Standards / Extensions | C or C++ | Dependencies |
---|---|---|
RFC2553 |
both | z/OS V1R4 |
#define _OPEN_SYS_SOCK_IPV6
#include <net/if.h>
char *if_indextoname(unsigned int ifindex, char *ifname);
#define _POSIX_C_SOURCE 200112L
#include <net/if.h>
char *if_indextoname(unsigned int ifindex, char *ifname);
The if_indextoname() function maps an interface index to its corresponding interface name. When this function is called, ifname must point to a buffer of at least IF_NAMESIZE bytes into which the interface name corresponding to interface index ifindex is returned. Otherwise, the function shall return a NULL pointer and set errno to indicate the error.