FD.io VPP  v20.09-64-g4f7b92f0a
Vector Packet Processing
cnat_session.c File Reference
+ Include dependency graph for cnat_session.c:

Go to the source code of this file.

Data Structures

struct  cnat_session_walk_ctx_t_
 
struct  cnat_session_purge_walk_t_
 

Typedefs

typedef struct cnat_session_walk_ctx_t_ cnat_session_walk_ctx_t
 
typedef struct cnat_session_purge_walk_t_ cnat_session_purge_walk_ctx_t
 

Functions

static int cnat_session_walk_cb (BVT(clib_bihash_kv) *kv, void *arg)
 
void cnat_session_walk (cnat_session_walk_cb_t cb, void *ctx)
 Walk/visit each of the cnat session. More...
 
static int cnat_session_purge_walk (BVT(clib_bihash_kv) *key, void *arg)
 
u8format_cnat_session (u8 *s, va_list *args)
 
static clib_error_tcnat_session_show (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
void cnat_session_free (cnat_session_t *session)
 
int cnat_session_purge (void)
 Purge all the sessions. More...
 
u64 cnat_session_scan (vlib_main_t *vm, f64 start_time, int i)
 Scan the session DB for expired sessions. More...
 
static clib_error_tcnat_session_init (vlib_main_t *vm)
 
static clib_error_tcnat_timestamp_show (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 

Variables

clib_bihash_40_48_t cnat_session_db
 The DB of sessions. More...
 
static vlib_cli_command_t cnat_session_show_cmd_node
 (constructor) VLIB_CLI_COMMAND (cnat_session_show_cmd_node) More...
 
static vlib_cli_command_t cnat_timestamp_show_cmd
 (constructor) VLIB_CLI_COMMAND (cnat_timestamp_show_cmd) More...
 

Typedef Documentation

◆ cnat_session_purge_walk_ctx_t

◆ cnat_session_walk_ctx_t

Function Documentation

◆ cnat_session_free()

void cnat_session_free ( cnat_session_t session)

Definition at line 126 of file cnat_session.c.

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

◆ cnat_session_init()

static clib_error_t* cnat_session_init ( vlib_main_t vm)
static

Definition at line 224 of file cnat_session.c.

+ Here is the call graph for this function:

◆ cnat_session_purge()

int cnat_session_purge ( void  )

Purge all the sessions.

Definition at line 140 of file cnat_session.c.

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

◆ cnat_session_purge_walk()

static int cnat_session_purge_walk ( BVT(clib_bihash_kv) *  key,
void *  arg 
)
static

Definition at line 60 of file cnat_session.c.

+ Here is the caller graph for this function:

◆ cnat_session_scan()

u64 cnat_session_scan ( vlib_main_t vm,
f64  start_time,
int  i 
)

Scan the session DB for expired sessions.

Definition at line 157 of file cnat_session.c.

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

◆ cnat_session_show()

static clib_error_t* cnat_session_show ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 96 of file cnat_session.c.

+ Here is the call graph for this function:

◆ cnat_session_walk()

void cnat_session_walk ( cnat_session_walk_cb_t  cb,
void *  ctx 
)

Walk/visit each of the cnat session.

Definition at line 44 of file cnat_session.c.

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

◆ cnat_session_walk_cb()

static int cnat_session_walk_cb ( BVT(clib_bihash_kv) *  kv,
void *  arg 
)
static

Definition at line 33 of file cnat_session.c.

+ Here is the caller graph for this function:

◆ cnat_timestamp_show()

static clib_error_t* cnat_timestamp_show ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 238 of file cnat_session.c.

+ Here is the call graph for this function:

◆ format_cnat_session()

u8* format_cnat_session ( u8 s,
va_list *  args 
)

Definition at line 70 of file cnat_session.c.

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

Variable Documentation

◆ cnat_session_db

clib_bihash_40_48_t cnat_session_db

The DB of sessions.

Definition at line 23 of file cnat_session.c.

◆ cnat_session_show_cmd_node

vlib_cli_command_t cnat_session_show_cmd_node
static
Initial value:
= {
.path = "show cnat session",
.function = cnat_session_show,
.short_help = "show cnat session",
.is_mp_safe = 1,
}
static clib_error_t * cnat_session_show(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: cnat_session.c:96

(constructor) VLIB_CLI_COMMAND (cnat_session_show_cmd_node)

Definition at line 117 of file cnat_session.c.

◆ cnat_timestamp_show_cmd

vlib_cli_command_t cnat_timestamp_show_cmd
static
Initial value:
= {
.path = "show cnat timestamp",
.function = cnat_timestamp_show,
.short_help = "show cnat timestamp",
.is_mp_safe = 1,
}
static clib_error_t * cnat_timestamp_show(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: cnat_session.c:238

(constructor) VLIB_CLI_COMMAND (cnat_timestamp_show_cmd)

Definition at line 255 of file cnat_session.c.