summaryrefslogtreecommitdiffstats
path: root/sys/net/if.h
diff options
context:
space:
mode:
authormlaier <mlaier@FreeBSD.org>2006-06-19 22:20:45 +0000
committermlaier <mlaier@FreeBSD.org>2006-06-19 22:20:45 +0000
commitf5cde2819f76cb3f86ff02a0c422b289ce94a096 (patch)
tree1d514a3c44a007d12f9a4007d15e7afe23180bb0 /sys/net/if.h
parent5a4834b848117e80b174a1d51aff1cfd5e9c8c2d (diff)
downloadFreeBSD-src-f5cde2819f76cb3f86ff02a0c422b289ce94a096.zip
FreeBSD-src-f5cde2819f76cb3f86ff02a0c422b289ce94a096.tar.gz
Import interface groups from OpenBSD. This allows to group interfaces in
order to - for example - apply firewall rules to a whole group of interfaces. This is required for importing pf from OpenBSD 3.9 Obtained from: OpenBSD (with changes) Discussed on: -net (back in April)
Diffstat (limited to 'sys/net/if.h')
-rw-r--r--sys/net/if.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/sys/net/if.h b/sys/net/if.h
index f669017..1116d4b 100644
--- a/sys/net/if.h
+++ b/sys/net/if.h
@@ -356,6 +356,37 @@ struct ifconf32 {
#endif
/*
+ * interface groups
+ */
+
+#define IFG_ALL "all" /* group contains all interfaces */
+/* XXX: will we implement this? */
+#define IFG_EGRESS "egress" /* if(s) default route(s) point to */
+
+struct ifg_req {
+ union {
+ char ifgrqu_group[IFNAMSIZ];
+ char ifgrqu_member[IFNAMSIZ];
+ } ifgrq_ifgrqu;
+#define ifgrq_group ifgrq_ifgrqu.ifgrqu_group
+#define ifgrq_member ifgrq_ifgrqu.ifgrqu_member
+};
+
+/*
+ * Used to lookup groups for an interface
+ */
+struct ifgroupreq {
+ char ifgr_name[IFNAMSIZ];
+ u_int ifgr_len;
+ union {
+ char ifgru_group[IFNAMSIZ];
+ struct ifg_req *ifgru_groups;
+ } ifgr_ifgru;
+#define ifgr_group ifgr_ifgru.ifgru_group
+#define ifgr_groups ifgr_ifgru.ifgru_groups
+};
+
+/*
* Structure for SIOC[AGD]LIFADDR
*/
struct if_laddrreq {
OpenPOWER on IntegriCloud