Lines Matching full:hook

79 	u8 hook;  member
99 nf_hookfn *hook; member
110 nf_hookfn *hook; member
124 /* trailer: pointers to original orig_ops of each hook,
129 * needed in slow path (hook register/unregister):
133 * only needed when a hook is deleted, not during
154 return entry->hook(entry->priv, skb, state); in nf_hook_entry_hookfn()
158 unsigned int hook, in nf_hook_state_init() argument
166 p->hook = hook; in nf_hook_state_init()
194 /* Function to register/unregister hook points. */
217 * nf_hook - call a netfilter hook
219 * Returns 1 if the hook has allowed the packet to pass. The function
221 * value indicates the packet has been consumed by the hook.
223 static inline int nf_hook(u_int8_t pf, unsigned int hook, struct net *net, in nf_hook() argument
233 __builtin_constant_p(hook) && in nf_hook()
234 !static_key_false(&nf_hooks_needed[pf][hook])) in nf_hook()
241 hook_head = rcu_dereference(net->nf.hooks_ipv4[hook]); in nf_hook()
244 hook_head = rcu_dereference(net->nf.hooks_ipv6[hook]); in nf_hook()
248 if (WARN_ON_ONCE(hook >= ARRAY_SIZE(net->nf.hooks_arp))) in nf_hook()
250 hook_head = rcu_dereference(net->nf.hooks_arp[hook]); in nf_hook()
255 hook_head = rcu_dereference(net->nf.hooks_bridge[hook]); in nf_hook()
266 nf_hook_state_init(&state, hook, pf, indev, outdev, in nf_hook()
276 /* Activate hook; either okfn or kfree_skb called, unless a hook
277 returns NF_STOLEN (in which case, it's up to the hook to deal with
294 NF_HOOK_COND(uint8_t pf, unsigned int hook, struct net *net, struct sock *sk, in NF_HOOK_COND() argument
302 ((ret = nf_hook(pf, hook, net, sk, skb, in, out, okfn)) == 1)) in NF_HOOK_COND()
308 NF_HOOK(uint8_t pf, unsigned int hook, struct net *net, struct sock *sk, struct sk_buff *skb, in NF_HOOK() argument
312 int ret = nf_hook(pf, hook, net, sk, skb, in, out, okfn); in NF_HOOK()
319 NF_HOOK_LIST(uint8_t pf, unsigned int hook, struct net *net, struct sock *sk, in NF_HOOK_LIST() argument
327 __builtin_constant_p(hook) && in NF_HOOK_LIST()
328 !static_key_false(&nf_hooks_needed[pf][hook])) in NF_HOOK_LIST()
335 hook_head = rcu_dereference(net->nf.hooks_ipv4[hook]); in NF_HOOK_LIST()
338 hook_head = rcu_dereference(net->nf.hooks_ipv6[hook]); in NF_HOOK_LIST()
348 nf_hook_state_init(&state, hook, pf, in, out, sk, net, okfn); in NF_HOOK_LIST()
364 __sum16 nf_checksum(struct sk_buff *skb, unsigned int hook,
368 __sum16 nf_checksum_partial(struct sk_buff *skb, unsigned int hook,
410 NF_HOOK_COND(uint8_t pf, unsigned int hook, struct net *net, struct sock *sk, in NF_HOOK_COND() argument
419 NF_HOOK(uint8_t pf, unsigned int hook, struct net *net, struct sock *sk, in NF_HOOK() argument
427 NF_HOOK_LIST(uint8_t pf, unsigned int hook, struct net *net, struct sock *sk, in NF_HOOK_LIST() argument
434 static inline int nf_hook(u_int8_t pf, unsigned int hook, struct net *net, in nf_hook() argument