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 /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 'net')
-rw-r--r-- | net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c | 6 | ||||
-rw-r--r-- | net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c | 18 | ||||
-rw-r--r-- | net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c | 3 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_expect.c | 1 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_l3proto_generic.c | 2 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_standalone.c | 7 |
6 files changed, 0 insertions, 37 deletions
diff --git a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c index 370df0fdb2..d1907082d7 100644 --- a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c +++ b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c | |||
@@ -38,8 +38,6 @@ | |||
38 | #define DEBUGP(format, args...) | 38 | #define DEBUGP(format, args...) |
39 | #endif | 39 | #endif |
40 | 40 | ||
41 | DECLARE_PER_CPU(struct nf_conntrack_stat, nf_conntrack_stat); | ||
42 | |||
43 | static int ipv4_pkt_to_tuple(const struct sk_buff *skb, unsigned int nhoff, | 41 | static int ipv4_pkt_to_tuple(const struct sk_buff *skb, unsigned int nhoff, |
44 | struct nf_conntrack_tuple *tuple) | 42 | struct nf_conntrack_tuple *tuple) |
45 | { | 43 | { |
@@ -429,10 +427,6 @@ struct nf_conntrack_l3proto nf_conntrack_l3proto_ipv4 = { | |||
429 | .me = THIS_MODULE, | 427 | .me = THIS_MODULE, |
430 | }; | 428 | }; |
431 | 429 | ||
432 | extern struct nf_conntrack_l4proto nf_conntrack_l4proto_tcp4; | ||
433 | extern struct nf_conntrack_l4proto nf_conntrack_l4proto_udp4; | ||
434 | extern struct nf_conntrack_l4proto nf_conntrack_l4proto_icmp; | ||
435 | |||
436 | MODULE_ALIAS("nf_conntrack-" __stringify(AF_INET)); | 430 | MODULE_ALIAS("nf_conntrack-" __stringify(AF_INET)); |
437 | MODULE_LICENSE("GPL"); | 431 | MODULE_LICENSE("GPL"); |
438 | 432 | ||
diff --git a/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c b/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c index cdbba44017..9108ecc22b 100644 --- a/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c +++ b/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c | |||
@@ -43,8 +43,6 @@ | |||
43 | #define DEBUGP(format, args...) | 43 | #define DEBUGP(format, args...) |
44 | #endif | 44 | #endif |
45 | 45 | ||
46 | DECLARE_PER_CPU(struct ip_conntrack_stat, nf_conntrack_stat); | ||
47 | |||
48 | static int ipv6_pkt_to_tuple(const struct sk_buff *skb, unsigned int nhoff, | 46 | static int ipv6_pkt_to_tuple(const struct sk_buff *skb, unsigned int nhoff, |
49 | struct nf_conntrack_tuple *tuple) | 47 | struct nf_conntrack_tuple *tuple) |
50 | { | 48 | { |
@@ -211,11 +209,6 @@ out: | |||
211 | return nf_conntrack_confirm(pskb); | 209 | return nf_conntrack_confirm(pskb); |
212 | } | 210 | } |
213 | 211 | ||
214 | extern struct sk_buff *nf_ct_frag6_gather(struct sk_buff *skb); | ||
215 | extern void nf_ct_frag6_output(unsigned int hooknum, struct sk_buff *skb, | ||
216 | struct net_device *in, | ||
217 | struct net_device *out, | ||
218 | int (*okfn)(struct sk_buff *)); | ||
219 | static unsigned int ipv6_defrag(unsigned int hooknum, | 212 | static unsigned int ipv6_defrag(unsigned int hooknum, |
220 | struct sk_buff **pskb, | 213 | struct sk_buff **pskb, |
221 | const struct net_device *in, | 214 | const struct net_device *in, |
@@ -335,11 +328,6 @@ static struct nf_hook_ops ipv6_conntrack_ops[] = { | |||
335 | /* From nf_conntrack_proto_icmpv6.c */ | 328 | /* From nf_conntrack_proto_icmpv6.c */ |
336 | extern unsigned int nf_ct_icmpv6_timeout; | 329 | extern unsigned int nf_ct_icmpv6_timeout; |
337 | 330 | ||
338 | /* From nf_conntrack_reasm.c */ | ||
339 | extern unsigned int nf_ct_frag6_timeout; | ||
340 | extern unsigned int nf_ct_frag6_low_thresh; | ||
341 | extern unsigned int nf_ct_frag6_high_thresh; | ||
342 | |||
343 | static struct ctl_table_header *nf_ct_ipv6_sysctl_header; | 331 | static struct ctl_table_header *nf_ct_ipv6_sysctl_header; |
344 | 332 | ||
345 | static ctl_table nf_ct_sysctl_table[] = { | 333 | static ctl_table nf_ct_sysctl_table[] = { |
@@ -458,12 +446,6 @@ struct nf_conntrack_l3proto nf_conntrack_l3proto_ipv6 = { | |||
458 | .me = THIS_MODULE, | 446 | .me = THIS_MODULE, |
459 | }; | 447 | }; |
460 | 448 | ||
461 | extern struct nf_conntrack_l4proto nf_conntrack_l4proto_tcp6; | ||
462 | extern struct nf_conntrack_l4proto nf_conntrack_l4proto_udp6; | ||
463 | extern struct nf_conntrack_l4proto nf_conntrack_l4proto_icmpv6; | ||
464 | extern int nf_ct_frag6_init(void); | ||
465 | extern void nf_ct_frag6_cleanup(void); | ||
466 | |||
467 | MODULE_ALIAS("nf_conntrack-" __stringify(AF_INET6)); | 449 | MODULE_ALIAS("nf_conntrack-" __stringify(AF_INET6)); |
468 | MODULE_LICENSE("GPL"); | 450 | MODULE_LICENSE("GPL"); |
469 | MODULE_AUTHOR("Yasuyuki KOZAKAI @USAGI <yasuyuki.kozakai@toshiba.co.jp>"); | 451 | MODULE_AUTHOR("Yasuyuki KOZAKAI @USAGI <yasuyuki.kozakai@toshiba.co.jp>"); |
diff --git a/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c b/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c index 2cdf225f16..b3b468c0ef 100644 --- a/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c +++ b/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c | |||
@@ -142,9 +142,6 @@ static int icmpv6_new(struct nf_conn *conntrack, | |||
142 | return 1; | 142 | return 1; |
143 | } | 143 | } |
144 | 144 | ||
145 | extern int | ||
146 | nf_ct_ipv6_skip_exthdr(struct sk_buff *skb, int start, u8 *nexthdrp, int len); | ||
147 | extern struct nf_conntrack_l3proto nf_conntrack_l3proto_ipv6; | ||
148 | static int | 145 | static int |
149 | icmpv6_error_message(struct sk_buff *skb, | 146 | icmpv6_error_message(struct sk_buff *skb, |
150 | unsigned int icmp6off, | 147 | unsigned int icmp6off, |
diff --git a/net/netfilter/nf_conntrack_expect.c b/net/netfilter/nf_conntrack_expect.c index 7269bffd8e..79cfd79a42 100644 --- a/net/netfilter/nf_conntrack_expect.c +++ b/net/netfilter/nf_conntrack_expect.c | |||
@@ -28,7 +28,6 @@ | |||
28 | 28 | ||
29 | LIST_HEAD(nf_conntrack_expect_list); | 29 | LIST_HEAD(nf_conntrack_expect_list); |
30 | kmem_cache_t *nf_conntrack_expect_cachep __read_mostly; | 30 | kmem_cache_t *nf_conntrack_expect_cachep __read_mostly; |
31 | DECLARE_PER_CPU(struct ip_conntrack_stat, nf_conntrack_stat); | ||
32 | static unsigned int nf_conntrack_expect_next_id; | 31 | static unsigned int nf_conntrack_expect_next_id; |
33 | 32 | ||
34 | /* nf_conntrack_expect helper functions */ | 33 | /* nf_conntrack_expect helper functions */ |
diff --git a/net/netfilter/nf_conntrack_l3proto_generic.c b/net/netfilter/nf_conntrack_l3proto_generic.c index 1852c9d927..3124b3a301 100644 --- a/net/netfilter/nf_conntrack_l3proto_generic.c +++ b/net/netfilter/nf_conntrack_l3proto_generic.c | |||
@@ -37,8 +37,6 @@ | |||
37 | #define DEBUGP(format, args...) | 37 | #define DEBUGP(format, args...) |
38 | #endif | 38 | #endif |
39 | 39 | ||
40 | DECLARE_PER_CPU(struct nf_conntrack_stat, nf_conntrack_stat); | ||
41 | |||
42 | static int generic_pkt_to_tuple(const struct sk_buff *skb, unsigned int nhoff, | 40 | static int generic_pkt_to_tuple(const struct sk_buff *skb, unsigned int nhoff, |
43 | struct nf_conntrack_tuple *tuple) | 41 | struct nf_conntrack_tuple *tuple) |
44 | { | 42 | { |
diff --git a/net/netfilter/nf_conntrack_standalone.c b/net/netfilter/nf_conntrack_standalone.c index f87d333b0c..2283a26869 100644 --- a/net/netfilter/nf_conntrack_standalone.c +++ b/net/netfilter/nf_conntrack_standalone.c | |||
@@ -44,9 +44,6 @@ | |||
44 | 44 | ||
45 | MODULE_LICENSE("GPL"); | 45 | MODULE_LICENSE("GPL"); |
46 | 46 | ||
47 | extern atomic_t nf_conntrack_count; | ||
48 | DECLARE_PER_CPU(struct ip_conntrack_stat, nf_conntrack_stat); | ||
49 | |||
50 | #ifdef CONFIG_PROC_FS | 47 | #ifdef CONFIG_PROC_FS |
51 | int | 48 | int |
52 | print_tuple(struct seq_file *s, const struct nf_conntrack_tuple *tuple, | 49 | print_tuple(struct seq_file *s, const struct nf_conntrack_tuple *tuple, |
@@ -334,10 +331,6 @@ int nf_conntrack_checksum __read_mostly = 1; | |||
334 | 331 | ||
335 | #ifdef CONFIG_SYSCTL | 332 | #ifdef CONFIG_SYSCTL |
336 | 333 | ||
337 | /* From nf_conntrack_core.c */ | ||
338 | extern int nf_conntrack_max; | ||
339 | extern unsigned int nf_conntrack_htable_size; | ||
340 | |||
341 | /* From nf_conntrack_proto_tcp.c */ | 334 | /* From nf_conntrack_proto_tcp.c */ |
342 | extern unsigned int nf_ct_tcp_timeout_syn_sent; | 335 | extern unsigned int nf_ct_tcp_timeout_syn_sent; |
343 | extern unsigned int nf_ct_tcp_timeout_syn_recv; | 336 | extern unsigned int nf_ct_tcp_timeout_syn_recv; |