diff options
Diffstat (limited to 'src/plugins/snat/snat.h')
-rw-r--r-- | src/plugins/snat/snat.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/plugins/snat/snat.h b/src/plugins/snat/snat.h index 61ed52f61e2..aa0f82fc9df 100644 --- a/src/plugins/snat/snat.h +++ b/src/plugins/snat/snat.h @@ -241,6 +241,8 @@ typedef struct { /* Pool of doubly-linked list elements */ dlist_elt_t * list_pool; + + u32 snat_thread_index; } snat_main_per_thread_data_t; struct snat_main_s; @@ -284,6 +286,8 @@ typedef struct snat_main_s { u32 * workers; snat_get_worker_function_t * worker_in2out_cb; snat_get_worker_function_t * worker_out2in_cb; + u16 port_per_thread; + u32 num_snat_thread; /* Per thread data */ snat_main_per_thread_data_t * per_thread_data; @@ -374,12 +378,13 @@ extern vlib_node_registration_t snat_det_out2in_node; extern vlib_node_registration_t snat_hairpin_dst_node; extern vlib_node_registration_t snat_hairpin_src_node; -void snat_free_outside_address_and_port (snat_main_t * sm, - snat_session_key_t * k, +void snat_free_outside_address_and_port (snat_main_t * sm, + snat_session_key_t * k, u32 address_index); -int snat_alloc_outside_address_and_port (snat_main_t * sm, +int snat_alloc_outside_address_and_port (snat_main_t * sm, u32 fib_index, + u32 thread_index, snat_session_key_t * k, u32 * address_indexp); |