Home
last modified time | relevance | path

Searched refs:hooknum (Results 1 – 25 of 53) sorted by relevance

123

/linux/net/netfilter/
H A Dcore.c41 /* max hooks per family/hooknum */
276 nf_hook_entry_head(struct net *net, int pf, unsigned int hooknum, in __nf_hook_entries_try_shrink()
284 if (WARN_ON_ONCE(ARRAY_SIZE(net->nf.hooks_arp) <= hooknum)) in nf_hook_entry_head()
286 return net->nf.hooks_arp + hooknum; in nf_hook_entry_head()
290 if (WARN_ON_ONCE(ARRAY_SIZE(net->nf.hooks_bridge) <= hooknum)) in nf_hook_entry_head()
292 return net->nf.hooks_bridge + hooknum; in nf_hook_entry_head()
296 if (WARN_ON_ONCE(hooknum != NF_INET_INGRESS)) in nf_hook_entry_head()
305 if (WARN_ON_ONCE(ARRAY_SIZE(net->nf.hooks_ipv4) <= hooknum)) in nf_hook_entry_head()
307 return net->nf.hooks_ipv4 + hooknum; in nf_hook_entry_head()
309 if (WARN_ON_ONCE(ARRAY_SIZE(net->nf.hooks_ipv6) <= hooknum)) in nf_hook_entry_head()
279 nf_hook_entry_head(struct net * net,int pf,unsigned int hooknum,struct net_device * dev) nf_hook_entry_head() argument
337 nf_ingress_check(struct net * net,const struct nf_hook_ops * reg,int hooknum) nf_ingress_check() argument
369 int hooknum; nf_static_key_inc() local
384 int hooknum; nf_static_key_dec() local
[all...]
H A Dnf_nat_ovs.c16 int hooknum, err = NF_ACCEPT; in nf_ct_nat_execute() local
20 hooknum = NF_INET_LOCAL_IN; /* Source NAT */ in nf_ct_nat_execute()
22 hooknum = NF_INET_LOCAL_OUT; /* Destination NAT */ in nf_ct_nat_execute()
30 hooknum)) in nf_ct_nat_execute()
43 hooknum, in nf_ct_nat_execute()
62 : nf_nat_alloc_null_binding(ct, hooknum); in nf_ct_nat_execute()
77 err = nf_nat_packet(ct, ctinfo, hooknum, skb); in nf_ct_nat_execute()
H A Dnf_nat_redirect.c51 unsigned int hooknum) in nf_nat_redirect_ipv4() argument
55 WARN_ON(hooknum != NF_INET_PRE_ROUTING && in nf_nat_redirect_ipv4()
56 hooknum != NF_INET_LOCAL_OUT); in nf_nat_redirect_ipv4()
59 if (hooknum == NF_INET_LOCAL_OUT) { in nf_nat_redirect_ipv4()
105 unsigned int hooknum) in nf_nat_redirect_ipv6() argument
109 if (hooknum == NF_INET_LOCAL_OUT) { in nf_nat_redirect_ipv6()
H A Dnfnetlink_hook.c200 u32 hooknum; in nfnl_hook_dump_one() local
238 if (ops->pf == NFPROTO_INET && ops->hooknum == NF_INET_INGRESS) in nfnl_hook_dump_one()
239 hooknum = NF_NETDEV_INGRESS; in nfnl_hook_dump_one()
241 hooknum = ops->hooknum; in nfnl_hook_dump_one()
243 ret = nla_put_be32(nlskb, NFNLA_HOOK_HOOKNUM, htonl(hooknum)); in nfnl_hook_dump_one()
390 u32 hooknum; in nfnl_hook_dump_start() local
392 hooknum = ntohl(nla_get_be32(nla[NFNLA_HOOK_HOOKNUM])); in nfnl_hook_dump_start()
393 if (hooknum > 255) in nfnl_hook_dump_start()
405 head = nfnl_hook_entries_head(family, hooknum, net, name); in nfnl_hook_dump_start()
417 ctx->hook = hooknum; in nfnl_hook_dump_start()
H A Dxt_repldata.h20 unsigned int bytes = 0, hooknum = 0, i = 0; \
38 for (; hook_mask != 0; hook_mask >>= 1, ++hooknum) { \
41 tbl->repl.hook_entry[hooknum] = bytes; \
42 tbl->repl.underflow[hooknum] = bytes; \
H A Dnf_bpf_link.c147 nf_link->hook_ops.pf, nf_link->hook_ops.hooknum, in bpf_nf_link_show_info()
158 info->netfilter.hooknum = nf_link->hook_ops.hooknum; in bpf_nf_link_fill_link_info()
187 if (attr->link_create.netfilter.hooknum >= NF_INET_NUMHOOKS) in bpf_nf_check_pf_and_hooks()
237 link->hook_ops.hooknum = attr->link_create.netfilter.hooknum; in bpf_nf_link_attach()
H A Dnf_log_syslog.c111 unsigned int hooknum, const struct sk_buff *skb, in nf_log_dump_packet_common() argument
135 unsigned int hooknum, const struct sk_buff *skb, in nf_log_arp_packet() argument
151 nf_log_dump_packet_common(m, pf, hooknum, skb, in, out, loginfo, in nf_log_arp_packet()
834 unsigned int hooknum, const struct sk_buff *skb, in nf_log_ip_packet() argument
850 nf_log_dump_packet_common(m, pf, hooknum, skb, in, in nf_log_ip_packet()
869 unsigned int hooknum, const struct sk_buff *skb, in nf_log_ip6_packet() argument
885 nf_log_dump_packet_common(m, pf, hooknum, skb, in, out, in nf_log_ip6_packet()
904 unsigned int hooknum, in nf_log_unknown_packet() argument
921 nf_log_dump_packet_common(m, pf, hooknum, skb, in, out, loginfo, in nf_log_unknown_packet()
930 unsigned int hooknum, in nf_log_netdev_packet() argument
[all …]
H A Dnf_nat_core.c859 nf_nat_alloc_null_binding(struct nf_conn *ct, unsigned int hooknum) in nf_nat_alloc_null_binding() argument
861 return __nf_nat_alloc_null_binding(ct, HOOK2MANIP(hooknum)); in nf_nat_alloc_null_binding()
868 unsigned int hooknum, in nf_nat_packet() argument
871 enum nf_nat_manip_type mtype = HOOK2MANIP(hooknum); in nf_nat_packet()
1186 unsigned int hooknum = ops->hooknum; in nf_nat_register_fn() local
1196 if (orig_nat_ops[i].hooknum == hooknum) { in nf_nat_register_fn()
1197 hooknum = i; in nf_nat_register_fn()
1241 priv = nat_ops[hooknum].priv; in nf_nat_register_fn()
1262 int hooknum = ops->hooknum; in nf_nat_unregister_fn() local
1278 if (nat_ops[i].hooknum == hooknum) { in nf_nat_unregister_fn()
[all …]
H A Dnf_conntrack_proto.c236 .hooknum = NF_INET_PRE_ROUTING,
242 .hooknum = NF_INET_LOCAL_OUT,
248 .hooknum = NF_INET_POST_ROUTING,
254 .hooknum = NF_INET_LOCAL_IN,
393 .hooknum = NF_INET_PRE_ROUTING,
399 .hooknum = NF_INET_LOCAL_OUT,
405 .hooknum = NF_INET_POST_ROUTING,
411 .hooknum = NF_INET_LOCAL_IN,
H A Dnf_nat_proto.c519 unsigned int hooknum) in nf_nat_icmp_reply_translation() argument
526 enum nf_nat_manip_type manip = HOOK2MANIP(hooknum); in nf_nat_icmp_reply_translation()
535 if (nf_ip_checksum(skb, hooknum, hdrlen, IPPROTO_ICMP)) in nf_nat_icmp_reply_translation()
790 .hooknum = NF_INET_PRE_ROUTING,
797 .hooknum = NF_INET_POST_ROUTING,
804 .hooknum = NF_INET_LOCAL_OUT,
811 .hooknum = NF_INET_LOCAL_IN,
833 unsigned int hooknum, in nf_nat_icmpv6_reply_translation() argument
841 enum nf_nat_manip_type manip = HOOK2MANIP(hooknum); in nf_nat_icmpv6_reply_translation()
849 if (nf_ip6_checksum(skb, hooknum, hdrlen, IPPROTO_ICMPV6)) in nf_nat_icmpv6_reply_translation()
[all …]
/linux/include/net/netfilter/
H A Dnf_nat.h19 #define HOOK2MANIP(hooknum) ((hooknum) != NF_INET_POST_ROUTING && \ argument
20 (hooknum) != NF_INET_LOCAL_IN)
44 unsigned int hooknum);
57 static inline bool nf_nat_oif_changed(unsigned int hooknum, in nf_nat_oif_changed() argument
63 return nat && nat->masq_index && hooknum == NF_INET_POST_ROUTING && in nf_nat_oif_changed()
77 unsigned int hooknum, struct sk_buff *skb);
88 unsigned int hooknum);
92 unsigned int hooknum, unsigned int hdrlen);
H A Dnf_log.h41 unsigned int hooknum,
82 unsigned int hooknum,
92 unsigned int hooknum,
H A Dnf_nat_redirect.h10 unsigned int hooknum);
13 unsigned int hooknum);
H A Dnf_nat_masquerade.h9 nf_nat_masquerade_ipv4(struct sk_buff *skb, unsigned int hooknum,
/linux/tools/testing/selftests/bpf/prog_tests/
H A Dnetfilter_link_attach.c11 __u32 hooknum; member
22 { .pf = NFPROTO_IPV4, .hooknum = 42, .name = "invalid-hooknum", },
31 .hooknum = NF_INET_POST_ROUTING,
39 .hooknum = NF_INET_FORWARD,
61 ASSERT_EQ(info.netfilter.hooknum, nf_expected.hooknum, "info nf hooknum"); in verify_netfilter_link_info()
89 X(opts, hooknum, i); in test_netfilter_link_attach()
/linux/net/ipv6/netfilter/
H A Dnf_defrag_ipv6_hooks.c31 static enum ip6_defrag_users nf_ct6_defrag_user(unsigned int hooknum, in nf_ct6_defrag_user() argument
46 if (hooknum == NF_INET_PRE_ROUTING) in nf_ct6_defrag_user()
80 .hooknum = NF_INET_PRE_ROUTING,
86 .hooknum = NF_INET_LOCAL_OUT,
H A Dip6table_nat.c38 .hooknum = NF_INET_PRE_ROUTING,
44 .hooknum = NF_INET_POST_ROUTING,
50 .hooknum = NF_INET_LOCAL_OUT,
56 .hooknum = NF_INET_LOCAL_IN,
H A Dnf_dup_ipv6.c47 void nf_dup_ipv6(struct net *net, struct sk_buff *skb, unsigned int hooknum, in nf_dup_ipv6() argument
61 if (hooknum == NF_INET_PRE_ROUTING || in nf_dup_ipv6()
62 hooknum == NF_INET_LOCAL_IN) { in nf_dup_ipv6()
/linux/net/ipv4/netfilter/
H A Diptable_nat.c36 .hooknum = NF_INET_PRE_ROUTING,
42 .hooknum = NF_INET_POST_ROUTING,
48 .hooknum = NF_INET_LOCAL_OUT,
54 .hooknum = NF_INET_LOCAL_IN,
H A Dnf_defrag_ipv4.c41 static enum ip_defrag_users nf_ct_defrag_user(unsigned int hooknum, in nf_ct_defrag_user() argument
56 if (hooknum == NF_INET_PRE_ROUTING) in nf_ct_defrag_user()
97 .hooknum = NF_INET_PRE_ROUTING,
103 .hooknum = NF_INET_LOCAL_OUT,
/linux/net/bridge/netfilter/
H A Debtable_nat.c57 .hooknum = NF_BR_LOCAL_OUT,
63 .hooknum = NF_BR_POST_ROUTING,
69 .hooknum = NF_BR_PRE_ROUTING,
H A Debtable_filter.c57 .hooknum = NF_BR_LOCAL_IN,
63 .hooknum = NF_BR_FORWARD,
69 .hooknum = NF_BR_LOCAL_OUT,
/linux/security/smack/
H A Dsmack_netfilter.c42 .hooknum = NF_INET_LOCAL_OUT,
49 .hooknum = NF_INET_LOCAL_OUT,
/linux/include/net/netfilter/ipv6/
H A Dnf_dup_ipv6.h7 void nf_dup_ipv6(struct net *net, struct sk_buff *skb, unsigned int hooknum,
/linux/include/net/netfilter/ipv4/
H A Dnf_dup_ipv4.h8 void nf_dup_ipv4(struct net *net, struct sk_buff *skb, unsigned int hooknum,

123