scapy.contrib.ldp

Label Distribution Protocol (LDP)

http://git.savannah.gnu.org/cgit/ldpscapy.git/snapshot/ldpscapy-5285b81d6e628043df2a83301b292f24a95f0ba1.tar.gz

class scapy.contrib.ldp.AddressTLVField(name: str, default: I | None, fmt: str = 'H', remain: int = 0)[源代码]

基类:StrField

getfield(pkt, s)[源代码]
i2m(pkt, x)[源代码]
islist = 1
m2i(pkt, x)[源代码]
size(s)[源代码]

Get the size of this field

class scapy.contrib.ldp.CommonHelloTLVField(name: str, default: I | None, fmt: str = 'H', remain: int = 0)[源代码]

基类:StrField

getfield(pkt, s)[源代码]
i2m(pkt, x)[源代码]
islist = 1
m2i(pkt, x)[源代码]
class scapy.contrib.ldp.CommonSessionTLVField(name: str, default: I | None, fmt: str = 'H', remain: int = 0)[源代码]

基类:StrField

getfield(pkt, s)[源代码]
i2m(pkt, x)[源代码]
islist = 1
m2i(pkt, x)[源代码]
class scapy.contrib.ldp.FecTLVField(name: str, default: I | None, fmt: str = 'H', remain: int = 0)[源代码]

基类:StrField

getfield(pkt, s)[源代码]
i2m(pkt, x)[源代码]
islist = 1
m2i(pkt, x)[源代码]
size(s)[源代码]

Get the size of this field

class scapy.contrib.ldp.LDP(_pkt, /, *, version=1, len=None, id='127.0.0.1', space=0)[源代码]

基类:_LDP_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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            VERSION            |              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               ID                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             SPACE             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                             Fig. LDP                             
LDP fields

version

ShortField

1

len

ShortField

None

id

IPField

'127.0.0.1'

space

ShortField

0

post_build(p, pay)[源代码]
class scapy.contrib.ldp.LDPAddress(_pkt, /, *, u=0, type=768, len=None, id=0, address=None)[源代码]

基类:_LDP_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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|U|             TYPE            |              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               ID                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            ADDRESS            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                         Fig. LDPAddress                          
LDPAddress fields

u

BitField (1 bit)

0

type

XBitField (15 bits)

768

len

ShortField

None

id

IntField

0

address

AddressTLVField

None

class scapy.contrib.ldp.LDPAddressWM(_pkt, /, *, u=0, type=769, len=None, id=0, address=None)[源代码]

基类:_LDP_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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|U|             TYPE            |              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               ID                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            ADDRESS            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                        Fig. LDPAddressWM                         
LDPAddressWM fields

u

BitField (1 bit)

0

type

XBitField (15 bits)

769

len

ShortField

None

id

IntField

0

address

AddressTLVField

None

class scapy.contrib.ldp.LDPHello(_pkt, /, *, u=0, type=256, len=None, id=0, params=[180, 0, 0])[源代码]

基类:_LDP_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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|U|             TYPE            |              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               ID                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             PARAMS            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                          Fig. LDPHello                           
LDPHello fields

u

BitField (1 bit)

0

type

BitField (15 bits)

256

len

ShortField

None

id

IntField

0

params

CommonHelloTLVField

[180, 0, 0]

class scapy.contrib.ldp.LDPInit(_pkt, /, *, u=0, type=512, len=None, id=0, params=None)[源代码]

基类:_LDP_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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|U|             TYPE            |              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               ID                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             PARAMS            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                           Fig. LDPInit                           
LDPInit fields

u

BitField (1 bit)

0

type

XBitField (15 bits)

512

len

ShortField

None

id

IntField

0

params

CommonSessionTLVField

None

class scapy.contrib.ldp.LDPKeepAlive(_pkt, /, *, u=0, type=513, len=None, id=0)[源代码]

基类:_LDP_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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|U|             TYPE            |              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               ID                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                        Fig. LDPKeepAlive                         
LDPKeepAlive fields

u

BitField (1 bit)

0

type

XBitField (15 bits)

513

len

ShortField

None

id

IntField

0

class scapy.contrib.ldp.LDPLabelARM(_pkt, /, *, u=0, type=1028, len=None, id=0, fec=None, labelRMid=0)[源代码]

基类:_LDP_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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|U|             TYPE            |              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               ID                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              FEC              |           LABELRMID           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                         Fig. LDPLabelARM                         
LDPLabelARM fields

u

BitField (1 bit)

0

type

XBitField (15 bits)

1028

len

ShortField

None

id

IntField

0

fec

FecTLVField

None

labelRMid

IntField

0

class scapy.contrib.ldp.LDPLabelMM(_pkt, /, *, u=0, type=1024, len=None, id=0, fec=None, label=0)[源代码]

基类:_LDP_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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|U|             TYPE            |              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               ID                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              FEC              |             LABEL             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                         Fig. LDPLabelMM                          
LDPLabelMM fields

u

BitField (1 bit)

0

type

XBitField (15 bits)

1024

len

ShortField

None

id

IntField

0

fec

MayEnd

None

label

LabelTLVField

0

class scapy.contrib.ldp.LDPLabelRelM(_pkt, /, *, u=0, type=1027, len=None, id=0, fec=None, label=0)[源代码]

基类:_LDP_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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|U|             TYPE            |              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               ID                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              FEC              |             LABEL             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                        Fig. LDPLabelRelM                         
LDPLabelRelM fields

u

BitField (1 bit)

0

type

XBitField (15 bits)

1027

len

ShortField

None

id

IntField

0

fec

FecTLVField

None

label

LabelTLVField

0

class scapy.contrib.ldp.LDPLabelReqM(_pkt, /, *, u=0, type=1025, len=None, id=0, fec=None)[源代码]

基类:_LDP_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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|U|             TYPE            |              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               ID                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              FEC              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                        Fig. LDPLabelReqM                         
LDPLabelReqM fields

u

BitField (1 bit)

0

type

XBitField (15 bits)

1025

len

ShortField

None

id

IntField

0

fec

FecTLVField

None

class scapy.contrib.ldp.LDPLabelWM(_pkt, /, *, u=0, type=1026, len=None, id=0, fec=None, label=0)[源代码]

基类:_LDP_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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|U|             TYPE            |              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               ID                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              FEC              |             LABEL             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                         Fig. LDPLabelWM                          
LDPLabelWM fields

u

BitField (1 bit)

0

type

XBitField (15 bits)

1026

len

ShortField

None

id

IntField

0

fec

MayEnd

None

label

LabelTLVField

0

class scapy.contrib.ldp.LDPNotification(_pkt, /, *, u=0, type=1, len=None, id=0, status=(0, 0, 0, 0, 0))[源代码]

基类:_LDP_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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|U|             TYPE            |              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               ID                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             STATUS            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                       Fig. LDPNotification                       
LDPNotification fields

u

BitField (1 bit)

0

type

BitField (15 bits)

1

len

ShortField

None

id

IntField

0

status

StatusTLVField

(0, 0, 0, 0, 0)

class scapy.contrib.ldp.LabelTLVField(name: str, default: I | None, fmt: str = 'H', remain: int = 0)[源代码]

基类:StrField

getfield(pkt, s)[源代码]
i2m(pkt, x)[源代码]
m2i(pkt, x)[源代码]
size(s)[源代码]

Get the size of this field

class scapy.contrib.ldp.StatusTLVField(name: str, default: I | None, fmt: str = 'H', remain: int = 0)[源代码]

基类:StrField

getfield(pkt, s)[源代码]
i2m(pkt, x)[源代码]
islist = 1
m2i(pkt, x)[源代码]