summaryrefslogtreecommitdiffstats
path: root/src/plugins/snat/snat.api
diff options
context:
space:
mode:
authorMatus Fabian <matfabia@cisco.com>2017-04-12 03:36:13 -0700
committerOle Trøan <otroan@employees.org>2017-04-12 13:09:34 +0000
commit6a0946f078183361a5b757f6405165089b659c5c (patch)
tree23ea7f7b823f9e987e18234365dd90de013d308f /src/plugins/snat/snat.api
parentf3ebb452ca26318b75b8f93569c3c752f05aed25 (diff)
CGN: configurable timeouts
add API and CLI configuration of deterministic NAT session timeout for TCP, UDP and ICMP protocol Change-Id: I577440452e7eaedcb5d80501a7fd4b76e31e8c9c Signed-off-by: Matus Fabian <matfabia@cisco.com>
Diffstat (limited to 'src/plugins/snat/snat.api')
-rw-r--r--src/plugins/snat/snat.api55
1 files changed, 54 insertions, 1 deletions
diff --git a/src/plugins/snat/snat.api b/src/plugins/snat/snat.api
index 92aa32b6dca..9689f5f9dfc 100644
--- a/src/plugins/snat/snat.api
+++ b/src/plugins/snat/snat.api
@@ -126,7 +126,8 @@ define snat_interface_details {
@param local_port - local port number
@param external_port - external port number
@param external_sw_if_index - external interface (if set
- external_ip_address is ignored)
+ external_ip_address is ignored, ~0 means not
+ used)
@param vfr_id - VRF ID
*/
define snat_add_static_mapping {
@@ -546,3 +547,55 @@ define snat_det_map_details {
u16 ports_per_host;
u32 ses_num;
};
+
+/** \brief Set values of timeouts for deterministic NAT (seconds, 0 = default)
+ @param client_index - opaque cookie to identify the sender
+ @param context - sender context, to match reply w/ request
+ @param udp - UDP timeout (default 300sec)
+ @param tcp_established - TCP established timeout (default 7440sec)
+ @param tcp_transitory - TCP transitory timeout (default 240sec)
+ @param icmp - ICMP timeout (default 60sec)
+*/
+define snat_det_set_timeouts {
+ u32 client_index;
+ u32 context;
+ u32 udp;
+ u32 tcp_established;
+ u32 tcp_transitory;
+ u32 icmp;
+};
+
+/** \brief Set values of timeouts for deterministic NAT reply
+ @param context - sender context, to match reply w/ request
+ @param retval - return code
+*/
+define snat_det_set_timeouts_reply {
+ u32 context;
+ i32 retval;
+};
+
+/** \brief Get values of timeouts for deterministic NAT (seconds)
+ @param client_index - opaque cookie to identify the sender
+ @param context - sender context, to match reply w/ request
+*/
+define snat_det_get_timeouts {
+ u32 client_index;
+ u32 context;
+};
+
+/** \brief Get values of timeouts for deterministic NAT reply
+ @param context - sender context, to match reply w/ request
+ @param retval - return code
+ @param udp - UDP timeout (default 300sec)
+ @param tcp_established - TCP established timeout (default 7440sec)
+ @param tcp_transitory - TCP transitory timeout (default 240sec)
+ @param icmp - ICMP timeout (default 60sec)
+*/
+define snat_det_get_timeouts_reply {
+ u32 context;
+ i32 retval;
+ u32 udp;
+ u32 tcp_established;
+ u32 tcp_transitory;
+ u32 icmp;
+};