From 6a0946f078183361a5b757f6405165089b659c5c Mon Sep 17 00:00:00 2001 From: Matus Fabian Date: Wed, 12 Apr 2017 03:36:13 -0700 Subject: 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 --- src/plugins/snat/snat.api | 55 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) (limited to 'src/plugins/snat/snat.api') 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; +}; -- cgit 1.2.3-korg