BGPKIT Parser v0.14.0 Release and v0.13.0 Highlights
Principal System Engineer at Cloudflare, founder and maintainer of BGPKIT. Build tools and pipelines to watch BGP data across the Internet.
We are pleased to announce the release of BGPKIT Parser v0.14.0. This update introduces support for negative filters and the RPKI-to-Router (RTR) protocol. We also want to highlight key features from the recent v0.13.0 release, including enhanced debugging tools.
v0.14.0 Features
Negative Filter Support
A frequent request has been the ability to filter out specific data points. We have added support for negative filters across most filter types, allowing exclusion of specific origins, prefixes, peers, or communities.
In the CLI, use the != operator. For example, to process all records except those originating from AS 13335:
bgpkit-parser https://spaces.bgpkit.org/parser/update-example.gz --filter "origin_asn!=13335"

In Rust code, use the ! prefix:
let parser = BgpkitParser::new("...")
.add_filter("!origin_asn", "13335")
.add_filter("!peer_ip", "192.168.1.1");
Supported negative filters include !origin_asn, !prefix, !peer_ip, !peer_asn, !type, !as_path, !community, and !ip_version.
RPKI RTR Protocol Support
We have added support for the RPKI-to-Router (RTR) protocol, covering both version 0 (RFC 6810) and version 1 (RFC 8210).
The new models::rpki::rtr and parser::rpki::rtr modules allow developers to build custom RTR clients or servers.
Here is how you can use the library to connect to an RTR server and request data:
use bgpkit_parser::models::rpki::rtr::*;
use bgpkit_parser::parser::rpki::rtr::{read_rtr_pdu, RtrEncode, RtrError};
use std::net::TcpStream;
use std::io::Write;
// 1. Connect to the RTR server
let mut stream = TcpStream::connect("rtr.rpki.cloudflare.com:8282")?;
// 2. Send a Reset Query to request the full database
let reset_query = RtrResetQuery::new_v1();
stream.write_all(&reset_query.encode())?;
// 3. Read the response PDUs
loop {
match read_rtr_pdu(&mut stream)? {
RtrPdu::IPv4Prefix(p) => {
println!("Received IPv4 ROA: {}/{}-{} -> AS{}",
p.prefix, p.prefix_length, p.max_length, p.asn);
}
RtrPdu::EndOfData(_) => break,
_ => {}
}
}
We have included a fully functional RTR client example that connects to a server, fetches ROAs, and performs route validation.

You can run the example yourself:
cargo run --example rtr_client -- rtr.rpki.cloudflare.com 8282
In Case You Missed It: v0.13.0
The v0.13.0 release introduced several improvements for debugging and analyzing MRT data.
Record-Level Output
The CLI supports inspecting individual MRT records rather than just parsed BGP elements. This aids in debugging parser issues or analyzing raw MRT files.
Switch to record-level output with --level records and choose a format (e.g., JSON):
bgpkit-parser https://spaces.bgpkit.org/parser/update-example.gz --level records --format json

Raw Bytes Access
For developers, RawMrtRecord now includes a header_bytes field, and the raw_bytes field has been renamed to message_bytes. This provides access to the exact bytes of the MRT header and the message body as they appeared on the wire, enabling byte-for-byte export and debugging without re-encoding.
Other Improvements
Testing & Fuzzing: Added a
cargo-fuzzharness and initial fuzz targets.Performance: Continued optimizations for faster processing.
Check out the full CHANGELOG for more details.
Happy Parsing!

