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

Go to the source code of this file.

Functions

static void cnat_compute_prefix_lengths_in_search_order (cnat_snat_pfx_table_t *table, ip_address_family_t af)
 
int cnat_add_snat_prefix (ip_prefix_t *pfx)
 
int cnat_del_snat_prefix (ip_prefix_t *pfx)
 
int cnat_search_snat_prefix (ip46_address_t *addr, ip_address_family_t af)
 
u8format_cnat_snat_prefix (u8 *s, va_list *args)
 
void cnat_set_snat (ip4_address_t *ip4, ip6_address_t *ip6, u32 sw_if_index)
 
static clib_error_tcnat_set_snat_cli (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tcnat_snat_exclude (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tcnat_show_snat (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tcnat_snat_init (vlib_main_t *vm)
 

Variables

static vlib_cli_command_t cnat_set_snat_command
 (constructor) VLIB_CLI_COMMAND (cnat_set_snat_command) More...
 
static vlib_cli_command_t cnat_snat_exclude_command
 (constructor) VLIB_CLI_COMMAND (cnat_snat_exclude_command) More...
 
static vlib_cli_command_t cnat_show_snat_command
 (constructor) VLIB_CLI_COMMAND (cnat_show_snat_command) More...
 

Function Documentation

◆ cnat_add_snat_prefix()

int cnat_add_snat_prefix ( ip_prefix_t pfx)

Definition at line 37 of file cnat_snat.c.

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

◆ cnat_compute_prefix_lengths_in_search_order()

static void cnat_compute_prefix_lengths_in_search_order ( cnat_snat_pfx_table_t table,
ip_address_family_t  af 
)
static

Definition at line 21 of file cnat_snat.c.

+ Here is the caller graph for this function:

◆ cnat_del_snat_prefix()

int cnat_del_snat_prefix ( ip_prefix_t pfx)

Definition at line 68 of file cnat_snat.c.

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

◆ cnat_search_snat_prefix()

int cnat_search_snat_prefix ( ip46_address_t *  addr,
ip_address_family_t  af 
)

Definition at line 106 of file cnat_snat.c.

+ Here is the caller graph for this function:

◆ cnat_set_snat()

void cnat_set_snat ( ip4_address_t ip4,
ip6_address_t *  ip6,
u32  sw_if_index 
)

Definition at line 162 of file cnat_snat.c.

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

◆ cnat_set_snat_cli()

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

Definition at line 182 of file cnat_snat.c.

+ Here is the call graph for this function:

◆ cnat_show_snat()

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

Definition at line 274 of file cnat_snat.c.

+ Here is the call graph for this function:

◆ cnat_snat_exclude()

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

Definition at line 233 of file cnat_snat.c.

+ Here is the call graph for this function:

◆ cnat_snat_init()

static clib_error_t* cnat_snat_init ( vlib_main_t vm)
static

Definition at line 296 of file cnat_snat.c.

+ Here is the call graph for this function:

◆ format_cnat_snat_prefix()

u8* format_cnat_snat_prefix ( u8 s,
va_list *  args 
)

Definition at line 148 of file cnat_snat.c.

+ Here is the caller graph for this function:

Variable Documentation

◆ cnat_set_snat_command

vlib_cli_command_t cnat_set_snat_command
static
Initial value:
=
{
.path = "cnat snat with",
.short_help = "cnat snat with [<ip4-address>][<ip6-address>][sw_if_index]",
.function = cnat_set_snat_cli,
}
static clib_error_t * cnat_set_snat_cli(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: cnat_snat.c:182

(constructor) VLIB_CLI_COMMAND (cnat_set_snat_command)

Definition at line 224 of file cnat_snat.c.

◆ cnat_show_snat_command

vlib_cli_command_t cnat_show_snat_command
static
Initial value:
=
{
.path = "show cnat snat",
.short_help = "show cnat snat",
.function = cnat_show_snat,
}
static clib_error_t * cnat_show_snat(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: cnat_snat.c:274

(constructor) VLIB_CLI_COMMAND (cnat_show_snat_command)

Definition at line 287 of file cnat_snat.c.

◆ cnat_snat_exclude_command

vlib_cli_command_t cnat_snat_exclude_command
static
Initial value:
=
{
.path = "cnat snat exclude",
.short_help = "cnat snat exclude [ip]",
.function = cnat_snat_exclude,
}
static clib_error_t * cnat_snat_exclude(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: cnat_snat.c:233

(constructor) VLIB_CLI_COMMAND (cnat_snat_exclude_command)

Definition at line 265 of file cnat_snat.c.