lwIP  2.1.0
Lightweight IP stack
Interface Identification API

Functions

char * lwip_if_indextoname (unsigned int ifindex, char *ifname)
 
unsigned int lwip_if_nametoindex (const char *ifname)
 

Detailed Description

Function Documentation

◆ lwip_if_indextoname()

char* lwip_if_indextoname ( unsigned int  ifindex,
char *  ifname 
)

Maps an interface index to its corresponding name.

Parameters
ifindexinterface index
ifnameshall point to a buffer of at least {IF_NAMESIZE} bytes
Returns
If ifindex is an interface index, then the function shall return the value supplied in ifname, which points to a buffer now containing the interface name. Otherwise, the function shall return a NULL pointer.

◆ lwip_if_nametoindex()

unsigned int lwip_if_nametoindex ( const char *  ifname)

Returs the interface index corresponding to name ifname.

Parameters
ifnameInterface name
Returns
The corresponding index if ifname is the name of an interface; otherwise, zero.