FD.io VPP  v19.08.3-2-gbabecb413
Vector Packet Processing
in2out_ed.c File Reference

NAT44 endpoint-dependent inside to outside network translation. More...

+ Include dependency graph for in2out_ed.c:

Go to the source code of this file.

Data Structures

struct  nat_in2out_ed_trace_t
 

Functions

static u8format_nat_in2out_ed_trace (u8 *s, va_list *args)
 
int nat44_i2o_ed_is_idle_session_cb (clib_bihash_kv_16_8_t *kv, void *arg)
 
static u32 icmp_in2out_ed_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 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, f64 now, tcp_header_t *tcp)
 
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 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_reass_node_fn_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, int is_output_feature)
 
VLIB_NODE_FN() nat44_ed_in2out_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
VLIB_NODE_FN() nat44_ed_in2out_output_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
VLIB_NODE_FN() nat44_ed_in2out_slowpath_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
VLIB_NODE_FN() nat44_ed_in2out_output_slowpath_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
VLIB_NODE_FN() nat44_ed_in2out_reass_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
VLIB_NODE_FN() nat44_ed_in2out_reass_output_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static u8format_nat_pre_trace (u8 *s, va_list *args)
 
VLIB_NODE_FN() nat_pre_in2out_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 

Variables

static char * nat_in2out_ed_error_strings []
 
vlib_node_registration_t nat44_ed_in2out_node
 (constructor) VLIB_REGISTER_NODE (nat44_ed_in2out_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_slowpath_node
 (constructor) VLIB_REGISTER_NODE (nat44_ed_in2out_slowpath_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_in2out_reass_node
 (constructor) VLIB_REGISTER_NODE (nat44_ed_in2out_reass_node) More...
 
vlib_node_registration_t nat44_ed_in2out_reass_output_node
 (constructor) VLIB_REGISTER_NODE (nat44_ed_in2out_reass_output_node) More...
 
vlib_node_registration_t nat_pre_in2out_node
 (constructor) VLIB_REGISTER_NODE (nat_pre_in2out_node) More...
 

Detailed Description

NAT44 endpoint-dependent inside to outside network translation.

Definition in file in2out_ed.c.

Function Documentation

◆ format_nat_in2out_ed_trace()

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

Definition at line 49 of file in2out_ed.c.

+ Here is the call graph for this function:

◆ format_nat_pre_trace()

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

Definition at line 2135 of file in2out_ed.c.

+ Here is the call graph for this function:

◆ icmp_in2out_ed_slow_path()

static u32 icmp_in2out_ed_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 163 of file in2out_ed.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ icmp_match_in2out_ed()

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 512 of file in2out_ed.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ nat44_ed_in2out_node()

VLIB_NODE_FN() nat44_ed_in2out_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)

Definition at line 2014 of file in2out_ed.c.

+ Here is the call graph for this function:

◆ nat44_ed_in2out_node_fn_inline()

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 824 of file in2out_ed.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ nat44_ed_in2out_output_node()

VLIB_NODE_FN() nat44_ed_in2out_output_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)

Definition at line 2034 of file in2out_ed.c.

+ Here is the call graph for this function:

◆ nat44_ed_in2out_output_slowpath_node()

VLIB_NODE_FN() nat44_ed_in2out_output_slowpath_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)

Definition at line 2074 of file in2out_ed.c.

+ Here is the call graph for this function:

◆ nat44_ed_in2out_reass_node()

VLIB_NODE_FN() nat44_ed_in2out_reass_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)

Definition at line 2096 of file in2out_ed.c.

+ Here is the call graph for this function:

◆ nat44_ed_in2out_reass_node_fn_inline()

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

Definition at line 1657 of file in2out_ed.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ nat44_ed_in2out_reass_output_node()

VLIB_NODE_FN() nat44_ed_in2out_reass_output_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)

Definition at line 2115 of file in2out_ed.c.

+ Here is the call graph for this function:

◆ nat44_ed_in2out_slowpath_node()

VLIB_NODE_FN() nat44_ed_in2out_slowpath_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)

Definition at line 2054 of file in2out_ed.c.

+ Here is the call graph for this function:

◆ nat44_ed_in2out_unknown_proto()

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 623 of file in2out_ed.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ nat44_ed_not_translate()

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 363 of file in2out_ed.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ nat44_ed_not_translate_output_feature()

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 459 of file in2out_ed.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ nat44_i2o_ed_is_idle_session_cb()

int nat44_i2o_ed_is_idle_session_cb ( clib_bihash_kv_16_8_t kv,
void *  arg 
)

Definition at line 68 of file in2out_ed.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ nat_not_translate_output_feature_fwd()

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 398 of file in2out_ed.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ nat_pre_in2out_node()

VLIB_NODE_FN() nat_pre_in2out_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)

Definition at line 2143 of file in2out_ed.c.

+ Here is the call graph for this function:

◆ slow_path_ed()

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,
f64  now,
tcp_header_t tcp 
)
static

Definition at line 185 of file in2out_ed.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ nat44_ed_in2out_node

vlib_node_registration_t nat44_ed_in2out_node
Initial value:
= {
.name = "nat44-ed-in2out",
.vector_size = sizeof (u32),
.sibling_of = "nat-default",
.format_trace = format_nat_in2out_ed_trace,
.error_strings = nat_in2out_ed_error_strings,
.runtime_data_bytes = sizeof (snat_runtime_t),
}
unsigned int u32
Definition: types.h:88
vl_api_fib_path_type_t type
Definition: fib_types.api:123
static u8 * format_nat_in2out_ed_trace(u8 *s, va_list *args)
Definition: in2out_ed.c:49
#define ARRAY_LEN(x)
Definition: clib.h:63
static char * nat_in2out_ed_error_strings[]
Definition: in2out_ed.c:34

