aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/nat.api
diff options
context:
space:
mode:
authorMatus Fabian <matfabia@cisco.com>2017-11-28 04:29:41 -0800
committerOle Trøan <otroan@employees.org>2017-11-30 12:09:11 +0000
commitab7a805fbb99661b2c125268aa9d7b96c435c1d1 (patch)
tree3ef2b821274642bf959682761a77a9a2faddac17 /src/plugins/nat/nat.api
parent8389fb9112bcf96def69539fa1de13a7a08923f5 (diff)
NAT44: identity NAT (VPP-1073)
Identity mapping translate an IP address to itself. Change-Id: Icc0ca5102d32547a4b0c75720b5f5bf41ed69c71 Signed-off-by: Matus Fabian <matfabia@cisco.com>
Diffstat (limited to 'src/plugins/nat/nat.api')
-rw-r--r--src/plugins/nat/nat.api52
1 files changed, 52 insertions, 0 deletions
diff --git a/src/plugins/nat/nat.api b/src/plugins/nat/nat.api
index d515a769cb3..d8e0d7eb812 100644
--- a/src/plugins/nat/nat.api
+++ b/src/plugins/nat/nat.api
@@ -393,6 +393,58 @@ define nat44_static_mapping_details {
u32 vrf_id;
};
+/** \brief Add/delete NAT44 identity mapping
+ @param client_index - opaque cookie to identify the sender
+ @param context - sender context, to match reply w/ request
+ @param is_add - 1 if add, 0 if delete
+ @param addr_only - 1 if address only mapping
+ @param ip_address - IPv4 address
+ @param protocol - IP protocol
+ @param port - port number
+ @param sw_if_index - interface (if set ip_address is ignored, ~0 means not
+ used)
+ @param vfr_id - VRF ID (if ~0 use default VRF)
+*/
+autoreply define nat44_add_del_identity_mapping {
+ u32 client_index;
+ u32 context;
+ u8 is_add;
+ u8 addr_only;
+ u8 ip_address[4];
+ u8 protocol;
+ u16 port;
+ u32 sw_if_index;
+ u32 vrf_id;
+};
+
+/** \brief Dump NAT44 identity mappings
+ @param client_index - opaque cookie to identify the sender
+ @param context - sender context, to match reply w/ request
+*/
+define nat44_identity_mapping_dump {
+ u32 client_index;
+ u32 context;
+};
+
+/** \brief NAT44 identity mapping details response
+ @param context - sender context, to match reply w/ request
+ @param addr_only - 1 if address only mapping
+ @param ip_address - IPv4 address
+ @param protocol - IP protocol
+ @param port - port number
+ @param sw_if_index - interface
+ @param vfr_id - VRF ID
+*/
+define nat44_identity_mapping_details {
+ u32 context;
+ u8 addr_only;
+ u8 ip_address[4];
+ u8 protocol;
+ u16 port;
+ u32 sw_if_index;
+ u32 vrf_id;
+};
+
/** \brief Add/delete NAT44 pool address from specific interfce
@param client_index - opaque cookie to identify the sender
@param context - sender context, to match reply w/ request