scapy.contrib.nsh module

class scapy.contrib.nsh.Metadata

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.contrib.nsh.Metadata'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (Metadata).value>]
class scapy.contrib.nsh.NSH

Bases: scapy.packet.Packet

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

aliastypes = [<class 'scapy.contrib.nsh.NSH'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (NSH).Ver>, <Field (NSH).OAM>, <Field (NSH).Critical>, <Field (NSH).Reserved>, <Field (NSH).Len>, <Field (NSH).MDType>, <Field (NSH).NextProto>, <Field (NSH).NSP>, <Field (NSH).NSI>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>, <scapy.fields.ConditionalField object>]
mysummary()

DEV: can be overloaded to return a string that summarizes the layer. Only one mysummary() is used in a whole packet summary: the one of the upper layer, # noqa: E501 except if a mysummary() also returns (as a couple) a list of layers whose # noqa: E501 mysummary() must be called if they are present.

payload_guess = [({'NextProto': 1}, <class 'scapy.layers.inet.IP'>), ({'NextProto': 2}, <class 'scapy.layers.inet6.IPv6'>), ({'NextProto': 3}, <class 'scapy.layers.l2.Ether'>), ({'NextProto': 4}, <class 'scapy.contrib.nsh.NSH'>), ({'NextProto': 5}, <class 'scapy.contrib.mpls.MPLS'>)]
class scapy.contrib.nsh.NSHTLV

Bases: scapy.packet.Packet

NSH MD-type 2 - Variable Length Context Headers

aliastypes = [<class 'scapy.contrib.nsh.NSHTLV'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (NSHTLV).Class>, <Field (NSHTLV).Critical>, <Field (NSHTLV).Type>, <Field (NSHTLV).Reserved>, <Field (NSHTLV).Len>, <Field (NSHTLV).Metadata>]