osf1 man page for if_nameindex

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)

NAME
if_nameindex - Returns an array of all interface names and indexes
LIBRARY
Standard C Library (libc.so, libc.a)
SYNOPSIS
#include <net/if.h> struct if_nameindex *if_nameindex ( void );
DESCRIPTION
The 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 VALUES
Upon successful conversion, the if_nameindex() function returns a pointer to the first structure in the array of if_nameindex structures.
RELATED INFORMATION
Functions: if_freenameindex(3), if_indextoname(3), if_nametoindex(3). delim off if_nameindex(3)
Related Man Pages
if_nametoindex(3) - mojave
if_nametoindex(3) - freebsd
if_freenameindex(3) - netbsd
if_freenameindex(3) - osx
if_nameindex(3) - osx