if_indextoname()

Map an interface index to its name

Synopsis:

#include <net/if.h>

char * if_indextoname( unsigned int ifindex,
                       char * ifname );

Since:

BlackBerry 10.0.0

Arguments:

ifindex
The interface index.
ifname
A pointer to a buffer in which if_indextoname() copies the interface name. The buffer must be a minimum of IFNAMSIZ bytes long.

Library:

libsocket

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

Description:

The if_indextoname() function maps the interface index specified by ifindex to its corresponding name. The name is copied into the buffer pointed to by ifname.

Returns:

A pointer to the name, or NULL if There isn't an interface corresponding to the specified index.

Classification:

POSIX 1003.1

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

Last modified: 2014-06-24



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus