aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2016-03-26 09:27:18 (GMT)
committerJouni Malinen <j@w1.fi>2016-03-26 09:27:18 (GMT)
commit9b7cd5788ac8224ffbe8712bee754446e0540921 (patch)
tree49d0d4cd2a8329b8369f576119f68f729cb47f4a
parentc815fab83a525f01019f2eae93c99f27a66d68a6 (diff)
downloadhostap-9b7cd5788ac8224ffbe8712bee754446e0540921.zip
hostap-9b7cd5788ac8224ffbe8712bee754446e0540921.tar.gz
hostap-9b7cd5788ac8224ffbe8712bee754446e0540921.tar.bz2
Use a separate header file for Linux bridge interface definitions
This moves the BRCTL_* defines from vlan_full.c to linux_bridge.h to clean up header inclusion. Signed-off-by: Jouni Malinen <j@w1.fi>
-rw-r--r--src/ap/vlan_full.c11
-rw-r--r--src/common/linux_bridge.h24
2 files changed, 25 insertions, 10 deletions
diff --git a/src/ap/vlan_full.c b/src/ap/vlan_full.c
index e362e98..aa42335 100644
--- a/src/ap/vlan_full.c
+++ b/src/ap/vlan_full.c
@@ -13,19 +13,10 @@
/* Avoid conflicts due to NetBSD net/if.h if_type define with driver.h */
#undef if_type
#include <sys/ioctl.h>
-/* From linux/if_bridge.h that can conflict with C library headers for IPv6 */
-#define BRCTL_GET_VERSION 0
-#define BRCTL_GET_BRIDGES 1
-#define BRCTL_ADD_BRIDGE 2
-#define BRCTL_DEL_BRIDGE 3
-#define BRCTL_ADD_IF 4
-#define BRCTL_DEL_IF 5
-#define BRCTL_GET_BRIDGE_INFO 6
-#define BRCTL_GET_PORT_LIST 7
-#define BRCTL_SET_BRIDGE_FORWARD_DELAY 8
#include "utils/common.h"
#include "drivers/priv_netlink.h"
+#include "common/linux_bridge.h"
#include "common/linux_vlan.h"
#include "utils/eloop.h"
#include "hostapd.h"
diff --git a/src/common/linux_bridge.h b/src/common/linux_bridge.h
new file mode 100644
index 0000000..7b76846
--- /dev/null
+++ b/src/common/linux_bridge.h
@@ -0,0 +1,24 @@
+/*
+ * Linux bridge configuration kernel interface
+ * Copyright (c) 2016, Jouni Malinen <j@w1.fi>
+ *
+ * This software may be distributed under the terms of the BSD license.
+ * See README for more details.
+ */
+
+#ifndef LINUX_BRIDGE_H
+#define LINUX_BRIDGE_H
+
+/* This interface is defined in linux/if_bridge.h */
+
+#define BRCTL_GET_VERSION 0
+#define BRCTL_GET_BRIDGES 1
+#define BRCTL_ADD_BRIDGE 2
+#define BRCTL_DEL_BRIDGE 3
+#define BRCTL_ADD_IF 4
+#define BRCTL_DEL_IF 5
+#define BRCTL_GET_BRIDGE_INFO 6
+#define BRCTL_GET_PORT_LIST 7
+#define BRCTL_SET_BRIDGE_FORWARD_DELAY 8
+
+#endif /* LINUX_BRIDGE_H */