FD.io VPP  v19.01.3-6-g70449b9b9
Vector Packet Processing
esp_encrypt.c File Reference
+ Include dependency graph for esp_encrypt.c:

Go to the source code of this file.

Data Structures

struct  esp_encrypt_trace_t
 

Macros

#define foreach_esp_encrypt_next
 
#define foreach_esp_encrypt_error
 

Enumerations

enum  esp_encrypt_next_t { ESP_ENCRYPT_N_NEXT, ESP_ENCRYPT_N_NEXT }
 
enum  esp_encrypt_error_t { ESP_ENCRYPT_N_ERROR, ESP_ENCRYPT_N_ERROR }
 

Functions

static u8format_esp_encrypt_trace (u8 *s, va_list *args)
 
static void esp_encrypt_cbc (vlib_main_t *vm, ipsec_crypto_alg_t alg, u8 *in, u8 *out, size_t in_len, u8 *key, u8 *iv)
 
static uword esp_encrypt_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame, int is_ip6)
 
VLIB_NODE_FN() esp4_encrypt_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
 
VLIB_NODE_FN() esp6_encrypt_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
 

Variables

ipsec_proto_main_t ipsec_proto_main
 
static char * esp_encrypt_error_strings []
 
vlib_node_registration_t esp4_encrypt_node
 (constructor) VLIB_REGISTER_NODE (esp4_encrypt_node) More...
 
vlib_node_registration_t esp6_encrypt_node
 (constructor) VLIB_REGISTER_NODE (esp6_encrypt_node) More...
 

Macro Definition Documentation

◆ foreach_esp_encrypt_error

#define foreach_esp_encrypt_error
Value:
_(RX_PKTS, "ESP pkts received") \
_(NO_BUFFER, "No buffer (packet dropped)") \
_(DECRYPTION_FAILED, "ESP encryption failed") \
_(SEQ_CYCLED, "sequence number cycled")

Definition at line 42 of file esp_encrypt.c.

◆ foreach_esp_encrypt_next

#define foreach_esp_encrypt_next
Value:
_(DROP, "error-drop") \
_(IP4_LOOKUP, "ip4-lookup") \
_(IP6_LOOKUP, "ip6-lookup") \
_(INTERFACE_OUTPUT, "interface-output")
DROP
Definition: error.def:41

Definition at line 28 of file esp_encrypt.c.

Enumeration Type Documentation

◆ esp_encrypt_error_t

Enumerator
ESP_ENCRYPT_N_ERROR 
ESP_ENCRYPT_N_ERROR 

Definition at line 49 of file esp_encrypt.c.

◆ esp_encrypt_next_t

Enumerator
ESP_ENCRYPT_N_NEXT 
ESP_ENCRYPT_N_NEXT 

Definition at line 35 of file esp_encrypt.c.

Function Documentation

◆ esp4_encrypt_node()

VLIB_NODE_FN() esp4_encrypt_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame 
)

Definition at line 440 of file esp_encrypt.c.

+ Here is the call graph for this function:

◆ esp6_encrypt_node()

VLIB_NODE_FN() esp6_encrypt_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame 
)

Definition at line 466 of file esp_encrypt.c.

+ Here is the call graph for this function:

◆ esp_encrypt_cbc()

static void esp_encrypt_cbc ( vlib_main_t vm,
ipsec_crypto_alg_t  alg,
u8 in,
u8 out,
size_t  in_len,
u8 key,
u8 iv 
)
inlinestatic

Definition at line 89 of file esp_encrypt.c.

◆ esp_encrypt_inline()

static uword esp_encrypt_inline ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t from_frame,
int  is_ip6 
)
inlinestatic

Definition at line 122 of file esp_encrypt.c.

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

◆ format_esp_encrypt_trace()

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

Definition at line 74 of file esp_encrypt.c.

+ Here is the call graph for this function:

Variable Documentation

◆ esp4_encrypt_node

vlib_node_registration_t esp4_encrypt_node
Initial value:
= {
.name = "esp4-encrypt",
.vector_size = sizeof (u32),
.format_trace = format_esp_encrypt_trace,
.error_strings = esp_encrypt_error_strings,
.n_next_nodes = ESP_ENCRYPT_N_NEXT,
.next_nodes = {
#define _(s,n)
},
}
static u8 * format_esp_encrypt_trace(u8 *s, va_list *args)
Definition: esp_encrypt.c:74
#define foreach_esp_encrypt_next
Definition: esp_encrypt.c:28
unsigned int u32
Definition: types.h:88
static char * esp_encrypt_error_strings[]
Definition: esp_encrypt.c:57
#define ARRAY_LEN(x)
Definition: clib.h:62

(constructor) VLIB_REGISTER_NODE (esp4_encrypt_node)

Definition at line 448 of file esp_encrypt.c.

◆ esp6_encrypt_node

vlib_node_registration_t esp6_encrypt_node
Initial value:
= {
.name = "esp6-encrypt",
.vector_size = sizeof (u32),
.format_trace = format_esp_encrypt_trace,
.error_strings = esp_encrypt_error_strings,
.n_next_nodes = ESP_ENCRYPT_N_NEXT,
.next_nodes = {
#define _(s,n)
},
}
static u8 * format_esp_encrypt_trace(u8 *s, va_list *args)
Definition: esp_encrypt.c:74
#define foreach_esp_encrypt_next
Definition: esp_encrypt.c:28
unsigned int u32
Definition: types.h:88
static char * esp_encrypt_error_strings[]
Definition: esp_encrypt.c:57
#define ARRAY_LEN(x)
Definition: clib.h:62

(constructor) VLIB_REGISTER_NODE (esp6_encrypt_node)

Definition at line 474 of file esp_encrypt.c.

◆ esp_encrypt_error_strings

char* esp_encrypt_error_strings[]
static
Initial value:
= {
#define _(sym,string)
}
#define foreach_esp_encrypt_error
Definition: esp_encrypt.c:42

Definition at line 57 of file esp_encrypt.c.

◆ ipsec_proto_main

ipsec_proto_main_t ipsec_proto_main

Definition at line 26 of file esp_encrypt.c.