FD.io VPP  v21.01.1
Vector Packet Processing
cnat_client.c File Reference
+ Include dependency graph for cnat_client.c:

Go to the source code of this file.

Functions

static_always_inline u8 cnat_client_is_clone (cnat_client_t *cc)
 
static void cnat_client_db_remove (cnat_client_t *cc)
 
static void cnat_client_destroy (cnat_client_t *cc)
 
void cnat_client_free_by_ip (ip46_address_t *ip, u8 af)
 
void cnat_client_throttle_pool_process ()
 
void cnat_client_translation_added (index_t cci)
 A translation that references this VIP was added. More...
 
void cnat_client_translation_deleted (index_t cci)
 A translation that references this VIP was deleted. More...
 
static void cnat_client_db_add (cnat_client_t *cc)
 
index_t cnat_client_add (const ip_address_t *ip, u8 flags)
 
void cnat_client_learn (const cnat_learn_arg_t *l)
 Called in the main thread by RPC from the workers to learn a new client. More...
 
static void cnat_client_dpo_interpose (const dpo_id_t *original, const dpo_id_t *parent, dpo_id_t *clone)
 Interpose a policy DPO. More...
 
int cnat_client_purge (void)
 Check all the clients were purged by translation & session purge. More...
 
u8format_cnat_client (u8 *s, va_list *args)
 
