Module if_

Source
Expand description

Network interface name resolution.

Uses Linux and/or POSIX functions to resolve interface names like “eth0” or “socan1” into device numbers.

Structs§

Interface
A network interface. Has a name like “eth0” or “wlp4s0” or “wlan0”, as well as an index (1, 2, 3, etc) that identifies it in the OS’s networking stack.
InterfaceFlags
Standard interface flags, used by getifaddrs
Interfaces
A list of the network interfaces available on this system. Obtained from if_nameindex().
InterfacesIter
An iterator over the interfaces in an Interfaces.

Functions§

if_nameindex
Retrieve a list of the network interfaces available on the local system.
if_nametoindex
Resolve an interface into a interface number.