FD.io VPP  v21.06-3-gbb25fbf28
Vector Packet Processing
ipsec_sa.c File Reference
+ Include dependency graph for ipsec_sa.c:

Go to the source code of this file.

Functions

static clib_error_tipsec_call_add_del_callbacks (ipsec_main_t *im, ipsec_sa_t *sa, u32 sa_index, int is_add)
 
void ipsec_mk_key (ipsec_key_t *key, const u8 *data, u8 len)
 
static void ipsec_sa_stack (ipsec_sa_t *sa)
 'stack' (resolve the recursion for) the SA tunnel destination More...
 
void ipsec_sa_set_crypto_alg (ipsec_sa_t *sa, ipsec_crypto_alg_t crypto_alg)
 
void ipsec_sa_set_integ_alg (ipsec_sa_t *sa, ipsec_integ_alg_t integ_alg)
 
void ipsec_sa_set_async_op_ids (ipsec_sa_t *sa)
 
int ipsec_sa_add_and_lock (u32 id, u32 spi, ipsec_protocol_t proto, ipsec_crypto_alg_t crypto_alg, const ipsec_key_t *ck, ipsec_integ_alg_t integ_alg, const ipsec_key_t *ik, ipsec_sa_flags_t flags, u32 salt, u16 src_port, u16 dst_port, const tunnel_t *tun, u32 *sa_out_index)
 
static void ipsec_sa_del (ipsec_sa_t *sa)
 
void ipsec_sa_unlock (index_t sai)
 
void ipsec_sa_lock (index_t sai)
 
index_t ipsec_sa_find_and_lock (u32 id)
 
int ipsec_sa_unlock_id (u32 id)
 
void ipsec_sa_clear (index_t sai)
 
void ipsec_sa_walk (ipsec_sa_walk_cb_t cb, void *ctx)
 
static fib_node_tipsec_sa_fib_node_get (fib_node_index_t index)
 Function definition to get a FIB node from its index. More...
 
static ipsec_sa_tipsec_sa_from_fib_node (fib_node_t *node)
 
static void ipsec_sa_last_lock_gone (fib_node_t *node)
 Function definition to inform the FIB node that its last lock has gone. More...
 
static fib_node_back_walk_rc_t ipsec_sa_back_walk (fib_node_t *node, fib_node_back_walk_ctx_t *ctx)
 Function definition to backwalk a FIB node. More...
 
clib_error_tipsec_sa_interface_init (vlib_main_t *vm)
 

Variables

vlib_combined_counter_main_t ipsec_sa_counters
 SA packet & bytes counters. More...
 
ipsec_sa_tipsec_sa_pool
 Pool of IPSec SAs. More...
 
const static fib_node_vft_t ipsec_sa_vft
 

Function Documentation

◆ ipsec_call_add_del_callbacks()

static clib_error_t* ipsec_call_add_del_callbacks ( ipsec_main_t im,
ipsec_sa_t sa,
u32  sa_index,
int  is_add 
)
static

Definition at line 35 of file ipsec_sa.c.

+ Here is the caller graph for this function:

◆ ipsec_mk_key()

void ipsec_mk_key ( ipsec_key_t key,
const u8 data,
u8  len 
)

Definition at line 57 of file ipsec_sa.c.

+ Here is the caller graph for this function:

◆ ipsec_sa_add_and_lock()

int ipsec_sa_add_and_lock ( u32  id,
u32  spi,
ipsec_protocol_t  proto,
ipsec_crypto_alg_t  crypto_alg,
const ipsec_key_t ck,
ipsec_integ_alg_t  integ_alg,
const ipsec_key_t ik,
ipsec_sa_flags_t  flags,
u32  salt,
u16  src_port,
u16  dst_port,
const tunnel_t tun,
u32 sa_out_index 
)

Definition at line 170 of file ipsec_sa.c.

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

◆ ipsec_sa_back_walk()

static fib_node_back_walk_rc_t ipsec_sa_back_walk ( fib_node_t node,
fib_node_back_walk_ctx_t ctx 
)
static

Function definition to backwalk a FIB node.

Definition at line 476 of file ipsec_sa.c.

+ Here is the call graph for this function:

◆ ipsec_sa_clear()

void ipsec_sa_clear ( index_t  sai)

Definition at line 418 of file ipsec_sa.c.

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

◆ ipsec_sa_del()

static void ipsec_sa_del ( ipsec_sa_t sa)
static

