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]
pub fn mac_address(&self) -> MacAddr
[src]
Retrieve the MAC address associated with the interface
pub fn is_up(&self) -> bool
[src]
pub fn is_broadcast(&self) -> bool
[src]
pub fn is_loopback(&self) -> bool
[src]
Is the interface a loopback interface?
pub fn is_point_to_point(&self) -> bool
[src]
pub fn is_multicast(&self) -> bool
[src]
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 !=
.
impl Eq for NetworkInterface
[src]
impl Debug for NetworkInterface
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Hash for NetworkInterface
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
[src]
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more