(constructor) VLIB_REGISTER_NODE (nat44_ed_in2out_node)

Definition at line 2022 of file in2out_ed.c.

◆ nat44_ed_in2out_output_node

vlib_node_registration_t nat44_ed_in2out_output_node
Initial value:
= {
.name = "nat44-ed-in2out-output",
.vector_size = sizeof (u32),
.sibling_of = "nat-default",
.format_trace = format_nat_in2out_ed_trace,
.error_strings = nat_in2out_ed_error_strings,
.runtime_data_bytes = sizeof (snat_runtime_t),
}
unsigned int u32
Definition: types.h:88
vl_api_fib_path_type_t type
Definition: fib_types.api:123
static u8 * format_nat_in2out_ed_trace(u8 *s, va_list *args)
Definition: in2out_ed.c:49
#define ARRAY_LEN(x)
Definition: clib.h:63
static char * nat_in2out_ed_error_strings[]
Definition: in2out_ed.c:34

(constructor) VLIB_REGISTER_NODE (nat44_ed_in2out_output_node)

Definition at line 2042 of file in2out_ed.c.

◆ nat44_ed_in2out_output_slowpath_node

vlib_node_registration_t nat44_ed_in2out_output_slowpath_node
Initial value:
= {
.name = "nat44-ed-in2out-output-slowpath",
.vector_size = sizeof (u32),
.sibling_of = "nat-default",
.format_trace = format_nat_in2out_ed_trace,
.error_strings = nat_in2out_ed_error_strings,
.runtime_data_bytes = sizeof (snat_runtime_t),
}
unsigned int u32
Definition: types.h:88
vl_api_fib_path_type_t type
Definition: fib_types.api:123
static u8 * format_nat_in2out_ed_trace(u8 *s, va_list *args)
Definition: in2out_ed.c:49
#define ARRAY_LEN(x)
Definition: clib.h:63
static char * nat_in2out_ed_error_strings[]
Definition: in2out_ed.c:34

(constructor) VLIB_REGISTER_NODE (nat44_ed_in2out_output_slowpath_node)

Definition at line 2083 of file in2out_ed.c.

◆ nat44_ed_in2out_reass_node

vlib_node_registration_t nat44_ed_in2out_reass_node
Initial value:
= {
.name = "nat44-ed-in2out-reass",
.vector_size = sizeof (u32),
.sibling_of = "nat-default",
.format_trace = format_nat44_reass_trace,
.error_strings = nat_in2out_ed_error_strings,
}
unsigned int u32
Definition: types.h:88
vl_api_fib_path_type_t type
Definition: fib_types.api:123
#define ARRAY_LEN(x)
Definition: clib.h:63
format_function_t format_nat44_reass_trace
Definition: nat.h:755
static char * nat_in2out_ed_error_strings[]
Definition: in2out_ed.c:34

(constructor) VLIB_REGISTER_NODE (nat44_ed_in2out_reass_node)

Definition at line 2104 of file in2out_ed.c.

◆ nat44_ed_in2out_reass_output_node

vlib_node_registration_t nat44_ed_in2out_reass_output_node
Initial value:
= {
.name = "nat44-ed-in2out-reass-output",
.vector_size = sizeof (u32),
.sibling_of = "nat-default",
.format_trace = format_nat44_reass_trace,
.error_strings = nat_in2out_ed_error_strings,
}
unsigned int u32
Definition: types.h:88
vl_api_fib_path_type_t type
Definition: fib_types.api:123
#define ARRAY_LEN(x)
Definition: clib.h:63
format_function_t format_nat44_reass_trace
Definition: nat.h:755
static char * nat_in2out_ed_error_strings[]
Definition: in2out_ed.c:34

(constructor) VLIB_REGISTER_NODE (nat44_ed_in2out_reass_output_node)

Definition at line 2123 of file in2out_ed.c.

◆ nat44_ed_in2out_slowpath_node

vlib_node_registration_t nat44_ed_in2out_slowpath_node
Initial value:
= {
.name = "nat44-ed-in2out-slowpath",
.vector_size = sizeof (u32),
.sibling_of = "nat-default",
.format_trace = format_nat_in2out_ed_trace,
.error_strings = nat_in2out_ed_error_strings,
.runtime_data_bytes = sizeof (snat_runtime_t),
}
unsigned int u32
Definition: types.h:88
vl_api_fib_path_type_t type
Definition: fib_types.api:123
static u8 * format_nat_in2out_ed_trace(u8 *s, va_list *args)
Definition: in2out_ed.c:49
#define ARRAY_LEN(x)
Definition: clib.h:63
static char * nat_in2out_ed_error_strings[]
Definition: in2out_ed.c:34

(constructor) VLIB_REGISTER_NODE (nat44_ed_in2out_slowpath_node)

Definition at line 2062 of file in2out_ed.c.

◆ nat_in2out_ed_error_strings

char* nat_in2out_ed_error_strings[]
static
Initial value:
= {
#define _(sym,string)
}
#define foreach_nat_in2out_ed_error
Definition: nat.h:219

Definition at line 34 of file in2out_ed.c.

◆ nat_pre_in2out_node

vlib_node_registration_t nat_pre_in2out_node
Initial value:
= {
.name = "nat-pre-in2out",
.vector_size = sizeof (u32),
.sibling_of = "nat-default",
.format_trace = format_nat_pre_trace,
.n_errors = 0,
}
unsigned int u32
Definition: types.h:88
vl_api_fib_path_type_t type
Definition: fib_types.api:123
static u8 * format_nat_pre_trace(u8 *s, va_list *args)
Definition: in2out_ed.c:2135

(constructor) VLIB_REGISTER_NODE (nat_pre_in2out_node)

Definition at line 2152 of file in2out_ed.c.