pub fn is_nic_active(nic: &str) -> bool {
    trace!("checking state: {}", nic);
    let path = format!("/sys/class/net/{}/operstate", nic);
    let operstate = file::string_from_file(&path).unwrap();
    let operstate = operstate.trim();
    trace!("nic: {} is in state: ({})", nic, operstate);
    operstate == "up"
}
// determine if a NIC is active based on operstate
determine if a NIC is active based on operstate
determine if a NIC is active based on operstate
pub fn is_nic_active(nic: &str) -> bool {
    trace!("checking state: {}", nic);
    let path = format!("/sys/class/net/{}/operstate", nic);
    let operstate = file::string_from_file(&path).unwrap();
    let operstate = operstate.trim();
    trace!("nic: {} is in state: ({})", nic, operstate);
    operstate == "up"
}
pub fn is_nic_active ( nic : & str ) -> bool { trace ! ( " " nic ) ; let path = format ! ( " " nic ) ; let operstate = file :: string_from_file ( & path ) . unwrap ( ) ; let operstate = operstate . trim ( ) ; trace ! ( " " nic operstate ) ; operstate == " " }
determine if a NIC is active based on operstate
determine if a NIC is active based on operstate
nic
&str
nic
&str