Struct network_interface::NetworkInterface
source · pub struct NetworkInterface {
pub name: String,
pub addr: Vec<Addr>,
pub mac_addr: Option<String>,
pub index: u32,
}
Expand description
A system’s network interface
Fields§
§name: String
Interface’s name
addr: Vec<Addr>
Interface’s address
mac_addr: Option<String>
MAC Address
index: u32
Interface’s index
Implementations§
source§impl NetworkInterface
impl NetworkInterface
pub fn new_afinet( name: &str, addr: Ipv4Addr, netmask: Netmask<Ipv4Addr>, broadcast: Option<Ipv4Addr>, index: u32 ) -> NetworkInterface
pub fn new_afinet6( name: &str, addr: Ipv6Addr, netmask: Netmask<Ipv6Addr>, broadcast: Option<Ipv6Addr>, index: u32 ) -> NetworkInterface
pub fn with_mac_addr(self, mac_addr: Option<String>) -> Self
Trait Implementations§
source§impl Clone for NetworkInterface
impl Clone for NetworkInterface
source§fn clone(&self) -> NetworkInterface
fn clone(&self) -> NetworkInterface
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more