[PARISC] irq_affinityp[] only available for SMP builds
[linux-2.6.22.y-op.git] / net / netfilter / nf_conntrack_proto_generic.c
blob36425f6c833f0b38505549c3b3e33c764847ad31
1 /* (C) 1999-2001 Paul `Rusty' Russell
2 * (C) 2002-2004 Netfilter Core Team <coreteam@netfilter.org>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
8 * 16 Dec 2003: Yasuyuki Kozakai @USAGI <yasuyuki.kozakai@toshiba.co.jp>
9 * - enable working with L3 protocol independent connection tracking.
11 * Derived from net/ipv4/netfilter/ip_conntrack_proto_generic.c
14 #include <linux/types.h>
15 #include <linux/sched.h>
16 #include <linux/timer.h>
17 #include <linux/netfilter.h>
18 #include <net/netfilter/nf_conntrack_protocol.h>
20 unsigned long nf_ct_generic_timeout = 600*HZ;
22 static int generic_pkt_to_tuple(const struct sk_buff *skb,
23 unsigned int dataoff,
24 struct nf_conntrack_tuple *tuple)
26 tuple->src.u.all = 0;
27 tuple->dst.u.all = 0;
29 return 1;
32 static int generic_invert_tuple(struct nf_conntrack_tuple *tuple,
33 const struct nf_conntrack_tuple *orig)
35 tuple->src.u.all = 0;
36 tuple->dst.u.all = 0;
38 return 1;
41 /* Print out the per-protocol part of the tuple. */
42 static int generic_print_tuple(struct seq_file *s,
43 const struct nf_conntrack_tuple *tuple)
45 return 0;
48 /* Print out the private part of the conntrack. */
49 static int generic_print_conntrack(struct seq_file *s,
50 const struct nf_conn *state)
52 return 0;
55 /* Returns verdict for packet, or -1 for invalid. */
56 static int packet(struct nf_conn *conntrack,
57 const struct sk_buff *skb,
58 unsigned int dataoff,
59 enum ip_conntrack_info ctinfo,
60 int pf,
61 unsigned int hooknum)
63 nf_ct_refresh_acct(conntrack, ctinfo, skb, nf_ct_generic_timeout);
64 return NF_ACCEPT;
67 /* Called when a new connection for this protocol found. */
68 static int new(struct nf_conn *conntrack, const struct sk_buff *skb,
69 unsigned int dataoff)
71 return 1;
74 struct nf_conntrack_protocol nf_conntrack_generic_protocol =
76 .l3proto = PF_UNSPEC,
77 .proto = 0,
78 .name = "unknown",
79 .pkt_to_tuple = generic_pkt_to_tuple,
80 .invert_tuple = generic_invert_tuple,
81 .print_tuple = generic_print_tuple,
82 .print_conntrack = generic_print_conntrack,
83 .packet = packet,
84 .new = new,