summaryrefslogtreecommitdiff
path: root/sys/netinet
diff options
context:
space:
mode:
authorGleb Smirnoff <glebius@FreeBSD.org>2005-05-04 13:12:52 +0000
committerGleb Smirnoff <glebius@FreeBSD.org>2005-05-04 13:12:52 +0000
commita1429ad9287247eaa6e23847fe317dd0f6428276 (patch)
tree0c918a4794bc85bb2e7881fce1d028a0265ececd /sys/netinet
parentc773494edd9d7aea4c5e7246345c570ded196c5c (diff)
downloadsrc-test2-a1429ad9287247eaa6e23847fe317dd0f6428276.tar.gz
src-test2-a1429ad9287247eaa6e23847fe317dd0f6428276.zip
Notes
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/ip_dummynet.c19
-rw-r--r--sys/netinet/ip_fw.h1
-rw-r--r--sys/netinet/ip_fw2.c4
3 files changed, 0 insertions, 24 deletions
diff --git a/sys/netinet/ip_dummynet.c b/sys/netinet/ip_dummynet.c
index 6a24c7989b00..63a57e3d81ed 100644
--- a/sys/netinet/ip_dummynet.c
+++ b/sys/netinet/ip_dummynet.c
@@ -33,8 +33,6 @@
#include "opt_inet6.h"
#endif
-#define IPFW2 1
-
/*
* This module implements IP dummynet, a bandwidth limiter/delay emulator
* used in conjunction with the ipfw package.
@@ -1125,7 +1123,6 @@ static __inline
struct dn_flow_set *
locate_flowset(int pipe_nr, struct ip_fw *rule)
{
-#if IPFW2
struct dn_flow_set *fs;
ipfw_insn *cmd = ACTION_PTR(rule);
@@ -1141,11 +1138,6 @@ locate_flowset(int pipe_nr, struct ip_fw *rule)
return fs;
if (cmd->opcode == O_QUEUE)
-#else /* !IPFW2 */
- struct dn_flow_set *fs = NULL ;
-
- if ( (rule->fw_flg & IP_FW_F_COMMAND) == IP_FW_F_QUEUE )
-#endif /* !IPFW2 */
for (fs=all_flow_sets; fs && fs->fs_nr != pipe_nr; fs=fs->next)
;
else {
@@ -1156,16 +1148,11 @@ locate_flowset(int pipe_nr, struct ip_fw *rule)
fs = &(p1->fs) ;
}
/* record for the future */
-#if IPFW2
#ifdef __i386__
((ipfw_insn_pipe *)cmd)->pipe_ptr = fs;
#else
bcopy(&fs, & ((ipfw_insn_pipe *)cmd)->pipe_ptr, sizeof(fs));
#endif
-#else
- if (fs != NULL)
- rule->pipe_ptr = fs;
-#endif
return fs ;
}
@@ -1193,20 +1180,14 @@ dummynet_io(struct mbuf *m, int dir, struct ip_fw_args *fwa)
u_int64_t len = m->m_pkthdr.len ;
struct dn_flow_queue *q = NULL ;
int is_pipe;
-#if IPFW2
ipfw_insn *cmd = ACTION_PTR(fwa->rule);
-#endif
KASSERT(m->m_nextpkt == NULL,
("dummynet_io: mbuf queue passed to dummynet"));
-#if IPFW2
if (cmd->opcode == O_LOG)
cmd += F_LEN(cmd);
is_pipe = (cmd->opcode == O_PIPE);
-#else
- is_pipe = (fwa->rule->fw_flg & IP_FW_F_COMMAND) == IP_FW_F_PIPE;
-#endif
DUMMYNET_LOCK();
/*
diff --git a/sys/netinet/ip_fw.h b/sys/netinet/ip_fw.h
index 5b196d6bf38c..01d91f1fa1f7 100644
--- a/sys/netinet/ip_fw.h
+++ b/sys/netinet/ip_fw.h
@@ -27,7 +27,6 @@
#ifndef _IPFW2_H
#define _IPFW2_H
-#define IPFW2 1
/*
* The kernel representation of ipfw rules is made of a list of
diff --git a/sys/netinet/ip_fw2.c b/sys/netinet/ip_fw2.c
index c0799706ccd9..f9c48beb0526 100644
--- a/sys/netinet/ip_fw2.c
+++ b/sys/netinet/ip_fw2.c
@@ -43,8 +43,6 @@
#endif /* INET */
#endif
-#define IPFW2 1
-#if IPFW2
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/condvar.h>
@@ -3947,5 +3945,3 @@ ipfw_destroy(void)
IPFW_LOCK_DESTROY(&layer3_chain);
printf("IP firewall unloaded\n");
}
-
-#endif /* IPFW2 */