static clib_error_tcnat_client_show (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static void cnat_client_dpo_lock (dpo_id_t *dpo)
 
static void cnat_client_dpo_unlock (dpo_id_t *dpo)
 
u8format_cnat_client_dpo (u8 *s, va_list *ap)
 
static clib_error_tcnat_client_init (vlib_main_t *vm)
 

Variables

cnat_client_tcnat_client_pool
 
cnat_client_db_t cnat_client_db
 
dpo_type_t cnat_client_dpo
 
static vlib_cli_command_t cnat_client_show_cmd_node
 (constructor) VLIB_CLI_COMMAND (cnat_client_show_cmd_node) More...
 
static const char *const cnat_client_dpo_ip4_nodes []
 
static const char *const cnat_client_dpo_ip6_nodes []
 
static const char *const *const cnat_client_dpo_nodes [DPO_PROTO_NUM]
 
static const dpo_vft_t cnat_client_dpo_vft
 

Function Documentation

◆ cnat_client_add()

index_t cnat_client_add ( const ip_address_t ip,
u8  flags 
)

Definition at line 151 of file cnat_client.c.

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

◆ cnat_client_db_add()

static void cnat_client_db_add ( cnat_client_t cc)
static

Definition at line 136 of file cnat_client.c.

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

◆ cnat_client_db_remove()

static void cnat_client_db_remove ( cnat_client_t cc)
static

Definition at line 35 of file cnat_client.c.

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

◆ cnat_client_destroy()

static void cnat_client_destroy ( cnat_client_t cc)
static

Definition at line 44 of file cnat_client.c.

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

◆ cnat_client_dpo_interpose()

static void cnat_client_dpo_interpose ( const dpo_id_t original,
const dpo_id_t parent,
dpo_id_t clone 
)
static

Interpose a policy DPO.

Definition at line 218 of file cnat_client.c.

+ Here is the call graph for this function:

◆ cnat_client_dpo_lock()

static void cnat_client_dpo_lock ( dpo_id_t dpo)
static

Definition at line 344 of file cnat_client.c.

+ Here is the call graph for this function:

◆ cnat_client_dpo_unlock()

static void cnat_client_dpo_unlock ( dpo_id_t dpo)
static

Definition at line 354 of file cnat_client.c.

+ Here is the call graph for this function:

◆ cnat_client_free_by_ip()

void cnat_client_free_by_ip ( ip46_address_t *  ip,
u8  af 
)

Definition at line 58 of file cnat_client.c.

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

◆ cnat_client_init()

static clib_error_t* cnat_client_init ( vlib_main_t vm)
static

Definition at line 388 of file cnat_client.c.

+ Here is the call graph for this function:

◆ cnat_client_is_clone()

static_always_inline u8 cnat_client_is_clone ( cnat_client_t cc)

Definition at line 29 of file cnat_client.c.

+ Here is the caller graph for this function:

◆ cnat_client_learn()

void cnat_client_learn ( const cnat_learn_arg_t l)

Called in the main thread by RPC from the workers to learn a new client.

Definition at line 202 of file cnat_client.c.

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

◆ cnat_client_purge()

int cnat_client_purge ( void  )

Check all the clients were purged by translation & session purge.

Definition at line 242 of file cnat_client.c.

+ Here is the call graph for this function:

◆ cnat_client_show()

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

Definition at line 285 of file cnat_client.c.

+ Here is the call graph for this function:

◆ cnat_client_throttle_pool_process()

void cnat_client_throttle_pool_process ( )

Definition at line 71 of file cnat_client.c.

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

◆ cnat_client_translation_added()

void cnat_client_translation_added ( index_t  cci)

A translation that references this VIP was added.

Definition at line 109 of file cnat_client.c.

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

◆ cnat_client_translation_deleted()

void cnat_client_translation_deleted ( index_t  cci)

A translation that references this VIP was deleted.

Definition at line 121 of file cnat_client.c.

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

◆ format_cnat_client()

u8* format_cnat_client ( u8 s,
va_list *  args 
)

Definition at line 258 of file cnat_client.c.

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

◆ format_cnat_client_dpo()

u8* format_cnat_client_dpo ( u8 s,
va_list *  ap 
)

Definition at line 370 of file cnat_client.c.

+ Here is the call graph for this function:

Variable Documentation

◆ cnat_client_db

cnat_client_db_t cnat_client_db

Definition at line 24 of file cnat_client.c.

◆ cnat_client_dpo

dpo_type_t cnat_client_dpo

Definition at line 26 of file cnat_client.c.

◆ cnat_client_dpo_ip4_nodes

const char* const cnat_client_dpo_ip4_nodes[]
static
Initial value:
= {
"ip4-cnat-tx",
NULL,
}

Definition at line 328 of file cnat_client.c.

◆ cnat_client_dpo_ip6_nodes

const char* const cnat_client_dpo_ip6_nodes[]
static
Initial value:
= {
"ip6-cnat-tx",
NULL,
}

Definition at line 333 of file cnat_client.c.

◆ cnat_client_dpo_nodes

const char* const* const cnat_client_dpo_nodes[DPO_PROTO_NUM]
static
Initial value:
= {
}
static const char *const cnat_client_dpo_ip6_nodes[]
Definition: cnat_client.c:333
static const char *const cnat_client_dpo_ip4_nodes[]
Definition: cnat_client.c:328

Definition at line 338 of file cnat_client.c.

◆ cnat_client_dpo_vft

const dpo_vft_t cnat_client_dpo_vft
static
Initial value:
= {
.dv_unlock = cnat_client_dpo_unlock,
.dv_format = format_cnat_client_dpo,
.dv_mk_interpose = cnat_client_dpo_interpose,
}
static void cnat_client_dpo_lock(dpo_id_t *dpo)
Definition: cnat_client.c:344
u8 * format_cnat_client_dpo(u8 *s, va_list *ap)
Definition: cnat_client.c:370
static void cnat_client_dpo_unlock(dpo_id_t *dpo)
Definition: cnat_client.c:354
static void cnat_client_dpo_interpose(const dpo_id_t *original, const dpo_id_t *parent, dpo_id_t *clone)
Interpose a policy DPO.
Definition: cnat_client.c:218

Definition at line 380 of file cnat_client.c.

◆ cnat_client_pool

cnat_client_t* cnat_client_pool

Definition at line 22 of file cnat_client.c.

◆ cnat_client_show_cmd_node

vlib_cli_command_t cnat_client_show_cmd_node
static
Initial value:
= {
.path = "show cnat client",
.function = cnat_client_show,
.short_help = "show cnat client",
.is_mp_safe = 1,
}
static clib_error_t * cnat_client_show(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: cnat_client.c:285

(constructor) VLIB_CLI_COMMAND (cnat_client_show_cmd_node)

Definition at line 320 of file cnat_client.c.