cymrust
Simple library to query Team Cymru's IP-to-ASN mapping information via DNS.
Please, see Team Cymru's documentation before using this library.
Cymrust's docs can be found from docs.rs.
Example
extern crate cymrust;
use env;
use IpAddr;
$ cargo run -q --example whois 8.8.8.8
Ok(
[
CymruIP2ASN {
ip_addr: V4(
8.8.8.8
),
bgp_prefix: "8.8.8.0/24",
as_number: 15169,
as_name: "GOOGLE - Google Inc., US",
country_code: "US",
registry: "arin",
allocated: None,
expires: SystemTime {
tv_sec: 1483648521,
tv_nsec: 906456000
}
}
]
)