08_network_interface/08_network_interface.rs
1use systemconfiguration::NetworkInterface;
2
3fn main() -> Result<(), Box<dyn std::error::Error>> {
4 for interface in NetworkInterface::copy_all()? {
5 println!(
6 "bsd={:?} type={:?} name={:?}",
7 interface.bsd_name()?,
8 interface.interface_type()?,
9 interface.localized_display_name()?
10 );
11 }
12 Ok(())
13}