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§
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
band 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 1ip:n, type 2asn4: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