FD.io VPP  v18.07.1-19-g511ce25
Vector Packet Processing
in2out.c File Reference
+ Include dependency graph for in2out.c:

Go to the source code of this file.

Data Structures

struct  snat_in2out_trace_t
 
struct  snat_in2out_worker_handoff_trace_t
 
struct  nat44_in2out_reass_trace_t
 

Macros

#define foreach_snat_in2out_error
 

Enumerations

enum  snat_in2out_error_t { SNAT_IN2OUT_N_ERROR }
 
enum  snat_in2out_next_t {
  SNAT_IN2OUT_NEXT_LOOKUP, SNAT_IN2OUT_NEXT_DROP, SNAT_IN2OUT_NEXT_ICMP_ERROR, SNAT_IN2OUT_NEXT_SLOW_PATH,
  SNAT_IN2OUT_NEXT_REASS, SNAT_IN2OUT_N_NEXT
}
 
enum  snat_hairpin_next_t {
  SNAT_HAIRPIN_SRC_NEXT_DROP, SNAT_HAIRPIN_SRC_NEXT_SNAT_IN2OUT, SNAT_HAIRPIN_SRC_NEXT_SNAT_IN2OUT_WH, SNAT_HAIRPIN_SRC_NEXT_INTERFACE_OUTPUT,
  SNAT_HAIRPIN_SRC_N_NEXT
}
 

Functions

static u8format_snat_in2out_trace (u8 *s, va_list *args)
 
static u8format_snat_in2out_fast_trace (u8 *s, va_list *args)
 
static u8format_snat_in2out_worker_handoff_trace (u8 *s, va_list *args)
 
static u8format_nat44_in2out_reass_trace (u8 *s, va_list *args)
 
static int snat_not_translate_fast (snat_main_t *sm, vlib_node_runtime_t *node, u32 sw_if_index0, ip4_header_t *ip0, u32 proto0, u32 rx_fib_index0)
 Check if packet should be translated. More...
 
static int snat_not_translate (snat_main_t *sm, vlib_node_runtime_t *node, u32 sw_if_index0, ip4_header_t *ip0, u32 proto0, u32 rx_fib_index0, u32 thread_index)
 
static int nat_not_translate_output_feature (snat_main_t *sm, ip4_header_t *ip0, u32 proto0, u16 src_port, u16 dst_port, u32 thread_index, u32 sw_if_index)
 
static u32 slow_path (snat_main_t *sm, vlib_buffer_t *b0, ip4_header_t *ip0, u32 rx_fib_index0, snat_session_key_t *key0, snat_session_t **sessionp, vlib_node_runtime_t *node, u32 next0, u32 thread_index)
 
static_always_inline snat_in2out_error_t icmp_get_key (ip4_header_t *ip0, snat_session_key_t *p_key0)
 
u32 icmp_match_in2out_slow (snat_main_t *sm, vlib_node_runtime_t *node, u32 thread_index, vlib_buffer_t *b0, ip4_header_t *ip0, u8 *p_proto, snat_session_key_t *p_value, u8 *p_dont_translate, void *d, void *e)
 Get address and port values to be used for ICMP packet translation and create session if needed. More...
 
u32 icmp_match_in2out_fast (snat_main_t *sm, vlib_node_runtime_t *node, u32 thread_index, vlib_buffer_t *b0, ip4_header_t *ip0, u8 *p_proto, snat_session_key_t *p_value, u8 *p_dont_translate, void *d, void *e)
 Get address and port values to be used for ICMP packet translation. More...
 
static u32 icmp_in2out (snat_main_t *sm, vlib_buffer_t *b0, ip4_header_t *ip0, icmp46_header_t *icmp0, u32 sw_if_index0, u32 rx_fib_index0, vlib_node_runtime_t *node, u32 next0, u32 thread_index, void *d, void *e)
 
static int snat_hairpinning (snat_main_t *sm, vlib_buffer_t *b0, ip4_header_t *ip0, udp_header_t *udp0, tcp_header_t *tcp0, u32 proto0, int is_ed)
 Hairpinning. More...
 
static void snat_icmp_hairpinning (snat_main_t *sm, vlib_buffer_t *b0, ip4_header_t *ip0, icmp46_header_t *icmp0, int is_ed)
 
static u32 icmp_in2out_slow_path (snat_main_t *sm, vlib_buffer_t *b0, ip4_header_t *ip0, icmp46_header_t *icmp0, u32 sw_if_index0, u32 rx_fib_index0, vlib_node_runtime_t *node, u32 next0, f64 now, u32 thread_index, snat_session_t **p_s0)
 
static void nat_hairpinning_sm_unknown_proto (snat_main_t *sm, vlib_buffer_t *b, ip4_header_t *ip)
 
static int nat_in2out_sm_unknown_proto (snat_main_t *sm, vlib_buffer_t *b, ip4_header_t *ip, u32 rx_fib_index)
 
static uword snat_in2out_node_fn_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, int is_slow_path, int is_output_feature)
 
static uword snat_in2out_fast_path_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
 VLIB_NODE_FUNCTION_MULTIARCH (snat_in2out_node, snat_in2out_fast_path_fn)
 
static uword snat_in2out_output_fast_path_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
 VLIB_NODE_FUNCTION_MULTIARCH (snat_in2out_output_node, snat_in2out_output_fast_path_fn)
 
static uword snat_in2out_slow_path_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
 VLIB_NODE_FUNCTION_MULTIARCH (snat_in2out_slowpath_node, snat_in2out_slow_path_fn)
 
static uword snat_in2out_output_slow_path_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
 VLIB_NODE_FUNCTION_MULTIARCH (snat_in2out_output_slowpath_node, snat_in2out_output_slow_path_fn)
 
static uword nat44_hairpinning_fn_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, int is_ed)
 
static uword nat44_hairpinning_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
 VLIB_NODE_FUNCTION_MULTIARCH (nat44_hairpinning_node, nat44_hairpinning_fn)
 
static uword nat44_ed_hairpinning_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
 VLIB_NODE_FUNCTION_MULTIARCH (nat44_ed_hairpinning_node, nat44_ed_hairpinning_fn)
 
static void nat44_reass_hairpinning (snat_main_t *sm, vlib_buffer_t *b0, ip4_header_t *ip0, u16 sport, u16 dport, u32 proto0)
 
static uword nat44_in2out_reass_node_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
 VLIB_NODE_FUNCTION_MULTIARCH (nat44_in2out_reass_node, nat44_in2out_reass_node_fn)
 
static_always_inline int icmp_get_ed_key (ip4_header_t *ip0, nat_ed_ses_key_t *p_key0)
 
