aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorLuigi Rizzo <luigi@FreeBSD.org>2009-12-05 13:53:41 +0000
committerLuigi Rizzo <luigi@FreeBSD.org>2009-12-05 13:53:41 +0000
commitf7de8f4704da3bc6e7da57a4f6427f60236c4cdc (patch)
treebfdabac8459b09233bc7d810f70725676262baba /sys
parent66b80058a21a74fac0ab7937c670340b8f5977e9 (diff)
Notes
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet/in.h8
-rw-r--r--sys/netinet/ip_fw.h2
-rw-r--r--sys/netinet/raw_ip.c4
3 files changed, 13 insertions, 1 deletions
diff --git a/sys/netinet/in.h b/sys/netinet/in.h
index e9847381a0fb..82a8bb46136d 100644
--- a/sys/netinet/in.h
+++ b/sys/netinet/in.h
@@ -438,12 +438,20 @@ __END_DECLS
#define IP_ONESBCAST 23 /* bool: send all-ones broadcast */
+/*
+ * Options for controlling the firewall and dummynet.
+ * Historical options (from 40 to 64) will eventually be
+ * replaced by only two options, IP_FW3 and IP_DUMMYNET3.
+ */
#define IP_FW_TABLE_ADD 40 /* add entry */
#define IP_FW_TABLE_DEL 41 /* delete entry */
#define IP_FW_TABLE_FLUSH 42 /* flush table */
#define IP_FW_TABLE_GETSIZE 43 /* get table size */
#define IP_FW_TABLE_LIST 44 /* list table contents */
+#define IP_FW3 48 /* generic ipfw v.3 sockopts */
+#define IP_DUMMYNET3 49 /* generic dummynet v.3 sockopts */
+
#define IP_FW_ADD 50 /* add a firewall rule to chain */
#define IP_FW_DEL 51 /* delete a firewall rule from chain */
#define IP_FW_FLUSH 52 /* flush firewall rule chain */
diff --git a/sys/netinet/ip_fw.h b/sys/netinet/ip_fw.h
index 9b49e241ee1d..e5528a2b5091 100644
--- a/sys/netinet/ip_fw.h
+++ b/sys/netinet/ip_fw.h
@@ -216,7 +216,7 @@ enum ipfw_opcodes { /* arguments (4 byte each) */
*
*/
typedef struct _ipfw_insn { /* template for instructions */
- enum ipfw_opcodes opcode:8;
+ u_int8_t opcode;
u_int8_t len; /* number of 32-bit words */
#define F_NOT 0x80
#define F_OR 0x40
diff --git a/sys/netinet/raw_ip.c b/sys/netinet/raw_ip.c
index 0d2415decd74..cbf8a291644c 100644
--- a/sys/netinet/raw_ip.c
+++ b/sys/netinet/raw_ip.c
@@ -453,6 +453,7 @@ rip_ctloutput(struct socket *so, struct sockopt *sopt)
error = sooptcopyout(sopt, &optval, sizeof optval);
break;
+ case IP_FW3: /* generic ipfw v.3 functions */
case IP_FW_ADD: /* ADD actually returns the body... */
case IP_FW_GET:
case IP_FW_TABLE_GETSIZE:
@@ -465,6 +466,7 @@ rip_ctloutput(struct socket *so, struct sockopt *sopt)
error = ENOPROTOOPT;
break;
+ case IP_DUMMYNET3: /* generic dummynet v.3 functions */
case IP_DUMMYNET_GET:
if (ip_dn_ctl_ptr != NULL)
error = ip_dn_ctl_ptr(sopt);
@@ -510,6 +512,7 @@ rip_ctloutput(struct socket *so, struct sockopt *sopt)
inp->inp_flags &= ~INP_HDRINCL;
break;
+ case IP_FW3: /* generic ipfw v.3 functions */
case IP_FW_ADD:
case IP_FW_DEL:
case IP_FW_FLUSH:
@@ -526,6 +529,7 @@ rip_ctloutput(struct socket *so, struct sockopt *sopt)
error = ENOPROTOOPT;
break;
+ case IP_DUMMYNET3: /* generic dummynet v.3 functions */
case IP_DUMMYNET_CONFIGURE:
case IP_DUMMYNET_DEL:
case IP_DUMMYNET_FLUSH: