FD.io VPP  v19.08.3-2-gbabecb413
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
 
struct  esp_decrypt_packet_data_t
 

Macros

#define foreach_esp_decrypt_next
 
#define foreach_esp_decrypt_error
 
#define ESP_ENCRYPT_PD_F_FD_TRANSPORT   (1 << 2)
 

Enumerations

enum  esp_decrypt_next_t { ESP_DECRYPT_N_NEXT, ESP_DECRYPT_N_NEXT }
 
enum  esp_decrypt_error_t { ESP_DECRYPT_N_ERROR, ESP_DECRYPT_N_ERROR }
 

Functions

static u8format_esp_decrypt_trace (u8 *s, va_list *args)
 
 STATIC_ASSERT_SIZEOF (esp_decrypt_packet_data_t, 3 *sizeof(u64))
 
static uword esp_decrypt_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame, int is_ip6, int is_tun)
 
VLIB_NODE_FN() esp4_decrypt_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
 
VLIB_NODE_FN() esp4_decrypt_tun_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
 
VLIB_NODE_FN() esp6_decrypt_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *from_frame)
 
VLIB_NODE_FN() esp6_decrypt_tun_node (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 esp4_decrypt_node
 (constructor) VLIB_REGISTER_NODE (esp4_decrypt_node) More...
 
vlib_node_registration_t esp6_decrypt_node
 (constructor) VLIB_REGISTER_NODE (esp6_decrypt_node) More...
 
vlib_node_registration_t esp4_decrypt_tun_node
 (constructor) VLIB_REGISTER_NODE (esp4_decrypt_tun_node) More...
 
vlib_node_registration_t esp6_decrypt_tun_node
 (constructor) VLIB_REGISTER_NODE (esp6_decrypt_tun_node) More...
 

Macro Definition Documentation

◆ ESP_ENCRYPT_PD_F_FD_TRANSPORT

#define ESP_ENCRYPT_PD_F_FD_TRANSPORT   (1 << 2)

Definition at line 114 of file esp_decrypt.c.

◆ foreach_esp_decrypt_error

#define foreach_esp_decrypt_error
Value:
_(RX_PKTS, "ESP pkts received") \
_(DECRYPTION_FAILED, "ESP decryption failed") \
_(INTEG_ERROR, "Integrity check failed") \
_(CRYPTO_ENGINE_ERROR, "crypto engine error (packet dropped)") \
_(REPLAY, "SA replayed packet") \
_(RUNT, "undersized packet") \
_(CHAINED_BUFFER, "chained buffers (packet dropped)") \
_(OVERSIZED_HEADER, "buffer with oversized header (dropped)") \
_(NO_TAIL_SPACE, "no enough buffer tail space (dropped)")

Definition at line 41 of file esp_decrypt.c.

◆ foreach_esp_decrypt_next

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

Definition at line 27 of file esp_decrypt.c.

Enumeration Type Documentation

◆ esp_decrypt_error_t

Enumerator
ESP_DECRYPT_N_ERROR 
ESP_DECRYPT_N_ERROR 

Definition at line 53 of file esp_decrypt.c.

◆ esp_decrypt_next_t

Enumerator
ESP_DECRYPT_N_NEXT 
ESP_DECRYPT_N_NEXT 

Definition at line 33 of file esp_decrypt.c.

Function Documentation

◆ esp4_decrypt_node()

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

Definition at line 550 of file esp_decrypt.c.

+ Here is the call graph for this function:

◆ esp4_decrypt_tun_node()

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

Definition at line 557 of file esp_decrypt.c.

+ Here is the call graph for this function:

◆ esp6_decrypt_node()

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

Definition at line 564 of file esp_decrypt.c.

+ Here is the call graph for this function:

◆ esp6_decrypt_tun_node()

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

Definition at line 571 of file esp_decrypt.c.

+ Here is the call graph for this function:

◆ esp_decrypt_inline()

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

Definition at line 117 of file esp_decrypt.c.

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

◆ format_esp_decrypt_trace()

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

Definition at line 78 of file esp_decrypt.c.

+ Here is the call graph for this function:

◆ STATIC_ASSERT_SIZEOF()

STATIC_ASSERT_SIZEOF ( esp_decrypt_packet_data_t  ,
3 *  sizeofu64 
)

Variable Documentation

◆ esp4_decrypt_node

vlib_node_registration_t esp4_decrypt_node
Initial value:
= {
.name = "esp4-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)
},
}
static u8 * format_esp_decrypt_trace(u8 *s, va_list *args)
Definition: esp_decrypt.c:78
static char * esp_decrypt_error_strings[]
Definition: esp_decrypt.c:61
unsigned int u32
Definition: types.h:88
vl_api_fib_path_type_t type
Definition: fib_types.api:123
#define ARRAY_LEN(x)
Definition: clib.h:63
#define foreach_esp_decrypt_next
Definition: esp_decrypt.c:27

(constructor) VLIB_REGISTER_NODE (esp4_decrypt_node)

Definition at line 579 of file esp_decrypt.c.

◆ esp4_decrypt_tun_node

vlib_node_registration_t esp4_decrypt_tun_node
Initial value:
= {
.name = "esp4-decrypt-tun",
.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)
},
}
static u8 * format_esp_decrypt_trace(u8 *s, va_list *args)
Definition: esp_decrypt.c:78
static char * esp_decrypt_error_strings[]
Definition: esp_decrypt.c:61
unsigned int u32
Definition: types.h:88
vl_api_fib_path_type_t type
Definition: fib_types.api:123
#define ARRAY_LEN(x)
Definition: clib.h:63
#define foreach_esp_decrypt_next
Definition: esp_decrypt.c:27

(constructor) VLIB_REGISTER_NODE (esp4_decrypt_tun_node)

Definition at line 613 of file esp_decrypt.c.

◆ esp6_decrypt_node

vlib_node_registration_t esp6_decrypt_node
Initial value:
= {
.name = "esp6-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)
},
}
static u8 * format_esp_decrypt_trace(u8 *s, va_list *args)
Definition: esp_decrypt.c:78
static char * esp_decrypt_error_strings[]
Definition: esp_decrypt.c:61
unsigned int u32
Definition: types.h:88
vl_api_fib_path_type_t type
Definition: fib_types.api:123
#define ARRAY_LEN(x)
Definition: clib.h:63
#define foreach_esp_decrypt_next
Definition: esp_decrypt.c:27

(constructor) VLIB_REGISTER_NODE (esp6_decrypt_node)

Definition at line 596 of file esp_decrypt.c.

◆ esp6_decrypt_tun_node

vlib_node_registration_t esp6_decrypt_tun_node
Initial value:
= {
.name = "esp6-decrypt-tun",
.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)
},
}
static u8 * format_esp_decrypt_trace(u8 *s, va_list *args)
Definition: esp_decrypt.c:78
static char * esp_decrypt_error_strings[]
Definition: esp_decrypt.c:61
unsigned int u32
Definition: types.h:88
vl_api_fib_path_type_t type
Definition: fib_types.api:123
#define ARRAY_LEN(x)
Definition: clib.h:63
#define foreach_esp_decrypt_next
Definition: esp_decrypt.c:27

(constructor) VLIB_REGISTER_NODE (esp6_decrypt_tun_node)

Definition at line 630 of file esp_decrypt.c.

◆ esp_decrypt_error_strings

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

Definition at line 61 of file esp_decrypt.c.