FD.io VPP  v20.09-64-g4f7b92f0a
Vector Packet Processing
ipsec_itf.c File Reference
+ Include dependency graph for ipsec_itf.c:

Go to the source code of this file.

Macros

#define IPSEC_ITF_MAX_INSTANCE   (16 * 1024)
 

Functions

static ipsec_itf_tipsec_itf_find_by_sw_if_index (u32 sw_if_index)
 
static u8format_ipsec_itf_name (u8 *s, va_list *args)
 
void ipsec_itf_adj_unstack (adj_index_t ai)
 
void ipsec_itf_adj_stack (adj_index_t ai, u32 sai)
 
static adj_walk_rc_t ipsec_itf_adj_stack_cb (adj_index_t ai, void *arg)
 
static void ipsec_itf_restack (index_t itpi, const ipsec_itf_t *itf)
 
static walk_rc_t ipsec_tun_protect_walk_state_change (index_t itpi, void *arg)
 
static clib_error_tipsec_itf_admin_up_down (vnet_main_t *vnm, u32 hw_if_index, u32 flags)
 
static int ipsec_itf_tunnel_desc (u32 sw_if_index, ip46_address_t *src, ip46_address_t *dst, u8 *is_l2)
 
static u8ipsec_itf_build_rewrite (void)
 
static u8ipsec_itf_build_rewrite_i (vnet_main_t *vnm, u32 sw_if_index, vnet_link_t link_type, const void *dst_address)
 
void ipsec_itf_update_adj (vnet_main_t *vnm, u32 sw_if_index, adj_index_t ai)
 
 VNET_DEVICE_CLASS (ipsec_itf_device_class)
 
 VNET_HW_INTERFACE_CLASS (ipsec_hw_interface_class)
 
static u32 ipsec_itf_instance_alloc (u32 want)
 
static int ipsec_itf_instance_free (u32 instance)
 
int ipsec_itf_create (u32 user_instance, tunnel_mode_t mode, u32 *sw_if_indexp)
 
int ipsec_itf_delete (u32 sw_if_index)
 
