scapy.contrib.bgp
BGP (Border Gateway Protocol).
- class scapy.contrib.bgp.ASPathSegmentPacketListField(name: str, default: Optional[List[BasePacket]], pkt_cls: Optional[Union[Callable[[bytes], Packet], Type[Packet]]] # noqa: E501 = None, count_from: Optional[Callable[[Packet], int]] = None, length_from: Optional[Callable[[Packet], int]] = None, next_cls_cb: Optional[Callable[[Packet, List[BasePacket], Optional[Packet], bytes], Type[Packet]]] # noqa: E501 = None)[source]
Bases:
scapy.fields.PacketListFieldPacketListField handling AS_PATH segments.
- class scapy.contrib.bgp.BGP(*args: Any, **kargs: Any)[source]
Bases:
scapy.packet.PacketEvery BGP message inherits from this class.
- KEEPALIVE_TYPE = 4
- NOTIFICATION_TYPE = 3
- OPEN_TYPE = 1
- ROUTEREFRESH_TYPE = 5
- UPDATE_TYPE = 2
- aliastypes
- class scapy.contrib.bgp.BGPAuthenticationInformation(*args: Any, **kargs: Any)[source]
Bases:
scapy.packet.PacketProvides an implementation of the Authentication Information optional parameter, which is now obsolete. References: RFC 1771, RFC 1654, RFC 4271
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |AUTHENTICATION | AUTHENTICATION DATA | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. BGPAuthenticationInformationBGPAuthenticationInformation fields authentication_code
0authentication_data
None
- class scapy.contrib.bgp.BGPCapFourBytesASN(*args: Any, **kargs: Any)[source]
Bases:
scapy.contrib.bgp.BGPCapabilityThis class provides an implementation of the 4-octet AS number capability. References: RFC 4893
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | CODE | LENGTH | ASN | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. BGPCapFourBytesASNBGPCapFourBytesASN fields code
65length
4asn
0
- match_subclass = True
- class scapy.contrib.bgp.BGPCapGeneric(*args: Any, **kargs: Any)[source]
Bases:
scapy.contrib.bgp.BGPCapabilityThis class provides an implementation of a generic capability.
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | CODE | LENGTH | CAP DATA | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. BGPCapGenericBGPCapGeneric fields code
0length
Nonecap_data
b''
- match_subclass = True
- class scapy.contrib.bgp.BGPCapGracefulRestart(*args: Any, **kargs: Any)[source]
Bases:
scapy.contrib.bgp.BGPCapabilityThis class provides an implementation of the Graceful Restart capability. References: RFC 4724
- class GRTuple(*args: Any, **kargs: Any)[source]
Bases:
scapy.packet.PacketTuple <AFI, SAFI, Flags for address family>
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | AFI | SAFI | FLAGS | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. GRTupleGRTuple fields afi
0safi
0flags
0
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | CODE | LENGTH |RESTART| RESTART TIME | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ENTRIES | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. BGPCapGracefulRestartBGPCapGracefulRestart fields code
64length
Nonerestart_flags
BitField(4 bits)0restart_time
BitField(12 bits)0entries
[]
- match_subclass = True
- class scapy.contrib.bgp.BGPCapMultiprotocol(*args: Any, **kargs: Any)[source]
Bases:
scapy.contrib.bgp.BGPCapabilityThis class provides an implementation of the Multiprotocol capability. References: RFC 4760
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | CODE | LENGTH | AFI | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | RESERVED | SAFI | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. BGPCapMultiprotocolBGPCapMultiprotocol fields code
1length
4afi
0reserved
0safi
0
- match_subclass = True
- class scapy.contrib.bgp.BGPCapORF(*args: Any, **kargs: Any)[source]
Bases:
scapy.contrib.bgp.BGPCapabilityThis class provides an implementation of the Outbound Route Filtering capability. References: RFC 5291
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | CODE | LENGTH | ORF | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. BGPCapORFBGPCapORF fields code
3length
Noneorf
[]
- match_subclass = True
- class scapy.contrib.bgp.BGPCapORFBlock(*args: Any, **kargs: Any)[source]
Bases:
scapy.packet.PacketThe “ORFBlock” is made of <AFI, rsvd, SAFI, Number of ORFs, and <ORF Type, Send/Receive> entries.
- class ORFTuple(*args: Any, **kargs: Any)[source]
Bases:
scapy.packet.PacketPacket handling <ORF Types, Send/Receive> tuples.
- aliastypes
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | AFI | RESERVED | SAFI | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ORF NUMBER | ENTRIES | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. BGPCapORFBlockBGPCapORFBlock fields afi
0reserved
0safi
0orf_number
Noneentries
[]
- class scapy.contrib.bgp.BGPCapORFBlockPacketListField(name: str, default: Optional[List[BasePacket]], pkt_cls: Optional[Union[Callable[[bytes], Packet], Type[Packet]]] # noqa: E501 = None, count_from: Optional[Callable[[Packet], int]] = None, length_from: Optional[Callable[[Packet], int]] = None, next_cls_cb: Optional[Callable[[Packet, List[BasePacket], Optional[Packet], bytes], Type[Packet]]] # noqa: E501 = None)[source]
Bases:
scapy.fields.PacketListFieldHandles lists of BGPCapORFBlocks.
- class scapy.contrib.bgp.BGPCapability(*args: Any, **kargs: Any)[source]
Bases:
scapy.packet.PacketGeneric BGP capability.
- aliastypes
- class scapy.contrib.bgp.BGPConf[source]
Bases:
scapy.config.ConfClassBGP module configuration.
- use_2_bytes_asn = True
- class scapy.contrib.bgp.BGPFieldIPv4(name: str, default: Any, fmt: str = 'H')[source]
Bases:
scapy.fields.FieldIPv4 Field (CIDR)
- class scapy.contrib.bgp.BGPFieldIPv6(name: str, default: Any, fmt: str = 'H')[source]
Bases:
scapy.fields.FieldIPv6 Field (CIDR)
- class scapy.contrib.bgp.BGPHeader(*args: Any, **kargs: Any)[source]
Bases:
scapy.packet.PacketThe header of any BGP message. References: RFC 4271
- aliastypes
- classmethod dispatch_hook(_pkt=None, *args, **kargs)[source]
Returns the right class for the given data.
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | MARKER | + + | | + + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | LEN | TYPE | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. BGPHeaderBGPHeader fields marker
XBitField(128 bits)340282366920938463463374607431768211455len
Nonetype
4
- payload_guess
Possible sublayers:
BGPKeepAlive,BGPNotification,BGPOpen,BGPRouteRefresh,BGPUpdate
- class scapy.contrib.bgp.BGPKeepAlive(*args: Any, **kargs: Any)[source]
Bases:
scapy.contrib.bgp.BGP,scapy.contrib.bgp.BGPHeaderKEEPALIVE message.
- aliastypes
- class scapy.contrib.bgp.BGPNLRIPacketListField(name: str, default: Optional[List[BasePacket]], pkt_cls: Optional[Union[Callable[[bytes], Packet], Type[Packet]]] # noqa: E501 = None, count_from: Optional[Callable[[Packet], int]] = None, length_from: Optional[Callable[[Packet], int]] = None, next_cls_cb: Optional[Callable[[Packet, List[BasePacket], Optional[Packet], bytes], Type[Packet]]] # noqa: E501 = None)[source]
Bases:
scapy.fields.PacketListFieldPacketListField handling NLRI fields.
- class scapy.contrib.bgp.BGPNLRI_IPv4(*args: Any, **kargs: Any)[source]
Bases:
scapy.packet.PacketPacket handling IPv4 NLRI fields.
- aliastypes
- class scapy.contrib.bgp.BGPNLRI_IPv6(*args: Any, **kargs: Any)[source]
Bases:
scapy.packet.PacketPacket handling IPv6 NLRI fields.
- aliastypes
- class scapy.contrib.bgp.BGPNotification(*args: Any, **kargs: Any)[source]
Bases:
scapy.contrib.bgp.BGPNOTIFICATION messages end a BGP session. References: RFC 4271
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ERROR CODE | ERROR SUBCODE | DATA | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. BGPNotificationBGPNotification fields error_code
0error_subcode
MultiEnumField(Depends on 0)0data
None
- class scapy.contrib.bgp.BGPORF(*args: Any, **kargs: Any)[source]
Bases:
scapy.packet.PacketProvides an implementation of ORFs carried in the RR message. References: RFC 5291
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |WHEN TO REFRESH| ORF TYPE | ORF LEN | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ENTRIES | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. BGPORFBGPORF fields when_to_refresh
0orf_type
0orf_len
Noneentries
[]
- class scapy.contrib.bgp.BGPORFAddressPrefix(*args: Any, **kargs: Any)[source]
Bases:
scapy.contrib.bgp.BGPORFEntryProvides an implementation of the Address Prefix ORF (RFC 5292).
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |ACT|M| RESERVED| SEQUENCE | +-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | MIN LEN | MAX LEN | PREFIX | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | +-+-+-+-+-+-+-+-+ Fig. BGPORFAddressPrefixBGPORFAddressPrefix fields action
0match
0reserved
BitField(5 bits)0sequence
0min_len
0max_len
0prefix
_ORFNLRIPacketFieldb''
- class scapy.contrib.bgp.BGPORFCoveringPrefix(*args: Any, **kargs: Any)[source]
Bases:
scapy.contrib.bgp.BGPORFEntryProvides an implementation of the CP-ORF (RFC 7543).
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |ACT|M| RESERVED| SEQUENCE | +-+-+-+-+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | MIN LEN | MAX LEN | RT | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | | + +-+-+-+-+-+-+-+-+ | | IMPORT RT | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + | | + +-+-+-+-+-+-+-+-+ | | ROUTE TYPE | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | HOST ADDR | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. BGPORFCoveringPrefixBGPORFCoveringPrefix fields action
0match
0reserved
BitField(5 bits)0sequence
0min_len
0max_len
0rt
0import_rt
0route_type
0host_addr
None
- class scapy.contrib.bgp.BGPORFEntry(*args: Any, **kargs: Any)[source]
Bases:
scapy.packet.PacketProvides an implementation of an ORF entry. References: RFC 5291
- afi
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |ACT|M| RESERVED| VALUE | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. BGPORFEntryBGPORFEntry fields action
0match
0reserved
BitField(5 bits)0value
b''
- safi
- class scapy.contrib.bgp.BGPORFEntryPacketListField(name: str, default: Optional[List[BasePacket]], pkt_cls: Optional[Union[Callable[[bytes], Packet], Type[Packet]]] # noqa: E501 = None, count_from: Optional[Callable[[Packet], int]] = None, length_from: Optional[Callable[[Packet], int]] = None, next_cls_cb: Optional[Callable[[Packet, List[BasePacket], Optional[Packet], bytes], Type[Packet]]] # noqa: E501 = None)[source]
Bases:
scapy.fields.PacketListFieldPacketListField handling the ORF entries.
- class scapy.contrib.bgp.BGPOpen(*args: Any, **kargs: Any)[source]
Bases:
scapy.contrib.bgp.BGPOPEN messages are exchanged in order to open a new BGP session. References: RFC 4271
- 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 | MY AS | HOLD TIME | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | BGP ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | OPT PARAM LEN | OPT PARAMS | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. BGPOpenBGPOpen fields version
4my_as
0hold_time
0bgp_id
'0.0.0.0'opt_param_len
Noneopt_params
[]
- class scapy.contrib.bgp.BGPOptParam(*args: Any, **kargs: Any)[source]
Bases:
scapy.packet.PacketProvides an implementation the OPEN message optional parameters. References: RFC 4271
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | PARAM TYPE | PARAM LENGTH | PARAM VALUE | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | AUTHENTICATION DATA | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. BGPOptParamBGPOptParam fields param_type
2param_length
Noneparam_value
PacketField(Cond)Noneauthentication_data
PacketField(Cond)None
- class scapy.contrib.bgp.BGPOptParamPacketListField(name: str, default: Optional[List[BasePacket]], pkt_cls: Optional[Union[Callable[[bytes], Packet], Type[Packet]]] # noqa: E501 = None, count_from: Optional[Callable[[Packet], int]] = None, length_from: Optional[Callable[[Packet], int]] = None, next_cls_cb: Optional[Callable[[Packet, List[BasePacket], Optional[Packet], bytes], Type[Packet]]] # noqa: E501 = None)[source]
Bases:
scapy.fields.PacketListFieldPacketListField handling the optional parameters (OPEN message).
- class scapy.contrib.bgp.BGPPAAS4Aggregator(*args: Any, **kargs: Any)[source]
Bases:
scapy.packet.PacketProvides an implementation of the AS4_AGGREGATOR attribute “value part”. References: RFC 4893
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | AGGREGATOR ASN | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | SPEAKER ADDRESS | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. BGPPAAS4AggregatorBGPPAAS4Aggregator fields aggregator_asn
0speaker_address
'0.0.0.0'
- class scapy.contrib.bgp.BGPPAAS4BytesPath(*args: Any, **kargs: Any)[source]
Bases:
scapy.packet.PacketPacket handling the AS_PATH attribute value (4 bytes ASNs, for new speakers -> ASNs are encoded as IntFields). References: RFC 4893
- class ASPathSegment(*args: Any, **kargs: Any)[source]
Bases:
scapy.packet.PacketProvides an implementation for AS_PATH segments with 4 bytes ASNs.
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | SEGMENT TYPE | SEGMENT LENGTH| SEGMENT VALUE | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. ASPathSegmentASPathSegment fields segment_type
2segment_length
Nonesegment_value
[]
- aliastypes
- class scapy.contrib.bgp.BGPPAAS4Path(*args: Any, **kargs: Any)[source]
Bases:
scapy.packet.PacketProvides an implementation of the AS4_PATH attribute “value part”. References: RFC 4893
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | SEGMENT TYPE | SEGMENT LENGTH| SEGMENT VALUE | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. BGPPAAS4PathBGPPAAS4Path fields segment_type
2segment_length
Nonesegment_value
[]
- class scapy.contrib.bgp.BGPPAASPath(*args: Any, **kargs: Any)[source]
Bases:
scapy.packet.PacketPacket handling the AS_PATH attribute value (2 bytes ASNs, for old speakers). References: RFC 4271, RFC 5065
- class ASPathSegment(*args: Any, **kargs: Any)[source]
Bases:
scapy.packet.PacketProvides an implementation for AS_PATH segments with 2 bytes ASNs.
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | SEGMENT TYPE | SEGMENT LENGTH| SEGMENT VALUE | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. ASPathSegmentASPathSegment fields segment_type
2segment_length
Nonesegment_value
[]
- AS_TRANS = 23456
- aliastypes
- class scapy.contrib.bgp.BGPPAAggregator(*args: Any, **kargs: Any)[source]
Bases:
scapy.packet.PacketPacket handling the AGGREGATOR attribute value. References: RFC 4271
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | AGGREGATOR ASN | SPEAKER ADDRESS | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. BGPPAAggregatorBGPPAAggregator fields aggregator_asn
0speaker_address
'0.0.0.0'
- class scapy.contrib.bgp.BGPPAAtomicAggregate(*args: Any, **kargs: Any)[source]
Bases:
scapy.packet.PacketPacket handling the ATOMIC_AGGREGATE attribute value. References: RFC 4271
- aliastypes
- class scapy.contrib.bgp.BGPPAClusterList(*args: Any, **kargs: Any)[source]
Bases:
scapy.packet.PacketPacket handling the CLUSTER_LIST attribute value. References: RFC 4456
- aliastypes
- class scapy.contrib.bgp.BGPPACommunity(*args: Any, **kargs: Any)[source]
Bases:
scapy.packet.PacketPacket handling the COMMUNITIES attribute value. References: RFC 1997
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | COMMUNITY | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. BGPPACommunityBGPPACommunity fields community
0
- class scapy.contrib.bgp.BGPPAExtCommFourOctetASSpecific(*args: Any, **kargs: Any)[source]
Bases:
scapy.packet.PacketPacket handling the Four-Octet AS Specific Extended Community attribute value. References: RFC 5668
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | GLOBAL ADMINISTRATOR | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | LOCAL ADMINISTRATOR | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. BGPPAExtCommFourOctetASSpecificBGPPAExtCommFourOctetASSpecific fields global_administrator
0local_administrator
0
- class scapy.contrib.bgp.BGPPAExtCommIPv4AddressSpecific(*args: Any, **kargs: Any)[source]
Bases:
scapy.packet.PacketPacket handling the IPv4 Address Specific Extended Community attribute value. References: RFC 4360
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | GLOBAL ADMINISTRATOR | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | LOCAL ADMINISTRATOR | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. BGPPAExtCommIPv4AddressSpecificBGPPAExtCommIPv4AddressSpecific fields global_administrator
0local_administrator
0
- class scapy.contrib.bgp.BGPPAExtCommOpaque(*args: Any, **kargs: Any)[source]
Bases:
scapy.packet.PacketPacket handling the Opaque Extended Community attribute value. References: RFC 4360
- aliastypes
- class scapy.contrib.bgp.BGPPAExtCommRedirectAS2Byte(*args: Any, **kargs: Any)[source]
Bases:
scapy.packet.PacketPacket handling the (FlowSpec) “redirect AS-2byte” extended community (RFC 7674). References: RFC 7674
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ASN | VALUE | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. BGPPAExtCommRedirectAS2ByteBGPPAExtCommRedirectAS2Byte fields asn
0value
0
- class scapy.contrib.bgp.BGPPAExtCommRedirectAS4Byte(*args: Any, **kargs: Any)[source]
Bases:
scapy.packet.PacketPacket handling the (FlowSpec) “redirect AS-4byte” extended community. (RFC 7674). References: RFC 7674
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ASN | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | VALUE | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. BGPPAExtCommRedirectAS4ByteBGPPAExtCommRedirectAS4Byte fields asn
0value
0
- class scapy.contrib.bgp.BGPPAExtCommRedirectIPv4(*args: Any, **kargs: Any)[source]
Bases:
scapy.packet.PacketPacket handling the (FlowSpec) “redirect IPv4” extended community. (RFC 7674). References: RFC 7674
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | IP ADDR | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | VALUE | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. BGPPAExtCommRedirectIPv4BGPPAExtCommRedirectIPv4 fields ip_addr
0value
0
- class scapy.contrib.bgp.BGPPAExtCommTrafficAction(*args: Any, **kargs: Any)[source]
Bases:
scapy.packet.PacketPacket handling the (FlowSpec) “traffic-action” extended community. References: RFC 5575
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | RESERVED | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | |S|T| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. BGPPAExtCommTrafficActionBGPPAExtCommTrafficAction fields reserved
BitField(46 bits)0sample
BitField(1 bit)0terminal_action
BitField(1 bit)0
- class scapy.contrib.bgp.BGPPAExtCommTrafficMarking(*args: Any, **kargs: Any)[source]
Bases:
scapy.packet.PacketPacket handling the (FlowSpec) “traffic-marking” extended community. References: RFC 5575
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | DSCP | + +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. BGPPAExtCommTrafficMarkingBGPPAExtCommTrafficMarking fields dscp
48
- class scapy.contrib.bgp.BGPPAExtCommTrafficRate(*args: Any, **kargs: Any)[source]
Bases:
scapy.packet.PacketPacket handling the (FlowSpec) “traffic-rate” extended community. References: RFC 5575
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ID | RATE | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. BGPPAExtCommTrafficRateBGPPAExtCommTrafficRate fields id
0rate
0
- class scapy.contrib.bgp.BGPPAExtCommTwoOctetASSpecific(*args: Any, **kargs: Any)[source]
Bases:
scapy.packet.PacketPacket handling the Two-Octet AS Specific Extended Community attribute value. References: RFC 4360
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | GLOBAL ADMINISTRATOR | LOCAL ADMINISTRATOR | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. BGPPAExtCommTwoOctetASSpecificBGPPAExtCommTwoOctetASSpecific fields global_administrator
0local_administrator
0
- class scapy.contrib.bgp.BGPPAExtComms(*args: Any, **kargs: Any)[source]
Bases:
scapy.packet.PacketPacket handling the multiple extended communities.
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | EXTENDED COMMUNITIES | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. BGPPAExtCommsBGPPAExtComms fields extended_communities
_ExtCommsPacketListField[]
- class scapy.contrib.bgp.BGPPAExtCommunity(*args: Any, **kargs: Any)[source]
Bases:
scapy.packet.PacketProvides an implementation of the Extended Communities attribute. References: RFC 4360
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | TYPE HIGH | TYPE LOW | VALUE | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. BGPPAExtCommunityBGPPAExtCommunity fields type_high
0type_low
_TypeLowFieldNonevalue
_ExtCommValuePacketFieldNone
- class scapy.contrib.bgp.BGPPAIPv6AddressSpecificExtComm(*args: Any, **kargs: Any)[source]
Bases:
scapy.packet.PacketProvides an implementation of the IPv6 Address Specific Extended Community attribute. This attribute is not defined using the existing BGP Extended Community attribute (see the RFC 5701 excerpt below). References: RFC 5701
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | GLOBAL ADMINISTRATOR | + + | | + + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | LOCAL ADMINISTRATOR | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. BGPPAIPv6AddressSpecificExtCommBGPPAIPv6AddressSpecificExtComm fields global_administrator
'::'local_administrator
0
- class scapy.contrib.bgp.BGPPALocalPref(*args: Any, **kargs: Any)[source]
Bases:
scapy.packet.PacketPacket handling the LOCAL_PREF attribute value. References: RFC 4271
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | LOCAL PREF | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. BGPPALocalPrefBGPPALocalPref fields local_pref
0
- class scapy.contrib.bgp.BGPPAMPReachNLRI(*args: Any, **kargs: Any)[source]
Bases:
scapy.packet.PacketPacket handling the MP_REACH_NLRI attribute value, for non IPv6 AFI. References: RFC 4760
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | AFI | SAFI | NH ADDR LEN | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | NH V4 ADDR | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | NH V6 ADDR | + + | | + + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | NH V6 GLOBAL | + + | | + + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | NH V6 LINK LOCAL | + + | | + + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | RESERVED | NLRI | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. BGPPAMPReachNLRIBGPPAMPReachNLRI fields afi
0safi
0nh_addr_len
0nh_v4_addr
IPField(Cond)'0.0.0.0'nh_v6_addr
IP6Field(Cond)'::'nh_v6_global
IP6Field(Cond)'::'nh_v6_link_local
IP6Field(Cond)'::'reserved
0nlri
[]
- class scapy.contrib.bgp.BGPPAMPUnreachNLRI(*args: Any, **kargs: Any)[source]
Bases:
scapy.packet.PacketPacket handling the MP_UNREACH_NLRI attribute value, for non IPv6 AFI. References: RFC 4760
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | AFI | SAFI |AFI SAFI SPECIF| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | +-+-+-+-+-+-+-+-+ Fig. BGPPAMPUnreachNLRIBGPPAMPUnreachNLRI fields afi
0safi
0afi_safi_specific
None
- class scapy.contrib.bgp.BGPPAMPUnreachNLRI_IPv6(*args: Any, **kargs: Any)[source]
Bases:
scapy.packet.PacketPacket handling the MP_UNREACH_NLRI attribute value, for IPv6 AFI.
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | WITHDRAWN ROUTES | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. BGPPAMPUnreachNLRI_IPv6BGPPAMPUnreachNLRI_IPv6 fields withdrawn_routes
[]
- class scapy.contrib.bgp.BGPPAMultiExitDisc(*args: Any, **kargs: Any)[source]
Bases:
scapy.packet.PacketPacket handling the MULTI_EXIT_DISC attribute value. References: RFC 4271
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | MED | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. BGPPAMultiExitDiscBGPPAMultiExitDisc fields med
0
- class scapy.contrib.bgp.BGPPANextHop(*args: Any, **kargs: Any)[source]
Bases:
scapy.packet.PacketPacket handling the NEXT_HOP attribute value. References: RFC 4271
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | NEXT HOP | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. BGPPANextHopBGPPANextHop fields next_hop
'0.0.0.0'
- class scapy.contrib.bgp.BGPPAOrigin(*args: Any, **kargs: Any)[source]
Bases:
scapy.packet.PacketPacket handling the ORIGIN attribute value. References: RFC 4271
- aliastypes
- class scapy.contrib.bgp.BGPPAOriginatorID(*args: Any, **kargs: Any)[source]
Bases:
scapy.packet.PacketPacket handling the ORIGINATOR_ID attribute value. References: RFC 4456
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ORIGINATOR ID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. BGPPAOriginatorIDBGPPAOriginatorID fields originator_id
'0.0.0.0'
- class scapy.contrib.bgp.BGPPathAttr(*args: Any, **kargs: Any)[source]
Bases:
scapy.packet.PacketProvides an implementation of the path attributes. References: RFC 4271
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | TYPE FLAGS | TYPE CODE | ATTR EXT LEN | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ATTR LEN | ATTRIBUTE | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. BGPPathAttrBGPPathAttr fields type_flags
<Flag 128 (Optional)>type_code
0attr_ext_len
ShortField(Cond)Noneattr_len
ByteField(Cond)Noneattribute
_PathAttrPacketFieldNone
- class scapy.contrib.bgp.BGPPathAttrPacketListField(name: str, default: Optional[List[BasePacket]], pkt_cls: Optional[Union[Callable[[bytes], Packet], Type[Packet]]] # noqa: E501 = None, count_from: Optional[Callable[[Packet], int]] = None, length_from: Optional[Callable[[Packet], int]] = None, next_cls_cb: Optional[Callable[[Packet, List[BasePacket], Optional[Packet], bytes], Type[Packet]]] # noqa: E501 = None)[source]
Bases:
scapy.fields.PacketListFieldPacketListField handling the path attributes (UPDATE message).
- class scapy.contrib.bgp.BGPRouteRefresh(*args: Any, **kargs: Any)[source]
Bases:
scapy.contrib.bgp.BGPProvides an implementation of the ROUTE-REFRESH message. References: RFC 2918, RFC 7313
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | AFI | SUBTYPE | SAFI | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ORF DATA | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. BGPRouteRefreshBGPRouteRefresh fields afi
1subtype
0safi
1orf_data
b''
- class scapy.contrib.bgp.BGPUpdate(*args: Any, **kargs: Any)[source]
Bases:
scapy.contrib.bgp.BGPUPDATE messages allow peers to exchange routes. References: RFC 4271
- 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | WITHDRAWN ROUTES LEN | WITHDRAWN ROUTES | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | PATH ATTR LEN | PATH ATTR | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | NLRI | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Fig. BGPUpdateBGPUpdate fields withdrawn_routes_len
Nonewithdrawn_routes
[]path_attr_len
Nonepath_attr
[]nlri
[]
- class scapy.contrib.bgp.MPReachNLRIPacketListField(name: str, default: Optional[List[BasePacket]], pkt_cls: Optional[Union[Callable[[bytes], Packet], Type[Packet]]] # noqa: E501 = None, count_from: Optional[Callable[[Packet], int]] = None, length_from: Optional[Callable[[Packet], int]] = None, next_cls_cb: Optional[Callable[[Packet, List[BasePacket], Optional[Packet], bytes], Type[Packet]]] # noqa: E501 = None)[source]
Bases:
scapy.fields.PacketListFieldPacketListField handling the AFI specific part (except for the length of Next Hop Network Address field, which is not AFI specific) of the MP_REACH_NLRI attribute.
- class scapy.contrib.bgp.MPUnreachNLRIPacketField(name: str, default: Optional[K], pkt_cls: Union[Callable[[bytes], Packet], Type[Packet]] # noqa: E501)[source]
Bases:
scapy.fields.PacketFieldPacketField handling the AFI specific part of the MP_UNREACH_NLRI attribute.