Loading...
Select Version
&pagelevel(3)&pagelevel
#include <net.if.h>
unsigned int if_nametoindex(const char * ifname);
Description
The function if_nametoindex() returns the interface index corresponding to the specified interface name. ifname is a null-terminated string containing the interface name.
Return value
If execution is successful, if_nametoindex() returns the interface index. Otherwise 0 is returned
Errors indicated by errno
No errors are defined.