The Open Group Base Specifications Issue 7, 2018 edition
IEEE Std 1003.1-2017 (Revision of IEEE Std 1003.1-2008)
Copyright © 2001-2018 IEEE and The Open GroupA newer edition of this document exists here
NAME
if_nametoindex - map a network interface name to its corresponding index
SYNOPSIS
#include <net/if.h>
unsigned if_nametoindex(const char *ifname);
DESCRIPTION
The if_nametoindex() function shall return the interface index corresponding to name ifname.
RETURN VALUE
The corresponding index if ifname is the name of an interface; otherwise, zero.
ERRORS
No errors are defined.
The following sections are informative.
EXAMPLES
None.
APPLICATION USAGE
None.
RATIONALE
None.
FUTURE DIRECTIONS
None.
SEE ALSO
getsockopt, if_freenameindex, if_indextoname, if_nameindex,
setsockopt
XBD <net/if.h>
CHANGE HISTORY
First released in Issue 6. Derived from the XNS, Issue 5.2 specification.
End of informative text.
return to top of page
UNIX ® is a registered Trademark of The Open Group.
POSIX ™ is a Trademark of The IEEE.
Copyright © 2001-2018 IEEE and The Open Group, All Rights Reserved
[ Main Index | XBD | XSH | XCU | XRAT
]