Home
last modified time | relevance | path

Searched refs:nat (Results 1 – 25 of 45) sorted by relevance

12

/linux-6.6.21/fs/f2fs/
Dnode.h71 #define nat_get_nid(nat) ((nat)->ni.nid) argument
72 #define nat_set_nid(nat, n) ((nat)->ni.nid = (n)) argument
73 #define nat_get_blkaddr(nat) ((nat)->ni.blk_addr) argument
74 #define nat_set_blkaddr(nat, b) ((nat)->ni.blk_addr = (b)) argument
75 #define nat_get_ino(nat) ((nat)->ni.ino) argument
76 #define nat_set_ino(nat, i) ((nat)->ni.ino = (i)) argument
77 #define nat_get_version(nat) ((nat)->ni.version) argument
78 #define nat_set_version(nat, v) ((nat)->ni.version = (v)) argument
/linux-6.6.21/net/ipv4/netfilter/
Dnf_nat_pptp.c53 struct nf_conn_nat *nat; in pptp_nat_expected() local
55 nat = nf_ct_nat_ext_add(ct); in pptp_nat_expected()
56 if (WARN_ON_ONCE(!nat)) in pptp_nat_expected()
59 nat_pptp_info = &nat->help.nat_pptp_info; in pptp_nat_expected()
129 struct nf_conn_nat *nat = nfct_nat(ct); in pptp_outbound_pkt() local
135 if (WARN_ON_ONCE(!nat)) in pptp_outbound_pkt()
138 nat_pptp_info = &nat->help.nat_pptp_info; in pptp_outbound_pkt()
203 struct nf_conn_nat *nat = nfct_nat(ct); in pptp_exp_gre() local
207 if (WARN_ON_ONCE(!nat)) in pptp_exp_gre()
210 nat_pptp_info = &nat->help.nat_pptp_info; in pptp_exp_gre()
[all …]
/linux-6.6.21/net/netfilter/
Dnf_conntrack_helper.c132 struct nf_conntrack_nat_helper *nat; in nf_nat_helper_try_module_get() local
143 nat = nf_conntrack_nat_helper_find(h->nat_mod_name); in nf_nat_helper_try_module_get()
144 if (!nat) { in nf_nat_helper_try_module_get()
150 nat = nf_conntrack_nat_helper_find(mod_name); in nf_nat_helper_try_module_get()
151 if (!nat) { in nf_nat_helper_try_module_get()
157 if (!try_module_get(nat->module)) in nf_nat_helper_try_module_get()
167 struct nf_conntrack_nat_helper *nat; in nf_nat_helper_put() local
169 nat = nf_conntrack_nat_helper_find(helper->nat_mod_name); in nf_nat_helper_put()
170 if (WARN_ON_ONCE(!nat)) in nf_nat_helper_put()
173 module_put(nat->module); in nf_nat_helper_put()
[all …]
Dnf_nat_masquerade.c33 struct nf_conn_nat *nat; in nf_nat_masquerade_ipv4() local
60 nat = nf_ct_nat_ext_add(ct); in nf_nat_masquerade_ipv4()
61 if (nat) in nf_nat_masquerade_ipv4()
62 nat->masq_index = out->ifindex; in nf_nat_masquerade_ipv4()
141 const struct nf_conn_nat *nat = nfct_nat(i); in device_cmp() local
144 if (!nat) in device_cmp()
146 return nat->masq_index == w->ifindex; in device_cmp()
245 struct nf_conn_nat *nat; in nf_nat_masquerade_ipv6() local
258 nat = nf_ct_nat_ext_add(ct); in nf_nat_masquerade_ipv6()
259 if (nat) in nf_nat_masquerade_ipv6()
[all …]
Dnf_nat_core.c652 struct nf_conn_nat *nat = nfct_nat(ct); in nf_ct_nat_ext_add() local
653 if (nat) in nf_ct_nat_ext_add()
654 return nat; in nf_ct_nat_ext_add()
657 nat = nf_ct_ext_add(ct, NF_CT_EXT_NAT, GFP_ATOMIC); in nf_ct_nat_ext_add()
659 return nat; in nf_ct_nat_ext_add()
802 struct nf_conn_nat *nat; in nf_nat_inet_fn() local
815 nat = nfct_nat(ct); in nf_nat_inet_fn()
850 if (nf_nat_oif_changed(state->hook, ctinfo, nat, in nf_nat_inet_fn()
859 if (nf_nat_oif_changed(state->hook, ctinfo, nat, state->out)) in nf_nat_inet_fn()
1001 nfnetlink_parse_nat(const struct nlattr *nat, in nfnetlink_parse_nat() argument
[all …]
Dnf_conntrack_ovs.c79 u8 proto, bool nat, struct nf_conntrack_helper **hp) in nf_ct_add_helper() argument
95 if (nat) { in nf_ct_add_helper()
/linux-6.6.21/arch/ia64/kernel/
Dmca.c859 u64 fslot, tslot, nat; in copy_reg() local
864 nat = (fnat >> fslot) & 1; in copy_reg()
865 *tnat |= (nat << tslot); in copy_reg()
896 unsigned long *nat) in finish_pt_regs() argument
920 copy_reg(&ms->pmsa_gr[1-1], ms->pmsa_nat_bits, &regs->r1, nat); in finish_pt_regs()
921 copy_reg(&ms->pmsa_gr[2-1], ms->pmsa_nat_bits, &regs->r2, nat); in finish_pt_regs()
922 copy_reg(&ms->pmsa_gr[3-1], ms->pmsa_nat_bits, &regs->r3, nat); in finish_pt_regs()
923 copy_reg(&ms->pmsa_gr[8-1], ms->pmsa_nat_bits, &regs->r8, nat); in finish_pt_regs()
924 copy_reg(&ms->pmsa_gr[9-1], ms->pmsa_nat_bits, &regs->r9, nat); in finish_pt_regs()
925 copy_reg(&ms->pmsa_gr[10-1], ms->pmsa_nat_bits, &regs->r10, nat); in finish_pt_regs()
[all …]
Dunaligned.c308 set_rse_reg (struct pt_regs *regs, unsigned long r1, unsigned long val, int nat) in set_rse_reg() argument
342 if (nat) in set_rse_reg()
367 (void *) rnat_addr, rnats, nat, (rnats >> ia64_rse_slot_num(addr)) & 1); in set_rse_reg()
370 if (nat) in set_rse_reg()
381 get_rse_reg (struct pt_regs *regs, unsigned long r1, unsigned long *val, int *nat) in get_rse_reg() argument
410 if (nat) { in get_rse_reg()
415 *nat = (*rnat_addr & nat_mask) != 0; in get_rse_reg()
434 if (nat) { in get_rse_reg()
441 *nat = (rnats & nat_mask) != 0; in get_rse_reg()
447 if (nat) in get_rse_reg()
[all …]
Dptrace.c112 ia64_put_scratch_nat_bits (struct pt_regs *pt, unsigned long nat) in ia64_put_scratch_nat_bits() argument
114 # define PUT_BITS(first, last, nat) \ in ia64_put_scratch_nat_bits() argument
124 ia64_rotl(nat & mask, dist); \ in ia64_put_scratch_nat_bits()
133 scratch_unat = PUT_BITS( 1, 1, nat); in ia64_put_scratch_nat_bits()
134 scratch_unat |= PUT_BITS( 2, 3, nat); in ia64_put_scratch_nat_bits()
135 scratch_unat |= PUT_BITS(12, 13, nat); in ia64_put_scratch_nat_bits()
136 scratch_unat |= PUT_BITS(14, 14, nat); in ia64_put_scratch_nat_bits()
137 scratch_unat |= PUT_BITS(15, 15, nat); in ia64_put_scratch_nat_bits()
138 scratch_unat |= PUT_BITS( 8, 11, nat); in ia64_put_scratch_nat_bits()
139 scratch_unat |= PUT_BITS(16, 31, nat); in ia64_put_scratch_nat_bits()
[all …]
Dsignal.c45 unsigned long ip, flags, nat, um, cfm, rsc; in restore_sigcontext() local
53 err |= __get_user(nat, &sc->sc_nat); in restore_sigcontext()
77 scr->scratch_unat = ia64_put_scratch_nat_bits(&scr->pt, nat); in restore_sigcontext()
167 unsigned long flags = 0, ifs, cfm, nat; in setup_sigcontext() local
184 nat = ia64_get_scratch_nat_bits(&scr->pt, scr->scratch_unat); in setup_sigcontext()
187 err |= __put_user(nat, &sc->sc_nat); in setup_sigcontext()
Dprocess.c430 char nat; in do_copy_task_regs() local
462 unw_get_gr(info, i, &dst[i], &nat); in do_copy_task_regs()
463 if (nat) in do_copy_task_regs()
/linux-6.6.21/tools/testing/selftests/netfilter/
Dconntrack_vrf.sh163 table ip nat {
175 type nat hook postrouting priority 0;
190 ip netns exec $ns0 nft list table ip nat |grep -q 'counter packets 2' &&
191 ip netns exec $ns0 nft list table ip nat |grep -q 'untracked counter packets [1-9]'
212 table ip nat {
214 type nat hook postrouting priority 0;
227 ip netns exec $ns0 nft list table ip nat |grep -q 'counter packets 2'
Dnft_nat.sh185 table $family nat {
187 type nat hook output priority 0; policy accept;
244 ip netns exec "$ns0" nft flush chain ip6 nat output
260 table $family nat {
262 type nat hook output priority 0; policy accept;
325 ip netns exec "$ns0" nft flush chain $family nat output
386 table $family nat {
388 type nat hook output priority 0; policy accept;
453 table $family nat {
455 type nat hook postrouting priority 0; policy accept;
[all …]
Dnft_flowtable.sh503 table ip nat {
505 type nat hook prerouting priority 0; policy accept;
510 type nat hook postrouting priority 0; policy accept;
560 flush table ip nat
561 table ip nat {
563 type nat hook prerouting priority 0; policy accept;
568 type nat hook postrouting priority 0; policy accept;
657 ip netns exec $nsr1 nft delete table ip nat
Dconntrack_icmp_related.sh197 table ip nat {
199 type nat hook postrouting priority 0; policy accept;
203 table ip6 nat {
205 type nat hook postrouting priority 0; policy accept;
Dconntrack_tcp_unreplied.sh118 table inet nat {
120 type nat hook prerouting priority 0; policy accept;
/linux-6.6.21/arch/ia64/include/asm/
Dunwind.h87 } nat; member
199 unw_set_gr (struct unw_frame_info *i, int n, unsigned long v, char nat) in unw_set_gr() argument
201 return unw_access_gr(i, n, &v, &nat, 1); in unw_set_gr()
228 #define unw_get_gr(i,n,v,nat) unw_access_gr(i,n,v,nat,0) argument
/linux-6.6.21/include/net/netfilter/
Dnf_nat.h59 struct nf_conn_nat *nat, in nf_nat_oif_changed() argument
63 return nat && nat->masq_index && hooknum == NF_INET_POST_ROUTING && in nf_nat_oif_changed()
65 nat->masq_index != out->ifindex; in nf_nat_oif_changed()
Dnf_conntrack_helper.h121 u8 proto, bool nat, struct nf_conntrack_helper **hp);
178 void nf_nat_helper_register(struct nf_conntrack_nat_helper *nat);
179 void nf_nat_helper_unregister(struct nf_conntrack_nat_helper *nat);
/linux-6.6.21/drivers/net/ethernet/broadcom/bnxt/
Dbnxt_tc.c212 actions->nat.l3_is_ipv4 = true; in bnxt_tc_parse_pedit()
214 actions->nat.src_xlate = true; in bnxt_tc_parse_pedit()
215 actions->nat.l3.ipv4.saddr.s_addr = htonl(val); in bnxt_tc_parse_pedit()
217 actions->nat.src_xlate = false; in bnxt_tc_parse_pedit()
218 actions->nat.l3.ipv4.daddr.s_addr = htonl(val); in bnxt_tc_parse_pedit()
227 actions->nat.src_xlate, &actions->nat.l3.ipv4.saddr, in bnxt_tc_parse_pedit()
228 &actions->nat.l3.ipv4.daddr); in bnxt_tc_parse_pedit()
233 actions->nat.l3_is_ipv4 = false; in bnxt_tc_parse_pedit()
239 actions->nat.src_xlate = true; in bnxt_tc_parse_pedit()
242 actions->nat.l3.ipv6.saddr.s6_addr32[idx] = htonl(val); in bnxt_tc_parse_pedit()
[all …]
/linux-6.6.21/drivers/net/ethernet/mellanox/mlx5/core/en/tc/
Dct_fs_smfs.c112 mlx5_ct_fs_smfs_matcher_get(struct mlx5_ct_fs *fs, bool nat, bool ipv4, bool tcp, bool gre) in mlx5_ct_fs_smfs_matcher_get() argument
122 matchers = nat ? &fs_smfs->matchers_nat : &fs_smfs->matchers; in mlx5_ct_fs_smfs_matcher_get()
148 tbl = nat ? fs_smfs->ct_nat_tbl : fs_smfs->ct_tbl; in mlx5_ct_fs_smfs_matcher_get()
153 nat, ipv4, tcp, gre, PTR_ERR(dr_matcher)); in mlx5_ct_fs_smfs_matcher_get()
305 bool nat, tcp, ipv4, gre; in mlx5_ct_fs_smfs_ct_rule_add() local
324 nat = (attr->ft == fs_smfs->ct_nat); in mlx5_ct_fs_smfs_ct_rule_add()
331 smfs_matcher = mlx5_ct_fs_smfs_matcher_get(fs, nat, ipv4, tcp, gre); in mlx5_ct_fs_smfs_ct_rule_add()
/linux-6.6.21/drivers/net/ethernet/mellanox/mlx5/core/en/
Dtc_ct.c90 bool nat; member
512 bool nat) in mlx5_tc_ct_entry_del_rule() argument
514 struct mlx5_ct_zone_rule *zone_rule = &entry->zone_rules[nat]; in mlx5_tc_ct_entry_del_rule()
793 bool nat, u8 zone_restore_id) in mlx5_tc_ct_entry_add_rule() argument
795 struct mlx5_ct_zone_rule *zone_rule = &entry->zone_rules[nat]; in mlx5_tc_ct_entry_add_rule()
801 zone_rule->nat = nat; in mlx5_tc_ct_entry_add_rule()
816 nat, in mlx5_tc_ct_entry_add_rule()
828 attr->ft = nat ? ct_priv->ct_nat : ct_priv->ct; in mlx5_tc_ct_entry_add_rule()
845 ct_dbg("Failed to add ct entry rule, nat: %d", nat); in mlx5_tc_ct_entry_add_rule()
870 bool nat, u8 zone_restore_id) in mlx5_tc_ct_entry_replace_rule() argument
[all …]
/linux-6.6.21/net/openvswitch/
Dconntrack.c66 u8 nat : 3; /* enum ovs_ct_nat */ member
669 if (!(info->nat & OVS_CT_NAT)) in ovs_ct_nat()
671 if (info->nat & OVS_CT_SRC_NAT) in ovs_ct_nat()
673 if (info->nat & OVS_CT_DST_NAT) in ovs_ct_nat()
759 if (info->nat && !(key->ct_state & OVS_CS_F_NAT_MASK) && in __ovs_ct_lookup()
780 if (info->nat && !nfct_seqadj(ct)) { in __ovs_ct_lookup()
1101 if (info->nat) { in parse_nat()
1105 info->nat |= OVS_CT_NAT; in parse_nat()
1106 info->nat |= ((type == OVS_NAT_ATTR_SRC) in parse_nat()
1156 if (!info->nat) { in parse_nat()
[all …]
/linux-6.6.21/tools/testing/selftests/net/forwarding/
Dtc_actions.sh167 ct commit nat src addr 192.0.2.2 pipe \
169 ct commit nat dst addr 192.0.2.1 pipe \
212 action ct commit nat src addr 192.0.2.2 pipe \
214 action ct commit nat dst addr 192.0.2.1 pipe \
/linux-6.6.21/tools/testing/selftests/drivers/net/dsa/
Dtc_actions.sh167 ct commit nat src addr 192.0.2.2 pipe \
169 ct commit nat dst addr 192.0.2.1 pipe \
212 action ct commit nat src addr 192.0.2.2 pipe \
214 action ct commit nat dst addr 192.0.2.1 pipe \

12