2 releases (1 stable)
Uses old Rust 2015
1.0.0 | Jan 12, 2018 |
---|---|
0.1.0 | Jan 12, 2018 |
#22 in #dns-query
22 downloads per month
555KB
151 lines
System DNS
For valid #[cfg(any(unix))]
systems this provides a simple API to
make DNS requests against the system resolver. This includes your
hosts file, and any configuration that maybe done to your system.
To use this crate
#[dependencies]
system_dns = "1.0.0"
Example
extern crate system_dns;
use system_dns::system_resolve_ipv4;
let results: Vec<IpAddr> = match system_resolve_ipv4("google.com") {
Ok(x) => x,
Err(e) => panic!("Failed to resolve `google.com`. Error {:?}", e)
};