Blame view
net/netfilter/xt_TRACE.c
852 Bytes
ba9dda3ab [NETFILTER]: x_ta... |
1 2 3 4 5 6 |
/* This is a module which is used to mark packets for tracing. */ #include <linux/module.h> #include <linux/skbuff.h> #include <linux/netfilter/x_tables.h> |
2ae15b64e [NETFILTER]: Upda... |
7 |
MODULE_DESCRIPTION("Xtables: packet flow tracing"); |
ba9dda3ab [NETFILTER]: x_ta... |
8 9 10 11 12 |
MODULE_LICENSE("GPL"); MODULE_ALIAS("ipt_TRACE"); MODULE_ALIAS("ip6t_TRACE"); static unsigned int |
4b560b447 netfilter: xtable... |
13 |
trace_tg(struct sk_buff *skb, const struct xt_action_param *par) |
ba9dda3ab [NETFILTER]: x_ta... |
14 |
{ |
3db05fea5 [NETFILTER]: Repl... |
15 |
skb->nf_trace = 1; |
ba9dda3ab [NETFILTER]: x_ta... |
16 17 |
return XT_CONTINUE; } |
55b69e910 netfilter: implem... |
18 19 20 21 22 23 24 |
static struct xt_target trace_tg_reg __read_mostly = { .name = "TRACE", .revision = 0, .family = NFPROTO_UNSPEC, .table = "raw", .target = trace_tg, .me = THIS_MODULE, |
ba9dda3ab [NETFILTER]: x_ta... |
25 |
}; |
d3c5ee6d5 [NETFILTER]: x_ta... |
26 |
static int __init trace_tg_init(void) |
ba9dda3ab [NETFILTER]: x_ta... |
27 |
{ |
55b69e910 netfilter: implem... |
28 |
return xt_register_target(&trace_tg_reg); |
ba9dda3ab [NETFILTER]: x_ta... |
29 |
} |
d3c5ee6d5 [NETFILTER]: x_ta... |
30 |
static void __exit trace_tg_exit(void) |
ba9dda3ab [NETFILTER]: x_ta... |
31 |
{ |
55b69e910 netfilter: implem... |
32 |
xt_unregister_target(&trace_tg_reg); |
ba9dda3ab [NETFILTER]: x_ta... |
33 |
} |
d3c5ee6d5 [NETFILTER]: x_ta... |
34 35 |
module_init(trace_tg_init); module_exit(trace_tg_exit); |