FD.io VPP  v21.10.1-2-g0a485f517
Vector Packet Processing
cnat_node_feature.c File Reference
+ Include dependency graph for cnat_node_feature.c:

Go to the source code of this file.

Typedefs

typedef enum cnat_feature_next_ cnat_feature_next_t
 

Enumerations

enum  cnat_feature_next_ { CNAT_FEATURE_NEXT_DROP, CNAT_FEATURE_N_NEXT }
 

Functions

static uword cnat_input_feature_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_buffer_t *b, cnat_node_ctx_t *ctx, int session_not_found, cnat_session_t *session)
 
return cnat_node_inline (vm, node, frame, cnat_input_feature_fn, AF_IP4, CNAT_LOCATION_INPUT, 0)
 
 VNET_FEATURE_INIT (cnat_in_ip4_feature, static)
 
return cnat_node_inline (vm, node, frame, cnat_input_feature_fn, AF_IP6, CNAT_LOCATION_INPUT, 0)
 
 VNET_FEATURE_INIT (cnat_in_ip6_feature, static)
 
static uword cnat_output_feature_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_buffer_t *b, cnat_node_ctx_t *ctx, int session_not_found, cnat_session_t *session)
 
return cnat_node_inline (vm, node, frame, cnat_output_feature_fn, AF_IP4, CNAT_LOCATION_OUTPUT, 0)
 
 VNET_FEATURE_INIT (cnat_out_ip4_feature, static)
 
return cnat_node_inline (vm, node, frame, cnat_output_feature_fn, AF_IP6, CNAT_LOCATION_OUTPUT, 0)
 
 VNET_FEATURE_INIT (cnat_out_ip6_feature, static)
 

Variables

vlib_node_registration_t cnat_input_feature_ip4_node
 (constructor) VLIB_REGISTER_NODE (cnat_input_feature_ip4_node) More...
 
vlib_node_registration_t cnat_input_feature_ip6_node
 (constructor) VLIB_REGISTER_NODE (cnat_input_feature_ip6_node) More...
 
vlib_node_registration_t cnat_output_feature_ip4_node
 (constructor) VLIB_REGISTER_NODE (cnat_output_feature_ip4_node) More...
 
vlib_node_registration_t cnat_output_feature_ip6_node
 (constructor) VLIB_REGISTER_NODE (cnat_output_feature_ip6_node) More...
 
vlib_main_tvm
 
vlib_main_t vlib_node_runtime_tnode
 
vlib_main_t vlib_node_runtime_t vlib_frame_tframe
 

Typedef Documentation

◆ cnat_feature_next_t

Enumeration Type Documentation

◆ cnat_feature_next_

Enumerator
CNAT_FEATURE_NEXT_DROP 
CNAT_FEATURE_N_NEXT 

Definition at line 29 of file cnat_node_feature.c.

Function Documentation

◆ cnat_input_feature_fn()

static uword cnat_input_feature_fn ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_buffer_t b,
cnat_node_ctx_t ctx,
int  session_not_found,
cnat_session_t session 
)
inlinestatic

Definition at line 41 of file cnat_node_feature.c.

+ Here is the call graph for this function:

◆ cnat_node_inline() [1/4]

return cnat_node_inline ( vm  ,
node  ,
frame  ,
cnat_input_feature_fn  ,
AF_IP4  ,
CNAT_LOCATION_INPUT  ,
 
)

◆ cnat_node_inline() [2/4]

return cnat_node_inline ( vm  ,
node  ,
frame  ,
cnat_input_feature_fn  ,
AF_IP6  ,
CNAT_LOCATION_INPUT  ,
 
)

◆ cnat_node_inline() [3/4]

return cnat_node_inline ( vm  ,
node  ,
frame  ,
cnat_output_feature_fn  ,
AF_IP4  ,
CNAT_LOCATION_OUTPUT  ,
 
)

◆ cnat_node_inline() [4/4]

return cnat_node_inline ( vm  ,
node  ,
frame  ,
cnat_output_feature_fn  ,
AF_IP6  ,
CNAT_LOCATION_OUTPUT  ,
 
)

◆ cnat_output_feature_fn()

static uword cnat_output_feature_fn ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_buffer_t b,
cnat_node_ctx_t ctx,
int  session_not_found,
cnat_session_t session 
)
inlinestatic

Definition at line 234 of file cnat_node_feature.c.

+ Here is the call graph for this function:

◆ VNET_FEATURE_INIT() [1/4]

VNET_FEATURE_INIT ( cnat_in_ip4_feature  ,
static   
)

◆ VNET_FEATURE_INIT() [2/4]

VNET_FEATURE_INIT ( cnat_in_ip6_feature  ,
static   
)

◆ VNET_FEATURE_INIT() [3/4]