static u32 slow_path_ed (snat_main_t *sm, vlib_buffer_t *b, u32 rx_fib_index, clib_bihash_kv_16_8_t *kv, snat_session_t **sessionp, vlib_node_runtime_t *node, u32 next, u32 thread_index)
 
static_always_inline int nat44_ed_not_translate (snat_main_t *sm, vlib_node_runtime_t *node, u32 sw_if_index, ip4_header_t *ip, u32 proto, u32 rx_fib_index, u32 thread_index)
 
static_always_inline int nat_not_translate_output_feature_fwd (snat_main_t *sm, ip4_header_t *ip, u32 thread_index, f64 now, vlib_main_t *vm, vlib_buffer_t *b)
 
static_always_inline int nat44_ed_not_translate_output_feature (snat_main_t *sm, ip4_header_t *ip, u8 proto, u16 src_port, u16 dst_port, u32 thread_index, u32 rx_sw_if_index, u32 tx_sw_if_index)
 
u32 icmp_match_in2out_ed (snat_main_t *sm, vlib_node_runtime_t *node, u32 thread_index, vlib_buffer_t *b, ip4_header_t *ip, u8 *p_proto, snat_session_key_t *p_value, u8 *p_dont_translate, void *d, void *e)
 
static void nat44_ed_hairpinning_unknown_proto (snat_main_t *sm, vlib_buffer_t *b, ip4_header_t *ip)
 
static snat_session_t * nat44_ed_in2out_unknown_proto (snat_main_t *sm, vlib_buffer_t *b, ip4_header_t *ip, u32 rx_fib_index, u32 thread_index, f64 now, vlib_main_t *vm, vlib_node_runtime_t *node)
 
static uword nat44_ed_in2out_node_fn_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, int is_slow_path, int is_output_feature)
 
static uword nat44_ed_in2out_fast_path_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
 VLIB_NODE_FUNCTION_MULTIARCH (nat44_ed_in2out_node, nat44_ed_in2out_fast_path_fn)
 
static uword nat44_ed_in2out_output_fast_path_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
 VLIB_NODE_FUNCTION_MULTIARCH (nat44_ed_in2out_output_node, nat44_ed_in2out_output_fast_path_fn)
 
static uword nat44_ed_in2out_slow_path_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
 VLIB_NODE_FUNCTION_MULTIARCH (nat44_ed_in2out_slowpath_node, nat44_ed_in2out_slow_path_fn)
 
static uword nat44_ed_in2out_output_slow_path_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
 VLIB_NODE_FUNCTION_MULTIARCH (nat44_ed_in2out_output_slowpath_node, nat44_ed_in2out_output_slow_path_fn)
 
static uword snat_det_in2out_node_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
 VLIB_NODE_FUNCTION_MULTIARCH (snat_det_in2out_node, snat_det_in2out_node_fn)
 
u32 icmp_match_in2out_det (snat_main_t *sm, vlib_node_runtime_t *node, u32 thread_index, vlib_buffer_t *b0, ip4_header_t *ip0, u8 *p_proto, snat_session_key_t *p_value, u8 *p_dont_translate, void *d, void *e)
 Get address and port values to be used for ICMP packet translation and create session if needed. More...
 
static uword snat_in2out_worker_handoff_fn_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, u8 is_output)
 
static uword snat_in2out_worker_handoff_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
 VLIB_NODE_FUNCTION_MULTIARCH (snat_in2out_worker_handoff_node, snat_in2out_worker_handoff_fn)
 
static uword snat_in2out_output_worker_handoff_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
 VLIB_NODE_FUNCTION_MULTIARCH (snat_in2out_output_worker_handoff_node, snat_in2out_output_worker_handoff_fn)
 
static_always_inline int is_hairpinning (snat_main_t *sm, ip4_address_t *dst_addr)
 
static uword snat_hairpin_dst_fn_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, int is_ed)
 
static uword snat_hairpin_dst_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
 VLIB_NODE_FUNCTION_MULTIARCH (snat_hairpin_dst_node, snat_hairpin_dst_fn)
 
static uword nat44_ed_hairpin_dst_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
 VLIB_NODE_FUNCTION_MULTIARCH (nat44_ed_hairpin_dst_node, nat44_ed_hairpin_dst_fn)
 
static uword snat_hairpin_src_fn_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, int is_ed)
 
static uword snat_hairpin_src_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
 VLIB_NODE_FUNCTION_MULTIARCH (snat_hairpin_src_node, snat_hairpin_src_fn)
 
static uword nat44_ed_hairpin_src_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
 VLIB_NODE_FUNCTION_MULTIARCH (nat44_ed_hairpin_src_node, nat44_ed_hairpin_src_fn)
 
static uword snat_in2out_fast_static_map_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
 VLIB_NODE_FUNCTION_MULTIARCH (snat_in2out_fast_node, snat_in2out_fast_static_map_fn)
 

Variables

vlib_node_registration_t snat_in2out_node
 (constructor) VLIB_REGISTER_NODE (snat_in2out_node) More...
 
vlib_node_registration_t snat_in2out_slowpath_node
 (constructor) VLIB_REGISTER_NODE (snat_in2out_slowpath_node) More...
 
vlib_node_registration_t snat_in2out_fast_node
 (constructor) VLIB_REGISTER_NODE (snat_in2out_fast_node) More...
 
vlib_node_registration_t snat_in2out_worker_handoff_node
 (constructor) VLIB_REGISTER_NODE (snat_in2out_worker_handoff_node) More...
 
vlib_node_registration_t snat_det_in2out_node
 (constructor) VLIB_REGISTER_NODE (snat_det_in2out_node) More...
 
vlib_node_registration_t snat_in2out_output_node
 (constructor) VLIB_REGISTER_NODE (snat_in2out_output_node) More...
 
vlib_node_registration_t snat_in2out_output_slowpath_node
 (constructor) VLIB_REGISTER_NODE (snat_in2out_output_slowpath_node) More...
 
vlib_node_registration_t snat_in2out_output_worker_handoff_node
 (constructor) VLIB_REGISTER_NODE (snat_in2out_output_worker_handoff_node) More...
 
vlib_node_registration_t snat_hairpin_dst_node
 (constructor) VLIB_REGISTER_NODE (snat_hairpin_dst_node) More...
 
vlib_node_registration_t snat_hairpin_src_node
 (constructor) VLIB_REGISTER_NODE (snat_hairpin_src_node) More...
 
vlib_node_registration_t nat44_hairpinning_node
 (constructor) VLIB_REGISTER_NODE (nat44_hairpinning_node) More...
 
vlib_node_registration_t nat44_in2out_reass_node
 (constructor) VLIB_REGISTER_NODE (nat44_in2out_reass_node) More...
 
