TAPI for interface name/index calls
Overview
// global functions unsigned int rpc_if_nametoindex(rcf_rpc_server* handle, const char* ifname); char* rpc_if_indextoname(rcf_rpc_server* handle, unsigned int ifindex, char* ifname);
Detailed Documentation
Global Functions
unsigned int rpc_if_nametoindex(rcf_rpc_server* handle, const char* ifname)
Convert network interface name to index.
Parameters:
handle |
RPC server handle |
ifname |
interface name |
Returns:
Interface index otherwise zero.
char* rpc_if_indextoname(rcf_rpc_server* handle, unsigned int ifindex, char* ifname)
Map network interface index to its corresponding name.
Parameters:
handle |
RPC server handle |
ifindex |
index of the interface |
ifname |
pointer to the network interface name with at least |
Returns:
Pointer to the interface name otherwise NULL