scapy.contrib.geneve

Geneve: Generic Network Virtualization Encapsulation

draft-ietf-nvo3-geneve-16

class scapy.contrib.geneve.GENEVE(_pkt, /, *, version=0, optionlen=None, oam=0, critical=0, reserved=0, proto=0, vni=0, reserved2=0, options=[])[源代码]

基类:Packet

aliastypes
answers(other)[源代码]
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|VER| OPTIONLEN |O|C|  RESERVED |             PROTO             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                              VNI                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   RESERVED2   |            OPTIONS            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                           Fig. GENEVE                            
GENEVE fields

version

BitField (2 bits)

0

optionlen

BitField (6 bits)

None

oam

BitField (1 bit)

0

critical

BitField (1 bit)

0

reserved

BitField (6 bits)

0

proto

XShortEnumField

0

vni

X3BytesField

0

reserved2

XByteField

0

options

PacketListField

[]

mysummary()[源代码]
payload_guess

Possible sublayers: IP, IPv6, Ether

post_build(p, pay)[源代码]
class scapy.contrib.geneve.GeneveOptions(_pkt, /, *, classid=0, type=0, reserved=0, length=None, data=b'')[源代码]

基类:Packet

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            CLASSID            |      TYPE     |RESER|  LENGTH |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              DATA             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                        Fig. GeneveOptions                        
GeneveOptions fields

classid

XShortEnumField

0

type

XByteField

0

reserved

BitField (3 bits)

0

length

BitField (5 bits)

None

data

StrLenField

b''

post_build(p, pay)[源代码]