Standards / Extensions | C or C++ | Dependencies |
---|---|---|
RFC2553 |
both | z/OS® V1R4 |
#define _OPEN_SYS_SOCK_IPV6
#include <net/if.h>
unsigned int if_nametoindex(const char *ifname);
#define _POSIX_C_SOURCE 200112L
#include <net/if.h>
unsigned int if_nametoindex(const char *ifname);
The if_nametoindex() function returns the interface index corresponding to the interface name ifname.
When successful, if_nametoindex() returns the interface index corresponding to the interface name ifname. Upon failure, if_nametoindex() returns zero and sets errno to one of the following: