pub fn get_if_addrs() -> Result<Vec<Interface>>
Get a list of all the network interfaces on this machine along with their IP info.
14 15 16 17 18
fn main() { let ifaces = if_addrs::get_if_addrs().unwrap(); println!("Got list of interfaces"); println!("{:#?}", ifaces); }