static clib_error_tipsec_itf_create_cli (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tipsec_itf_delete_cli (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 

Variables

static uwordipsec_itf_instances
 
static ipsec_itf_tipsec_itf_pool
 
static u32ipsec_itf_index_by_sw_if_index
 
static vlib_cli_command_t ipsec_itf_create_command
 (constructor) VLIB_CLI_COMMAND (ipsec_itf_create_command) More...
 
static vlib_cli_command_t ipsec_itf_delete_command
 (constructor) VLIB_CLI_COMMAND (ipsec_itf_delete_command) More...
 

Macro Definition Documentation

◆ IPSEC_ITF_MAX_INSTANCE

#define IPSEC_ITF_MAX_INSTANCE   (16 * 1024)

Definition at line 205 of file ipsec_itf.c.

Function Documentation

◆ format_ipsec_itf_name()

static u8* format_ipsec_itf_name ( u8 s,
va_list *  args 
)
static

Definition at line 44 of file ipsec_itf.c.

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

◆ ipsec_itf_adj_stack()

void ipsec_itf_adj_stack ( adj_index_t  ai,
u32  sai 
)

Definition at line 57 of file ipsec_itf.c.

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

◆ ipsec_itf_adj_stack_cb()

static adj_walk_rc_t ipsec_itf_adj_stack_cb ( adj_index_t  ai,
void *  arg 
)
static

Definition at line 86 of file ipsec_itf.c.

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

◆ ipsec_itf_adj_unstack()

void ipsec_itf_adj_unstack ( adj_index_t  ai)

Definition at line 51 of file ipsec_itf.c.

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

◆ ipsec_itf_admin_up_down()

static clib_error_t* ipsec_itf_admin_up_down ( vnet_main_t vnm,
u32  hw_if_index,
u32  flags 
)
static

Definition at line 123 of file ipsec_itf.c.

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

◆ ipsec_itf_build_rewrite()

static u8* ipsec_itf_build_rewrite ( void  )
static

Definition at line 155 of file ipsec_itf.c.

+ Here is the caller graph for this function:

◆ ipsec_itf_build_rewrite_i()

static u8* ipsec_itf_build_rewrite_i ( vnet_main_t vnm,
u32  sw_if_index,
vnet_link_t  link_type,
const void *  dst_address 
)
static

Definition at line 172 of file ipsec_itf.c.

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

◆ ipsec_itf_create()

int ipsec_itf_create ( u32  user_instance,
tunnel_mode_t  mode,
u32 sw_if_indexp 
)

Definition at line 268 of file ipsec_itf.c.

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

◆ ipsec_itf_create_cli()

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

Definition at line 344 of file ipsec_itf.c.

+ Here is the call graph for this function:

◆ ipsec_itf_delete()

int ipsec_itf_delete ( u32  sw_if_index)

Definition at line 318 of file ipsec_itf.c.

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

◆ ipsec_itf_delete_cli()

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

Definition at line 405 of file ipsec_itf.c.

+ Here is the call graph for this function:

◆ ipsec_itf_find_by_sw_if_index()

static ipsec_itf_t* ipsec_itf_find_by_sw_if_index ( u32  sw_if_index)
static

Definition at line 33 of file ipsec_itf.c.

+ Here is the caller graph for this function:

◆ ipsec_itf_instance_alloc()

static u32 ipsec_itf_instance_alloc ( u32  want)
static

Definition at line 208 of file ipsec_itf.c.

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

◆ ipsec_itf_instance_free()

static int ipsec_itf_instance_free ( u32  instance)
static

Definition at line 251 of file ipsec_itf.c.

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

◆ ipsec_itf_restack()

static void ipsec_itf_restack ( index_t  itpi,
const ipsec_itf_t itf 
)
static

Definition at line 96 of file ipsec_itf.c.

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

◆ ipsec_itf_tunnel_desc()

static int ipsec_itf_tunnel_desc ( u32  sw_if_index,
ip46_address_t *  src,
ip46_address_t *  dst,
u8 is_l2 
)
static

Definition at line 144 of file ipsec_itf.c.

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

◆ ipsec_itf_update_adj()

void ipsec_itf_update_adj ( vnet_main_t vnm,
u32  sw_if_index,
adj_index_t  ai 
)

Definition at line 180 of file ipsec_itf.c.

+ Here is the call graph for this function:

◆ ipsec_tun_protect_walk_state_change()

static walk_rc_t ipsec_tun_protect_walk_state_change ( index_t  itpi,
void *  arg 
)
static

Definition at line 113 of file ipsec_itf.c.

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

◆ VNET_DEVICE_CLASS()

VNET_DEVICE_CLASS ( ipsec_itf_device_class  )
+ Here is the caller graph for this function:

◆ VNET_HW_INTERFACE_CLASS()

VNET_HW_INTERFACE_CLASS ( ipsec_hw_interface_class  )
+ Here is the caller graph for this function:

Variable Documentation

◆ ipsec_itf_create_command

vlib_cli_command_t ipsec_itf_create_command
static
Initial value:
= {
.path = "ipsec itf create",
.short_help = "ipsec itf create [instance <instance>]",
.function = ipsec_itf_create_cli,
}
static clib_error_t * ipsec_itf_create_cli(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: ipsec_itf.c:344

(constructor) VLIB_CLI_COMMAND (ipsec_itf_create_command)

Definition at line 397 of file ipsec_itf.c.

◆ ipsec_itf_delete_command

vlib_cli_command_t ipsec_itf_delete_command
static
Initial value:
= {
.path = "ipsec itf delete",
.short_help = "ipsec itf delete <interface>",
.function = ipsec_itf_delete_cli,
}
static clib_error_t * ipsec_itf_delete_cli(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: ipsec_itf.c:405

(constructor) VLIB_CLI_COMMAND (ipsec_itf_delete_command)

Definition at line 448 of file ipsec_itf.c.

◆ ipsec_itf_index_by_sw_if_index

u32* ipsec_itf_index_by_sw_if_index
static

Definition at line 30 of file ipsec_itf.c.

◆ ipsec_itf_instances

uword* ipsec_itf_instances
static

Definition at line 25 of file ipsec_itf.c.

◆ ipsec_itf_pool

ipsec_itf_t* ipsec_itf_pool
static

Definition at line 28 of file ipsec_itf.c.