IF_NAMETOINDEX(3) Library Functions Manual IF_NAMETOINDEX(3)

if_nametoindexmap a network interface name to its corresponding index

#include <net/if.h>

unsigned if_nametoindex(const char *ifname);

The if_nametoindex () function shall return the interface index corresponding to name ifname.

The corresponding index if ifname is the name of an interface; otherwise, zero.

No errors are defined.

None.

None.

None.

None.

getsockopt(3) , if_freenameindex(3) , if_indextoname(3) , if_nameindex(3) , setsockopt(3) , the Base Definitions volume of IEEE Std 1003.1-2001 (“POSIX.1”), <net/if.h>

First released in Issue 6. Derived from the XNS, Issue 5.2 specification.

footer end

December 6, 2001 posix.fail