zettabgp - BGP&BMP Rust library
This is a BGP and BMP protocols driver library for Rust.
BGP - Border Gateway Protocol version 4. BMP - BGP Monitoring Protocol version 3.
Supported BGP message types
Open Notification Keepalive Update
Supported BMP message types
Initiation Termination PeerUpNotification RouteMonitoring
Supported address families NLRI (network layer reachability information)
ipv4 unicast ipv4 labeled-unicast ipv4 multicast ipv4 mvpn vpnv4 unicast vpnv4 multicast ipv6 unicast ipv6 labeled-unicast ipv6 multicast vpnv6 unicast vpnv6 multicast vpls evpn flowspec ipv4 flowspec ipv6
Supported path attributes
MED Origin Local preference AS path Communities Extended communities Aggregator AS Atomic aggregate Cluster list Originator ID Attribute set some PMSI tunnels
Usage
Library allow you to parse protocol messages (as binary buffers) into Rust data structures to frther processing. Or generate valid protocol messages from Rust data structure. So it can be use in any environment (synrchronous or asynchronous) to make a BGP RR, monitoring system or BGP analytics.
use *;
use ;
let mut socket = match connect ;
let params=new;
let mut buf = ;
let mut open_my = params.open_message;
let open_sz = open_my.encode_to.unwrap;
let tosend = params.prepare_message_buf.unwrap;
socket.write_all.unwrap;//send my open message
socket.read_exact.unwrap;//read response message head
let messagehead=params.decode_message_head.unwrap;//decode message head
if messagehead.0 == Open
Crates.io
https://crates.io/crates/zettabgp