vlan: Move if_nametoindex() use out of vlan_init.c

With this, vlan_init.c does not need any special header files anymore
and vlan_ifconfig.c does not need hostapd-specific header files that
might conflict with net/if.h on NetBSD.

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2016-03-25 18:00:44 +02:00
parent 7c03c08229
commit e86859929f
3 changed files with 8 additions and 4 deletions

View file

@ -61,3 +61,9 @@ int ifconfig_up(const char *if_name)
wpa_printf(MSG_DEBUG, "VLAN: Set interface %s up", if_name);
return ifconfig_helper(if_name, 1);
}
int iface_exists(const char *ifname)
{
return if_nametoindex(ifname);
}