FD.io VPP  v16.06
Vector Packet Processing
esp_decrypt.c File Reference
+ Include dependency graph for esp_decrypt.c:

Go to the source code of this file.

Data Structures

struct  esp_decrypt_trace_t
 

Macros

#define ESP_WINDOW_SIZE   64
 
#define foreach_esp_decrypt_next
 
#define foreach_esp_decrypt_error
 

Enumerations

enum  esp_decrypt_next_t { ESP_DECRYPT_N_NEXT }
 
enum  esp_decrypt_error_t { ESP_DECRYPT_N_ERROR }
 

Functions

static u8format_esp_decrypt_trace (u8 *s, va_list *args)
 
always_inline void esp_decrypt_aes_cbc (ipsec_crypto_alg_t alg, u8 *in, u8 *out, size_t in_len, u8 *key, u8 *iv)
 
always_inline int esp_replay_check (ipsec_sa_t *sa, u32 seq)
 
always_inline int esp_replay_check_esn (ipsec_sa_t *sa, u32 seq)
 
always_inline void esp_replay_advance (ipsec_sa_t *sa, u32 seq)
 
always_inline void esp_replay_advance_esn (ipsec_sa_t *sa, u32 seq)
 
static uword esp_decrypt_node_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
 

Variables

static char * esp_decrypt_error_strings []
 
vlib_node_registration_t esp_decrypt_node
 (constructor) VLIB_REGISTER_NODE (esp_decrypt_node) More...
 

Macro Definition Documentation

#define ESP_WINDOW_SIZE   64

Definition at line 25 of file esp_decrypt.c.

#define foreach_esp_decrypt_error
Value:
_(RX_PKTS, "ESP pkts received") \
_(NO_BUFFER, "No buffer (packed dropped)") \
_(DECRYPTION_FAILED, "ESP decryption failed") \
_(INTEG_ERROR, "Integrity check failed") \
_(REPLAY, "SA replayed packet")

Definition at line 40 of file esp_decrypt.c.

#define foreach_esp_decrypt_next
Value:
_(DROP, "error-drop") \
_(IP4_INPUT, "ip4-input") \
_(IP6_INPUT, "ip6-input")
DROP
Definition: error.def:41

Definition at line 27 of file esp_decrypt.c.

Enumeration Type Documentation

Enumerator
ESP_DECRYPT_N_ERROR 

Definition at line 48 of file esp_decrypt.c.

Enumerator
ESP_DECRYPT_N_NEXT 

Definition at line 33 of file esp_decrypt.c.

Function Documentation

always_inline void esp_decrypt_aes_cbc ( ipsec_crypto_alg_t  alg,
u8 in,
u8 out,
size_t  in_len,
u8 key,
u8 iv 
)

Definition at line 80 of file esp_decrypt.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static uword esp_decrypt_node_fn ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame 
)
static

Definition at line 229 of file esp_decrypt.c.

+ Here is the call graph for this function:

always_inline void esp_replay_advance ( ipsec_sa_t sa,
u32  seq 
)

Definition at line 171 of file esp_decrypt.c.

+ Here is the caller graph for this function:

always_inline void esp_replay_advance_esn ( ipsec_sa_t sa,
u32  seq 
)

Definition at line 192 of file esp_decrypt.c.

+ Here is the caller graph for this function:

always_inline int esp_replay_check ( ipsec_sa_t sa,
u32  seq 
)

Definition at line 110 of file esp_decrypt.c.

+ Here is the caller graph for this function:

always_inline int esp_replay_check_esn ( ipsec_sa_t sa,
u32  seq 
)

Definition at line 128 of file esp_decrypt.c.

+ Here is the caller graph for this function:

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

Definition at line 67 of file esp_decrypt.c.

+ Here is the call graph for this function:

Variable Documentation

char* esp_decrypt_error_strings[]
static
Initial value:
= {
#define _(sym,string)
}
#define foreach_esp_decrypt_error
Definition: esp_decrypt.c:40

Definition at line 55 of file esp_decrypt.c.

vlib_node_registration_t esp_decrypt_node
Initial value:
= {
.function = esp_decrypt_node_fn,
.name = "esp-decrypt",
.vector_size = sizeof (u32),
.format_trace = format_esp_decrypt_trace,
.error_strings = esp_decrypt_error_strings,
.n_next_nodes = ESP_DECRYPT_N_NEXT,
.next_nodes = {
#define _(s,n)
},
}
bad routing header type(not 4)") sr_error (NO_MORE_SEGMENTS
static char * esp_decrypt_error_strings[]
Definition: esp_decrypt.c:55
static u8 * format_esp_decrypt_trace(u8 *s, va_list *args)
Definition: esp_decrypt.c:67
#define ARRAY_LEN(x)
Definition: clib.h:59
static uword esp_decrypt_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
Definition: esp_decrypt.c:229
#define foreach_esp_decrypt_next
Definition: esp_decrypt.c:27
unsigned int u32
Definition: types.h:88

(constructor) VLIB_REGISTER_NODE (esp_decrypt_node)

Definition at line 410 of file esp_decrypt.c.