Module nix::net::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§

  • 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.
  • Standard interface flags, used by getifaddrs
  • A list of the network interfaces available on this system. Obtained from if_nameindex().
  • An iterator over the interfaces in an Interfaces.

Functions§

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

Type Aliases§