/** config parameters */
u32 bib_buckets;
- u32 bib_memory_size;
+ uword bib_memory_size;
u32 st_buckets;
- u32 st_memory_size;
+ uword st_memory_size;
/** values of various timeouts */
u32 udp_timeout;
ip4_main_t *ip4_main;
snat_main_t *sm;
+
+#define _(x) vlib_simple_counter_main_t x;
+ struct
+ {
+ struct
+ {
+ foreach_nat_counter;
+ } in2out;
+
+ struct
+ {
+ foreach_nat_counter;
+ } out2in;
+ } counters;
+#undef _
+
} nat64_main_t;
extern nat64_main_t nat64_main;
*
* @returns 0 on success, non-zero value otherwise.
*/
-int nat64_alloc_out_addr_and_port (u32 fib_index, snat_protocol_t proto,
+int nat64_alloc_out_addr_and_port (u32 fib_index, nat_protocol_t proto,
ip4_address_t * addr, u16 * port,
u32 thread_index);
* @param st_buckets Number of session table hash buckets.
* @param st_memory_size Memory size of session table hash.
*/
-void nat64_set_hash (u32 bib_buckets, u32 bib_memory_size, u32 st_buckets,
- u32 st_memory_size);
+void nat64_set_hash (u32 bib_buckets, uword bib_memory_size, u32 st_buckets,
+ uword st_memory_size);
/**
* @brief Get worker thread index for NAT64 in2out.