FD.io VPP  v16.06
Vector Packet Processing
cnat_ipv4_udp_outside_input.c File Reference
+ Include dependency graph for cnat_ipv4_udp_outside_input.c:

Go to the source code of this file.

Data Structures

struct  cnat_ipv4_udp_outside_input_main_t
 

Macros

#define foreach_cnat_ipv4_udp_outside_input_error
 
#define NSTAGES   6
 
#define stage0   generic_stage0
 
#define CNAT_UDP_OUTSIDE_UPDATE_FLAG_TIMER(db, dslite_nat44_inst_id)
 
#define UDP_PACKET_DEBUG   1
 
#define SPP_LOG2_CACHE_LINE_BYTES   6
 
#define SPP_CACHE_LINE_BYTES   (1 << SPP_LOG2_CACHE_LINE_BYTES)
 

Enumerations

enum  cnat_ipv4_udp_outside_input_t { CNAT_IPV4_UDP_OUTSIDE_INPUT_N_ERROR }
 
enum  cnat_ipv4_udp_outside_input_next_t { CNAT_V4_UDP_O2I_E, CNAT_V4_UDP_O2I_T, CNAT_V4_UDP_O2I_NEXT }
 

Functions

static void swap_ip_dst (ipv4_header *ip, cnat_main_db_entry_t *db, u16 vrf)
 
void swap_ip_dst_udp_port (ipv4_header *ip, udp_hdr_type_t *udp, cnat_main_db_entry_t *db, u16 vrf)
 
static void stage1 (vlib_main_t *vm, vlib_node_runtime_t *node, u32 buffer_index)
 
static void stage2 (vlib_main_t *vm, vlib_node_runtime_t *node, u32 buffer_index)
 
static void stage3 (vlib_main_t *vm, vlib_node_runtime_t *node, u32 buffer_index)
 
static void stage4 (vlib_main_t *vm, vlib_node_runtime_t *node, u32 buffer_index)
 
static u32 last_stage (vlib_main_t *vm, vlib_node_runtime_t *node, u32 bi)
 
static uword cnat_ipv4_udp_outside_input_node_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
clib_error_tcnat_ipv4_udp_outside_input_init (vlib_main_t *vm)
 

Variables

static char * cnat_ipv4_udp_outside_input_error_strings []
 
cnat_ipv4_udp_outside_input_main_t cnat_ipv4_udp_outside_input_main
 
vlib_node_registration_t cnat_ipv4_udp_outside_input_node
 (constructor) VLIB_REGISTER_NODE (cnat_ipv4_udp_outside_input_node) More...
 

Macro Definition Documentation

#define CNAT_UDP_OUTSIDE_UPDATE_FLAG_TIMER (   db,
  dslite_nat44_inst_id 
)
Value:
if (PREDICT_FALSE(!(db->flags & CNAT_DB_FLAG_UDP_ACTIVE))) { \
db->flags |= CNAT_DB_FLAG_UDP_ACTIVE; \
} else if (PREDICT_FALSE(db->flags & CNAT_DB_DSLITE_FLAG)) { \
} \
} \
u8 mapping_refresh_both_direction
Definition: cnat_config.c:46
#define PREDICT_TRUE(x)
Definition: clib.h:98
#define CNAT_DB_TIMEOUT_RST(db)
Definition: cnat_db.h:561
dslite_table_entry_t * dslite_table_db_ptr
Definition: cnat_global.c:52
#define PREDICT_FALSE(x)
Definition: clib.h:97
#define CNAT_DB_DSLITE_FLAG
Definition: cnat_db.h:188
#define CNAT_DB_FLAG_UDP_ACTIVE
Definition: cnat_db.h:163

Definition at line 112 of file cnat_ipv4_udp_outside_input.c.

#define foreach_cnat_ipv4_udp_outside_input_error
Value:
_(CNAT_V4_UDP_O2I_T_PKT, "v4 udp o2i transmit") \
_(CNAT_V4_DSLITE_ENCAP_CTR, "to dslite encap") \
_(CNAT_V4_UDP_O2I_MISS_PKT, "v4 udp o2i db miss drop") \
_(CNAT_V4_UDP_O2I_TTL_GEN, "v4 udp o2i TTL gen") \
_(CNAT_V4_UDP_O2I_TTL_DROP, "v4 udp o2i TTL drop") \
_(CNAT_V4_UDP_O2I_PTB_GEN, "v4 ptb gen") \
_(CNAT_V4_UDP_O2I_PTB_DROP, "v4 ptb throttle drop") \
_(CNAT_V4_UDP_O2I_SESSION_DROP, "v4 udp o2i session drop") \
_(CNAT_V4_UDP_O2I_FILTER_DROP, "v4 udp o2i drop: end point filtering") \
_(CNAT_V4_UDP_O2I_SUB_FRAG_NO_DB_DROP, "v4 udp o2i subsequent frag no DB drop") \
_(CNAT_V4_UDP_O2I_1ST_FRAG_FILTER_DROP, "v4 udp i2o 1st frag filter drop")