vlib_node_registration_t nat44_ed_in2out_node
 (constructor) VLIB_REGISTER_NODE (nat44_ed_in2out_node) More...
 
vlib_node_registration_t nat44_ed_in2out_slowpath_node
 (constructor) VLIB_REGISTER_NODE (nat44_ed_in2out_slowpath_node) More...
 
vlib_node_registration_t nat44_ed_in2out_output_node
 (constructor) VLIB_REGISTER_NODE (nat44_ed_in2out_output_node) More...
 
vlib_node_registration_t nat44_ed_in2out_output_slowpath_node
 (constructor) VLIB_REGISTER_NODE (nat44_ed_in2out_output_slowpath_node) More...
 
vlib_node_registration_t nat44_ed_hairpin_dst_node
 (constructor) VLIB_REGISTER_NODE (nat44_ed_hairpin_dst_node) More...
 
vlib_node_registration_t nat44_ed_hairpin_src_node
 (constructor) VLIB_REGISTER_NODE (nat44_ed_hairpin_src_node) More...
 
vlib_node_registration_t nat44_ed_hairpinning_node
 (constructor) VLIB_REGISTER_NODE (nat44_ed_hairpinning_node) More...
 
static char * snat_in2out_error_strings []
 
vnet_feature_arc_registration_t vnet_feat_arc_ip4_local
 

Macro Definition Documentation

#define foreach_snat_in2out_error
Value:
_(UNSUPPORTED_PROTOCOL, "Unsupported protocol") \
_(IN2OUT_PACKETS, "Good in2out packets processed") \
_(OUT_OF_PORTS, "Out of ports") \
_(BAD_OUTSIDE_FIB, "Outside VRF ID not found") \
_(BAD_ICMP_TYPE, "unsupported ICMP type") \
_(NO_TRANSLATION, "No translation") \
_(MAX_SESSIONS_EXCEEDED, "Maximum sessions exceeded") \
_(DROP_FRAGMENT, "Drop fragment") \
_(MAX_REASS, "Maximum reassemblies exceeded") \
_(MAX_FRAG, "Maximum fragments per reassembly exceeded")\
_(FQ_CONGESTED, "Handoff frame queue congested")

Definition at line 127 of file in2out.c.

Enumeration Type Documentation

Enumerator
SNAT_HAIRPIN_SRC_NEXT_DROP 
SNAT_HAIRPIN_SRC_NEXT_SNAT_IN2OUT 
SNAT_HAIRPIN_SRC_NEXT_SNAT_IN2OUT_WH 
SNAT_HAIRPIN_SRC_NEXT_INTERFACE_OUTPUT 
SNAT_HAIRPIN_SRC_N_NEXT 

Definition at line 162 of file in2out.c.

Enumerator
SNAT_IN2OUT_N_ERROR 

Definition at line 140 of file in2out.c.

Enumerator
SNAT_IN2OUT_NEXT_LOOKUP 
SNAT_IN2OUT_NEXT_DROP 
SNAT_IN2OUT_NEXT_ICMP_ERROR 
SNAT_IN2OUT_NEXT_SLOW_PATH 
SNAT_IN2OUT_NEXT_REASS 
SNAT_IN2OUT_N_NEXT 

Definition at line 153 of file in2out.c.

Function Documentation

static u8* format_nat44_in2out_reass_trace ( u8 s,
va_list *  args 
)
static

Definition at line 94 of file in2out.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u8* format_snat_in2out_fast_trace ( u8 s,
va_list *  args 
)
static

Definition at line 62 of file in2out.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u8* format_snat_in2out_trace ( u8 s,
va_list *  args 
)
static

Definition at line 47 of file in2out.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u8* format_snat_in2out_worker_handoff_trace ( u8 s,
va_list *  args 
)
static

Definition at line 74 of file in2out.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static_always_inline int icmp_get_ed_key ( ip4_header_t ip0,
nat_ed_ses_key_t p_key0 
)

Definition at line 2328 of file in2out.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Definition at line 442 of file in2out.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u32 icmp_in2out ( snat_main_t sm,
vlib_buffer_t b0,
ip4_header_t ip0,
icmp46_header_t *  icmp0,
u32  sw_if_index0,
u32  rx_fib_index0,
vlib_node_runtime_t node,
u32  next0,
u32  thread_index,
void *  d,
void *  e 
)
inlinestatic

Definition at line 670 of file in2out.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u32 icmp_in2out_slow_path ( snat_main_t sm,
vlib_buffer_t b0,
ip4_header_t ip0,
icmp46_header_t *  icmp0,
u32  sw_if_index0,
u32  rx_fib_index0,
vlib_node_runtime_t node,
u32  next0,
f64  now,
u32  thread_index,
snat_session_t **  p_s0 
)
inlinestatic

Definition at line 997 of file in2out.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u32 icmp_match_in2out_det ( snat_main_t sm,
vlib_node_runtime_t node,
u32  thread_index,
vlib_buffer_t b0,
ip4_header_t ip0,
u8 p_proto,
snat_session_key_t p_value,
u8 p_dont_translate,
void *  d,
void *  e 
)

Get address and port values to be used for ICMP packet translation and create session if needed.

Parameters
[in,out]smNAT main
[in,out]nodeNAT node runtime
[in]thread_indexthread index
[in,out]b0buffer containing packet to be translated
[out]p_protoprotocol used for matching
[out]p_valueaddress and port after NAT translation
[out]p_dont_translateif packet should not be translated
doptional parameter
eoptional parameter

Definition at line 4402 of file in2out.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u32 icmp_match_in2out_ed ( snat_main_t sm,
vlib_node_runtime_t node,
u32  thread_index,
vlib_buffer_t b,
ip4_header_t ip,
u8 p_proto,
snat_session_key_t p_value,
u8 p_dont_translate,
void *  d,
void *  e 
)

Definition at line 2644 of file in2out.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u32 icmp_match_in2out_fast ( snat_main_t sm,
vlib_node_runtime_t node,
u32  thread_index,
vlib_buffer_t b0,
ip4_header_t ip0,
u8 p_proto,
snat_session_key_t p_value,
u8 p_dont_translate,
void *  d,
void *  e 
)

Get address and port values to be used for ICMP packet translation.

Parameters
[in]smNAT main
[in,out]nodeNAT node runtime
[in]thread_indexthread index
[in,out]b0buffer containing packet to be translated
[out]p_protoprotocol used for matching
[out]p_valueaddress and port after NAT translation
[out]p_dont_translateif packet should not be translated
doptional parameter
eoptional parameter

