FD.io VPP  v16.09
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
 

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_SLOW_PATH, SNAT_IN2OUT_N_NEXT }
 

Functions

static u8format_snat_in2out_trace (u8 *s, va_list *args)
 
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)
 
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)
 
static uword snat_in2out_node_fn_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, int is_slow_path)
 
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_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)
 

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...
 
static char * snat_in2out_error_strings []
 

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, "icmp type not echo-request")

Definition at line 55 of file in2out.c.

Enumeration Type Documentation

Enumerator
SNAT_IN2OUT_N_ERROR 

Definition at line 62 of file in2out.c.

Enumerator
SNAT_IN2OUT_NEXT_LOOKUP 
SNAT_IN2OUT_NEXT_DROP 
SNAT_IN2OUT_NEXT_SLOW_PATH 
SNAT_IN2OUT_N_NEXT 

Definition at line 75 of file in2out.c.

Function Documentation

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

Definition at line 38 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 
)
inlinestatic

Definition at line 239 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 
)
static

Definition at line 83 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 892 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 
)
inlinestatic

Definition at line 332 of file in2out.c.

+ Here is the call graph for this function:

+ Here is the caller 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 924 of file in2out.c.

+ Here is the call 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_slowpath_node  ,
snat_in2out_slow_path_fn   
)

Variable Documentation

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

Definition at line 69 of file in2out.c.

vlib_node_registration_t snat_in2out_node
Initial value:
= {
.name = "snat-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] = "snat-in2out-slowpath",
},
}
static u8 * format_snat_in2out_trace(u8 *s, va_list *args)
Definition: in2out.c:38
bad routing header type(not 4)") sr_error (NO_MORE_SEGMENTS
static char * snat_in2out_error_strings[]
Definition: in2out.c:69
#define ARRAY_LEN(x)
Definition: clib.h:59
unsigned int u32
Definition: types.h:88
static uword snat_in2out_fast_path_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: in2out.c:892

(constructor) VLIB_REGISTER_NODE (snat_in2out_node)

Definition at line 28 of file in2out.c.

vlib_node_registration_t snat_in2out_slowpath_node
Initial value:
= {
.name = "snat-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] = "snat-in2out-slowpath",
},
}
static u8 * format_snat_in2out_trace(u8 *s, va_list *args)
Definition: in2out.c:38
static uword snat_in2out_slow_path_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: in2out.c:924
bad routing header type(not 4)") sr_error (NO_MORE_SEGMENTS
static char * snat_in2out_error_strings[]
Definition: in2out.c:69
#define ARRAY_LEN(x)
Definition: clib.h:59
unsigned int u32
Definition: types.h:88

(constructor) VLIB_REGISTER_NODE (snat_in2out_slowpath_node)

Definition at line 28 of file in2out.c.