Skip to main content

Module codec

Module codec 

Source
Expand description

BMP version 3 (RFC 7854, with the RFC 8671 Adj-RIB-Out flag and RFC 9069 Loc-RIB peers): message framing, the per-peer header, TLVs, and the JSON the handler sees. Embedded BGP PDUs are framed by their own length and decoded by crate::server::bgp::wire (netgauze).

Structs§

PeerHeader

Constants§

FLAG_ADJ_RIB_OUT
FLAG_LEGACY_AS
FLAG_POST_POLICY
FLAG_V6
HEADER_LEN
INITIATION
MAX_ITEMS
Statistics entries and TLVs read from one message.
MAX_MESSAGE
A BMP message carries at most two BGP PDUs (Peer Up) plus TLVs; BGP PDUs are 4096 bytes unless extended messages were negotiated (65535).
PEER_DOWN
PEER_HEADER_LEN
PEER_UP
ROUTE_MIRRORING
ROUTE_MONITORING
STATISTICS
TERMINATION
VERSION

Functions§

bgp_pdu
The BGP PDU at the front of b and what follows it.
describe
The handler’s event for one message: (event id, data). Unknown message types are None.
distinguisher
RFC 4364 route distinguisher text: type 0 asn:n, type 1 ip:n, type 2 asn4:n.
frame
Frame a message body with the common header.
initiation
A message in its frame, from the exporter’s side.
message_len
The length of the message at the front of buf, once its common header is there.
parse_distinguisher
peer_down_code
peer_down_reason
peer_type_code
peer_type_name
put_tlv
stat_code
stat_name
IANA “BMP Statistics Types”.
stat_shape
Whether a statistics type is a 64-bit gauge (otherwise a 32-bit counter); per-AFI/SAFI gauges carry AFI and SAFI before the value.
termination
termination_code
termination_reason
tlvs
Type-length-value items with 2-byte type and length.
with_peer