libexplain  1.4.D001
Functions
libexplain/iocontrol/disambiguate/net_dev_name.c File Reference
#include <libexplain/ac/ctype.h>
#include <libexplain/ac/net/if.h>
#include <libexplain/ac/string.h>
#include <libexplain/ac/sys/ioctl.h>
#include <libexplain/ac/sys/sockio.h>
#include <libexplain/iocontrol.h>

Go to the source code of this file.

Functions

int explain_iocontrol_disambiguate_net_dev_name (int fildes, const char *name)

Function Documentation

int explain_iocontrol_disambiguate_net_dev_name ( int  fildes,
const char *  name 
)

The explain_iocontrol_disambiguate_net_dev_name helper function is used to decide whether or not a file descriptor is associated with a network device of the given name.

Parameters:
fildesThe file descriptor if interest
nameThe name of the network device of interest. The actual network device could also have an optional trailing number (e.g. name="eth" will also match "eth0").
Returns:
DISAMBIGUATE_USE if the name matches, or DISAMBIGUATE_DO_NOT_USE if the name does not match.

Definition at line 30 of file net_dev_name.c.