net/if.h - sockets local interfaces
#include <net/if.h>
The<net/if.h> header defines the if_nameindex structure that includes at least the following members:
Member Type Value if_index unsigned int numeric index of the interface if_name char * null-terminated name of the interface The
<net/if.h> header defines the following macro for the length of a buffer containing an interface name (including the terminating NULL character):
- IF_NAMESIZE interface name length
The following are declared as functions, and may also be defined as macros:
- unsigned int if_nametoindex(const char *ifname); char *if_indextoname(unsigned int ifindex, char *ifname); struct if_nameindex *if_nameindex(void); void if_freenameindex (struct if_nameindex *ptr);
if_freenameindex() ,if_indextoname() ,if_nameindex() ,if_nametoindex() .
First released in Issue 5.2.
Contents | Next section | Index |