Function if_addrs::get_if_addrs

source ยท
pub fn get_if_addrs() -> Result<Vec<Interface>>
Available on Windows only.
Expand description

Get a list of all the network interfaces on this machine along with their IP info.

Examples found in repository?
examples/list_interfaces.rs (line 13)
12
13
14
15
16
fn main() {
    let ifaces = if_addrs::get_if_addrs().unwrap();
    println!("Got list of interfaces");
    println!("{:#?}", ifaces);
}