Definition at line 330 of file ipsec_sa.c.

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

◆ ipsec_sa_fib_node_get()

static fib_node_t* ipsec_sa_fib_node_get ( fib_node_index_t  index)
static

Function definition to get a FIB node from its index.

Definition at line 441 of file ipsec_sa.c.

+ Here is the call graph for this function:

◆ ipsec_sa_find_and_lock()

index_t ipsec_sa_find_and_lock ( u32  id)

Definition at line 383 of file ipsec_sa.c.

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

◆ ipsec_sa_from_fib_node()

static ipsec_sa_t* ipsec_sa_from_fib_node ( fib_node_t node)
static

Definition at line 451 of file ipsec_sa.c.

+ Here is the caller graph for this function:

◆ ipsec_sa_interface_init()

clib_error_t* ipsec_sa_interface_init ( vlib_main_t vm)

Definition at line 495 of file ipsec_sa.c.

+ Here is the call graph for this function:

◆ ipsec_sa_last_lock_gone()

static void ipsec_sa_last_lock_gone ( fib_node_t node)
static

Function definition to inform the FIB node that its last lock has gone.

Definition at line 463 of file ipsec_sa.c.

+ Here is the call graph for this function:

◆ ipsec_sa_lock()

void ipsec_sa_lock ( index_t  sai)

Definition at line 370 of file ipsec_sa.c.

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

◆ ipsec_sa_set_async_op_ids()

void ipsec_sa_set_async_op_ids ( ipsec_sa_t sa)

Definition at line 127 of file ipsec_sa.c.

+ Here is the caller graph for this function:

◆ ipsec_sa_set_crypto_alg()

void ipsec_sa_set_crypto_alg ( ipsec_sa_t sa,
ipsec_crypto_alg_t  crypto_alg 
)

Definition at line 92 of file ipsec_sa.c.

+ Here is the caller graph for this function:

◆ ipsec_sa_set_integ_alg()

void ipsec_sa_set_integ_alg ( ipsec_sa_t sa,
ipsec_integ_alg_t  integ_alg 
)

Definition at line 116 of file ipsec_sa.c.

+ Here is the caller graph for this function:

◆ ipsec_sa_stack()

static void ipsec_sa_stack ( ipsec_sa_t sa)
static

'stack' (resolve the recursion for) the SA tunnel destination

Definition at line 73 of file ipsec_sa.c.

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

◆ ipsec_sa_unlock()

void ipsec_sa_unlock ( index_t  sai)

Definition at line 357 of file ipsec_sa.c.

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

◆ ipsec_sa_unlock_id()

int ipsec_sa_unlock_id ( u32  id)

Definition at line 402 of file ipsec_sa.c.

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

◆ ipsec_sa_walk()

void ipsec_sa_walk ( ipsec_sa_walk_cb_t  cb,
void *  ctx 
)

Definition at line 424 of file ipsec_sa.c.

+ Here is the caller graph for this function:

Variable Documentation

◆ ipsec_sa_counters

vlib_combined_counter_main_t ipsec_sa_counters
Initial value:
= {
.name = "SA",
.stat_segment_name = "/net/ipsec/sa",
}

SA packet & bytes counters.

Definition at line 27 of file ipsec_sa.c.

◆ ipsec_sa_pool

ipsec_sa_t* ipsec_sa_pool

Pool of IPSec SAs.

Definition at line 32 of file ipsec_sa.c.

◆ ipsec_sa_vft

const static fib_node_vft_t ipsec_sa_vft
static
Initial value:
= {
.fnv_last_lock = ipsec_sa_last_lock_gone,
.fnv_back_walk = ipsec_sa_back_walk,
}

Definition at line 487 of file ipsec_sa.c.

ipsec_sa_last_lock_gone
static void ipsec_sa_last_lock_gone(fib_node_t *node)
Function definition to inform the FIB node that its last lock has gone.
Definition: ipsec_sa.c:463
ipsec_sa_fib_node_get
static fib_node_t * ipsec_sa_fib_node_get(fib_node_index_t index)
Function definition to get a FIB node from its index.
Definition: ipsec_sa.c:441
ipsec_sa_back_walk
static fib_node_back_walk_rc_t ipsec_sa_back_walk(fib_node_t *node, fib_node_back_walk_ctx_t *ctx)
Function definition to backwalk a FIB node.
Definition: ipsec_sa.c:476