Struct pnet_datalink::NetworkInterface
source ·
[−]pub struct NetworkInterface {
pub name: String,
pub description: String,
pub index: u32,
pub mac: Option<MacAddr>,
pub ips: Vec<IpNetwork>,
pub flags: u32,
}
Expand description
Represents a network interface and its associated addresses.
Fields
name: String
The name of the interface.
description: String
A description of the interface.
index: u32
The interface index (operating system specific).
mac: Option<MacAddr>
A MAC address for the interface.
ips: Vec<IpNetwork>
IP addresses and netmasks for the interface.
flags: u32
Operating system specific flags for the interface.
Implementations
Is the interface a loopback interface?
Triggered when the driver has signated netif_carrier_on Check https://www.kernel.org/doc/html/latest/networking/operstates.html for more information
Triggered when the driver has signated netif_dormant_on Check https://www.kernel.org/doc/html/latest/networking/operstates.html for more information
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for NetworkInterface
impl Send for NetworkInterface
impl Sync for NetworkInterface
impl Unpin for NetworkInterface
impl UnwindSafe for NetworkInterface
Blanket Implementations
Mutably borrows from an owned value. Read more