scapy.contrib.nsh

class scapy.contrib.nsh.NSH

Bases: scapy.packet.Packet

Network Service Header. NSH MD-type 1 if there is no ContextHeaders

aliastypes
fields_desc
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

ByteEnumField

3

spi

X3BytesField

0

si

ByteField

255

context_header

XStrFixedLenField (Cond)

b''

vlch

PacketListField (Cond)

[]

mysummary()
payload_guess

Possible sublayers: MPLS, NSH, IP, IPv6, Ether

class scapy.contrib.nsh.NSHTLV

Bases: scapy.packet.Packet

NSH MD-type 2 - Variable Length Context Headers

aliastypes
fields_desc
NSHTLV fields

class

ShortField

0

type

BitField (8 bits)

0

reserved

BitField (1 bit)

0

length

BitField (7 bits)

0

metadata

PacketListField

[]