summaryrefslogtreecommitdiff
path: root/sys/net/pfvar.h
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2010-06-27 01:39:44 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2010-06-27 01:39:44 +0000
commite27daf9a5459e72ae53b8dd3d5594bfa9f875b46 (patch)
treee38c512598731ae417adbbdbb2ca9c6e7d701037 /sys/net/pfvar.h
parent020ba06d0fd1f2501bd51824a3c45c9a803f00a9 (diff)
stuff nsaddr/ndaddr/nsport/ndport (addrs/ports after NAT, used a lot while
walking the ruleset and up until state is fully set up) into pf_pdesc instead of passing around those 4 seperately all the time, also shrinks the argument count for a few functions that have/partialy had an insane count of arguments. kinda preparational since we'll need them elsewhere too, soon ok ryan jsing
Diffstat (limited to 'sys/net/pfvar.h')
-rw-r--r--sys/net/pfvar.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h
index c1093556d67..8c91ce7ca46 100644
--- a/sys/net/pfvar.h
+++ b/sys/net/pfvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfvar.h,v 1.309 2010/05/07 13:33:16 claudio Exp $ */
+/* $OpenBSD: pfvar.h,v 1.310 2010/06/27 01:39:43 henning Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -1196,6 +1196,9 @@ struct pf_pdesc {
void *any;
} hdr;
+ struct pf_addr nsaddr; /* src address after NAT */
+ struct pf_addr ndaddr; /* dst address after NAT */
+
struct ether_header
*eh;
struct pf_addr *src; /* src address */
@@ -1204,6 +1207,8 @@ struct pf_pdesc {
u_int16_t *dport;
u_int16_t osport;
u_int16_t odport;
+ u_int16_t nsport; /* src port after NAT */
+ u_int16_t ndport; /* dst port after NAT */
u_int32_t p_len; /* total length of payload */
@@ -1925,18 +1930,13 @@ int pf_step_out_of_anchor(int *, struct pf_ruleset **,
int *);
int pf_get_transaddr(struct pf_rule *, struct pf_pdesc *,
- struct pf_addr *, u_int16_t *, struct pf_addr *,
- u_int16_t *, struct pf_src_node **);
+ struct pf_src_node **);
int pf_map_addr(sa_family_t, struct pf_rule *,
struct pf_addr *, struct pf_addr *,
struct pf_addr *, struct pf_src_node **,
struct pf_pool *, enum pf_sn_types);
-int pf_state_key_setup(struct pf_pdesc *,
- struct pf_state_key **, struct pf_state_key **,
- struct pf_addr **, struct pf_addr **,
- u_int16_t *, u_int16_t *, int);
#endif /* _KERNEL */