scapy.contrib.rsvp

RSVP layer

class scapy.contrib.rsvp.RSVP(_pkt, /, *, Version=1, Flags=1, Class=1, chksum=None, TTL=1, dataofs=0, Length=None)[source]

Bases: Packet

Common RSVP message header. The header is followed by this message’s objects, which chains to further RSVP_Object instances, forming the sequence of RSVP objects.

aliastypes = [<class 'scapy.contrib.rsvp.RSVP'>, <class 'scapy.packet.Packet'>]
fields_desc: ClassVar[List[Field[Any, Any] | _FieldContainer]] = [<BitField (RSVP).Version>, <BitField (RSVP).Flags>, <ByteEnumField (RSVP).Class>, <XShortField (RSVP).chksum>, <ByteField (RSVP).TTL>, <XByteField (RSVP).dataofs>, <ShortField (RSVP).Length>]
payload_guess: List[Tuple[Dict[str, Any], Type[Packet]]] = [({}, <class 'scapy.contrib.rsvp.RSVP_Object'>)]
post_build(p, pay)[source]

Append payload bytes to the header, and patch in Length/checksum if unset. Returns the fully packet message bytes.

class scapy.contrib.rsvp.RSVP_Data(_pkt, /, *, Data=b'')[source]

Bases: Packet

Defines a generic/unknown RSVP object data structure for any Class value that doesn’t have a dedicated class implemented yet.

aliastypes = [<class 'scapy.contrib.rsvp.RSVP_Data'>, <class 'scapy.packet.Packet'>]
default_payload_class(payload)[source]
fields_desc: ClassVar[List[Field[Any, Any] | _FieldContainer]] = [<StrLenField (RSVP_Data).Data>]
class scapy.contrib.rsvp.RSVP_HOP(_pkt, /, *, neighbor='0.0.0.0', inface=1)[source]

Bases: Packet

RSVP_HOP object data structure, RFC 2205 section A.2. Identifies the IP address and the Logical Interface Handle (LIH) of the interface this message was sent from.

aliastypes = [<class 'scapy.contrib.rsvp.RSVP_HOP'>, <class 'scapy.packet.Packet'>]
default_payload_class(payload)[source]
fields_desc: ClassVar[List[Field[Any, Any] | _FieldContainer]] = [<IPField (RSVP_HOP).neighbor>, <IntField (RSVP_HOP).inface>]
class scapy.contrib.rsvp.RSVP_LabelReq(_pkt, /, *, reserve=1, L3PID=1)[source]

Bases: Packet

LABEL_REQUEST object RFC 3209 section 4.2. Requests that a label be allocated for this LSP, and indicates which layer 3 protocol the label will carry.

aliastypes = [<class 'scapy.contrib.rsvp.RSVP_LabelReq'>, <class 'scapy.packet.Packet'>]
default_payload_class(payload)[source]
fields_desc: ClassVar[List[Field[Any, Any] | _FieldContainer]] = [<ShortField (RSVP_LabelReq).reserve>, <ShortField (RSVP_LabelReq).L3PID>]
class scapy.contrib.rsvp.RSVP_Object(_pkt, /, *, Length=4, Class=1, C_Type=1)[source]

Bases: Packet

Common RSVP object header. Followed by exactly one RSVP object data structure, Dissection naturally chains into the next object if more bytes remain.

aliastypes = [<class 'scapy.contrib.rsvp.RSVP_Object'>, <class 'scapy.packet.Packet'>]
fields_desc: ClassVar[List[Field[Any, Any] | _FieldContainer]] = [<ShortField (RSVP_Object).Length>, <ByteEnumField (RSVP_Object).Class>, <ByteField (RSVP_Object).C_Type>]
guess_payload_class(payload)[source]

Pick the data class to dissect based on Class. Falls back to a generic container.

class scapy.contrib.rsvp.RSVP_SESSION(_pkt, /, *, dest_addr='0.0.0.0', reserved=0, tunnel_id=0, ext_tunnel_id='0.0.0.0')[source]

Bases: Packet

SESSION LSP_TUNNEL_IPV4 object data structure, RFC 3209 section 4.6.1.1. Identifies the session for which this message is sent.

aliastypes = [<class 'scapy.contrib.rsvp.RSVP_SESSION'>, <class 'scapy.packet.Packet'>]
default_payload_class(payload)[source]
fields_desc: ClassVar[List[Field[Any, Any] | _FieldContainer]] = [<IPField (RSVP_SESSION).dest_addr>, <ShortField (RSVP_SESSION).reserved>, <ShortField (RSVP_SESSION).tunnel_id>, <IPField (RSVP_SESSION).ext_tunnel_id>]
class scapy.contrib.rsvp.RSVP_SenderTSPEC(_pkt, /, *, Msg_Format=0, reserve=0, Data_Length=4, Srv_hdr=1, reserve2=0, Srv_Length=4, Tokens=b'')[source]

Bases: Packet

SENDER_TSPEC object RFC 2210 section 3.1. Carries the sender’s traffic specification for the reservation.

aliastypes = [<class 'scapy.contrib.rsvp.RSVP_SenderTSPEC'>, <class 'scapy.packet.Packet'>]
default_payload_class(payload)[source]
fields_desc: ClassVar[List[Field[Any, Any] | _FieldContainer]] = [<ByteField (RSVP_SenderTSPEC).Msg_Format>, <ByteField (RSVP_SenderTSPEC).reserve>, <ShortField (RSVP_SenderTSPEC).Data_Length>, <ByteField (RSVP_SenderTSPEC).Srv_hdr>, <ByteField (RSVP_SenderTSPEC).reserve2>, <ShortField (RSVP_SenderTSPEC).Srv_Length>, <StrLenField (RSVP_SenderTSPEC).Tokens>]
class scapy.contrib.rsvp.RSVP_SessionAttrb(_pkt, /, *, Setup_priority=1, Hold_priority=1, flags=1, Name_length=None, Name=b'')[source]

Bases: Packet

SESSION_ATTRIBUTE object RFC 3209 section 4.7. Carries session data, mainly used for setup/recovery priority and human readable session name.

aliastypes = [<class 'scapy.contrib.rsvp.RSVP_SessionAttrb'>, <class 'scapy.packet.Packet'>]
default_payload_class(payload)[source]
fields_desc: ClassVar[List[Field[Any, Any] | _FieldContainer]] = [<ByteField (RSVP_SessionAttrb).Setup_priority>, <ByteField (RSVP_SessionAttrb).Hold_priority>, <ByteField (RSVP_SessionAttrb).flags>, <FieldLenField (RSVP_SessionAttrb).Name_length>, <StrLenField (RSVP_SessionAttrb).Name>]
class scapy.contrib.rsvp.RSVP_Time(_pkt, /, *, refresh=1)[source]

Bases: Packet

TIME_VALUES object RFC 2205 section A.4. Carries the refresh period a sender will use to resend PATH/RESV messages, which the receiver can use to determine when to tear down the reservation if no further messages are received.

aliastypes = [<class 'scapy.contrib.rsvp.RSVP_Time'>, <class 'scapy.packet.Packet'>]
default_payload_class(payload)[source]
fields_desc: ClassVar[List[Field[Any, Any] | _FieldContainer]] = [<IntField (RSVP_Time).refresh>]