FD.io VPP  v21.06-3-gbb25fbf28
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_location (u8 *s, va_list *args)
 
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)
 Free a session & update refcounts. More...
 
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

cnat_bihash_t cnat_session_db
 The DB of sessions. More...
 
void(* cnat_free_port_cb )(u16 port, ip_protocol_t iproto)
 Port cleanup callback. 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)

Free a session & update refcounts.

Definition at line 144 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 243 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 159 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 176 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 116 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 257 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 92 of file cnat_session.c.

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

◆ format_cnat_session_location()

u8* format_cnat_session_location ( u8 s,
va_list *  args 
)

Definition at line 70 of file cnat_session.c.

+ Here is the caller graph for this function:

Variable Documentation

◆ cnat_free_port_cb

void(* cnat_free_port_cb) (u16 port, ip_protocol_t iproto)

Port cleanup callback.

Definition at line 24 of file cnat_session.c.

◆ cnat_session_db

cnat_bihash_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,
}

(constructor) VLIB_CLI_COMMAND (cnat_session_show_cmd_node)

Definition at line 136 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,
}

(constructor) VLIB_CLI_COMMAND (cnat_timestamp_show_cmd)

Definition at line 272 of file cnat_session.c.

cnat_timestamp_show
static clib_error_t * cnat_timestamp_show(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: cnat_session.c:257
cnat_session_show
static clib_error_t * cnat_session_show(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: cnat_session.c:116