Skip to content

V0.2 ASNames

Choose a tag to compare

@digizeph digizeph released this 04 Sep 17:15
· 195 commits to main since this release
c09775d

What's new

  • added AS name and country lookup
use std::collections::HashMap;
use bgpkit_commons::asnames::{AsName, get_asnames};

fn main() {
    let asnames: HashMap<u32, AsName> = get_asnames().unwrap();
    assert_eq!(asnames.get(&3333).unwrap().name, "RIPE-NCC-AS Reseaux IP Europeens Network Coordination Centre (RIPE NCC)");
    assert_eq!(asnames.get(&400644).unwrap().name, "BGPKIT-LLC");
    assert_eq!(asnames.get(&400644).unwrap().country, "US");
}

Full Changelog: https://github.com/bgpkit/bgpkit-commons/commits/v0.2.0