Maps an interface name to its corresponding index.
Standard C Library (libc.a)
#include <net/if.h> unsigned int if_nametoindex(const char *ifname);
If the ifname parameter is the name of an interface, the if_nametoindex subroutine returns the interface index corresponding to the ifname name. If the ifname parameter is not the name of an interface, the if_nametoindex subroutine returns a 0 and the errno global variable is set to the appropriate value.
ifname | Possible name of an interface. |
if_indextoname Subroutine, if_nameindex Subroutine, and if_freenameindex Subroutine.
Subroutines Overview in AIX 5L Version 5.2 General Programming Concepts: Writing and Debugging Programs.