cregit-Linux how code gets into the kernel

Release 4.11 net/netfilter/xt_TRACE.c

Directory: net/netfilter
/* 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>
#include <net/netfilter/nf_log.h>

MODULE_DESCRIPTION("Xtables: packet flow tracing");
MODULE_LICENSE("GPL");
MODULE_ALIAS("ipt_TRACE");
MODULE_ALIAS("ip6t_TRACE");


static int trace_tg_check(const struct xt_tgchk_param *par) { return nf_logger_find_get(par->family, NF_LOG_TYPE_LOG); }

Contributors

PersonTokensPropCommitsCommitProp
Liping Zhang22100.00%1100.00%
Total22100.00%1100.00%


static void trace_tg_destroy(const struct xt_tgdtor_param *par) { nf_logger_put(par->family, NF_LOG_TYPE_LOG); }

Contributors

PersonTokensPropCommitsCommitProp
Liping Zhang21100.00%1100.00%
Total21100.00%1100.00%


static unsigned int trace_tg(struct sk_buff *skb, const struct xt_action_param *par) { skb->nf_trace = 1; return XT_CONTINUE; }

Contributors

PersonTokensPropCommitsCommitProp
Jozsef Kadlecsik2281.48%120.00%
Jan Engelhardt311.11%360.00%
Herbert Xu27.41%120.00%
Total27100.00%5100.00%

static struct xt_target trace_tg_reg __read_mostly = { .name = "TRACE", .revision = 0, .family = NFPROTO_UNSPEC, .table = "raw", .target = trace_tg, .checkentry = trace_tg_check, .destroy = trace_tg_destroy, .me = THIS_MODULE, };
static int __init trace_tg_init(void) { return xt_register_target(&trace_tg_reg); }

Contributors

PersonTokensPropCommitsCommitProp
Jozsef Kadlecsik1275.00%133.33%
Jan Engelhardt425.00%266.67%
Total16100.00%3100.00%


static void __exit trace_tg_exit(void) { xt_unregister_target(&trace_tg_reg); }

Contributors

PersonTokensPropCommitsCommitProp
Jozsef Kadlecsik1173.33%133.33%
Jan Engelhardt426.67%266.67%
Total15100.00%3100.00%

module_init(trace_tg_init); module_exit(trace_tg_exit);

Overall Contributors

PersonTokensPropCommitsCommitProp
Jozsef Kadlecsik10956.77%111.11%
Liping Zhang5629.17%111.11%
Jan Engelhardt2412.50%555.56%
Herbert Xu21.04%111.11%
Patrick McHardy10.52%111.11%
Total192100.00%9100.00%
Directory: net/netfilter
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.