FD.io VPP  v20.09-64-g4f7b92f0a
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 150 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 135 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 215 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 335 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 345 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 59 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 379 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 199 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 239 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 275 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 74 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 113 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 122 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 248 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 361 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 319 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 324 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:324
static const char *const cnat_client_dpo_ip4_nodes[]
Definition: cnat_client.c:319

Definition at line 329 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:335
u8 * format_cnat_client_dpo(u8 *s, va_list *ap)
Definition: cnat_client.c:361
static void cnat_client_dpo_unlock(dpo_id_t *dpo)
Definition: cnat_client.c:345
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:215

Definition at line 371 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:275

(constructor) VLIB_CLI_COMMAND (cnat_client_show_cmd_node)

Definition at line 311 of file cnat_client.c.