Home
last modified time | relevance | path

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

12

/linux-6.15/fs/f2fs/
H A Dnode.h78 #define nat_get_nid(nat) ((nat)->ni.nid) argument
79 #define nat_set_nid(nat, n) ((nat)->ni.nid = (n)) argument
80 #define nat_get_blkaddr(nat) ((nat)->ni.blk_addr) argument
81 #define nat_set_blkaddr(nat, b) ((nat)->ni.blk_addr = (b)) argument
82 #define nat_get_ino(nat) ((nat)->ni.ino) argument
83 #define nat_set_ino(nat, i) ((nat)->ni.ino = (i)) argument
84 #define nat_get_version(nat) ((nat)->ni.version) argument
85 #define nat_set_version(nat, v) ((nat)->ni.version = (v)) argument
/linux-6.15/net/ipv4/netfilter/
H A 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()
239 struct nf_conn_nat *nat = nfct_nat(ct); in pptp_inbound_pkt() local
[all …]
/linux-6.15/Documentation/netlink/specs/
H A Dconntrack.yaml91 - src-nat
92 - dst-nat
94 - src-nat-done
95 - dst-nat-done
99 - nat-clash
307 name: nat-attrs
392 name: nat-src
420 name: nat-dst
574 - nat-src
575 - nat-dst
[all …]
H A Dovs_flow.yaml368 name: src-nat
371 name: dst-nat
886 name: nat
888 nested-attributes: nat-attrs
899 name: nat-attrs
900 enum-name: ovs-nat-attr
901 name-prefix: ovs-nat-attr-
/linux-6.15/net/netfilter/
H A 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
170 if (WARN_ON_ONCE(!nat)) in nf_nat_helper_put()
173 module_put(nat->module); in nf_nat_helper_put()
488 list_add_rcu(&nat->list, &nf_ct_nat_helpers); in nf_nat_helper_register()
[all …]
H A 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 …]
H A Dnf_nat_core.c771 struct nf_conn_nat *nat = nfct_nat(ct); in nf_ct_nat_ext_add() local
772 if (nat) in nf_ct_nat_ext_add()
773 return nat; in nf_ct_nat_ext_add()
776 nat = nf_ct_ext_add(ct, NF_CT_EXT_NAT, GFP_ATOMIC); in nf_ct_nat_ext_add()
778 return nat; in nf_ct_nat_ext_add()
921 struct nf_conn_nat *nat; in nf_nat_inet_fn() local
934 nat = nfct_nat(ct); in nf_nat_inet_fn()
969 if (nf_nat_oif_changed(state->hook, ctinfo, nat, in nf_nat_inet_fn()
978 if (nf_nat_oif_changed(state->hook, ctinfo, nat, state->out)) in nf_nat_inet_fn()
1118 nfnetlink_parse_nat(const struct nlattr *nat, in nfnetlink_parse_nat() argument
[all …]
H A 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.15/tools/testing/selftests/net/netfilter/
H A Dnft_nat.sh159 table $family nat {
161 type nat hook output priority 0; policy accept;
229 table $family nat {
231 type nat hook output priority 0; policy accept;
351 table $family nat {
353 type nat hook output priority 0; policy accept;
413 table $family nat {
504 table $family nat {
593 table $family nat {
668 table $family nat {
[all …]
H A Dconntrack_vrf.sh153 table ip nat {
165 type nat hook postrouting priority 0;
179 if ip netns exec "$ns0" nft list table ip nat |grep -q 'counter packets 1' &&
180 ip netns exec "$ns0" nft list table ip nat |grep -q 'untracked counter packets [1-9]'; then
200 table ip nat {
202 type nat hook postrouting priority 0;
214 if ip netns exec "$ns0" nft list table ip nat |grep -q 'counter packets 1'; then
H A Dconntrack_reverse_clash.sh20 table ip nat {
22 type nat hook postrouting priority srcnat; policy accept;
H A Dnf_nat_edemux.sh47 ip netns exec "$ns2" iptables -t nat -A OUTPUT -d 10.96.0.1/32 -p tcp --dport 443 -j DNAT --to-dest…
71 ip netns exec "$ns1" iptables -t nat -A PREROUTING -p tcp --dport 5202 -j REDIRECT --to-ports 5201
72 ip netns exec "$ns1" iptables -t nat -A PREROUTING -p tcp --dport 5203 -j REDIRECT --to-ports 5201
H A Dconntrack_icmp_related.sh178 table ip nat {
180 type nat hook postrouting priority 0; policy accept;
184 table ip6 nat {
186 type nat hook postrouting priority 0; policy accept;
H A Dnft_flowtable.sh479 table ip nat {
481 type nat hook prerouting priority 0; policy accept;
486 type nat hook postrouting priority 0; policy accept;
541 flush table ip nat
542 table ip nat {
544 type nat hook prerouting priority 0; policy accept;
549 type nat hook postrouting priority 0; policy accept;
640 ip netns exec "$nsr1" nft delete table ip nat
H A Dconntrack_tcp_unreplied.sh127 table inet nat {
129 type nat hook prerouting priority 0; policy accept;
/linux-6.15/include/net/netfilter/
H A 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()
H A 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.15/drivers/net/ethernet/mellanox/mlx5/core/en/tc/
H A Dct_fs_hmfs.c113 bool nat, bool ipv4, bool tcp, bool gre) in mlx5_ct_fs_hmfs_matcher_get() argument
121 hmfs_matcher = nat ? in mlx5_ct_fs_hmfs_matcher_get()
134 tbl = nat ? fs_hmfs->ct_nat_tbl : fs_hmfs->ct_tbl; in mlx5_ct_fs_hmfs_matcher_get()
140 nat, ipv4, tcp, gre, PTR_ERR(hws_bwc_matcher)); in mlx5_ct_fs_hmfs_matcher_get()
198 bool nat, tcp, ipv4, gre; in mlx5_ct_fs_hmfs_ct_rule_add() local
208 nat = (attr->ft == fs_hmfs->ct_nat); in mlx5_ct_fs_hmfs_ct_rule_add()
215 hmfs_matcher = mlx5_ct_fs_hmfs_matcher_get(fs, spec, nat, ipv4, tcp, gre); in mlx5_ct_fs_hmfs_ct_rule_add()
H A Dct_fs_smfs.c111 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
121 matchers = nat ? &fs_smfs->matchers_nat : &fs_smfs->matchers; in mlx5_ct_fs_smfs_matcher_get()
147 tbl = nat ? fs_smfs->ct_nat_tbl : fs_smfs->ct_tbl; in mlx5_ct_fs_smfs_matcher_get()
152 nat, ipv4, tcp, gre, PTR_ERR(dr_matcher)); in mlx5_ct_fs_smfs_matcher_get()
232 bool nat, tcp, ipv4, gre; in mlx5_ct_fs_smfs_ct_rule_add() local
251 nat = (attr->ft == fs_smfs->ct_nat); in mlx5_ct_fs_smfs_ct_rule_add()
258 smfs_matcher = mlx5_ct_fs_smfs_matcher_get(fs, nat, ipv4, tcp, gre); in mlx5_ct_fs_smfs_ct_rule_add()
/linux-6.15/drivers/net/ethernet/broadcom/bnxt/
H A 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()
217 actions->nat.src_xlate = false; in bnxt_tc_parse_pedit()
227 actions->nat.src_xlate, &actions->nat.l3.ipv4.saddr, 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()
245 actions->nat.src_xlate = false; in bnxt_tc_parse_pedit()
265 if (actions->nat.src_xlate) in bnxt_tc_parse_pedit()
619 if (actions->nat.l3_is_ipv4) { in bnxt_hwrm_cfa_flow_alloc()
623 if (actions->nat.src_xlate) { in bnxt_hwrm_cfa_flow_alloc()
[all …]
/linux-6.15/drivers/net/ethernet/mellanox/mlx5/core/en/
H A Dtc_ct.c92 bool nat; member
522 bool nat) in mlx5_tc_ct_entry_del_rule() argument
805 bool nat, u8 zone_restore_id) in mlx5_tc_ct_entry_add_rule() argument
813 zone_rule->nat = nat; in mlx5_tc_ct_entry_add_rule()
828 nat, in mlx5_tc_ct_entry_add_rule()
840 attr->ft = nat ? ct_priv->ct_nat : ct_priv->ct; in mlx5_tc_ct_entry_add_rule()
882 bool nat, u8 zone_restore_id) in mlx5_tc_ct_entry_update_rule() argument
1605 bool nat) in tc_ct_pre_ct_add_rules() argument
1653 if (nat) in tc_ct_pre_ct_add_rules()
1705 bool nat) in mlx5_tc_ct_alloc_pre_ct() argument
[all …]
/linux-6.15/net/openvswitch/
H A Dconntrack.c674 if (!(info->nat & OVS_CT_NAT)) in ovs_ct_nat()
676 if (info->nat & OVS_CT_SRC_NAT) in ovs_ct_nat()
678 if (info->nat & OVS_CT_DST_NAT) in ovs_ct_nat()
806 if (info->nat && !nfct_seqadj(ct)) { in __ovs_ct_lookup()
1133 if (info->nat) { in parse_nat()
1137 info->nat |= OVS_CT_NAT; in parse_nat()
1138 info->nat |= ((type == OVS_NAT_ATTR_SRC) in parse_nat()
1188 if (!info->nat) { in parse_nat()
1456 if (info->nat & OVS_CT_SRC_NAT) { in ovs_ct_nat_to_attr()
1459 } else if (info->nat & OVS_CT_DST_NAT) { in ovs_ct_nat_to_attr()
[all …]
/linux-6.15/tools/testing/selftests/net/forwarding/
H A Dtc_actions.sh168 ct commit nat src addr 192.0.2.2 pipe \
170 ct commit nat dst addr 192.0.2.1 pipe \
213 action ct commit nat src addr 192.0.2.2 pipe \
215 action ct commit nat dst addr 192.0.2.1 pipe \
/linux-6.15/tools/testing/selftests/net/
H A Dudpgro_fwd.sh233 ip netns exec $NS_DST $IPT -t nat -I PREROUTING -d $BM_NET$DST_NAT \
255 ip netns exec $NS_DST $IPT -t nat -I PREROUTING -d $OL_NET$DST_NAT \
/linux-6.15/include/net/libeth/
H A Drx.h223 u32 nat:1; member

12