if_indextoname(3) — Subroutines
NAME
if_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
ifindex
Specifies the index number.
ifname
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).