diff options
author | Patrick McHardy <kaber@trash.net> | 2006-11-28 20:35:15 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-03 00:31:16 -0500 |
commit | f8eb24a89afa12b48fa7e39775faea6d64b8e538 (patch) | |
tree | cab6364c9155bebad3b20a8125c7b2a086c36356 /include/net | |
parent | d73468533451fd896324058d9ba649c11ba3e3ee (diff) |
[NETFILTER]: nf_conntrack: move extern declaration to header files
Using extern in a C file is a bad idea because the compiler can't
catch type errors.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/netfilter/ipv4/nf_conntrack_ipv4.h | 4 | ||||
-rw-r--r-- | include/net/netfilter/ipv6/nf_conntrack_ipv6.h | 25 | ||||
-rw-r--r-- | include/net/netfilter/nf_conntrack.h | 5 |
3 files changed, 34 insertions, 0 deletions
diff --git a/include/net/netfilter/ipv4/nf_conntrack_ipv4.h b/include/net/netfilter/ipv4/nf_conntrack_ipv4.h index 91684436af8e..8c4f7e89ce55 100644 --- a/include/net/netfilter/ipv4/nf_conntrack_ipv4.h +++ b/include/net/netfilter/ipv4/nf_conntrack_ipv4.h | |||
@@ -37,4 +37,8 @@ struct nf_conntrack_ipv4 { | |||
37 | struct sk_buff * | 37 | struct sk_buff * |
38 | nf_ct_ipv4_ct_gather_frags(struct sk_buff *skb); | 38 | nf_ct_ipv4_ct_gather_frags(struct sk_buff *skb); |
39 | 39 | ||
40 | extern struct nf_conntrack_l4proto nf_conntrack_l4proto_tcp4; | ||
41 | extern struct nf_conntrack_l4proto nf_conntrack_l4proto_udp4; | ||
42 | extern struct nf_conntrack_l4proto nf_conntrack_l4proto_icmp; | ||
43 | |||
40 | #endif /*_NF_CONNTRACK_IPV4_H*/ | 44 | #endif /*_NF_CONNTRACK_IPV4_H*/ |
diff --git a/include/net/netfilter/ipv6/nf_conntrack_ipv6.h b/include/net/netfilter/ipv6/nf_conntrack_ipv6.h new file mode 100644 index 000000000000..b4b6049e01fa --- /dev/null +++ b/include/net/netfilter/ipv6/nf_conntrack_ipv6.h | |||
@@ -0,0 +1,25 @@ | |||
1 | #ifndef _NF_CONNTRACK_IPV6_H | ||
2 | #define _NF_CONNTRACK_IPV6_H | ||
3 | |||
4 | extern struct nf_conntrack_l3proto nf_conntrack_l3proto_ipv6; | ||
5 | |||
6 | extern struct nf_conntrack_l4proto nf_conntrack_l4proto_tcp6; | ||
7 | extern struct nf_conntrack_l4proto nf_conntrack_l4proto_udp6; | ||
8 | extern struct nf_conntrack_l4proto nf_conntrack_l4proto_icmpv6; | ||
9 | |||
10 | extern int nf_ct_ipv6_skip_exthdr(struct sk_buff *skb, int start, | ||
11 | u8 *nexthdrp, int len); | ||
12 | |||
13 | extern int nf_ct_frag6_init(void); | ||
14 | extern void nf_ct_frag6_cleanup(void); | ||
15 | extern struct sk_buff *nf_ct_frag6_gather(struct sk_buff *skb); | ||
16 | extern void nf_ct_frag6_output(unsigned int hooknum, struct sk_buff *skb, | ||
17 | struct net_device *in, | ||
18 | struct net_device *out, | ||
19 | int (*okfn)(struct sk_buff *)); | ||
20 | |||
21 | extern unsigned int nf_ct_frag6_timeout; | ||
22 | extern unsigned int nf_ct_frag6_low_thresh; | ||
23 | extern unsigned int nf_ct_frag6_high_thresh; | ||
24 | |||
25 | #endif /* _NF_CONNTRACK_IPV6_H*/ | ||
diff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h index 9a2950551cd3..d0d0e6491448 100644 --- a/include/net/netfilter/nf_conntrack.h +++ b/include/net/netfilter/nf_conntrack.h | |||
@@ -79,6 +79,8 @@ struct nf_conn_help { | |||
79 | 79 | ||
80 | 80 | ||
81 | #include <net/netfilter/ipv4/nf_conntrack_ipv4.h> | 81 | #include <net/netfilter/ipv4/nf_conntrack_ipv4.h> |
82 | #include <net/netfilter/ipv6/nf_conntrack_ipv6.h> | ||
83 | |||
82 | struct nf_conn | 84 | struct nf_conn |
83 | { | 85 | { |
84 | /* Usage count in here is 1 for hash table/destruct timer, 1 per skb, | 86 | /* Usage count in here is 1 for hash table/destruct timer, 1 per skb, |
@@ -241,7 +243,10 @@ static inline int nf_ct_is_dying(struct nf_conn *ct) | |||
241 | 243 | ||
242 | extern unsigned int nf_conntrack_htable_size; | 244 | extern unsigned int nf_conntrack_htable_size; |
243 | extern int nf_conntrack_checksum; | 245 | extern int nf_conntrack_checksum; |
246 | extern atomic_t nf_conntrack_count; | ||
247 | extern int nf_conntrack_max; | ||
244 | 248 | ||
249 | DECLARE_PER_CPU(struct ip_conntrack_stat, nf_conntrack_stat); | ||
245 | #define NF_CT_STAT_INC(count) (__get_cpu_var(nf_conntrack_stat).count++) | 250 | #define NF_CT_STAT_INC(count) (__get_cpu_var(nf_conntrack_stat).count++) |
246 | 251 | ||
247 | /* no helper, no nat */ | 252 | /* no helper, no nat */ |