summaryrefslogtreecommitdiffstats
path: root/sys/netinet
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2005-11-29 08:59:41 +0000
committerglebius <glebius@FreeBSD.org>2005-11-29 08:59:41 +0000
commit7abe9e6ffe612f8a9e1d7ea439c090185b48e4c4 (patch)
treecef235698aa879aaac3db5364615bb470230a037 /sys/netinet
parent53e5fb0f4c83b8319c21a4ed3c9064cc57495b49 (diff)
downloadFreeBSD-src-7abe9e6ffe612f8a9e1d7ea439c090185b48e4c4.zip
FreeBSD-src-7abe9e6ffe612f8a9e1d7ea439c090185b48e4c4.tar.gz
Garbage-collect now unused struct _ipfw_insn_pipe and flush_pipe_ptrs(),
thus removing a few XXXes. Document the ABI breakage in UPDATING.
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/ip_fw.h15
-rw-r--r--sys/netinet/ip_fw2.c30
2 files changed, 1 insertions, 44 deletions
diff --git a/sys/netinet/ip_fw.h b/sys/netinet/ip_fw.h
index 88c13bd..dc5b563 100644
--- a/sys/netinet/ip_fw.h
+++ b/sys/netinet/ip_fw.h
@@ -271,19 +271,6 @@ typedef struct _ipfw_insn_if {
} ipfw_insn_if;
/*
- * This is used for pipe and queue actions, which need to store
- * a single pointer (which can have different size on different
- * architectures.
- * Note that, because of previous instructions, pipe_ptr might
- * be unaligned in the overall structure, so it needs to be
- * manipulated with care.
- */
-typedef struct _ipfw_insn_pipe {
- ipfw_insn o;
- void *pipe_ptr; /* XXX */
-} ipfw_insn_pipe;
-
-/*
* This is used for storing an altq queue id number.
*/
typedef struct _ipfw_insn_altq {
@@ -546,8 +533,6 @@ int ipfw_chk(struct ip_fw_args *);
int ipfw_init(void);
void ipfw_destroy(void);
-void flush_pipe_ptrs(struct dn_flow_set *match); /* used by dummynet */
-
typedef int ip_fw_ctl_t(struct sockopt *);
extern ip_fw_ctl_t *ip_fw_ctl_ptr;
extern int fw_one_pass;
diff --git a/sys/netinet/ip_fw2.c b/sys/netinet/ip_fw2.c
index fa3b0c2..f2c6504 100644
--- a/sys/netinet/ip_fw2.c
+++ b/sys/netinet/ip_fw2.c
@@ -3169,34 +3169,6 @@ flush_rule_ptrs(struct ip_fw_chain *chain)
}
/*
- * When pipes/queues are deleted, clear the "pipe_ptr" pointer to a given
- * pipe/queue, or to all of them (match == NULL).
- */
-void
-flush_pipe_ptrs(struct dn_flow_set *match)
-{
- struct ip_fw *rule;
-
- IPFW_WLOCK(&layer3_chain);
- for (rule = layer3_chain.rules; rule; rule = rule->next) {
- ipfw_insn_pipe *cmd = (ipfw_insn_pipe *)ACTION_PTR(rule);
-
- if (cmd->o.opcode != O_PIPE && cmd->o.opcode != O_QUEUE)
- continue;
- /*
- * XXX Use bcmp/bzero to handle pipe_ptr to overcome
- * possible alignment problems on 64-bit architectures.
- * This code is seldom used so we do not worry too
- * much about efficiency.
- */
- if (match == NULL ||
- !bcmp(&cmd->pipe_ptr, &match, sizeof(match)) )
- bzero(&cmd->pipe_ptr, sizeof(cmd->pipe_ptr));
- }
- IPFW_WUNLOCK(&layer3_chain);
-}
-
-/*
* Add a new rule to the list. Copy the rule into a malloc'ed area, then
* possibly create a rule number and add the rule to the list.
* Update the rule_number in the input struct so the caller knows it as well.
@@ -3685,7 +3657,7 @@ check_ipfw_struct(struct ip_fw *rule, int size)
case O_PIPE:
case O_QUEUE:
- if (cmdlen != F_INSN_SIZE(ipfw_insn_pipe))
+ if (cmdlen != F_INSN_SIZE(ipfw_insn))
goto bad_size;
goto check_action;
OpenPOWER on IntegriCloud