scapy.contrib.nsh
- class scapy.contrib.nsh.NSH(*args, **kargs)
Bases:
scapy.packet.Packet
Network Service Header. NSH MD-type 1 if there is no ContextHeaders
- 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|O|U| TTL | LENGTH |UNUSED2| MDTYPE| NEXTPROTO | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | SPI | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | SI | CONTEXT HEADER | VLCH | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | +-+-+-+-+-+-+-+-+ Fig. NSH
NSH fields ver
BitField
(2 bits)0
oam
BitField
(1 bit)0
unused1
BitField
(1 bit)0
ttl
BitField
(6 bits)63
length
BitFieldLenField
(6 bits)None
unused2
BitField
(4 bits)0
mdtype
BitEnumField
(4 bits)1
nextproto
3
spi
0
si
255
context_header
XStrFixedLenField
(Cond)b''
vlch
PacketListField
(Cond)[]
- mysummary()
- class scapy.contrib.nsh.NSHTLV(*args, **kargs)
Bases:
scapy.packet.Packet
NSH MD-type 2 - Variable Length Context Headers
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | CLASS | TYPE |R| LENGTH | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | METADATA | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. NSHTLV
NSHTLV fields class
0
type
BitField
(8 bits)0
reserved
BitField
(1 bit)0
length
BitField
(7 bits)0
metadata
[]