Definition at line 604 of file in2out.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u32 icmp_match_in2out_slow ( snat_main_t sm,
vlib_node_runtime_t node,
u32  thread_index,
vlib_buffer_t b0,
ip4_header_t ip0,
u8 p_proto,
snat_session_key_t p_value,
u8 p_dont_translate,
void *  d,
void *  e 
)

Get address and port values to be used for ICMP packet translation and create session if needed.

Parameters
[in,out]smNAT main
[in,out]nodeNAT node runtime
[in]thread_indexthread index
[in,out]b0buffer containing packet to be translated
[out]p_protoprotocol used for matching
[out]p_valueaddress and port after NAT translation
[out]p_dont_translateif packet should not be translated
doptional parameter
eoptional parameter

Definition at line 500 of file in2out.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static_always_inline int is_hairpinning ( snat_main_t sm,
ip4_address_t dst_addr 
)

Definition at line 4786 of file in2out.c.

+ Here is the caller graph for this function:

static uword nat44_ed_hairpin_dst_fn ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 4926 of file in2out.c.

+ Here is the call graph for this function:

static uword nat44_ed_hairpin_src_fn ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 5057 of file in2out.c.

+ Here is the call graph for this function:

static uword nat44_ed_hairpinning_fn ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 1940 of file in2out.c.

+ Here is the call graph for this function:

static void nat44_ed_hairpinning_unknown_proto ( snat_main_t sm,
vlib_buffer_t b,
ip4_header_t ip 
)
inlinestatic

Definition at line 2737 of file in2out.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword nat44_ed_in2out_fast_path_fn ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 3651 of file in2out.c.

+ Here is the call graph for this function:

static uword nat44_ed_in2out_node_fn_inline ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame,
int  is_slow_path,
int  is_output_feature 
)
inlinestatic

Definition at line 2982 of file in2out.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword nat44_ed_in2out_output_fast_path_fn ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 3685 of file in2out.c.

+ Here is the call graph for this function:

static uword nat44_ed_in2out_output_slow_path_fn ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 3755 of file in2out.c.

+ Here is the call graph for this function:

static uword nat44_ed_in2out_slow_path_fn ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 3720 of file in2out.c.

+ Here is the call graph for this function:

static snat_session_t* nat44_ed_in2out_unknown_proto ( snat_main_t sm,
vlib_buffer_t b,
ip4_header_t ip,
u32  rx_fib_index,
u32  thread_index,
f64  now,
vlib_main_t vm,
vlib_node_runtime_t node 
)
static

Definition at line 2782 of file in2out.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static_always_inline int nat44_ed_not_translate ( snat_main_t sm,
vlib_node_runtime_t node,
u32  sw_if_index,
ip4_header_t ip,
u32  proto,
u32  rx_fib_index,
u32  thread_index 
)

Definition at line 2510 of file in2out.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static_always_inline int nat44_ed_not_translate_output_feature ( snat_main_t sm,
ip4_header_t ip,
u8  proto,
u16  src_port,
u16  dst_port,
u32  thread_index,
u32  rx_sw_if_index,
u32  tx_sw_if_index 
)

Definition at line 2604 of file in2out.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword nat44_hairpinning_fn ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 1915 of file in2out.c.

+ Here is the call graph for this function:

static uword nat44_hairpinning_fn_inline ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame,
int  is_ed 
)
inlinestatic

Definition at line 1840 of file in2out.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword nat44_in2out_reass_node_fn ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 2060 of file in2out.c.

+ Here is the call graph for this function:

static void nat44_reass_hairpinning ( snat_main_t sm,
vlib_buffer_t b0,
ip4_header_t ip0,
u16  sport,
u16  dport,
u32  proto0 
)
inlinestatic

Definition at line 1965 of file in2out.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void nat_hairpinning_sm_unknown_proto ( snat_main_t sm,
vlib_buffer_t b,
ip4_header_t ip 
)
inlinestatic

Definition at line 1027 of file in2out.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int nat_in2out_sm_unknown_proto ( snat_main_t sm,
vlib_buffer_t b,
ip4_header_t ip,
u32  rx_fib_index 
)
static

Definition at line 1053 of file in2out.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int nat_not_translate_output_feature ( snat_main_t sm,
ip4_header_t ip0,
u32  proto0,
u16  src_port,
u16  dst_port,
u32  thread_index,
u32  sw_if_index 
)
inlinestatic

Definition at line 275 of file in2out.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static_always_inline int nat_not_translate_output_feature_fwd ( snat_main_t sm,
ip4_header_t ip,
u32  thread_index,
f64  now,
vlib_main_t vm,
vlib_buffer_t b 
)

Definition at line 2544 of file in2out.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u32 slow_path ( snat_main_t sm,
vlib_buffer_t b0,
ip4_header_t ip0,
u32  rx_fib_index0,
snat_session_key_t key0,
snat_session_t **  sessionp,
vlib_node_runtime_t node,
u32  next0,
u32  thread_index 
)
static

Definition at line 314 of file in2out.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static u32 slow_path_ed ( snat_main_t sm,
vlib_buffer_t b,
u32  rx_fib_index,
clib_bihash_kv_16_8_t kv,
snat_session_t **  sessionp,
vlib_node_runtime_t node,
u32  next,
u32  thread_index 
)
static

Definition at line 2377 of file in2out.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword snat_det_in2out_node_fn ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 3793 of file in2out.c.

+ Here is the call graph for this function:

static uword snat_hairpin_dst_fn ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 4901 of file in2out.c.

+ Here is the call graph for this function:

static uword snat_hairpin_dst_fn_inline ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame,
int  is_ed 
)
inlinestatic

Definition at line 4810 of file in2out.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword snat_hairpin_src_fn ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 5030 of file in2out.c.

+ Here is the call graph for this function:

static uword snat_hairpin_src_fn_inline ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame,
int  is_ed 
)
inlinestatic

Definition at line 4951 of file in2out.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int snat_hairpinning ( snat_main_t sm,
vlib_buffer_t b0,
ip4_header_t ip0,
udp_header_t udp0,
tcp_header_t tcp0,
u32  proto0,
int  is_ed 
)
inlinestatic

Hairpinning.

Hairpinning allows two endpoints on the internal side of the NAT to communicate even if they only use each other's external IP addresses and ports.

Parameters
smNAT main.
b0Vlib buffer.
ip0IP header.
udp0UDP header.
tcp0TCP header.
proto0NAT protocol.

Definition at line 811 of file in2out.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void snat_icmp_hairpinning ( snat_main_t sm,
vlib_buffer_t b0,
ip4_header_t ip0,
icmp46_header_t *  icmp0,
int  is_ed 
)
inlinestatic

Definition at line 918 of file in2out.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword snat_in2out_fast_path_fn ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 1699 of file in2out.c.

