NAT64: Run nat64-expire-worker-walk only when NAT64 is configured (VPP-1162)
[vpp.git] / src / plugins / nat / nat64.h
index 0c8fd82..e2334a5 100644 (file)
@@ -39,6 +39,11 @@ typedef enum
 #undef _
 } nat64_tcp_ses_state_t;
 
+enum
+{
+  NAT64_CLEANER_RESCHEDULE = 1,
+} nat64_cleaner_process_event_e;
+
 typedef struct
 {
   ip6_address_t prefix;
@@ -99,6 +104,11 @@ typedef struct
   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;
+
   ip4_main_t *ip4_main;
   snat_main_t *sm;
 } nat64_main_t;
@@ -209,19 +219,6 @@ int nat64_alloc_out_addr_and_port (u32 fib_index, snat_protocol_t proto,
                                   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.
  *