Index Index for
Section 3
Index Alphabetical
listing for I
Bottom of page Bottom of
page

if_nametoindex(3)

NAME

if_nametoindex - Map an interface name to an interface index

SYNOPSIS

#include <net/if.h> unsigned int if_nametoindex( const char *ifname );

LIBRARY

Standard C Library (libc)

PARAMETERS

ifname Points to a buffer that contains the interface name.

DESCRIPTION

The if_nametoindex() function maps an interface name to its corresponding interface index number.

RETURN VALUES

Upon successful conversion, the if_nametoindex() function returns an interface index number. If the interface does not exist, it returns zero (0).

SEE ALSO

Functions: if_freenameindex(3), if_indextoname(3), if_nameindex(3).

Index Index for
Section 3
Index Alphabetical
listing for I
Top of page Top of
page