+ Here is the call graph for this function:

static uword snat_in2out_fast_static_map_fn ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 5084 of file in2out.c.

+ Here is the call graph for this function:

static uword snat_in2out_node_fn_inline ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame,
int  is_slow_path,
int  is_output_feature 
)
inlinestatic

Definition at line 1092 of file in2out.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword snat_in2out_output_fast_path_fn ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 1733 of file in2out.c.

+ Here is the call graph for this function:

static uword snat_in2out_output_slow_path_fn ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 1803 of file in2out.c.

+ Here is the call graph for this function:

static uword snat_in2out_output_worker_handoff_fn ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 4761 of file in2out.c.

+ Here is the call graph for this function:

static uword snat_in2out_slow_path_fn ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 1768 of file in2out.c.

+ Here is the call graph for this function:

static uword snat_in2out_worker_handoff_fn ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 4733 of file in2out.c.

+ Here is the call graph for this function:

static uword snat_in2out_worker_handoff_fn_inline ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame,
u8  is_output 
)
inlinestatic

Definition at line 4549 of file in2out.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int snat_not_translate ( snat_main_t sm,
vlib_node_runtime_t node,
u32  sw_if_index0,
ip4_header_t ip0,
u32  proto0,
u32  rx_fib_index0,
u32  thread_index 
)
inlinestatic

Definition at line 241 of file in2out.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int snat_not_translate_fast ( snat_main_t sm,
vlib_node_runtime_t node,
u32  sw_if_index0,
ip4_header_t ip0,
u32  proto0,
u32  rx_fib_index0 
)
inlinestatic

Check if packet should be translated.

Packets aimed at outside interface and external address with active session should be translated.

Parameters
smNAT main
rtNAT runtime data
sw_if_index0index of the inside interface
ip0IPv4 header
proto0NAT protocol
rx_fib_index0RX FIB index
Returns
0 if packet should be translated otherwise 1

Definition at line 186 of file in2out.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

VLIB_NODE_FUNCTION_MULTIARCH ( snat_in2out_node  ,
snat_in2out_fast_path_fn   
)

+ Here is the caller graph for this function:

VLIB_NODE_FUNCTION_MULTIARCH ( snat_in2out_output_node  ,
snat_in2out_output_fast_path_fn   
)
VLIB_NODE_FUNCTION_MULTIARCH ( snat_in2out_slowpath_node  ,
snat_in2out_slow_path_fn   
)
VLIB_NODE_FUNCTION_MULTIARCH ( snat_in2out_output_slowpath_node  ,
snat_in2out_output_slow_path_fn   
)
VLIB_NODE_FUNCTION_MULTIARCH ( nat44_hairpinning_node  ,
nat44_hairpinning_fn   
)
VLIB_NODE_FUNCTION_MULTIARCH ( nat44_ed_hairpinning_node  ,
nat44_ed_hairpinning_fn   
)
VLIB_NODE_FUNCTION_MULTIARCH ( nat44_in2out_reass_node  ,
nat44_in2out_reass_node_fn   
)
VLIB_NODE_FUNCTION_MULTIARCH ( nat44_ed_in2out_node  ,
nat44_ed_in2out_fast_path_fn   
)
VLIB_NODE_FUNCTION_MULTIARCH ( nat44_ed_in2out_output_node  ,
nat44_ed_in2out_output_fast_path_fn   
)
VLIB_NODE_FUNCTION_MULTIARCH ( nat44_ed_in2out_slowpath_node  ,
nat44_ed_in2out_slow_path_fn   
)
VLIB_NODE_FUNCTION_MULTIARCH ( snat_det_in2out_node  ,
snat_det_in2out_node_fn   
)
VLIB_NODE_FUNCTION_MULTIARCH ( snat_in2out_worker_handoff_node  ,
snat_in2out_worker_handoff_fn   
)
VLIB_NODE_FUNCTION_MULTIARCH ( snat_hairpin_dst_node  ,
snat_hairpin_dst_fn   
)
VLIB_NODE_FUNCTION_MULTIARCH ( nat44_ed_hairpin_dst_node  ,
nat44_ed_hairpin_dst_fn   
)
VLIB_NODE_FUNCTION_MULTIARCH ( snat_hairpin_src_node  ,
snat_hairpin_src_fn   
)
VLIB_NODE_FUNCTION_MULTIARCH ( nat44_ed_hairpin_src_node  ,
nat44_ed_hairpin_src_fn   
)
VLIB_NODE_FUNCTION_MULTIARCH ( snat_in2out_fast_node  ,
snat_in2out_fast_static_map_fn   
)

Variable Documentation

vlib_node_registration_t nat44_ed_hairpin_dst_node
Initial value:
= {
.name = "nat44-ed-hairpin-dst",
.vector_size = sizeof (u32),
.error_strings = snat_in2out_error_strings,
.n_next_nodes = 2,
.next_nodes = {
[SNAT_IN2OUT_NEXT_DROP] = "error-drop",
[SNAT_IN2OUT_NEXT_LOOKUP] = "ip4-lookup",
},
}
static char * snat_in2out_error_strings[]
Definition: in2out.c:147
unsigned int u32
Definition: types.h:88
#define ARRAY_LEN(x)
Definition: clib.h:59
static uword nat44_ed_hairpin_dst_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: in2out.c:4926

(constructor) VLIB_REGISTER_NODE (nat44_ed_hairpin_dst_node)

Definition at line 123 of file in2out.c.

vlib_node_registration_t nat44_ed_hairpin_src_node
Initial value:
= {
.name = "nat44-ed-hairpin-src",
.vector_size = sizeof (u32),
.error_strings = snat_in2out_error_strings,
.n_next_nodes = SNAT_HAIRPIN_SRC_N_NEXT,
.next_nodes = {
[SNAT_HAIRPIN_SRC_NEXT_DROP] = "error-drop",
[SNAT_HAIRPIN_SRC_NEXT_SNAT_IN2OUT] = "nat44-ed-in2out-output",
[SNAT_HAIRPIN_SRC_NEXT_SNAT_IN2OUT_WH] = "nat44-in2out-output-worker-handoff",
},
}
static char * snat_in2out_error_strings[]
Definition: in2out.c:147
static uword nat44_ed_hairpin_src_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: in2out.c:5057
unsigned int u32
Definition: types.h:88
#define ARRAY_LEN(x)
Definition: clib.h:59

(constructor) VLIB_REGISTER_NODE (nat44_ed_hairpin_src_node)

Definition at line 124 of file in2out.c.

