[NETFILTER]: nf_conntrack: move extern declaration to header files
[linux-2.6.git] / net / netfilter / nf_conntrack_l3proto_generic.c
1 /*
2  * (C) 2003,2004 USAGI/WIDE Project <http://www.linux-ipv6.org>
3  *
4  * Based largely upon the original ip_conntrack code which
5  * had the following copyright information:
6  *
7  * (C) 1999-2001 Paul `Rusty' Russell
8  * (C) 2002-2004 Netfilter Core Team <coreteam@netfilter.org>
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License version 2 as
12  * published by the Free Software Foundation.
13  *
14  * Author:
15  *      Yasuyuki Kozakai @USAGI <yasuyuki.kozakai@toshiba.co.jp>
16  */
17
18 #include <linux/types.h>
19 #include <linux/ip.h>
20 #include <linux/netfilter.h>
21 #include <linux/module.h>
22 #include <linux/skbuff.h>
23 #include <linux/icmp.h>
24 #include <linux/sysctl.h>
25 #include <net/ip.h>
26
27 #include <linux/netfilter_ipv4.h>
28 #include <net/netfilter/nf_conntrack.h>
29 #include <net/netfilter/nf_conntrack_l4proto.h>
30 #include <net/netfilter/nf_conntrack_l3proto.h>
31 #include <net/netfilter/nf_conntrack_core.h>
32 #include <net/netfilter/ipv4/nf_conntrack_ipv4.h>
33
34 #if 0
35 #define DEBUGP printk
36 #else
37 #define DEBUGP(format, args...)
38 #endif
39
40 static int generic_pkt_to_tuple(const struct sk_buff *skb, unsigned int nhoff,
41                                 struct nf_conntrack_tuple *tuple)
42 {
43         memset(&tuple->src.u3, 0, sizeof(tuple->src.u3));
44         memset(&tuple->dst.u3, 0, sizeof(tuple->dst.u3));
45
46         return 1;
47 }
48
49 static int generic_invert_tuple(struct nf_conntrack_tuple *tuple,
50                            const struct nf_conntrack_tuple *orig)
51 {
52         memset(&tuple->src.u3, 0, sizeof(tuple->src.u3));
53         memset(&tuple->dst.u3, 0, sizeof(tuple->dst.u3));
54
55         return 1;
56 }
57
58 static int generic_print_tuple(struct seq_file *s,
59                             const struct nf_conntrack_tuple *tuple)
60 {
61         return 0;
62 }
63
64 static int generic_print_conntrack(struct seq_file *s,
65                                 const struct nf_conn *conntrack)
66 {
67         return 0;
68 }
69
70 static int
71 generic_prepare(struct sk_buff **pskb, unsigned int hooknum,
72                 unsigned int *dataoff, u_int8_t *protonum)
73 {
74         /* Never track !!! */
75         return -NF_ACCEPT;
76 }
77
78
79 static u_int32_t generic_get_features(const struct nf_conntrack_tuple *tuple)
80                                 
81 {
82         return NF_CT_F_BASIC;
83 }
84
85 struct nf_conntrack_l3proto nf_conntrack_l3proto_generic = {
86         .l3proto         = PF_UNSPEC,
87         .name            = "unknown",
88         .pkt_to_tuple    = generic_pkt_to_tuple,
89         .invert_tuple    = generic_invert_tuple,
90         .print_tuple     = generic_print_tuple,
91         .print_conntrack = generic_print_conntrack,
92         .prepare         = generic_prepare,
93         .get_features    = generic_get_features,
94 };