netdev 0.41.0

Cross-platform library for enumerating network interfaces with metadata.
Documentation
1
2
3
4
5
6
7
pub use libc::{IFF_BROADCAST, IFF_LOOPBACK, IFF_MULTICAST, IFF_POINTOPOINT, IFF_RUNNING, IFF_UP};

use crate::interface::interface::Interface;

pub fn is_running(interface: &Interface) -> bool {
    interface.flags & (IFF_RUNNING as u32) != 0
}