Struct getifaddrs::IfAddr
[−]
[src]
pub struct IfAddr { pub name: Vec<u8>, pub flags: u32, pub address: Option<IpAddr>, pub netmask: Option<IpAddr>, pub broadcast_or_dest: Option<IpAddr>, pub index: u32, }
A single configured address.
Mostly analogous to struct ifaddrs
from libc, with some field omitted or renamed.
Fields
name: Vec<u8>
Name of the interface the address is configured on. The name need not be valid UTF-8 and is thus handled as pure binary data.
flags: u32
Interface flags.
address: Option<IpAddr>
Configured address. May be None
if no address is configured or the configured address is
not IPv4 or IPv6.
netmask: Option<IpAddr>
Configured netmask. May be None
if no address is configured or the configured address is
not IPv4 or IPv6.
broadcast_or_dest: Option<IpAddr>
Configured broadcast address or destination address (depending on flags). May be None
if
no address is configured or the configured address is not IPv4 or IPv6. Corresponds to
ifa_broadaddr
and ifa_dstaddr
in struct ifaddrs
.
index: u32
Index of the interface as determined by if_nametoindex
.