aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cnat/cnat.api
diff options
context:
space:
mode:
authorNathan Skrzypczak <nathan.skrzypczak@gmail.com>2021-02-25 17:39:03 +0100
committerDave Barach <openvpp@barachs.net>2021-03-04 12:35:15 +0000
commit3fd77f7dea1ac91c5b4c9ede69b992a4e2243153 (patch)
tree21550f5d6e28f55f4e64ee1ddb7697c9e261dd85 /src/plugins/cnat/cnat.api
parent8786a4cd4a62f2817da7060afd8523857f504912 (diff)
cnat: Prepare extended snat policies
Type: refactor Change-Id: I9ca3333274d6f32b6aff57f0fb3d2049c066337a Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Diffstat (limited to 'src/plugins/cnat/cnat.api')
-rw-r--r--src/plugins/cnat/cnat.api27
1 files changed, 24 insertions, 3 deletions
diff --git a/src/plugins/cnat/cnat.api b/src/plugins/cnat/cnat.api
index a5df8b1e578..df57ea54896 100644
--- a/src/plugins/cnat/cnat.api
+++ b/src/plugins/cnat/cnat.api
@@ -159,7 +159,7 @@ define cnat_get_snat_addresses_reply
vl_api_interface_index_t sw_if_index;
};
-autoreply define cnat_add_del_snat_prefix
+autoreply define cnat_snat_policy_add_del_exclude_pfx
{
u32 client_index;
u32 context;
@@ -167,9 +167,29 @@ autoreply define cnat_add_del_snat_prefix
vl_api_prefix_t prefix;
};
-enum cnat_snat_policies:u32
+enum cnat_snat_policy_table:u8
{
- CNAT_SNAT_POLICY_NONE = 1,
+ CNAT_POLICY_INCLUDE_V4 = 0,
+ CNAT_POLICY_INCLUDE_V6 = 1,
+};
+
+autoreply define cnat_snat_policy_add_del_if
+{
+ u32 client_index;
+ u32 context;
+ vl_api_interface_index_t sw_if_index;
+ u8 is_add;
+ vl_api_cnat_snat_policy_table_t table;
+};
+
+/* A snat policy controls what traffic is srcNATed */
+enum cnat_snat_policies:u8
+{
+ /* No filter applied, srcNAT everything */
+ CNAT_POLICY_NONE = 0,
+ /* Filter by interface list : snat_policy_add_del_if
+ * and prefix list : snat_policy_add_del_if */
+ CNAT_POLICY_IF_PFX = 1,
};
autoreply define cnat_set_snat_policy
@@ -178,6 +198,7 @@ autoreply define cnat_set_snat_policy
u32 context;
vl_api_cnat_snat_policies_t policy;
};
+
/*
* fd.io coding-style-patch-verification: ON
*