* RFC 4309, 5 AAD Construction * spi and sqn should already be converted into network byte order. * Make sure that not used bytes are zeroed. */
| 189 | * Make sure that not used bytes are zeroed. |
| 190 | */ |
| 191 | static inline void |
| 192 | aead_ccm_aad_fill(struct aead_ccm_aad *aad, rte_be32_t spi, rte_be64_t sqn, |
| 193 | int esn) |
| 194 | { |
| 195 | aad->spi = spi; |
| 196 | if (esn) |
| 197 | aad->sqn.u64 = sqn; |
| 198 | else { |
| 199 | aad->sqn.u32[0] = sqn_low32(sqn); |
| 200 | aad->sqn.u32[1] = 0; |
| 201 | } |
| 202 | aad->align0 = 0; |
| 203 | } |
| 204 | |
| 205 | static inline void |
| 206 | gen_iv(uint64_t iv[IPSEC_MAX_IV_QWORD], rte_be64_t sqn) |
no test coverage detected