diff options
author | Jan Engelhardt <jengelh@computergmbh.de> | 2007-12-18 01:43:50 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 17:59:07 -0500 |
commit | 643a2c15a407faf08101a20e1a3461160711899d (patch) | |
tree | ee1634c4961162f3ae938fb892b64083af838ba3 /include/net | |
parent | df54aae02210e1acf3a1d2ffac9b29003835710c (diff) |
[NETFILTER]: Introduce nf_inet_address
A few netfilter modules provide their own union of IPv4 and IPv6
address storage. Will unify that in this patch series.
(1/4): Rename union nf_conntrack_address to union nf_inet_addr and
move it to x_tables.h.
Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/netfilter/nf_conntrack_expect.h | 4 | ||||
-rw-r--r-- | include/net/netfilter/nf_conntrack_tuple.h | 17 |
2 files changed, 7 insertions, 14 deletions
diff --git a/include/net/netfilter/nf_conntrack_expect.h b/include/net/netfilter/nf_conntrack_expect.h index b47c04f12dbe..6c3fd254c28e 100644 --- a/include/net/netfilter/nf_conntrack_expect.h +++ b/include/net/netfilter/nf_conntrack_expect.h | |||
@@ -73,8 +73,8 @@ void nf_ct_unexpect_related(struct nf_conntrack_expect *exp); | |||
73 | nf_ct_expect_related. You will have to call put afterwards. */ | 73 | nf_ct_expect_related. You will have to call put afterwards. */ |
74 | struct nf_conntrack_expect *nf_ct_expect_alloc(struct nf_conn *me); | 74 | struct nf_conntrack_expect *nf_ct_expect_alloc(struct nf_conn *me); |
75 | void nf_ct_expect_init(struct nf_conntrack_expect *, int, | 75 | void nf_ct_expect_init(struct nf_conntrack_expect *, int, |
76 | union nf_conntrack_address *, | 76 | union nf_inet_addr *, |
77 | union nf_conntrack_address *, | 77 | union nf_inet_addr *, |
78 | u_int8_t, __be16 *, __be16 *); | 78 | u_int8_t, __be16 *, __be16 *); |
79 | void nf_ct_expect_put(struct nf_conntrack_expect *exp); | 79 | void nf_ct_expect_put(struct nf_conntrack_expect *exp); |
80 | int nf_ct_expect_related(struct nf_conntrack_expect *expect); | 80 | int nf_ct_expect_related(struct nf_conntrack_expect *expect); |
diff --git a/include/net/netfilter/nf_conntrack_tuple.h b/include/net/netfilter/nf_conntrack_tuple.h index c48e390f4b0f..45cb17cdcfd0 100644 --- a/include/net/netfilter/nf_conntrack_tuple.h +++ b/include/net/netfilter/nf_conntrack_tuple.h | |||
@@ -10,6 +10,7 @@ | |||
10 | #ifndef _NF_CONNTRACK_TUPLE_H | 10 | #ifndef _NF_CONNTRACK_TUPLE_H |
11 | #define _NF_CONNTRACK_TUPLE_H | 11 | #define _NF_CONNTRACK_TUPLE_H |
12 | 12 | ||
13 | #include <linux/netfilter/x_tables.h> | ||
13 | #include <linux/netfilter/nf_conntrack_tuple_common.h> | 14 | #include <linux/netfilter/nf_conntrack_tuple_common.h> |
14 | 15 | ||
15 | /* A `tuple' is a structure containing the information to uniquely | 16 | /* A `tuple' is a structure containing the information to uniquely |
@@ -20,15 +21,7 @@ | |||
20 | "non-manipulatable" lines, for the benefit of the NAT code. | 21 | "non-manipulatable" lines, for the benefit of the NAT code. |
21 | */ | 22 | */ |
22 | 23 | ||
23 | #define NF_CT_TUPLE_L3SIZE 4 | 24 | #define NF_CT_TUPLE_L3SIZE ARRAY_SIZE(((union nf_inet_addr *)NULL)->all) |
24 | |||
25 | /* The l3 protocol-specific manipulable parts of the tuple: always in | ||
26 | network order! */ | ||
27 | union nf_conntrack_address { | ||
28 | u_int32_t all[NF_CT_TUPLE_L3SIZE]; | ||
29 | __be32 ip; | ||
30 | __be32 ip6[4]; | ||
31 | }; | ||
32 | 25 | ||
33 | /* The protocol-specific manipulable parts of the tuple: always in | 26 | /* The protocol-specific manipulable parts of the tuple: always in |
34 | network order! */ | 27 | network order! */ |
@@ -57,7 +50,7 @@ union nf_conntrack_man_proto | |||
57 | /* The manipulable part of the tuple. */ | 50 | /* The manipulable part of the tuple. */ |
58 | struct nf_conntrack_man | 51 | struct nf_conntrack_man |
59 | { | 52 | { |
60 | union nf_conntrack_address u3; | 53 | union nf_inet_addr u3; |
61 | union nf_conntrack_man_proto u; | 54 | union nf_conntrack_man_proto u; |
62 | /* Layer 3 protocol */ | 55 | /* Layer 3 protocol */ |
63 | u_int16_t l3num; | 56 | u_int16_t l3num; |
@@ -70,7 +63,7 @@ struct nf_conntrack_tuple | |||
70 | 63 | ||
71 | /* These are the parts of the tuple which are fixed. */ | 64 | /* These are the parts of the tuple which are fixed. */ |
72 | struct { | 65 | struct { |
73 | union nf_conntrack_address u3; | 66 | union nf_inet_addr u3; |
74 | union { | 67 | union { |
75 | /* Add other protocols here. */ | 68 | /* Add other protocols here. */ |
76 | __be16 all; | 69 | __be16 all; |
@@ -103,7 +96,7 @@ struct nf_conntrack_tuple | |||
103 | struct nf_conntrack_tuple_mask | 96 | struct nf_conntrack_tuple_mask |
104 | { | 97 | { |
105 | struct { | 98 | struct { |
106 | union nf_conntrack_address u3; | 99 | union nf_inet_addr u3; |
107 | union nf_conntrack_man_proto u; | 100 | union nf_conntrack_man_proto u; |
108 | } src; | 101 | } src; |
109 | }; | 102 | }; |