Struct pnet::util::NetworkInterface []

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

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 Debug for NetworkInterface

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

impl Eq for NetworkInterface

impl PartialEq for NetworkInterface

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

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

impl Clone for NetworkInterface

fn clone(&self) -> NetworkInterface

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