X-Git-Url: https://gerrit.fd.io/r/gitweb?p=vpp.git;a=blobdiff_plain;f=src%2Fplugins%2Fnat%2Fnat.h;h=ca2d1fcf1bf73128bc4ffffdca38141ca8bac40d;hp=c9139b352007bbf3d9b56c759ec5616290462735;hb=8feeaff56;hpb=e69e423743630b52e13db58c3f0229df8a46c07f diff --git a/src/plugins/nat/nat.h b/src/plugins/nat/nat.h index c9139b35200..ca2d1fcf1bf 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; @@ -944,7 +947,7 @@ int snat_add_interface_address (snat_main_t * sm, u32 sw_if_index, int is_del, * @param port L4 port number * @param proto L4 protocol * @param vrf_id VRF ID - * @param is_in 1 = inside network addres and por pair, 0 = outside + * @param is_in 1 = inside network address and port pair, 0 = outside * * @return 0 on success, non-zero value otherwise */ @@ -958,7 +961,7 @@ int nat44_del_session (snat_main_t * sm, ip4_address_t * addr, u16 port, * @param port L4 port number * @param proto L4 protocol * @param vrf_id VRF ID - * @param is_in 1 = inside network addres and por pair, 0 = outside + * @param is_in 1 = inside network address and port pair, 0 = outside * * @return 0 on success, non-zero value otherwise */ @@ -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 @@ -1038,7 +1042,7 @@ void nat_set_alloc_addr_and_port_default (void); * * @param addresses vector of outside addresses * @param thread_index thread index - * @param k adddress, port and protocol + * @param k address, port and protocol */ void snat_free_outside_address_and_port (snat_address_t * addresses, u32 thread_index, @@ -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