summaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/nat.api
diff options
context:
space:
mode:
authorMatus Fabian <matfabia@cisco.com>2018-08-23 00:33:35 -0700
committerOle Trøan <otroan@employees.org>2018-08-27 12:17:25 +0000
commit878c646aea9b9ccf68011ffd964694c43bbe5fdd (patch)
tree4acfaf8c3e35e2c2e334ae8495fdd52c49b5a791 /src/plugins/nat/nat.api
parentd2dcd200fe2e94f6408155f6c38e7f570dbe1183 (diff)
NAT44: add support for session timeout (VPP-1272)
NAT44 (vanilla/simple and endpoint-dependent mode) now lazily delete expired sessions. When inserting to session lookup hash and bucket is full, expired session is overwritten. Change-Id: Ib1b34959f60f0ca4f5b13525b1d41dd2f992288d Signed-off-by: Matus Fabian <matfabia@cisco.com>
Diffstat (limited to 'src/plugins/nat/nat.api')
-rw-r--r--src/plugins/nat/nat.api135
1 files changed, 44 insertions, 91 deletions
diff --git a/src/plugins/nat/nat.api b/src/plugins/nat/nat.api
index 45e504fa2ff..8e37567a9e8 100644
--- a/src/plugins/nat/nat.api
+++ b/src/plugins/nat/nat.api
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-option version = "3.1.0";
+option version = "4.0.0";
/**
* @file nat.api
@@ -234,6 +234,49 @@ define nat_reass_details {
u8 frag_n;
};
+/** \brief Set values of timeouts for NAT sessions (seconds)
+ @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)
+*/
+autoreply define nat_set_timeouts {
+ u32 client_index;
+ u32 context;
+ u32 udp;
+ u32 tcp_established;
+ u32 tcp_transitory;
+ u32 icmp;
+};
+
+/** \brief Get values of timeouts for NAT sessions (seconds)
+ @param client_index - opaque cookie to identify the sender
+ @param context - sender context, to match reply w/ request
+*/
+define nat_get_timeouts {
+ u32 client_index;
+ u32 context;
+};
+
+/** \brief Get values of timeouts for NAT sessions reply
+ @param context - sender context, to match reply w/ request
+ @param retval - return code
+ @param udp - UDP timeout
+ @param tcp_established - TCP established timeout
+ @param tcp_transitory - TCP transitory timeout
+ @param icmp - ICMP timeout
+*/
+define nat_get_timeouts_reply {
+ u32 context;
+ i32 retval;
+ u32 udp;
+ u32 tcp_established;
+ u32 tcp_transitory;
+ u32 icmp;
+};
+
/*
* NAT44 APIs
*/
@@ -849,49 +892,6 @@ define nat_det_map_details {
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)
-*/
-autoreply define nat_det_set_timeouts {
- u32 client_index;
- u32 context;
- u32 udp;
- u32 tcp_established;
- u32 tcp_transitory;
- u32 icmp;
-};
-
-/** \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 nat_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 nat_det_get_timeouts_reply {
- u32 context;
- i32 retval;
- u32 udp;
- u32 tcp_established;
- u32 tcp_transitory;
- u32 icmp;
-};
-
/** \brief Close deterministic NAT session by outside address and port
@param client_index - opaque cookie to identify the sender
@param context - sender context, to match reply w/ request
@@ -1097,53 +1097,6 @@ define nat64_bib_details {
u32 ses_num;
};
-/** \brief Set values of timeouts for NAT64 (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 icmp - ICMP timeout (default 60sec)
- @param tcp_trans - TCP transitory timeout (default 240sec)
- @param tcp_est - TCP established timeout (default 7440sec)
- @param tcp_incoming_syn - TCP incoming SYN timeout (default 6sec)
-*/
-autoreply define nat64_set_timeouts {
- u32 client_index;
- u32 context;
- u32 udp;
- u32 icmp;
- u32 tcp_trans;
- u32 tcp_est;
- u32 tcp_incoming_syn;
-};
-
-/** \brief Get values of timeouts for NAT64 (seconds)
- @param client_index - opaque cookie to identify the sender
- @param context - sender context, to match reply w/ request
-*/
-define nat64_get_timeouts {
- u32 client_index;
- u32 context;
-};
-
-/** \brief Get values of timeouts for NAT64 reply
- @param context - sender context, to match reply w/ request
- @param retval - return code
- @param udp - UDP timeout
- @param icmp - ICMP timeout
- @param tcp_trans - TCP transitory timeout
- @param tcp_est - TCP established timeout
- @param tcp_incoming_syn - TCP incoming SYN timeout
-*/
-define nat64_get_timeouts_reply {
- u32 context;
- i32 retval;
- u32 udp;
- u32 icmp;
- u32 tcp_trans;
- u32 tcp_est;
- u32 tcp_incoming_syn;
-};
-
/** \brief Dump NAT64 session table
@param client_index - opaque cookie to identify the sender
@param context - sender context, to match reply w/ request