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

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]

impl Debug for NetworkInterface[src]

impl Display for NetworkInterface[src]

impl Eq for NetworkInterface[src]

impl Hash for NetworkInterface[src]

impl PartialEq<NetworkInterface> for NetworkInterface[src]

impl StructuralEq for NetworkInterface[src]

impl StructuralPartialEq for NetworkInterface[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.