summaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/pnat/pnat.api
diff options
context:
space:
mode:
authorAndrew Yourtchenko <ayourtch@gmail.com>2021-02-23 08:56:27 +0000
committerDamjan Marion <dmarion@me.com>2021-03-15 17:53:05 +0000
commitab3151c52e3686c629c79a6447cf9df4f73d5c6d (patch)
tree9ac5439beef669ad54fda1a6779b99b7e659a48b /src/plugins/nat/pnat/pnat.api
parent73d9c9da6a66ca8658f4ff2a0f8421f3d755cb95 (diff)
nat: pnat copy and clear byte instructions
Type: feature Signed-off-by: Ole Troan <ot@cisco.com> Change-Id: I8e48bdcc4c311717e067bb0a4e0b409a2eb8e83d Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com> Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'src/plugins/nat/pnat/pnat.api')
-rw-r--r--src/plugins/nat/pnat/pnat.api32
1 files changed, 26 insertions, 6 deletions
diff --git a/src/plugins/nat/pnat/pnat.api b/src/plugins/nat/pnat/pnat.api
index c18c89445e9..fe7bf98b00b 100644
--- a/src/plugins/nat/pnat/pnat.api
+++ b/src/plugins/nat/pnat/pnat.api
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-option version = "0.0.1";
+option version = "0.1.1";
import "vnet/interface_types.api";
import "vnet/ip/ip_types.api";
@@ -24,6 +24,8 @@ enum pnat_mask
PNAT_DA = 0x2,
PNAT_SPORT = 0x4,
PNAT_DPORT = 0x8,
+ PNAT_COPY_BYTE = 0x10,
+ PNAT_CLEAR_BYTE = 0x20,
};
enum pnat_attachment_point
@@ -33,7 +35,7 @@ enum pnat_attachment_point
PNAT_ATTACHMENT_POINT_MAX,
};
-typedef pnat_5tuple
+typedef pnat_match_tuple
{
vl_api_ip4_address_t src;
vl_api_ip4_address_t dst;
@@ -43,12 +45,24 @@ typedef pnat_5tuple
vl_api_pnat_mask_t mask;
};
+typedef pnat_rewrite_tuple
+{
+ vl_api_ip4_address_t src;
+ vl_api_ip4_address_t dst;
+ u16 sport;
+ u16 dport;
+ vl_api_pnat_mask_t mask; // needed?
+ u8 from_offset;
+ u8 to_offset;
+ u8 clear_offset;
+};
+
autoendian define pnat_binding_add
{
u32 client_index;
u32 context;
- vl_api_pnat_5tuple_t match;
- vl_api_pnat_5tuple_t rewrite;
+ vl_api_pnat_match_tuple_t match;
+ vl_api_pnat_rewrite_tuple_t rewrite;
};
autoendian define pnat_binding_add_reply
@@ -107,8 +121,8 @@ define pnat_bindings_get_reply
define pnat_bindings_details
{
u32 context;
- vl_api_pnat_5tuple_t match;
- vl_api_pnat_5tuple_t rewrite;
+ vl_api_pnat_match_tuple_t match;
+ vl_api_pnat_rewrite_tuple_t rewrite;
};
define pnat_interfaces_get
@@ -147,6 +161,12 @@ counters pnat {
units "packets";
description "rewrite failed";
};
+ tooshort {
+ severity info;
+ type counter64;
+ units "packets";
+ description "packet too short for rewrite";
+ };
};
paths {