Struct pnet_datalink::NetworkInterface
[−]
[src]
pub struct NetworkInterface { pub name: String, pub index: u32, pub mac: Option<MacAddr>, pub ips: Vec<IpNetwork>, pub flags: u32, }
Represents a network interface and its associated addresses
Fields
name: String
The name 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
Methods
impl NetworkInterface
[src]
fn mac_address(&self) -> MacAddr
[src]
Retrieve the MAC address associated with the interface
fn is_loopback(&self) -> bool
[src]
Is the interface a loopback interface?
Trait Implementations
impl Clone for NetworkInterface
[src]
fn clone(&self) -> NetworkInterface
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq for NetworkInterface
[src]
fn eq(&self, __arg_0: &NetworkInterface) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &NetworkInterface) -> bool
[src]
This method tests for !=
.