[NETFILTER]: nf_queue: move list_head/skb/id to struct nf_info
[cascardo/linux.git] / net / netfilter / xt_TRACE.c
1 /* This is a module which is used to mark packets for tracing.
2  */
3 #include <linux/module.h>
4 #include <linux/skbuff.h>
5
6 #include <linux/netfilter/x_tables.h>
7
8 MODULE_LICENSE("GPL");
9 MODULE_ALIAS("ipt_TRACE");
10 MODULE_ALIAS("ip6t_TRACE");
11
12 static unsigned int
13 trace_tg(struct sk_buff *skb, const struct net_device *in,
14          const struct net_device *out, unsigned int hooknum,
15          const struct xt_target *target, const void *targinfo)
16 {
17         skb->nf_trace = 1;
18         return XT_CONTINUE;
19 }
20
21 static struct xt_target trace_tg_reg[] __read_mostly = {
22         {
23                 .name           = "TRACE",
24                 .family         = AF_INET,
25                 .target         = trace_tg,
26                 .table          = "raw",
27                 .me             = THIS_MODULE,
28         },
29         {
30                 .name           = "TRACE",
31                 .family         = AF_INET6,
32                 .target         = trace_tg,
33                 .table          = "raw",
34                 .me             = THIS_MODULE,
35         },
36 };
37
38 static int __init trace_tg_init(void)
39 {
40         return xt_register_targets(trace_tg_reg, ARRAY_SIZE(trace_tg_reg));
41 }
42
43 static void __exit trace_tg_exit(void)
44 {
45         xt_unregister_targets(trace_tg_reg, ARRAY_SIZE(trace_tg_reg));
46 }
47
48 module_init(trace_tg_init);
49 module_exit(trace_tg_exit);