Previous section.

Technical Standard: Networking Services (XNS), Issue 5.2 Draft 2.0
Copyright © 1999 The Open Group

NAME

if_indextoname - map an interface index to its corresponding name

SYNOPSIS


#include <net/if.h>

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


DESCRIPTION

When this function is called, ifname must point to a buffer of at least IFNAMSIZ bytes. The function places in this buffer the name of the interface with index ifindex.

RETURN VALUE

If ifindex is an interface index then the function returns the value supplied in ifname, which points to a buffer now containing the interface name. Otherwise the function returns a NULL pointer.

ERRORS

[EFAULT]
The buffer pointed to by ifname can not be accessed or written.

SEE ALSO

getsockopt(), if_freenameindex(), if_nameindex(), if_nametoindex(), setsockopt(), <net/if.h>.

CHANGE HISTORY

First released in Issue 5.2.

Contents Next section Index