Struct pnet::datalink::NetworkInterface [] [src]

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
[src]

fn mac_address(&self) -> MacAddr

Retrieve the MAC address associated with the interface

fn is_loopback(&self) -> bool

Is the interface a loopback interface?

Trait Implementations

Derived Implementations

impl Hash for NetworkInterface
[src]

fn hash<__H: Hasher>(&self, __arg_0: &mut __H)

Feeds this value into the state given, updating the hasher as necessary.

fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher
1.3.0

Feeds a slice of this type into the state provided.

impl Debug for NetworkInterface
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Eq for NetworkInterface
[src]

impl PartialEq for NetworkInterface
[src]

fn eq(&self, __arg_0: &NetworkInterface) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, __arg_0: &NetworkInterface) -> bool

This method tests for !=.

impl Clone for NetworkInterface
[src]

fn clone(&self) -> NetworkInterface

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more