scapy.contrib.nsh

class scapy.contrib.nsh.NSH

Bases: scapy.packet.Packet

网络服务头. 如果没有ContextHeaders,则为NSH MD类型1

aliastypes
fields_desc
NSH字段

ver

BitField (2位)

0

oam

BitField (1位)

0

unused1

BitField (1位)

0

ttl

BitField (6位)

63

length

BitFieldLenField (6位)

None

unused2

BitField (4位)

0

mdtype

BitEnumField (4位)

1

nextproto

ByteEnumField

3

spi

X3BytesField

0

si

ByteField

255

context_header

XStrFixedLenField (Cond)

b''

vlch

PacketListField (Cond)

[]

mysummary()
payload_guess

可能的子层: MPLSNSHIPIPv6Ether

class scapy.contrib.nsh.NSHTLV

Bases: scapy.packet.Packet

NSH MD类型2-可变长度上下文标头

aliastypes
fields_desc
NSHTLV字段

class

ShortField

0

type

BitField (8位)

0

reserved

BitField (1位)

0

length

BitField (7位)

0

metadata

PacketListField

[]