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 of the interface the address is configured on. The name need not be valid UTF-8 and is thus handled as pure binary data.

Interface flags.

Configured address. May be None if no address is configured or the configured address is not IPv4 or IPv6.

Configured netmask. May be None if no address is configured or the configured address is not IPv4 or IPv6.

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 of the interface as determined by if_nametoindex.