scapy.contrib.rtr

class scapy.contrib.rtr.RTR

Bases: scapy.packet.Packet

虚拟RPKI到路由器通用数据包,用于对数据包类型进行预排序,例如. https://tools.ietf.org/html/rfc6810#section-5.2

aliastypes
classmethod dispatch_hook(_pkt=None, *args, **kargs)

正确类型的归属取决于版本和pdu_type

class scapy.contrib.rtr.RTRCacheReset

Bases: scapy.packet.Packet

来自第5.9节的缓存重置数据包https://tools.ietf.org/html/rfc6810#section-5.9

aliastypes
fields_desc
RTRCacheReset字段

rtr_version

ByteEnumField

0

pdu_type

ByteEnumField

8

reserved

ShortField

0

length

IntField

8

class scapy.contrib.rtr.RTRCacheResponse

Bases: scapy.packet.Packet

5.5节的缓存响应数据包https://tools.ietf.org/html/rfc6810#section-5.5

aliastypes
fields_desc
RTRCacheResponse字段

rtr_version

ByteEnumField

0

pdu_type

ByteEnumField

3

session_id

ShortField

0

length

IntField

8

guess_payload_class(payload)
class scapy.contrib.rtr.RTREndofDatav0

Bases: scapy.packet.Packet

版本0标准第5.8节的数据包结尾https://tools.ietf.org/html/rfc6810#section-5.8

aliastypes
fields_desc
RTREndofDatav0字段

rtr_version

ByteEnumField

0

pdu_type

ByteEnumField

7

session_id

ShortField

0

length

IntField

12

serial_number

IntField

0

class scapy.contrib.rtr.RTREndofDatav1

Bases: scapy.packet.Packet

版本1标准第5.8节的数据包结尾https://tools.ietf.org/html/rfc8210#section-5.8

aliastypes
fields_desc
RTREndofDatav1字段

rtr_version

ByteEnumField

1

pdu_type

ByteEnumField

7

session_id

ShortField

0

length

IntField

24

serial_number

IntField

0

refresh_interval

IntField

0

retry_interval

IntField

0

expire_interval

IntField

0

class scapy.contrib.rtr.RTRErrorReport

Bases: scapy.packet.Packet

来自5.10节的错误报告数据包https://tools.ietf.org/html/rfc6810#section-5.10

aliastypes
fields_desc
RTRErrorReport字段

rtr_version

ByteEnumField

0

pdu_type

ByteEnumField

10

error_code

ShortEnumField

0

length

IntField

None

length_of_encaps_PDU

FieldLenField

None

erroneous_PDU

StrLenField

b''

length_of_error_text

FieldLenField

None

error_text

StrLenField

b''

post_build(pkt, pay)
class scapy.contrib.rtr.RTRIPv4Prefix

Bases: scapy.packet.Packet

来自第5.6节的IPv4前缀数据包https://tools.ietf.org/html/rfc6810#section-5.6

aliastypes
fields_desc
RTRIPv4Prefix字段

rtr_version

ByteEnumField

0

pdu_type

ByteEnumField

4

reserved

ShortField

0

length

IntField

20

flags

ByteField

0

shortest_length

ByteField

0

longest_length

ByteField

0

zeros

ByteField

0

prefix

IPField

'0.0.0.0'

asn

IntField

0

guess_payload_class(payload)
class scapy.contrib.rtr.RTRIPv6Prefix

Bases: scapy.packet.Packet

来自第5.7节的IPv6前缀数据包https://tools.ietf.org/html/rfc6810#section-5.7

aliastypes
fields_desc
RTRIPv6Prefix字段

rtr_version

ByteEnumField

0

pdu_type

ByteEnumField

6

reserved

ShortField

0

length

IntField

32

flags

ByteField

0

shortest_length

ByteField

0

longest_length

ByteField

0

zeros

ByteField

0

prefix

IP6Field

'::'

asn

IntField

0

guess_payload_class(payload)
class scapy.contrib.rtr.RTRResetQuery

Bases: scapy.packet.Packet

重置5.4节中的查询数据包https://tools.ietf.org/html/rfc6810#section-5.4

aliastypes
fields_desc
RTRResetQuery字段

rtr_version

ByteEnumField

0

pdu_type

ByteEnumField

2

reserved

ShortField

0

length

IntField

8

class scapy.contrib.rtr.RTRRouterKey

Bases: scapy.packet.Packet

版本1标准第5.10节中的路由器密钥包https://tools.ietf.org/html/rfc8210#section-5.10

aliastypes
fields_desc
RTRRouterKey字段

rtr_version

ByteEnumField

1

pdu_type

ByteEnumField

9

flags

ByteField

0

zeros

ByteField

0

length

IntField

None

subject_key_identifier

StrFixedLenField

b''

asn

IntField

0

subject_PKI

StrLenField

b''

post_build(pkt, pay)
class scapy.contrib.rtr.RTRSerialNotify

Bases: scapy.packet.Packet

来自第5.2节的串行通知包https://tools.ietf.org/html/rfc6810#section-5.2

aliastypes
fields_desc
RTRSerialNotify字段

rtr_version

ByteEnumField

0

pdu_type

ByteEnumField

0

session_id

ShortField

0

length

IntField

12

serial_number

IntField

0

class scapy.contrib.rtr.RTRSerialQuery

Bases: scapy.packet.Packet

来自第5.3节的串行查询数据包https://tools.ietf.org/html/rfc6810#section-5.3

aliastypes
fields_desc
RTRSerialQuery字段

rtr_version

ByteEnumField

0

pdu_type

ByteEnumField

1

session_id

ShortField

0

length

IntField

12

serial_number

IntField

0