FD.io VPP  v21.06-3-gbb25fbf28
Vector Packet Processing
esp.h File Reference
+ Include dependency graph for esp.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  esp_header_t
 
struct  esp_footer_t
 
struct  esp_aead_t_
 AES GCM Additional Authentication data. More...
 
struct  esp_decrypt_packet_data_t
 The post data structure to for esp_encrypt/decrypt_inline to write to vib_buffer_t opaque unused field, and for post nodes to pick up after dequeue. More...
 
struct  esp_decrypt_packet_data2_t
 
union  esp_post_data_t
 
struct  esp_async_post_next_t
 

Macros

#define ESP_SEQ_MAX   (4294967295UL)
 
#define ESP_MAX_BLOCK_SIZE   (16)
 
#define ESP_MAX_IV_SIZE   (16)
 
#define ESP_MAX_ICV_SIZE   (32)
 
#define esp_post_data(b)
 
#define esp_post_data2(b)
 

Typedefs

typedef struct esp_aead_t_ esp_aead_t
 AES GCM Additional Authentication data. More...
 

Functions

typedef CLIB_PACKED (struct { ip4_header_t ip4;esp_header_t esp;}) ip4_and_esp_header_t
 
typedef CLIB_PACKED (struct { ip4_header_t ip4;udp_header_t udp;esp_header_t esp;}) ip4_and_udp_and_esp_header_t
 
typedef CLIB_PACKED (struct { ip6_header_t ip6;esp_header_t esp;}) ip6_and_esp_header_t
 
 STATIC_ASSERT_SIZEOF (esp_ctr_nonce_t, 16)
 
u8format_esp_header (u8 *s, va_list *args)
 
static int esp_seq_advance (ipsec_sa_t *sa)
 
static u16 esp_aad_fill (u8 *data, const esp_header_t *esp, const ipsec_sa_t *sa)
 
static void esp_set_next_index (vlib_buffer_t *b, vlib_node_runtime_t *node, u32 err, u16 index, u16 *nexts, u16 drop_next)
 
static u32 esp_async_recycle_failed_submit (vlib_main_t *vm, vnet_crypto_async_frame_t *f, vlib_node_runtime_t *node, u32 err, u16 index, u32 *from, u16 *nexts, u16 drop_next_index)
 
 STATIC_ASSERT_SIZEOF (esp_decrypt_packet_data_t, 3 *sizeof(u64))
 
 STATIC_ASSERT_OFFSET_OF (esp_decrypt_packet_data_t, seq, sizeof(u64))
 
 STATIC_ASSERT (sizeof(esp_post_data_t)<=STRUCT_SIZE_OF(vnet_buffer_opaque_t, unused), "Custom meta-data too large for vnet_buffer_opaque_t")
 
 STATIC_ASSERT (sizeof(esp_decrypt_packet_data2_t)<=STRUCT_SIZE_OF(vnet_buffer_opaque2_t, unused), "Custom meta-data too large for vnet_buffer_opaque2_t")
 

Variables

esp_async_post_next_t esp_encrypt_async_next
 
esp_async_post_next_t esp_decrypt_async_next
 

Macro Definition Documentation

◆ ESP_MAX_BLOCK_SIZE

#define ESP_MAX_BLOCK_SIZE   (16)

Definition at line 88 of file esp.h.

◆ ESP_MAX_ICV_SIZE

#define ESP_MAX_ICV_SIZE   (32)

Definition at line 90 of file esp.h.

◆ ESP_MAX_IV_SIZE

#define ESP_MAX_IV_SIZE   (16)

Definition at line 89 of file esp.h.

◆ esp_post_data