vlib_node_registration_t nat44_ed_hairpinning_node
Initial value:
= {
.name = "nat44-ed-hairpinning",
.vector_size = sizeof (u32),
.error_strings = snat_in2out_error_strings,
.n_next_nodes = 2,
.next_nodes = {
[SNAT_IN2OUT_NEXT_DROP] = "error-drop",
[SNAT_IN2OUT_NEXT_LOOKUP] = "ip4-lookup",
},
}
static uword nat44_ed_hairpinning_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: in2out.c:1940
static char * snat_in2out_error_strings[]
Definition: in2out.c:147
unsigned int u32
Definition: types.h:88
#define ARRAY_LEN(x)
Definition: clib.h:59

(constructor) VLIB_REGISTER_NODE (nat44_ed_hairpinning_node)

Definition at line 125 of file in2out.c.

vlib_node_registration_t nat44_ed_in2out_node
Initial value:
= {
.name = "nat44-ed-in2out",
.vector_size = sizeof (u32),
.format_trace = format_snat_in2out_trace,
.error_strings = snat_in2out_error_strings,
.runtime_data_bytes = sizeof (snat_runtime_t),
.n_next_nodes = SNAT_IN2OUT_N_NEXT,
.next_nodes = {
[SNAT_IN2OUT_NEXT_DROP] = "error-drop",
[SNAT_IN2OUT_NEXT_LOOKUP] = "ip4-lookup",
[SNAT_IN2OUT_NEXT_SLOW_PATH] = "nat44-ed-in2out-slowpath",
[SNAT_IN2OUT_NEXT_ICMP_ERROR] = "ip4-icmp-error",
[SNAT_IN2OUT_NEXT_REASS] = "nat44-in2out-reass",
},
}
static u8 * format_snat_in2out_trace(u8 *s, va_list *args)
Definition: in2out.c:47
static char * snat_in2out_error_strings[]
Definition: in2out.c:147
unsigned int u32
Definition: types.h:88
static uword nat44_ed_in2out_fast_path_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: in2out.c:3651
#define ARRAY_LEN(x)
Definition: clib.h:59

(constructor) VLIB_REGISTER_NODE (nat44_ed_in2out_node)

Definition at line 119 of file in2out.c.

vlib_node_registration_t nat44_ed_in2out_output_node
Initial value:
= {
.name = "nat44-ed-in2out-output",
.vector_size = sizeof (u32),
.format_trace = format_snat_in2out_trace,
.error_strings = snat_in2out_error_strings,
.runtime_data_bytes = sizeof (snat_runtime_t),
.n_next_nodes = SNAT_IN2OUT_N_NEXT,
.next_nodes = {
[SNAT_IN2OUT_NEXT_DROP] = "error-drop",
[SNAT_IN2OUT_NEXT_LOOKUP] = "interface-output",
[SNAT_IN2OUT_NEXT_SLOW_PATH] = "nat44-ed-in2out-output-slowpath",
[SNAT_IN2OUT_NEXT_ICMP_ERROR] = "ip4-icmp-error",
[SNAT_IN2OUT_NEXT_REASS] = "nat44-in2out-reass",
},
}
static u8 * format_snat_in2out_trace(u8 *s, va_list *args)
Definition: in2out.c:47
static char * snat_in2out_error_strings[]
Definition: in2out.c:147
unsigned int u32
Definition: types.h:88
static uword nat44_ed_in2out_output_fast_path_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: in2out.c:3685
#define ARRAY_LEN(x)
Definition: clib.h:59

(constructor) VLIB_REGISTER_NODE (nat44_ed_in2out_output_node)

Definition at line 121 of file in2out.c.

vlib_node_registration_t nat44_ed_in2out_output_slowpath_node
Initial value:
= {
.name = "nat44-ed-in2out-output-slowpath",
.vector_size = sizeof (u32),
.format_trace = format_snat_in2out_trace,
.error_strings = snat_in2out_error_strings,
.runtime_data_bytes = sizeof (snat_runtime_t),
.n_next_nodes = SNAT_IN2OUT_N_NEXT,
.next_nodes = {
[SNAT_IN2OUT_NEXT_DROP] = "error-drop",
[SNAT_IN2OUT_NEXT_LOOKUP] = "interface-output",
[SNAT_IN2OUT_NEXT_SLOW_PATH] = "nat44-ed-in2out-output-slowpath",
[SNAT_IN2OUT_NEXT_ICMP_ERROR] = "ip4-icmp-error",
[SNAT_IN2OUT_NEXT_REASS] = "nat44-in2out-reass",
},
}
static u8 * format_snat_in2out_trace(u8 *s, va_list *args)
Definition: in2out.c:47
static char * snat_in2out_error_strings[]
Definition: in2out.c:147
unsigned int u32
Definition: types.h:88
#define ARRAY_LEN(x)
Definition: clib.h:59
static uword nat44_ed_in2out_output_slow_path_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: in2out.c:3755

(constructor) VLIB_REGISTER_NODE (nat44_ed_in2out_output_slowpath_node)

Definition at line 122 of file in2out.c.

vlib_node_registration_t nat44_ed_in2out_slowpath_node
Initial value:
= {
.name = "nat44-ed-in2out-slowpath",
.vector_size = sizeof (u32),
.format_trace = format_snat_in2out_trace,
.error_strings = snat_in2out_error_strings,
.runtime_data_bytes = sizeof (snat_runtime_t),
.n_next_nodes = SNAT_IN2OUT_N_NEXT,
.next_nodes = {
[SNAT_IN2OUT_NEXT_DROP] = "error-drop",
[SNAT_IN2OUT_NEXT_LOOKUP] = "ip4-lookup",
[SNAT_IN2OUT_NEXT_SLOW_PATH] = "nat44-ed-in2out-slowpath",
[SNAT_IN2OUT_NEXT_ICMP_ERROR] = "ip4-icmp-error",
[SNAT_IN2OUT_NEXT_REASS] = "nat44-in2out-reass",
},
}
static u8 * format_snat_in2out_trace(u8 *s, va_list *args)
Definition: in2out.c:47
static char * snat_in2out_error_strings[]
Definition: in2out.c:147
unsigned int u32
Definition: types.h:88
#define ARRAY_LEN(x)
Definition: clib.h:59
static uword nat44_ed_in2out_slow_path_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: in2out.c:3720

(constructor) VLIB_REGISTER_NODE (nat44_ed_in2out_slowpath_node)

Definition at line 120 of file in2out.c.