Definition at line 36 of file cnat_ipv4_udp_outside_input.c.

#define NSTAGES   6

Definition at line 84 of file cnat_ipv4_udp_outside_input.c.

#define SPP_CACHE_LINE_BYTES   (1 << SPP_LOG2_CACHE_LINE_BYTES)

Definition at line 314 of file cnat_ipv4_udp_outside_input.c.

#define SPP_LOG2_CACHE_LINE_BYTES   6

Definition at line 313 of file cnat_ipv4_udp_outside_input.c.

#define stage0   generic_stage0

Definition at line 90 of file cnat_ipv4_udp_outside_input.c.

#define UDP_PACKET_DEBUG   1

Enumeration Type Documentation

Enumerator
CNAT_V4_UDP_O2I_E 
CNAT_V4_UDP_O2I_T 
CNAT_V4_UDP_O2I_NEXT 

Definition at line 71 of file cnat_ipv4_udp_outside_input.c.

Enumerator
CNAT_IPV4_UDP_OUTSIDE_INPUT_N_ERROR 

Definition at line 49 of file cnat_ipv4_udp_outside_input.c.

Function Documentation

clib_error_t* cnat_ipv4_udp_outside_input_init ( vlib_main_t vm)

Definition at line 595 of file cnat_ipv4_udp_outside_input.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 560 of file cnat_ipv4_udp_outside_input.c.

+ Here is the call graph for this function:

static u32 last_stage ( vlib_main_t vm,
vlib_node_runtime_t node,
u32  bi 
)
inlinestatic

Definition at line 421 of file cnat_ipv4_udp_outside_input.c.

+ Here is the call graph for this function:

static void stage1 ( vlib_main_t vm,
vlib_node_runtime_t node,
u32  buffer_index 
)
inlinestatic

Definition at line 276 of file cnat_ipv4_udp_outside_input.c.

+ Here is the call graph for this function:

static void stage2 ( vlib_main_t vm,
vlib_node_runtime_t node,
u32  buffer_index 
)
inlinestatic

Definition at line 310 of file cnat_ipv4_udp_outside_input.c.

static void stage3 ( vlib_main_t vm,
vlib_node_runtime_t node,
u32  buffer_index 
)
inlinestatic

Definition at line 317 of file cnat_ipv4_udp_outside_input.c.

+ Here is the call graph for this function:

static void stage4 ( vlib_main_t vm,
vlib_node_runtime_t node,
u32  buffer_index 
)
inlinestatic

Definition at line 347 of file cnat_ipv4_udp_outside_input.c.

+ Here is the call graph for this function:

static void swap_ip_dst ( ipv4_header ip,
cnat_main_db_entry_t db,
u16  vrf 
)
inlinestatic

Definition at line 141 of file cnat_ipv4_udp_outside_input.c.

void swap_ip_dst_udp_port ( ipv4_header ip,
udp_hdr_type_t udp,
cnat_main_db_entry_t db,
u16  vrf 
)
inline

Definition at line 180 of file cnat_ipv4_udp_outside_input.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

char* cnat_ipv4_udp_outside_input_error_strings[]
static
Initial value:
= {
#define _(sym,string)
}
#define foreach_cnat_ipv4_udp_outside_input_error

Definition at line 56 of file cnat_ipv4_udp_outside_input.c.

cnat_ipv4_udp_outside_input_main_t cnat_ipv4_udp_outside_input_main

Definition at line 81 of file cnat_ipv4_udp_outside_input.c.

vlib_node_registration_t cnat_ipv4_udp_outside_input_node
Initial value:
= {
.name = "vcgn-v4-udp-o2i",
.vector_size = sizeof (u32),
.n_next_nodes = CNAT_V4_UDP_O2I_NEXT,
.next_nodes = {
[CNAT_V4_UDP_O2I_E] = "error-drop",
[CNAT_V4_UDP_O2I_T] = "ip4-input",
},
}
bad routing header type(not 4)") sr_error (NO_MORE_SEGMENTS
static uword cnat_ipv4_udp_outside_input_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
static char * cnat_ipv4_udp_outside_input_error_strings[]
#define ARRAY_LEN(x)
Definition: clib.h:59
unsigned int u32
Definition: types.h:88

(constructor) VLIB_REGISTER_NODE (cnat_ipv4_udp_outside_input_node)

Definition at line 82 of file cnat_ipv4_udp_outside_input.c.