#define esp_post_data (   b)
Value:
((esp_post_data_t *)((u8 *)((b)->opaque) \

Definition at line 227 of file esp.h.

◆ esp_post_data2

#define esp_post_data2 (   b)
Value:

Definition at line 235 of file esp.h.

◆ ESP_SEQ_MAX

#define ESP_SEQ_MAX   (4294967295UL)

Definition at line 87 of file esp.h.

Typedef Documentation

◆ esp_aead_t

typedef struct esp_aead_t_ esp_aead_t

AES GCM Additional Authentication data.

Function Documentation

◆ CLIB_PACKED() [1/3]

typedef CLIB_PACKED ( struct { ip4_header_t ip4;esp_header_t esp;}  )

◆ CLIB_PACKED() [2/3]

typedef CLIB_PACKED ( struct { ip4_header_t ip4;udp_header_t udp;esp_header_t esp;}  )

◆ CLIB_PACKED() [3/3]

typedef CLIB_PACKED ( struct { ip6_header_t ip6;esp_header_t esp;}  )

◆ esp_aad_fill()

static u16 esp_aad_fill ( u8 data,
const esp_header_t esp,
const ipsec_sa_t sa 
)
inlinestatic

Definition at line 121 of file esp.h.

+ Here is the caller graph for this function:

◆ esp_async_recycle_failed_submit()

static u32 esp_async_recycle_failed_submit ( vlib_main_t vm,
vnet_crypto_async_frame_t f,
vlib_node_runtime_t node,
u32  err,
u16  index,
u32 from,
u16 nexts,
u16  drop_next_index 
)
inlinestatic

Definition at line 158 of file esp.h.

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

◆ esp_seq_advance()

static int esp_seq_advance ( ipsec_sa_t sa)
inlinestatic

Definition at line 96 of file esp.h.

+ Here is the caller graph for this function:

◆ esp_set_next_index()

static void esp_set_next_index ( vlib_buffer_t b,
vlib_node_runtime_t node,
u32  err,
u16  index,
u16 nexts,
u16  drop_next 
)
inlinestatic

Definition at line 149 of file esp.h.

+ Here is the caller graph for this function:

◆ format_esp_header()

u8* format_esp_header ( u8 s,
va_list *  args 
)

Definition at line 23 of file esp_format.c.

+ Here is the caller graph for this function:

◆ STATIC_ASSERT() [1/2]

STATIC_ASSERT ( sizeof(esp_decrypt_packet_data2_t)<=STRUCT_SIZE_OF(vnet_buffer_opaque2_t, unused)  ,
"Custom meta-data too large for vnet_buffer_opaque2_t  
)

◆ STATIC_ASSERT() [2/2]

STATIC_ASSERT ( sizeof(esp_post_data_t)<=STRUCT_SIZE_OF(vnet_buffer_opaque_t, unused)  ,
"Custom meta-data too large for vnet_buffer_opaque_t  
)

◆ STATIC_ASSERT_OFFSET_OF()

STATIC_ASSERT_OFFSET_OF ( esp_decrypt_packet_data_t  ,
seq  ,
sizeof(u64  
)

◆ STATIC_ASSERT_SIZEOF() [1/2]

STATIC_ASSERT_SIZEOF ( esp_ctr_nonce_t  ,
16   
)

◆ STATIC_ASSERT_SIZEOF() [2/2]

STATIC_ASSERT_SIZEOF ( esp_decrypt_packet_data_t  ,
3 *  sizeofu64 
)

Variable Documentation

◆ esp_decrypt_async_next

esp_async_post_next_t esp_decrypt_async_next

Definition at line 30 of file ipsec.c.

◆ esp_encrypt_async_next

esp_async_post_next_t esp_encrypt_async_next

Definition at line 29 of file ipsec.c.

vnet_buffer_opaque2_t
Definition: buffer.h:440
STRUCT_OFFSET_OF
#define STRUCT_OFFSET_OF(t, f)
Definition: clib.h:73
esp_decrypt_packet_data2_t
Definition: esp.h:210
vnet_buffer_opaque_t
Definition: buffer.h:149
b
vlib_buffer_t ** b
Definition: nat44_ei_out2in.c:717
u8
unsigned char u8
Definition: types.h:56
esp_post_data_t
Definition: esp.h:217