MCPcopy Create free account
hub / github.com/F-Stack/f-stack / aead_ccm_aad_fill

Function aead_ccm_aad_fill

dpdk/lib/ipsec/crypto.h:191–203  ·  view source on GitHub ↗

* RFC 4309, 5 AAD Construction * spi and sqn should already be converted into network byte order. * Make sure that not used bytes are zeroed. */

Source from the content-addressed store, hash-verified

189 * Make sure that not used bytes are zeroed.
190 */
191static inline void
192aead_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
205static inline void
206gen_iv(uint64_t iv[IPSEC_MAX_IV_QWORD], rte_be64_t sqn)

Callers 2

inb_pkt_xprepareFunction · 0.85
outb_pkt_xprepareFunction · 0.85

Calls 1

sqn_low32Function · 0.85

Tested by

no test coverage detected