Home
last modified time | relevance | path

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

12

/linux/fs/f2fs/
H A Dnode.h37 /* vector size for gang look-up from nat cache that consists of radix tree */
51 IS_DIRTY, /* this nat entry is dirty? */
52 IS_PREALLOC, /* nat entry is preallocated */
74 struct list_head list; /* for clean or dirty nat list */
78 #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) argument
81 nat_set_blkaddr(nat,b) global() argument
82 nat_get_ino(nat) global() argument
83 nat_set_ino(nat,i) global() argument
84 nat_get_version(nat) global() argument
85 nat_set_version(nat,v) global() argument
[all...]
/linux/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()
210 nat_pptp_info = &nat in pptp_exp_gre()
239 struct nf_conn_nat *nat = nfct_nat(ct); pptp_inbound_pkt() local
[all...]
/linux/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
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 in nf_nat_helper_put()
485 nf_nat_helper_register(struct nf_conntrack_nat_helper * nat) nf_nat_helper_register() argument
493 nf_nat_helper_unregister(struct nf_conntrack_nat_helper * nat) nf_nat_helper_unregister() argument
[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_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/tools/testing/selftests/net/netfilter/
H A Dconntrack_vrf.sh142 table ip nat {
154 type nat hook postrouting priority 0;
167 # must also check that nat table was evaluated on second (lower device) iteration.
168 if ip netns exec "$ns0" nft list table ip nat |grep -q 'counter packets 1' &&
169 ip netns exec "$ns0" nft list table ip nat |grep -q 'untracked counter packets [1-9]'; then
189 table ip nat {
191 type nat hook postrouting priority 0;
202 # must also check that nat table was evaluated on second (lower device) iteration.
203 if ip netns exec "$ns0" nft list table ip nat |grep -q 'counter packets 1'; then
H A Dnft_nat.sh159 table $family nat {
161 type nat hook output priority 0; policy accept;
213 ip netns exec "$ns0" nft flush chain ip6 nat output
229 table $family nat {
231 type nat hook output priority 0; policy accept;
238 echo "SKIP: inet nat tests"
289 ip netns exec "$ns0" nft flush chain "$family" nat output
331 test $lret -eq 0 && echo "PASS: ping to $ns1 OK after $family nat output chain flush"
351 table $family nat {
353 type nat hoo
[all...]
H A Dconntrack_reverse_clash.sh18 # make loopback connections get nat null bindings assigned
20 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-destination 192.168.1.1:5201
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.sh15 # nat of "established" icmp-echo "connection".
174 # make sure NAT core rewrites adress of icmp error if nat is used according to
175 # conntrack nat information (icmp error will be directed at nsrouter1 address,
178 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_clash.sh31 type nat hook prerouting priority dstnat
37 type nat hook output priority dstnat
161 # exercise clash resolution with nat:
165 # exercise clash resolution without nat.
H A Dconntrack_tcp_unreplied.sh120 # the nat redirect rule.
127 table inet nat {
129 type nat hook prerouting priority 0; policy accept;
135 echo "ERROR: Could not load nat redirect"
148 echo "INFO: NAT redirect added in ns $ns2, waiting for $BUSYWAIT_TIMEOUT ms for nat to take effect"
/linux/include/net/netfilter/
H A Dnf_nat.h22 /* per conntrack: nat application helper private data */
24 /* insert nat helper private data here */
59 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/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()
139 "ct_fs_hmfs: failed to create bwc matcher (nat %d, ipv4 %d, tcp %d, gre %d), err: %ld\n", 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()
151 "ct_fs_smfs: failed to create matcher (nat %d, ipv4 %d, tcp %d, gre %d), err: %ld\n", 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/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()
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()
226 netdev_dbg(bp->dev, "nat.src_xlate = %d src IP: %pI4 dst ip : %pI4\n", 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 in bnxt_tc_parse_pedit()
[all...]
H A Dbnxt_tc.h101 } nat; member
/linux/drivers/net/ethernet/mellanox/mlx5/core/en/
H A Dtc_ct.c44 * ipv6 and port nat (5) + tuple fields (4) + nic mode zone restore (1) = 10.
92 bool nat; member
522 bool nat) in mlx5_tc_ct_entry_del_rule() argument
524 struct mlx5_ct_zone_rule *zone_rule = &entry->zone_rules[nat]; in mlx5_tc_ct_entry_del_rule()
805 bool nat, u8 zone_restore_id) in mlx5_tc_ct_entry_add_rule() argument
807 struct mlx5_ct_zone_rule *zone_rule = &entry->zone_rules[nat]; in mlx5_tc_ct_entry_add_rule()
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 in mlx5_tc_ct_entry_add_rule()
882 mlx5_tc_ct_entry_update_rule(struct mlx5_tc_ct_priv * ct_priv,struct flow_rule * flow_rule,struct mlx5_ct_entry * entry,bool nat,u8 zone_restore_id) mlx5_tc_ct_entry_update_rule() argument
1608 tc_ct_pre_ct_add_rules(struct mlx5_ct_ft * ct_ft,struct mlx5_tc_ct_pre * pre_ct,bool nat) tc_ct_pre_ct_add_rules() argument
1708 mlx5_tc_ct_alloc_pre_ct(struct mlx5_ct_ft * ct_ft,struct mlx5_tc_ct_pre * pre_ct,bool nat) mlx5_tc_ct_alloc_pre_ct() argument
1976 bool nat = attr->ct_attr.ct_action & TCA_CT_ACT_NAT; __mlx5_tc_ct_flow_offload() local
[all...]
/linux/net/openvswitch/
H A Dconntrack.c66 u8 nat : 3; /* enum ovs_ct_nat */ member
674 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()
782 if (info->nat && !(key->ct_state & OVS_CS_F_NAT_MASK) && in __ovs_ct_lookup()
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()
1179 OVS_NLERR(log, "Unknown nat attribut in parse_nat()
[all...]
/linux/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/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 \
H A Dudpgro.sh92 ip netns exec "${PEER_NS}" $ipt_cmd -t nat -I PREROUTING -d ${addr1} -j DNAT --to-destination ${addr2%/*}
/linux/include/net/libeth/
H A Drx.h216 * @nat: the packet is a UDP tunneled packet
229 u32 nat:1; member

12