X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fipsec%2Fesp.h;h=51386e688441159f2a71e9fd8895709fcc7a611a;hb=490b92738;hp=d24b5ea41025002a6537b4aff47e4fa72598de7b;hpb=4a58e49cfe03150034a65e147a2ffe8d24391b86;p=vpp.git diff --git a/src/vnet/ipsec/esp.h b/src/vnet/ipsec/esp.h index d24b5ea4102..51386e68844 100644 --- a/src/vnet/ipsec/esp.h +++ b/src/vnet/ipsec/esp.h @@ -58,6 +58,18 @@ typedef CLIB_PACKED (struct { }) ip6_and_esp_header_t; /* *INDENT-ON* */ +/** + * AES counter mode nonce + */ +typedef struct +{ + u32 salt; + u64 iv; + u32 ctr; /* counter: 1 in big-endian for ctr, unused for gcm */ +} __clib_packed esp_ctr_nonce_t; + +STATIC_ASSERT_SIZEOF (esp_ctr_nonce_t, 16); + /** * AES GCM Additional Authentication data */ @@ -196,6 +208,7 @@ typedef struct } esp_decrypt_packet_data_t; STATIC_ASSERT_SIZEOF (esp_decrypt_packet_data_t, 3 * sizeof (u64)); +STATIC_ASSERT_OFFSET_OF (esp_decrypt_packet_data_t, seq, sizeof (u64)); /* we are forced to store the decrypt post data into 2 separate places - vlib_opaque and opaque2. */