aboutsummaryrefslogtreecommitdiffstats
path: root/src/ap/vlan_ioctl.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2016-03-26 09:19:49 (GMT)
committerJouni Malinen <j@w1.fi>2016-03-26 09:24:38 (GMT)
commitc815fab83a525f01019f2eae93c99f27a66d68a6 (patch)
tree4a1410a7a97484e23e275d38f0a2391cf16be18a /src/ap/vlan_ioctl.c
parent81606ab73bff3c402d03a60b590b4e723d8e12c1 (diff)
downloadhostap-c815fab83a525f01019f2eae93c99f27a66d68a6.zip
hostap-c815fab83a525f01019f2eae93c99f27a66d68a6.tar.gz
hostap-c815fab83a525f01019f2eae93c99f27a66d68a6.tar.bz2
Use own header file for defining Linux VLAN kernel interface
This gets rid of need to include linux/if_vlan.h and additional defines in vlan_ioctl.c to avoid issues with missing definitions in libc headers. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src/ap/vlan_ioctl.c')
-rw-r--r--src/ap/vlan_ioctl.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/ap/vlan_ioctl.c b/src/ap/vlan_ioctl.c
index 97b9224..987b612 100644
--- a/src/ap/vlan_ioctl.c
+++ b/src/ap/vlan_ioctl.c
@@ -10,19 +10,11 @@
#include "utils/includes.h"
#include <sys/ioctl.h>
-#include <linux/sockios.h>
-#include <linux/if_vlan.h>
#include "utils/common.h"
+#include "common/linux_vlan.h"
#include "vlan_util.h"
-/*
- * These are only available in recent linux headers (without the leading
- * underscore).
- */
-#define _GET_VLAN_REALDEV_NAME_CMD 8
-#define _GET_VLAN_VID_CMD 9
-
int vlan_rem(const char *if_name)
{
@@ -95,11 +87,11 @@ int vlan_add(const char *if_name, int vid, const char *vlan_if_name)
os_snprintf(if_request.device1, sizeof(if_request.device1), "vlan%d",
vid);
- if_request.cmd = _GET_VLAN_VID_CMD;
+ if_request.cmd = GET_VLAN_VID_CMD;
if (ioctl(fd, SIOCSIFVLAN, &if_request) == 0 &&
if_request.u.VID == vid) {
- if_request.cmd = _GET_VLAN_REALDEV_NAME_CMD;
+ if_request.cmd = GET_VLAN_REALDEV_NAME_CMD;
if (ioctl(fd, SIOCSIFVLAN, &if_request) == 0 &&
os_strncmp(if_request.u.device2, if_name,