scapy.contrib.erspan

ERSPAN - Encapsulated Remote SPAN

https://datatracker.ietf.org/doc/html/draft-foschiano-erspan-03

class scapy.contrib.erspan.ERSPAN(_pkt, /)[源代码]

基类:Packet

A generic ERSPAN packet

aliastypes
classmethod dispatch_hook(_pkt=None, *args, **kargs)[源代码]
fields_desc
class scapy.contrib.erspan.ERSPAN_I(_pkt, /)[源代码]

基类:ERSPAN

aliastypes
fields_desc
match_subclass = True
payload_guess

Possible sublayers: Ether

class scapy.contrib.erspan.ERSPAN_II(_pkt, /, *, ver=1, vlan=0, cos=0, en=0, t=0, session_id=0, reserved=0, index=0)[源代码]

基类:ERSPAN

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  VER  |          VLAN         | COS | EN|T|     SESSION ID    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|        RESERVED       |                 INDEX                 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                          Fig. ERSPAN_II                          
ERSPAN_II fields

ver

BitField (4 bits)

1

vlan

BitField (12 bits)

0

cos

BitField (3 bits)

0

en

BitField (2 bits)

0

t

BitField (1 bit)

0

session_id

BitField (10 bits)

0

reserved

BitField (12 bits)

0

index

BitField (20 bits)

0

match_subclass = True
payload_guess

Possible sublayers: Ether

class scapy.contrib.erspan.ERSPAN_III(_pkt, /, *, ver=2, vlan=0, cos=0, bso=0, t=0, session_id=0, timestamp=0, sgt_other=0, p=0, ft=0, hw=0, d=0, gra=0, o=0)[源代码]

基类:ERSPAN

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  VER  |          VLAN         | COS |BSO|T|     SESSION ID    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           TIMESTAMP                           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           SGT OTHER           |P|    FT   |     HW    |D|GRA|O|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                         Fig. ERSPAN_III                          
ERSPAN_III fields

ver

BitField (4 bits)

2

vlan

BitField (12 bits)

0

cos

BitField (3 bits)

0

bso

BitField (2 bits)

0

t

BitField (1 bit)

0

session_id

BitField (10 bits)

0

timestamp

XIntField

0

sgt_other

XShortField

0

p

BitField (1 bit)

0

ft

BitEnumField

0

hw

BitField (6 bits)

0

d

BitField (1 bit)

0

gra

BitEnumField

0

o

BitField (1 bit)

0

match_subclass = True
payload_guess

Possible sublayers: ERSPAN_PlatformSpecific, Ether

class scapy.contrib.erspan.ERSPAN_PlatformSpecific(_pkt, /, *, platf_id=0, info1=0, info2=0)[源代码]

基类: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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  PLATF ID |                       INFO1                       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             INFO2                             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                   Fig. ERSPAN_PlatformSpecific                   
ERSPAN_PlatformSpecific fields

platf_id

BitField (6 bits)

0

info1

BitField (26 bits)

0

info2

XIntField

0

payload_guess

Possible sublayers: Ether