43 }) ip4_and_esp_header_t;
51 }) ip4_and_udp_and_esp_header_t;
58 }) ip6_and_esp_header_t;
75 #define ESP_SEQ_MAX (4294967295UL) 76 #define ESP_MAX_BLOCK_SIZE (16) 77 #define ESP_MAX_IV_SIZE (16) 78 #define ESP_MAX_ICV_SIZE (32) 113 aad = (esp_aead_t *) data;
116 if (ipsec_sa_is_set_USE_ESN (sa))
138 u16 * drop_index,
u16 drop_next,
u16 * next)
142 from[*drop_index] = bi;
143 nexts[*drop_index] = drop_next;
154 u16 * n_dropped,
u16 drop_next_index,
217 "Custom meta-data too large for vnet_buffer_opaque_t");
219 #define esp_post_data(b) \ 220 ((esp_post_data_t *)((u8 *)((b)->opaque) \ 221 + STRUCT_OFFSET_OF (vnet_buffer_opaque_t, unused))) 225 "Custom meta-data too large for vnet_buffer_opaque2_t");
227 #define esp_post_data2(b) \ 228 ((esp_decrypt_packet_data2_t *)((u8 *)((b)->opaque2) \ 229 + STRUCT_OFFSET_OF (vnet_buffer_opaque2_t, unused)))
The post data structure to for esp_encrypt/decrypt_inline to write to vib_buffer_t opaque unused fiel...
static_always_inline void vnet_crypto_async_reset_frame(vnet_crypto_async_frame_t *f)
static u16 esp_aad_fill(u8 *data, const esp_header_t *esp, const ipsec_sa_t *sa)
struct esp_aead_t_ esp_aead_t
AES GCM Additional Authentication data.
AES GCM Additional Authentication data.
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 int esp_seq_advance(ipsec_sa_t *sa)
u32 data[3]
for GCM: when using ESN it's: SPI, seq-hi, seg-low else SPI, seq-low
vlib_error_t error
Error code for buffers to be enqueued to error handler.
static void esp_async_recycle_failed_submit(vnet_crypto_async_frame_t *f, vlib_buffer_t **b, u32 *from, u16 *nexts, u16 *n_dropped, u16 drop_next_index, vlib_error_t err)
esp_async_post_next_t esp_decrypt_async_next
typedef CLIB_PACKED(struct { ip4_header_t ip4;esp_header_t esp;}) ip4_and_esp_header_t
esp_async_post_next_t esp_encrypt_async_next
STATIC_ASSERT_SIZEOF(esp_decrypt_packet_data_t, 3 *sizeof(u64))
u32 buffer_indices[VNET_CRYPTO_FRAME_SIZE]
enum ipsec_sad_flags_t_ ipsec_sa_flags_t
u8 * format_esp_header(u8 *s, va_list *args)
VLIB buffer representation.
esp_decrypt_packet_data_t decrypt_data
#define STRUCT_SIZE_OF(t, f)
static void esp_set_next_index(int is_async, u32 *from, u16 *nexts, u32 bi, u16 *drop_index, u16 drop_next, u16 *next)