#undef _
} nat64_tcp_ses_state_t;
+enum
+{
+ NAT64_CLEANER_RESCHEDULE = 1,
+} nat64_cleaner_process_event_e;
+
typedef struct
{
ip6_address_t prefix;
u32 icmp_timeout;
u32 tcp_trans_timeout;
u32 tcp_est_timeout;
- u32 tcp_incoming_syn_timeout;
+
+ /* Total count of interfaces enabled */
+ u32 total_enabled_count;
+ /* The process node which orcherstrates the cleanup */
+ u32 nat64_expire_walk_node_index;
+
+ /* counters/gauges */
+ vlib_simple_counter_main_t total_bibs;
+ vlib_simple_counter_main_t total_sessions;
ip4_main_t *ip4_main;
snat_main_t *sm;
/**
* @brief Add/delete address to NAT64 pool.
*
+ * @param thread_index Thread index used by ipfix nat logging (not address per thread).
* @param addr IPv4 address.
* @param vrf_id VRF id of tenant, ~0 means independent of VRF.
* @param is_add 1 if add, 0 if delete.
*
* @returns 0 on success, non-zero value otherwise.
*/
-int nat64_add_del_pool_addr (ip4_address_t * addr, u32 vrf_id, u8 is_add);
+int nat64_add_del_pool_addr (u32 thread_index,
+ ip4_address_t * addr, u32 vrf_id, u8 is_add);
/**
* @brief Call back function when walking addresses in NAT64 pool, non-zero
ip4_address_t * addr, u16 * port,
u32 thread_index);
-/**
- * @brief Free IPv4 address and port pair from NAT64 pool.
- *
- * @param addr IPv4 address to free.
- * @param port Port number to free.
- * @param proto L4 protocol.
- * @param thread_index Thread index.
- *
- * @returns 0 on success, non-zero value otherwise.
- */
-void nat64_free_out_addr_and_port (ip4_address_t * addr, u16 port,
- snat_protocol_t proto, u32 thread_index);
-
/**
* @brief Set UDP session timeout.
*
*
* @param trans Transitory timeout in seconds (if 0 reset to default value 240sec).
* @param est Established timeout in seconds (if 0 reset to default value 7440sec).
- * @param incoming_syn Incoming SYN timeout in seconds (if 0 reset to default value 6sec).
*
* @returns 0 on success, non-zero value otherwise.
*/
-int nat64_set_tcp_timeouts (u32 trans, u32 est, u32 incoming_syn);
+int nat64_set_tcp_timeouts (u32 trans, u32 est);
/**
* @brief Get TCP transitory timeout.
*/
u32 nat64_get_tcp_est_timeout (void);
-/**
- * @brief Get TCP incoming SYN timeout.
- *
- * @returns TCP incoming SYN timeout in seconds.
- */
-u32 nat64_get_tcp_incoming_syn_timeout (void);
-
/**
* @brief Reset NAT64 session timeout.
*
*/
u32 nat64_get_worker_out2in (ip4_header_t * ip);
-#define u8_ptr_add(ptr, index) (((u8 *)ptr) + index)
-#define u16_net_add(u, val) clib_host_to_net_u16(clib_net_to_host_u16(u) + (val))
-
#endif /* __included_nat64_h__ */
/*