Query: if_nameindex
OS: osf1
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
if_nameindex(3) Library Functions Manual if_nameindex(3)NAMEif_nameindex - Returns an array of all interface names and indexesLIBRARYStandard C Library (libc.so, libc.a)SYNOPSIS#include <net/if.h> struct if_nameindex *if_nameindex ( void );DESCRIPTIONThe if_nameindex() function dynamically allocates memory for an array of if_nameindex structures, one structure for each interface. A structure with a zero (0) if_index value (0) and a NULL if_name value indicates the end of the array. You must define the following if_nameindex structure prior to a call to if_nameindex: struct if_nameindex { unsigned int if_index; char *if_name; }; To free memory allocated by this function, use the if_freenameindex function.RETURN VALUESUpon successful conversion, the if_nameindex() function returns a pointer to the first structure in the array of if_nameindex structures.RELATED INFORMATIONFunctions: if_freenameindex(3), if_indextoname(3), if_nametoindex(3). delim off if_nameindex(3)