DPDK  24.11.0-rc1
rte_dtls.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(C) 2023 Marvell.
3  */
4 
5 #ifndef RTE_DTLS_H
6 #define RTE_DTLS_H
7 
14 #include <rte_byteorder.h>
15 
16 #define RTE_DTLS_TYPE_INVALID 0
17 #define RTE_DTLS_TYPE_CHANGE_CIPHER_SPEC 20
18 #define RTE_DTLS_TYPE_ALERT 21
19 #define RTE_DTLS_TYPE_HANDSHAKE 22
20 #define RTE_DTLS_TYPE_APPDATA 23
21 #define RTE_DTLS_TYPE_HEARTBEAT 24
22 #define RTE_DTLS_TYPE_CIPHERTEXT_WITH_CID 25
23 #define RTE_DTLS_TYPE_ACK 26
24 #define RTE_DTLS_TYPE_MAX 255
26 #define RTE_DTLS_VERSION_1_2 0xFEFD
27 #define RTE_DTLS_VERSION_1_3 0xFEFC
32 __extension__
33 struct rte_dtls_hdr {
35  uint8_t type;
38 #if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN
39 
40  uint64_t sequence_number : 48;
42  uint64_t epoch : 16;
43 #elif RTE_BYTE_ORDER == RTE_BIG_ENDIAN
44 
45  uint64_t epoch : 16;
47  uint64_t sequence_number : 48;
48 #endif
49 
51 } __rte_packed;
52 
53 #endif /* RTE_DTLS_H */
rte_be16_t length
Definition: rte_dtls.h:50
uint8_t type
Definition: rte_dtls.h:35
uint64_t sequence_number
Definition: rte_dtls.h:40
uint64_t epoch
Definition: rte_dtls.h:42
rte_be16_t version
Definition: rte_dtls.h:37
#define __rte_packed
Definition: rte_common.h:108
uint16_t rte_be16_t