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: Optional[scapy.fields.I], fmt: str = 'H', remain: int = 0)[source]

Bases: scapy.fields.StrField

getfield(pkt, s)[source]
i2m(pkt, x)[source]
islist = 1
m2i(pkt, x)[source]
size(s)[source]

Get the size of this field

class scapy.contrib.ldp.CommonHelloTLVField(name: str, default: Optional[scapy.fields.I], fmt: str = 'H', remain: int = 0)[source]

Bases: scapy.fields.StrField

getfield(pkt, s)[source]
i2m(pkt, x)[source]
islist = 1
m2i(pkt, x)[source]
class scapy.contrib.ldp.CommonSessionTLVField(name: str, default: Optional[scapy.fields.I], fmt: str = 'H', remain: int = 0)[source]

Bases: scapy.fields.StrField

getfield(pkt, s)[source]
i2m(pkt, x)[source]
islist = 1
m2i(pkt, x)[source]
class scapy.contrib.ldp.FecTLVField(name: str, default: Optional[scapy.fields.I], fmt: str = 'H', remain: int = 0)[source]

Bases: scapy.fields.StrField

getfield(pkt, s)[source]
i2m(pkt, x)[source]
islist = 1
m2i(pkt, x)[source]
size(s)[source]

Get the size of this field

class scapy.contrib.ldp.LDP(*args: Any, **kargs: Any)[source]

Bases: scapy.contrib.ldp._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)[source]
class scapy.contrib.ldp.LDPAddress(*args: Any, **kargs: Any)[source]

Bases: scapy.contrib.ldp._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(*args: Any, **kargs: Any)[source]

Bases: scapy.contrib.ldp._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(*args: Any, **kargs: Any)[source]

Bases: scapy.contrib.ldp._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(*args: Any, **kargs: Any)[source]

Bases: scapy.contrib.ldp._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(*args: Any, **kargs: Any)[source]

Bases: scapy.contrib.ldp._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(*args: Any, **kargs: Any)[source]

Bases: scapy.contrib.ldp._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(*args: Any, **kargs: Any)[source]

Bases: scapy.contrib.ldp._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

FecTLVField

None

label

LabelTLVField

0

class scapy.contrib.ldp.LDPLabelRelM(*args: Any, **kargs: Any)[source]

Bases: scapy.contrib.ldp._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(*args: Any, **kargs: Any)[source]

Bases: scapy.contrib.ldp._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(*args: Any, **kargs: Any)[source]

Bases: scapy.contrib.ldp._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

FecTLVField

None

label

LabelTLVField

0

class scapy.contrib.ldp.LDPNotification(*args: Any, **kargs: Any)[source]

Bases: scapy.contrib.ldp._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: Optional[scapy.fields.I], fmt: str = 'H', remain: int = 0)[source]

Bases: scapy.fields.StrField

getfield(pkt, s)[source]
i2m(pkt, x)[source]
m2i(pkt, x)[source]
size(s)[source]

Get the size of this field

class scapy.contrib.ldp.StatusTLVField(name: str, default: Optional[scapy.fields.I], fmt: str = 'H', remain: int = 0)[source]

Bases: scapy.fields.StrField

getfield(pkt, s)[source]
i2m(pkt, x)[source]
islist = 1
m2i(pkt, x)[source]