From 7a1bde061a919af42645e3bc09206b98fbfde9d9 Mon Sep 17 00:00:00 2001 From: Juraj Sloboda Date: Mon, 3 Apr 2017 08:43:58 +0200 Subject: Add ICMP support for deterministic NAT Change-Id: I9a6bcb7d173a2c13d89784e7ff8a6e42dcee201f Signed-off-by: Juraj Sloboda --- src/plugins/snat/snat.h | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'src/plugins/snat/snat.h') diff --git a/src/plugins/snat/snat.h b/src/plugins/snat/snat.h index 92b2f7ea..49b6e374 100644 --- a/src/plugins/snat/snat.h +++ b/src/plugins/snat/snat.h @@ -226,7 +226,8 @@ typedef u32 snat_icmp_match_function_t (struct snat_main_s *sm, u8 *p_proto, snat_session_key_t *p_value, u8 *p_dont_translate, - void *d); + void *d, + void *e); typedef u32 (snat_get_worker_function_t) (ip4_header_t * ip, u32 rx_fib_index); @@ -404,19 +405,27 @@ typedef struct { u32 icmp_match_in2out_fast(snat_main_t *sm, vlib_node_runtime_t *node, u32 thread_index, vlib_buffer_t *b0, u8 *p_proto, snat_session_key_t *p_value, - u8 *p_dont_translate, void *d); + u8 *p_dont_translate, void *d, void *e); u32 icmp_match_in2out_slow(snat_main_t *sm, vlib_node_runtime_t *node, u32 thread_index, vlib_buffer_t *b0, u8 *p_proto, snat_session_key_t *p_value, - u8 *p_dont_translate, void *d); + u8 *p_dont_translate, void *d, void *e); +u32 icmp_match_in2out_det(snat_main_t *sm, vlib_node_runtime_t *node, + u32 thread_index, vlib_buffer_t *b0, u8 *p_proto, + snat_session_key_t *p_value, + u8 *p_dont_translate, void *d, void *e); u32 icmp_match_out2in_fast(snat_main_t *sm, vlib_node_runtime_t *node, u32 thread_index, vlib_buffer_t *b0, u8 *p_proto, snat_session_key_t *p_value, - u8 *p_dont_translate, void *d); + u8 *p_dont_translate, void *d, void *e); u32 icmp_match_out2in_slow(snat_main_t *sm, vlib_node_runtime_t *node, u32 thread_index, vlib_buffer_t *b0, u8 *p_proto, snat_session_key_t *p_value, - u8 *p_dont_translate, void *d); + u8 *p_dont_translate, void *d, void *e); +u32 icmp_match_out2in_det(snat_main_t *sm, vlib_node_runtime_t *node, + u32 thread_index, vlib_buffer_t *b0, u8 *p_proto, + snat_session_key_t *p_value, + u8 *p_dont_translate, void *d, void *e); static_always_inline u8 icmp_is_error_message (icmp46_header_t * icmp) -- cgit 1.2.3-korg