VNET_FEATURE_INIT ( cnat_out_ip4_feature  ,
static   
)

◆ VNET_FEATURE_INIT() [4/4]

VNET_FEATURE_INIT ( cnat_out_ip6_feature  ,
static   
)

Variable Documentation

◆ cnat_input_feature_ip4_node

vlib_node_registration_t cnat_input_feature_ip4_node
Initial value:
= {
.name = "cnat-input-ip4",
.vector_size = sizeof (u32),
.format_trace = format_cnat_trace,
.n_errors = CNAT_N_ERROR,
.error_strings = cnat_error_strings,
.sibling_of = "ip4-lookup",
}

(constructor) VLIB_REGISTER_NODE (cnat_input_feature_ip4_node)

Definition at line 35 of file cnat_node_feature.c.

◆ cnat_input_feature_ip6_node

vlib_node_registration_t cnat_input_feature_ip6_node
Initial value:
= {
.name = "cnat-input-ip6",
.vector_size = sizeof (u32),
.format_trace = format_cnat_trace,
.n_errors = CNAT_N_ERROR,
.error_strings = cnat_error_strings,
.sibling_of = "ip6-lookup",
}

(constructor) VLIB_REGISTER_NODE (cnat_input_feature_ip6_node)

Definition at line 36 of file cnat_node_feature.c.

◆ cnat_output_feature_ip4_node

vlib_node_registration_t cnat_output_feature_ip4_node
Initial value:
= {
.name = "cnat-output-ip4",
.vector_size = sizeof (u32),
.format_trace = format_cnat_trace,
.n_errors = CNAT_N_ERROR,
.error_strings = cnat_error_strings,
.n_next_nodes = CNAT_FEATURE_N_NEXT,
.next_nodes = {
[CNAT_FEATURE_NEXT_DROP] = "error-drop",
},
}

(constructor) VLIB_REGISTER_NODE (cnat_output_feature_ip4_node)

Definition at line 37 of file cnat_node_feature.c.

◆ cnat_output_feature_ip6_node

vlib_node_registration_t cnat_output_feature_ip6_node
Initial value:
= {
.name = "cnat-output-ip6",
.vector_size = sizeof (u32),
.format_trace = format_cnat_trace,
.n_errors = CNAT_N_ERROR,
.error_strings = cnat_error_strings,
.n_next_nodes = CNAT_FEATURE_N_NEXT,
.next_nodes = {
[CNAT_FEATURE_NEXT_DROP] = "error-drop",
},
}

(constructor) VLIB_REGISTER_NODE (cnat_output_feature_ip6_node)

Definition at line 38 of file cnat_node_feature.c.

◆ frame

◆ node

Definition at line 180 of file cnat_node_feature.c.

◆ vm

Definition at line 180 of file cnat_node_feature.c.

cnat_node_inline
return cnat_node_inline(vm, node, frame, cnat_input_feature_fn, AF_IP4, CNAT_LOCATION_INPUT, 0)
VLIB_NODE_TYPE_INTERNAL
@ VLIB_NODE_TYPE_INTERNAL
Definition: node.h:72
CNAT_N_ERROR
@ CNAT_N_ERROR
Definition: cnat_types.h:179
CNAT_FEATURE_NEXT_DROP
@ CNAT_FEATURE_NEXT_DROP
Definition: cnat_node_feature.c:31
cnat_error_strings
char * cnat_error_strings[]
Definition: cnat_types.c:22
CNAT_LOCATION_INPUT
@ CNAT_LOCATION_INPUT
Definition: cnat_session.h:136
AF_IP4
@ AF_IP4
Definition: ip_types.h:23
vm
vlib_main_t * vm
Definition: cnat_node_feature.c:180
VLIB_NODE_FLAG_TRACE
#define VLIB_NODE_FLAG_TRACE
Definition: node.h:291
format_cnat_trace
static u8 * format_cnat_trace(u8 *s, va_list *args)
Definition: cnat_node.h:75
PREDICT_FALSE
#define PREDICT_FALSE(x)
Definition: clib.h:124
node
vlib_main_t vlib_node_runtime_t * node
Definition: cnat_node_feature.c:180
u32
unsigned int u32
Definition: types.h:88
CNAT_FEATURE_N_NEXT
@ CNAT_FEATURE_N_NEXT
Definition: cnat_node_feature.c:32
cnat_input_feature_fn
static uword cnat_input_feature_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_buffer_t *b, cnat_node_ctx_t *ctx, int session_not_found, cnat_session_t *session)
Definition: cnat_node_feature.c:41
frame
vlib_main_t vlib_node_runtime_t vlib_frame_t * frame
Definition: cnat_node_feature.c:181
type
vl_api_fib_path_type_t type
Definition: fib_types.api:123