if_indextoname(3)if_indextoname(3)NAMEif_indextoname - Map an interface index to an interface name
SYNOPSIS
#include <net/if.h>
char *if_indextoname(
unsigned int ifindex,
char *ifname );
LIBRARY
Standard C Library (libc)
PARAMETERS
Specifies the index number. Points to a buffer, IFNAMSIZ bytes in
length, into which the function will place the interface name. IFNAMSIZ
is defined in <net/if.h>.
DESCRIPTION
The if_indextoname() function maps an interface index number to its
corresponding interface name.
RETURN VALUES
Upon successful conversion, the if_indextoname() function returns the
value specified in the ifname parameter, which points the buffer that
now contains the interface name. If no interface name corresponds to
the index, it returns a NULL pointer.
SEE ALSO
Functions: if_freenameindex(3), if_nameindex(3), if_nametoindex(3).
if_indextoname(3)