This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs. |
Map an interface index to its name
#include <net/if.h> char * if_indextoname( unsigned int ifindex, char * ifname );
libsocket
Use the -l socket option to qcc to link against this library.
The if_indextoname() function maps the interface index specified by ifindex to its corresponding name. The name is copied into the buffer pointed to by ifname.
A pointer to the name, or NULL if There isn't an interface corresponding to the specified index.
Safety: | |
---|---|
Cancellation point | Yes |
Interrupt handler | No |
Signal handler | No |
Thread | Yes |
getifaddrs(), if_freenameindex(), if_nameindex(), if_nametoindex()