Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
BGPKIT Parser remote file parsing example.
use bgpkit_parser::BgpkitParser;
fn main() {
let url =
"http://archive.routeviews.org/bgpdata/\
2021.10/UPDATES/updates.20211001.0000.bz2";
for elem in BgpkitParser::new(url) {
println!("{:?}|{:?}|{:?}|{:?}|{:?}",
elem.elem_type,
elem.timestamp,
elem.prefix,
elem.as_path,
elem.next_hop,
)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment