]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Use a separate header file for Linux bridge interface definitions
authorJouni Malinen <j@w1.fi>
Sat, 26 Mar 2016 09:27:18 +0000 (11:27 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 26 Mar 2016 09:27:18 +0000 (11:27 +0200)
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>
src/ap/vlan_full.c
src/common/linux_bridge.h [new file with mode: 0644]

index e362e987f5bd84a5ccdccbdef49aeb4ca75ddeaf..aa42335b96a19be3de47f3ca337e6cffc7d4898f 100644 (file)
 /* 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 (file)
index 0000000..7b76846
--- /dev/null
@@ -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 */