FD.io VPP  v21.06-3-gbb25fbf28
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 ip_address_t *addr)
 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...
 
const static char *const cnat_client_dpo_ip4_nodes []
 
const static char *const cnat_client_dpo_ip6_nodes []
 
const static char *const *const cnat_client_dpo_nodes [DPO_PROTO_NUM]
 
const static 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 137 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 122 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 204 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 327 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 337 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 57 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 372 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 ip_address_t addr)

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

Definition at line 188 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 228 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 272 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 69 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 97 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 108 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 247 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 354 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 static char* const cnat_client_dpo_ip4_nodes[]
static
Initial value:
= {
"ip4-cnat-tx",
NULL,
}

Definition at line 311 of file cnat_client.c.

◆ cnat_client_dpo_ip6_nodes

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

Definition at line 316 of file cnat_client.c.

◆ cnat_client_dpo_nodes

const static char* const * const cnat_client_dpo_nodes[DPO_PROTO_NUM]
static
Initial value:

Definition at line 321 of file cnat_client.c.

◆ cnat_client_dpo_vft

const static 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,
}

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

(constructor) VLIB_CLI_COMMAND (cnat_client_show_cmd_node)

Definition at line 304 of file cnat_client.c.

cnat_client_dpo_ip4_nodes
const static char *const cnat_client_dpo_ip4_nodes[]
Definition: cnat_client.c:311
cnat_client_dpo_interpose
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:204
cnat_client_dpo_ip6_nodes
const static char *const cnat_client_dpo_ip6_nodes[]
Definition: cnat_client.c:316
format_cnat_client_dpo
u8 * format_cnat_client_dpo(u8 *s, va_list *ap)
Definition: cnat_client.c:354
DPO_PROTO_IP6
@ DPO_PROTO_IP6
Definition: dpo.h:65
cnat_client_dpo_lock
static void cnat_client_dpo_lock(dpo_id_t *dpo)
Definition: cnat_client.c:327
DPO_PROTO_IP4
@ DPO_PROTO_IP4
Definition: dpo.h:64
cnat_client_dpo_unlock
static void cnat_client_dpo_unlock(dpo_id_t *dpo)
Definition: cnat_client.c:337
cnat_client_show
static clib_error_t * cnat_client_show(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: cnat_client.c:272