FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the source code of this file.
Data Structures | |
struct | ipsec_key_t_ |
struct | ipsec_sa_t |
Macros | |
#define | foreach_ipsec_crypto_alg |
#define | IPSEC_CRYPTO_ALG_IS_GCM(_alg) |
#define | IPSEC_CRYPTO_ALG_IS_CTR(_alg) |
#define | foreach_ipsec_integ_alg |
#define | IPSEC_KEY_MAX_LEN 128 |
#define | foreach_ipsec_sa_flags |
#define | IPSEC_UDP_PORT_NONE ((u16)~0) |
#define | IPSEC_SA_ANTI_REPLAY_WINDOW_SIZE (64) |
#define | IPSEC_SA_ANTI_REPLAY_WINDOW_MAX_INDEX (IPSEC_SA_ANTI_REPLAY_WINDOW_SIZE-1) |
#define | IPSEC_SA_ANTI_REPLAY_WINDOW_LOWER_BOUND(_tl) (_tl - IPSEC_SA_ANTI_REPLAY_WINDOW_SIZE + 1) |
Typedefs | |
typedef struct ipsec_key_t_ | ipsec_key_t |
typedef enum ipsec_sad_flags_t_ | ipsec_sa_flags_t |
typedef walk_rc_t(* | ipsec_sa_walk_cb_t) (ipsec_sa_t *sa, void *ctx) |
Enumerations | |
enum | ipsec_sad_flags_t_ { foreach_ipsec_sa_flags } |
Variables | |
ipsec_sa_t * | ipsec_sa_pool |
Pool of IPSec SAs. More... | |
foreach_ipsec_sa_flags vlib_combined_counter_main_t | ipsec_sa_counters |
SA packet & bytes counters. More... | |
#define foreach_ipsec_crypto_alg |
Definition at line 24 of file ipsec_sa.h.
#define foreach_ipsec_integ_alg |
Definition at line 56 of file ipsec_sa.h.
#define foreach_ipsec_sa_flags |
Definition at line 94 of file ipsec_sa.h.
#define IPSEC_CRYPTO_ALG_IS_CTR | ( | _alg | ) |
Definition at line 51 of file ipsec_sa.h.
#define IPSEC_CRYPTO_ALG_IS_GCM | ( | _alg | ) |
Definition at line 46 of file ipsec_sa.h.
#define IPSEC_KEY_MAX_LEN 128 |
Definition at line 79 of file ipsec_sa.h.
#define IPSEC_SA_ANTI_REPLAY_WINDOW_LOWER_BOUND | ( | _tl | ) | (_tl - IPSEC_SA_ANTI_REPLAY_WINDOW_SIZE + 1) |
Definition at line 311 of file ipsec_sa.h.
#define IPSEC_SA_ANTI_REPLAY_WINDOW_MAX_INDEX (IPSEC_SA_ANTI_REPLAY_WINDOW_SIZE-1) |
Definition at line 304 of file ipsec_sa.h.
#define IPSEC_SA_ANTI_REPLAY_WINDOW_SIZE (64) |
Definition at line 303 of file ipsec_sa.h.
#define IPSEC_UDP_PORT_NONE ((u16)~0) |
Definition at line 297 of file ipsec_sa.h.
typedef struct ipsec_key_t_ ipsec_key_t |
typedef enum ipsec_sad_flags_t_ ipsec_sa_flags_t |
typedef walk_rc_t(* ipsec_sa_walk_cb_t) (ipsec_sa_t *sa, void *ctx) |
Definition at line 283 of file ipsec_sa.h.
enum ipsec_sad_flags_t_ |
Enumerator | |
---|---|
foreach_ipsec_sa_flags |
Definition at line 107 of file ipsec_sa.h.
Definition at line 235 of file ipsec_format.c.
Definition at line 270 of file ipsec_format.c.
void ipsec_mk_key | ( | ipsec_key_t * | key, |
const u8 * | data, | ||
u8 | len | ||
) |
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.
|
inlinestatic |
|
inlinestatic |
Definition at line 338 of file ipsec_sa.h.
|
inlinestatic |
Definition at line 598 of file ipsec_sa.h.
void ipsec_sa_clear | ( | index_t | sai | ) |
Definition at line 422 of file ipsec_sa.c.
Definition at line 387 of file ipsec_sa.c.
|
inlinestatic |
void ipsec_sa_lock | ( | index_t | sai | ) |
Definition at line 374 of file ipsec_sa.c.
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_unlock | ( | index_t | sai | ) |
Definition at line 361 of file ipsec_sa.c.
int ipsec_sa_unlock_id | ( | u32 | id | ) |
Definition at line 406 of file ipsec_sa.c.
void ipsec_sa_walk | ( | ipsec_sa_walk_cb_t | cd, |
void * | ctx | ||
) |
STATIC_ASSERT | ( | sizeof(ipsec_sa_flags_t) | = =2 | ) |
STATIC_ASSERT | ( | STRUCT_OFFSET_OF(vnet_buffer_opaque_t, ipsec.sad_index) | = =STRUCT_OFFSET_OF(vnet_buffer_opaque_t, ip.save_protocol) , |
"IPSec data is overlapping with IP data" | |||
) |
STATIC_ASSERT_OFFSET_OF | ( | ipsec_sa_t | , |
cacheline1 | , | ||
CLIB_CACHE_LINE_BYTES | |||
) |
STATIC_ASSERT_OFFSET_OF | ( | ipsec_sa_t | , |
cacheline2 | , | ||
2 * | CLIB_CACHE_LINE_BYTES | ||
) |
uword unformat_ipsec_crypto_alg | ( | unformat_input_t * | input, |
va_list * | args | ||
) |
uword unformat_ipsec_integ_alg | ( | unformat_input_t * | input, |
va_list * | args | ||
) |
uword unformat_ipsec_key | ( | unformat_input_t * | input, |
va_list * | args | ||
) |
Definition at line 243 of file ipsec_format.c.
foreach_ipsec_sa_flags vlib_combined_counter_main_t ipsec_sa_counters |
SA packet & bytes counters.
Definition at line 27 of file ipsec_sa.c.
ipsec_sa_t* ipsec_sa_pool |
Pool of IPSec SAs.
Definition at line 32 of file ipsec_sa.c.