if_nametoindex - map an interface name to its corresponding index
#include <net/if.h> unsigned int if_nametoindex(const char *ifname);
Returns the interface index corresponding to name ifname.
The corresponding index if ifname is the name of an interface; zero otherwise.
- [EFAULT]
- The buffer pointed to by ifname can not be accessed.
getsockopt() ,if_freenameindex() ,if_indextoname() ,if_nameindex() ,setsockopt() ,<net/if.h> .
First released in Issue 5.2.
Contents | Next section | Index |