Python Scapy / operator, | pipes in types

With scapy we can:

p = Ether() / IP()

What operation does // really do? Which object is returning? If I find p in the python interpreter, it returns this

<Ether  ... | IP ...>

What does '|' mean in this case?

I tried to change the dst IP field after creating p without completely recreating the object, but I was not able to do this because I do not know which object I am facing.

Thanks.

+4
source share
1 answer

The div statement is /used in Scapy for stack levels :

/ . .

| - , .

+2

Source: https://habr.com/ru/post/1624616/


All Articles