BGPKIT Parser remote file parsing example.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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