aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/nat.api
diff options
context:
space:
mode:
authorJuraj Sloboda <jsloboda@cisco.com>2018-04-10 13:51:54 +0200
committerDamjan Marion <dmarion.lists@gmail.com>2018-04-19 10:35:13 +0000
commit1e5c07d379a092f4829e7081aa962d013b31fdfc (patch)
tree1b1a3c386663b3356773cf374b55a64f14d43709 /src/plugins/nat/nat.api
parentb14826e459302556febb391456ea90644278645a (diff)
Add special Twice-NAT feature (VPP-1221)
When enabled then Twice-NAT is applied only when source IP equals destination IP after DNAT Change-Id: I58a9d1d222b2a10c83eafffb2107f32c1b4aa3a8 Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
Diffstat (limited to 'src/plugins/nat/nat.api')
-rw-r--r--src/plugins/nat/nat.api16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/plugins/nat/nat.api b/src/plugins/nat/nat.api
index 69b6045c4cb..23c89adef7a 100644
--- a/src/plugins/nat/nat.api
+++ b/src/plugins/nat/nat.api
@@ -352,6 +352,9 @@ define nat44_interface_output_feature_details {
@param vfr_id - VRF ID
@param twice_nat - if 1 translate external host address and port, only for
1:1 NAPT (addr_only must be 0)
+ @param self_twice_nat - if 1 translate external host address and port
+ whenever external host address equals
+ local address of internal host
@param out2in_only - if 1 rule match only out2in direction
@param tag - opaque string tag
*/
@@ -368,6 +371,7 @@ autoreply define nat44_add_del_static_mapping {
u32 external_sw_if_index;
u32 vrf_id;
u8 twice_nat;
+ u8 self_twice_nat;
u8 out2in_only;
u8 tag[64];
};
@@ -392,6 +396,9 @@ define nat44_static_mapping_dump {
@param external_sw_if_index - external interface
@param vfr_id - VRF ID
@param twice_nat - if 1 translate external host address and port
+ @param self_twice_nat - if 1 translate external host address and port
+ whenever external host address equals
+ local address of internal host
@param out2in_only - if 1 rule match only out2in direction
@param tag - opaque string tag
*/
@@ -406,6 +413,7 @@ define nat44_static_mapping_details {
u32 external_sw_if_index;
u32 vrf_id;
u8 twice_nat;
+ u8 self_twice_nat;
u8 out2in_only;
u8 tag[64];
};
@@ -584,6 +592,9 @@ typeonly manual_endian define nat44_lb_addr_port {
@param protocol - IP protocol number of the service
@param vrf_id - internal network VRF ID
@param twice_nat - if 1 translate external host address and port
+ @param self_twice_nat - if 1 translate external host address and port
+ whenever external host address equals
+ local address of internal host
@param out2in_only - if 1 rule match only out2in direction
@param tag - opaque string tag
@param local_num - number of local network nodes
@@ -598,6 +609,7 @@ autoreply manual_endian define nat44_add_del_lb_static_mapping {
u8 protocol;
u32 vrf_id;
u8 twice_nat;
+ u8 self_twice_nat;
u8 out2in_only;
u8 tag[64];
u8 local_num;
@@ -621,6 +633,9 @@ define nat44_lb_static_mapping_dump {
@param protocol - IP protocol number of the service
@param vrf_id - internal network VRF ID
@param twice_nat - if 1 translate external host address and port
+ @param self_twice_nat - if 1 translate external host address and port
+ whenever external host address equals
+ local address of internal host
@param out2in_only - if 1 rule match only out2in direction
@param tag - opaque string tag
@param local_num - number of local network nodes
@@ -633,6 +648,7 @@ manual_endian define nat44_lb_static_mapping_details {
u8 protocol;
u32 vrf_id;
u8 twice_nat;
+ u8 self_twice_nat;
u8 out2in_only;
u8 tag[64];
u8 local_num;