Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/i/if_nametoindex.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/i/if_nametoindex.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/i/if_nametoindex.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/i/if_nametoindex.html on line 8

if_nametoindex()

Map an interface name to its index

Synopsis:

#include <net/if.h>

unsigned int if_nametoindex( const char * ifname );

Arguments:

ifname
The interface name that you want to map.

Library:

libsocket

Use the -l socket option to qcc to link against this library.

Description:

The if_nametoindex() function maps the interface name specified by ifname to its corresponding index.

Returns:

The index number of the interface, or 0 if the specified interface couldn't be found or an error occurred while using getifaddrs() to retrieve the list of interfaces.

Classification:

POSIX 1003.1

Safety:
Cancellation point Yes
Interrupt handler No
Signal handler No
Thread Yes

See also:

getifaddrs(), if_freenameindex(), if_indextoname(), if_nameindex()


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/i/if_nametoindex.html on line 107

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/i/if_nametoindex.html on line 107