Struct pnet::util::NetworkInterface
[−]
pub struct NetworkInterface {
pub name: String,
pub index: u32,
pub mac: Option<MacAddr>,
pub ips: Option<Vec<IpAddr>>,
pub flags: u32,
}Represents a network interface and its associated addresses
Fields
name | The name of the interface |
index | The interface index (operating system specific) |
mac | A MAC address for the interface |
ips | An IP addresses for the interface |
flags | Operating system specific flags for the interface |
Methods
impl NetworkInterface
fn mac_address(&self) -> MacAddr
Retrieve the MAC address associated with the interface
fn is_loopback(&self) -> bool
Is the interface a loopback interface?