vlib_node_registration_t nat44_hairpinning_node
Initial value:
= {
.function = nat44_hairpinning_fn,
.name = "nat44-hairpinning",
.vector_size = sizeof (u32),
.error_strings = snat_in2out_error_strings,
.n_next_nodes = 2,
.next_nodes = {
[SNAT_IN2OUT_NEXT_DROP] = "error-drop",
[SNAT_IN2OUT_NEXT_LOOKUP] = "ip4-lookup",
},
}
static char * snat_in2out_error_strings[]
Definition: in2out.c:147
unsigned int u32
Definition: types.h:88
#define ARRAY_LEN(x)
Definition: clib.h:59
static uword nat44_hairpinning_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: in2out.c:1915

(constructor) VLIB_REGISTER_NODE (nat44_hairpinning_node)

Definition at line 117 of file in2out.c.

vlib_node_registration_t nat44_in2out_reass_node
Initial value:
= {
.name = "nat44-in2out-reass",
.vector_size = sizeof (u32),
.error_strings = snat_in2out_error_strings,
.n_next_nodes = SNAT_IN2OUT_N_NEXT,
.next_nodes = {
[SNAT_IN2OUT_NEXT_DROP] = "error-drop",
[SNAT_IN2OUT_NEXT_LOOKUP] = "ip4-lookup",
[SNAT_IN2OUT_NEXT_SLOW_PATH] = "nat44-in2out-slowpath",
[SNAT_IN2OUT_NEXT_ICMP_ERROR] = "ip4-icmp-error",
[SNAT_IN2OUT_NEXT_REASS] = "nat44-in2out-reass",
},
}
static char * snat_in2out_error_strings[]
Definition: in2out.c:147
unsigned int u32
Definition: types.h:88
static u8 * format_nat44_in2out_reass_trace(u8 *s, va_list *args)
Definition: in2out.c:94
static uword nat44_in2out_reass_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: in2out.c:2060
#define ARRAY_LEN(x)
Definition: clib.h:59

(constructor) VLIB_REGISTER_NODE (nat44_in2out_reass_node)

Definition at line 118 of file in2out.c.

vlib_node_registration_t snat_det_in2out_node
Initial value:
= {
.name = "nat44-det-in2out",
.vector_size = sizeof (u32),
.format_trace = format_snat_in2out_trace,
.error_strings = snat_in2out_error_strings,
.runtime_data_bytes = sizeof (snat_runtime_t),
.n_next_nodes = 3,
.next_nodes = {
[SNAT_IN2OUT_NEXT_DROP] = "error-drop",
[SNAT_IN2OUT_NEXT_LOOKUP] = "ip4-lookup",
[SNAT_IN2OUT_NEXT_ICMP_ERROR] = "ip4-icmp-error",
},
}
static u8 * format_snat_in2out_trace(u8 *s, va_list *args)
Definition: in2out.c:47
static char * snat_in2out_error_strings[]
Definition: in2out.c:147
static uword snat_det_in2out_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: in2out.c:3793
unsigned int u32
Definition: types.h:88
#define ARRAY_LEN(x)
Definition: clib.h:59

(constructor) VLIB_REGISTER_NODE (snat_det_in2out_node)

Definition at line 111 of file in2out.c.

vlib_node_registration_t snat_hairpin_dst_node
Initial value:
= {
.function = snat_hairpin_dst_fn,
.name = "nat44-hairpin-dst",
.vector_size = sizeof (u32),
.error_strings = snat_in2out_error_strings,
.n_next_nodes = 2,
.next_nodes = {
[SNAT_IN2OUT_NEXT_DROP] = "error-drop",
[SNAT_IN2OUT_NEXT_LOOKUP] = "ip4-lookup",
},
}
static char * snat_in2out_error_strings[]
Definition: in2out.c:147
unsigned int u32
Definition: types.h:88
#define ARRAY_LEN(x)
Definition: clib.h:59
static uword snat_hairpin_dst_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: in2out.c:4901

(constructor) VLIB_REGISTER_NODE (snat_hairpin_dst_node)

Definition at line 115 of file in2out.c.

vlib_node_registration_t snat_hairpin_src_node
Initial value:
= {
.function = snat_hairpin_src_fn,
.name = "nat44-hairpin-src",
.vector_size = sizeof (u32),
.error_strings = snat_in2out_error_strings,
.n_next_nodes = SNAT_HAIRPIN_SRC_N_NEXT,
.next_nodes = {
[SNAT_HAIRPIN_SRC_NEXT_DROP] = "error-drop",
[SNAT_HAIRPIN_SRC_NEXT_SNAT_IN2OUT] = "nat44-in2out-output",
[SNAT_HAIRPIN_SRC_NEXT_SNAT_IN2OUT_WH] = "nat44-in2out-output-worker-handoff",
},
}
static char * snat_in2out_error_strings[]
Definition: in2out.c:147
unsigned int u32
Definition: types.h:88
#define ARRAY_LEN(x)
Definition: clib.h:59
static uword snat_hairpin_src_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: in2out.c:5030

(constructor) VLIB_REGISTER_NODE (snat_hairpin_src_node)

Definition at line 116 of file in2out.c.

char* snat_in2out_error_strings[]
static
Initial value:
= {
#define _(sym,string)
}
#define foreach_snat_in2out_error
Definition: in2out.c:127

Definition at line 147 of file in2out.c.

vlib_node_registration_t snat_in2out_fast_node
Initial value:
= {
.name = "nat44-in2out-fast",
.vector_size = sizeof (u32),
.error_strings = snat_in2out_error_strings,
.runtime_data_bytes = sizeof (snat_runtime_t),
.n_next_nodes = SNAT_IN2OUT_N_NEXT,
.next_nodes = {
[SNAT_IN2OUT_NEXT_DROP] = "error-drop",
[SNAT_IN2OUT_NEXT_LOOKUP] = "ip4-lookup",
[SNAT_IN2OUT_NEXT_SLOW_PATH] = "nat44-in2out-slowpath",
[SNAT_IN2OUT_NEXT_ICMP_ERROR] = "ip4-icmp-error",
[SNAT_IN2OUT_NEXT_REASS] = "nat44-in2out-reass",
},
}
static u8 * format_snat_in2out_fast_trace(u8 *s, va_list *args)
Definition: in2out.c:62
static char * snat_in2out_error_strings[]
Definition: in2out.c:147
unsigned int u32
Definition: types.h:88
static uword snat_in2out_fast_static_map_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: in2out.c:5084
#define ARRAY_LEN(x)
Definition: clib.h:59

(constructor) VLIB_REGISTER_NODE (snat_in2out_fast_node)

Definition at line 109 of file in2out.c.

