Function cymrust::cymru_ip2asn
[−]
[src]
pub fn cymru_ip2asn(ip: IpAddr) -> Result<Vec<CymruIP2ASN>, String>
Query Cymru's IP-to-ASN mapping service using DNS
This function first queries (Cymru's IP-to-ASN)https://www.team-cymru.org/IP-ASN-mapping.html mapping to learn AS number(s) for IP. Then for every AS unique number, it does a
new query to get ASN information. The returned CymruIP2ASN
is union of IP-to-ASN mapping and
ASN query information.
No caching is performed by this function.
Errors
If DNS resolver fails or there's error in DNS query, the error is returned as String