use e_app::net::InterfaceType; use e_app::net::{get_interfaces, set_dns_dhcp, set_ip_dhcp}; fn main() -> e_utils::Result<()> { for iface in get_interfaces() { if let Some(ref x) = iface.friendly_name { match iface.if_type { InterfaceType::Wireless80211 | InterfaceType::GigabitEthernet | InterfaceType::FastEthernetFx | InterfaceType::FastEthernetT | InterfaceType::Ethernet | InterfaceType::TokenRing => { println!( "Name: {x} Type: {:#?} Res: {};{}", iface.if_type, set_ip_dhcp(x)?, set_dns_dhcp(x)? ); } _ => {} } } } Ok(()) }