diff options
author | Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp> | 2007-07-08 01:22:33 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-07-11 01:17:16 -0400 |
commit | 4ba887790ce2015e8c464809c0be902fb813ad15 (patch) | |
tree | 0373b274e64a4b70415cd59f2cb6270762aa55b4 | |
parent | 9f15c5302de4e8b0aac7ca24c36bf26a7fe1a513 (diff) |
[NETFILTER]: nf_nat: move NAT declarations from nf_conntrack_ipv4.h to nf_nat.h
Signed-off-by: Yasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | include/net/netfilter/ipv4/nf_conntrack_ipv4.h | 23 | ||||
-rw-r--r-- | include/net/netfilter/nf_conntrack.h | 1 | ||||
-rw-r--r-- | include/net/netfilter/nf_nat.h | 18 | ||||
-rw-r--r-- | include/net/netfilter/nf_nat_core.h | 1 |
4 files changed, 21 insertions, 22 deletions
diff --git a/include/net/netfilter/ipv4/nf_conntrack_ipv4.h b/include/net/netfilter/ipv4/nf_conntrack_ipv4.h index 1401ccc051c4..3ed4e14970c5 100644 --- a/include/net/netfilter/ipv4/nf_conntrack_ipv4.h +++ b/include/net/netfilter/ipv4/nf_conntrack_ipv4.h | |||
@@ -9,29 +9,8 @@ | |||
9 | #ifndef _NF_CONNTRACK_IPV4_H | 9 | #ifndef _NF_CONNTRACK_IPV4_H |
10 | #define _NF_CONNTRACK_IPV4_H | 10 | #define _NF_CONNTRACK_IPV4_H |
11 | 11 | ||
12 | #ifdef CONFIG_NF_NAT_NEEDED | ||
13 | #include <net/netfilter/nf_nat.h> | ||
14 | #include <linux/netfilter/nf_conntrack_pptp.h> | ||
15 | |||
16 | /* per conntrack: nat application helper private data */ | ||
17 | union nf_conntrack_nat_help { | ||
18 | /* insert nat helper private data here */ | ||
19 | struct nf_nat_pptp nat_pptp_info; | ||
20 | }; | ||
21 | |||
22 | struct nf_conn_nat { | ||
23 | struct nf_nat_info info; | ||
24 | union nf_conntrack_nat_help help; | ||
25 | #if defined(CONFIG_IP_NF_TARGET_MASQUERADE) || \ | ||
26 | defined(CONFIG_IP_NF_TARGET_MASQUERADE_MODULE) | ||
27 | int masq_index; | ||
28 | #endif | ||
29 | }; | ||
30 | #endif /* CONFIG_NF_NAT_NEEDED */ | ||
31 | |||
32 | /* Returns new sk_buff, or NULL */ | 12 | /* Returns new sk_buff, or NULL */ |
33 | struct sk_buff * | 13 | struct sk_buff *nf_ct_ipv4_ct_gather_frags(struct sk_buff *skb); |
34 | nf_ct_ipv4_ct_gather_frags(struct sk_buff *skb); | ||
35 | 14 | ||
36 | extern struct nf_conntrack_l4proto nf_conntrack_l4proto_tcp4; | 15 | extern struct nf_conntrack_l4proto nf_conntrack_l4proto_tcp4; |
37 | extern struct nf_conntrack_l4proto nf_conntrack_l4proto_udp4; | 16 | extern struct nf_conntrack_l4proto nf_conntrack_l4proto_udp4; |
diff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h index 4732432f8eb0..12a0e793cc0b 100644 --- a/include/net/netfilter/nf_conntrack.h +++ b/include/net/netfilter/nf_conntrack.h | |||
@@ -280,6 +280,7 @@ nf_conntrack_unregister_cache(u_int32_t features); | |||
280 | * nat: nf_conn .. nf_conn_nat, nf_conn .. nf_conn_nat .. nf_conn help | 280 | * nat: nf_conn .. nf_conn_nat, nf_conn .. nf_conn_nat .. nf_conn help |
281 | */ | 281 | */ |
282 | #ifdef CONFIG_NF_NAT_NEEDED | 282 | #ifdef CONFIG_NF_NAT_NEEDED |
283 | #include <net/netfilter/nf_nat.h> | ||
283 | static inline struct nf_conn_nat *nfct_nat(const struct nf_conn *ct) | 284 | static inline struct nf_conn_nat *nfct_nat(const struct nf_conn *ct) |
284 | { | 285 | { |
285 | unsigned int offset = sizeof(struct nf_conn); | 286 | unsigned int offset = sizeof(struct nf_conn); |
diff --git a/include/net/netfilter/nf_nat.h b/include/net/netfilter/nf_nat.h index bc57dd7b9b5c..47d3dc107a6a 100644 --- a/include/net/netfilter/nf_nat.h +++ b/include/net/netfilter/nf_nat.h | |||
@@ -51,6 +51,7 @@ struct nf_nat_multi_range_compat | |||
51 | 51 | ||
52 | #ifdef __KERNEL__ | 52 | #ifdef __KERNEL__ |
53 | #include <linux/list.h> | 53 | #include <linux/list.h> |
54 | #include <linux/netfilter/nf_conntrack_pptp.h> | ||
54 | 55 | ||
55 | /* The structure embedded in the conntrack structure. */ | 56 | /* The structure embedded in the conntrack structure. */ |
56 | struct nf_nat_info | 57 | struct nf_nat_info |
@@ -59,6 +60,23 @@ struct nf_nat_info | |||
59 | struct nf_nat_seq seq[IP_CT_DIR_MAX]; | 60 | struct nf_nat_seq seq[IP_CT_DIR_MAX]; |
60 | }; | 61 | }; |
61 | 62 | ||
63 | /* per conntrack: nat application helper private data */ | ||
64 | union nf_conntrack_nat_help | ||
65 | { | ||
66 | /* insert nat helper private data here */ | ||
67 | struct nf_nat_pptp nat_pptp_info; | ||
68 | }; | ||
69 | |||
70 | struct nf_conn_nat | ||
71 | { | ||
72 | struct nf_nat_info info; | ||
73 | union nf_conntrack_nat_help help; | ||
74 | #if defined(CONFIG_IP_NF_TARGET_MASQUERADE) || \ | ||
75 | defined(CONFIG_IP_NF_TARGET_MASQUERADE_MODULE) | ||
76 | int masq_index; | ||
77 | #endif | ||
78 | }; | ||
79 | |||
62 | struct nf_conn; | 80 | struct nf_conn; |
63 | 81 | ||
64 | /* Set up the info structure to map into this range. */ | 82 | /* Set up the info structure to map into this range. */ |
diff --git a/include/net/netfilter/nf_nat_core.h b/include/net/netfilter/nf_nat_core.h index 9778ffa93440..c3cd127ba4bb 100644 --- a/include/net/netfilter/nf_nat_core.h +++ b/include/net/netfilter/nf_nat_core.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define _NF_NAT_CORE_H | 2 | #define _NF_NAT_CORE_H |
3 | #include <linux/list.h> | 3 | #include <linux/list.h> |
4 | #include <net/netfilter/nf_conntrack.h> | 4 | #include <net/netfilter/nf_conntrack.h> |
5 | #include <net/netfilter/nf_nat.h> | ||
5 | 6 | ||
6 | /* This header used to share core functionality between the standalone | 7 | /* This header used to share core functionality between the standalone |
7 | NAT module, and the compatibility layer's use of NAT for masquerading. */ | 8 | NAT module, and the compatibility layer's use of NAT for masquerading. */ |