cregit-Linux how code gets into the kernel

Release 4.16 net/netfilter/nf_flow_table_inet.c

Directory: net/netfilter
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/netfilter.h>
#include <linux/rhashtable.h>
#include <net/netfilter/nf_flow_table.h>
#include <net/netfilter/nf_tables.h>


static unsigned int nf_flow_offload_inet_hook(void *priv, struct sk_buff *skb, const struct nf_hook_state *state) { switch (skb->protocol) { case htons(ETH_P_IP): return nf_flow_offload_ip_hook(priv, skb, state); case htons(ETH_P_IPV6): return nf_flow_offload_ipv6_hook(priv, skb, state); } return NF_ACCEPT; }

Contributors

PersonTokensPropCommitsCommitProp
Pablo Neira Ayuso65100.00%1100.00%
Total65100.00%1100.00%

static struct nf_flowtable_type flowtable_inet = { .family = NFPROTO_INET, .params = &nf_flow_offload_rhash_params, .gc = nf_flow_offload_work_gc, .free = nf_flow_table_free, .hook = nf_flow_offload_inet_hook, .owner = THIS_MODULE, };
static int __init nf_flow_inet_module_init(void) { nft_register_flowtable_type(&flowtable_inet); return 0; }

Contributors

PersonTokensPropCommitsCommitProp
Pablo Neira Ayuso18100.00%1100.00%
Total18100.00%1100.00%


static void __exit nf_flow_inet_module_exit(void) { nft_unregister_flowtable_type(&flowtable_inet); }

Contributors

PersonTokensPropCommitsCommitProp
Pablo Neira Ayuso15100.00%1100.00%
Total15100.00%1100.00%

module_init(nf_flow_inet_module_init); module_exit(nf_flow_inet_module_exit); MODULE_LICENSE("GPL"); MODULE_AUTHOR("Pablo Neira Ayuso <pablo@netfilter.org>"); MODULE_ALIAS_NF_FLOWTABLE(1); /* NFPROTO_INET */

Overall Contributors

PersonTokensPropCommitsCommitProp
Pablo Neira Ayuso183100.00%2100.00%
Total183100.00%2100.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.