aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/nat.h
diff options
context:
space:
mode:
authorMatus Fabian <matfabia@cisco.com>2019-02-26 09:05:23 -0800
committerMatus Fabian <matfabia@cisco.com>2019-02-27 00:56:32 -0800
commit34931eb47124ef78a3aa9575930e848a78c9618b (patch)
treedec97d4d04e0011fe49b7712d7deba5ef8f0e99c /src/plugins/nat/nat.h
parent8343ee5665942353e57ee074da62b9d07c1c510b (diff)
NAT44: active-passive HA (VPP-1571)
session synchronization so that we can build a plain active-passive HA NAT pair Change-Id: I21db200491081ca46b7af3e82afc677c1985abf4 Signed-off-by: Matus Fabian <matfabia@cisco.com>
Diffstat (limited to 'src/plugins/nat/nat.h')
-rw-r--r--src/plugins/nat/nat.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/plugins/nat/nat.h b/src/plugins/nat/nat.h
index c9139b35200..dabb616911f 100644
--- a/src/plugins/nat/nat.h
+++ b/src/plugins/nat/nat.h
@@ -206,6 +206,9 @@ typedef CLIB_PACKED(struct
/* Last heard timer */
f64 last_heard;
+ /* Last HA refresh */
+ f64 ha_last_refreshed;
+
/* Counters */
u64 total_bytes;
u32 total_pkts;
@@ -971,9 +974,10 @@ int nat44_del_ed_session (snat_main_t * sm, ip4_address_t * addr, u16 port,
*
* @param s NAT session
* @param thread_index thread index
+ * @param is_ha is HA event
*/
void nat_free_session_data (snat_main_t * sm, snat_session_t * s,
- u32 thread_index);
+ u32 thread_index, u8 is_ha);
/**
* @brief Find or create NAT user
@@ -997,7 +1001,7 @@ snat_user_t *nat_user_get_or_create (snat_main_t * sm, ip4_address_t * addr,
*/
snat_session_t *nat_session_alloc_or_recycle (snat_main_t * sm,
snat_user_t * u,
- u32 thread_index);
+ u32 thread_index, f64 now);
/**
* @brief Allocate NAT endpoint-dependent session
@@ -1102,7 +1106,6 @@ int snat_static_mapping_match (snat_main_t * sm,
void snat_add_del_addr_to_fib (ip4_address_t * addr,
u8 p_len, u32 sw_if_index, int is_add);
-
/*
* Why is this here? Because we don't need to touch this layer to
* simply reply to an icmp. We need to change id to a unique