vlib_node_registration_t snat_in2out_node
Initial value:
= {
.name = "nat44-in2out",
.vector_size = sizeof (u32),
.format_trace = format_snat_in2out_trace,
.error_strings = snat_in2out_error_strings,
.runtime_data_bytes = sizeof (snat_runtime_t),
.n_next_nodes = SNAT_IN2OUT_N_NEXT,
.next_nodes = {
[SNAT_IN2OUT_NEXT_DROP] = "error-drop",
[SNAT_IN2OUT_NEXT_LOOKUP] = "ip4-lookup",
[SNAT_IN2OUT_NEXT_SLOW_PATH] = "nat44-in2out-slowpath",
[SNAT_IN2OUT_NEXT_ICMP_ERROR] = "ip4-icmp-error",
[SNAT_IN2OUT_NEXT_REASS] = "nat44-in2out-reass",
},
}
static u8 * format_snat_in2out_trace(u8 *s, va_list *args)
Definition: in2out.c:47
static char * snat_in2out_error_strings[]
Definition: in2out.c:147
unsigned int u32
Definition: types.h:88
#define ARRAY_LEN(x)
Definition: clib.h:59
static uword snat_in2out_fast_path_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: in2out.c:1699

(constructor) VLIB_REGISTER_NODE (snat_in2out_node)

Definition at line 107 of file in2out.c.

vlib_node_registration_t snat_in2out_output_node
Initial value:
= {
.name = "nat44-in2out-output",
.vector_size = sizeof (u32),
.format_trace = format_snat_in2out_trace,
.error_strings = snat_in2out_error_strings,
.runtime_data_bytes = sizeof (snat_runtime_t),
.n_next_nodes = SNAT_IN2OUT_N_NEXT,
.next_nodes = {
[SNAT_IN2OUT_NEXT_DROP] = "error-drop",
[SNAT_IN2OUT_NEXT_LOOKUP] = "interface-output",
[SNAT_IN2OUT_NEXT_SLOW_PATH] = "nat44-in2out-output-slowpath",
[SNAT_IN2OUT_NEXT_ICMP_ERROR] = "ip4-icmp-error",
[SNAT_IN2OUT_NEXT_REASS] = "nat44-in2out-reass",
},
}
static u8 * format_snat_in2out_trace(u8 *s, va_list *args)
Definition: in2out.c:47
static char * snat_in2out_error_strings[]
Definition: in2out.c:147
unsigned int u32
Definition: types.h:88
static uword snat_in2out_output_fast_path_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: in2out.c:1733
#define ARRAY_LEN(x)
Definition: clib.h:59

(constructor) VLIB_REGISTER_NODE (snat_in2out_output_node)

Definition at line 112 of file in2out.c.

vlib_node_registration_t snat_in2out_output_slowpath_node
Initial value:
= {
.name = "nat44-in2out-output-slowpath",
.vector_size = sizeof (u32),
.format_trace = format_snat_in2out_trace,
.error_strings = snat_in2out_error_strings,
.runtime_data_bytes = sizeof (snat_runtime_t),
.n_next_nodes = SNAT_IN2OUT_N_NEXT,
.next_nodes = {
[SNAT_IN2OUT_NEXT_DROP] = "error-drop",
[SNAT_IN2OUT_NEXT_LOOKUP] = "interface-output",
[SNAT_IN2OUT_NEXT_SLOW_PATH] = "nat44-in2out-output-slowpath",
[SNAT_IN2OUT_NEXT_ICMP_ERROR] = "ip4-icmp-error",
[SNAT_IN2OUT_NEXT_REASS] = "nat44-in2out-reass",
},
}
static u8 * format_snat_in2out_trace(u8 *s, va_list *args)
Definition: in2out.c:47
static char * snat_in2out_error_strings[]
Definition: in2out.c:147
static uword snat_in2out_output_slow_path_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: in2out.c:1803
unsigned int u32
Definition: types.h:88
#define ARRAY_LEN(x)
Definition: clib.h:59

(constructor) VLIB_REGISTER_NODE (snat_in2out_output_slowpath_node)

Definition at line 113 of file in2out.c.

vlib_node_registration_t snat_in2out_output_worker_handoff_node
Initial value:
= {
.name = "nat44-in2out-output-worker-handoff",
.vector_size = sizeof (u32),
.n_next_nodes = 1,
.next_nodes = {
[0] = "error-drop",
},
}
static uword snat_in2out_output_worker_handoff_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: in2out.c:4761
static u8 * format_snat_in2out_worker_handoff_trace(u8 *s, va_list *args)
Definition: in2out.c:74
unsigned int u32
Definition: types.h:88

(constructor) VLIB_REGISTER_NODE (snat_in2out_output_worker_handoff_node)

Definition at line 114 of file in2out.c.

vlib_node_registration_t snat_in2out_slowpath_node
Initial value:
= {
.name = "nat44-in2out-slowpath",
.vector_size = sizeof (u32),
.format_trace = format_snat_in2out_trace,
.error_strings = snat_in2out_error_strings,
.runtime_data_bytes = sizeof (snat_runtime_t),
.n_next_nodes = SNAT_IN2OUT_N_NEXT,
.next_nodes = {
[SNAT_IN2OUT_NEXT_DROP] = "error-drop",
[SNAT_IN2OUT_NEXT_LOOKUP] = "ip4-lookup",
[SNAT_IN2OUT_NEXT_SLOW_PATH] = "nat44-in2out-slowpath",
[SNAT_IN2OUT_NEXT_ICMP_ERROR] = "ip4-icmp-error",
[SNAT_IN2OUT_NEXT_REASS] = "nat44-in2out-reass",
},
}
static u8 * format_snat_in2out_trace(u8 *s, va_list *args)
Definition: in2out.c:47
static uword snat_in2out_slow_path_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: in2out.c:1768
static char * snat_in2out_error_strings[]
Definition: in2out.c:147
unsigned int u32
Definition: types.h:88
#define ARRAY_LEN(x)
Definition: clib.h:59

(constructor) VLIB_REGISTER_NODE (snat_in2out_slowpath_node)

Definition at line 108 of file in2out.c.

vlib_node_registration_t snat_in2out_worker_handoff_node
Initial value:
= {
.name = "nat44-in2out-worker-handoff",
.vector_size = sizeof (u32),
.error_strings = snat_in2out_error_strings,
.n_next_nodes = 1,
.next_nodes = {
[0] = "error-drop",
},
}
static char * snat_in2out_error_strings[]
Definition: in2out.c:147
static uword snat_in2out_worker_handoff_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: in2out.c:4733
static u8 * format_snat_in2out_worker_handoff_trace(u8 *s, va_list *args)
Definition: in2out.c:74
unsigned int u32
Definition: types.h:88
#define ARRAY_LEN(x)
Definition: clib.h:59

(constructor) VLIB_REGISTER_NODE (snat_in2out_worker_handoff_node)

Definition at line 110 of file in2out.c.

vnet_feature_arc_registration_t vnet_feat_arc_ip4_local