DPDK  24.07.0
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 #ifdef __cplusplus
17 extern "C" {
18 #endif
19 
20 #define RTE_DTLS_TYPE_INVALID 0
21 #define RTE_DTLS_TYPE_CHANGE_CIPHER_SPEC 20
22 #define RTE_DTLS_TYPE_ALERT 21
23 #define RTE_DTLS_TYPE_HANDSHAKE 22
24 #define RTE_DTLS_TYPE_APPDATA 23
25 #define RTE_DTLS_TYPE_HEARTBEAT 24
26 #define RTE_DTLS_TYPE_CIPHERTEXT_WITH_CID 25
27 #define RTE_DTLS_TYPE_ACK 26
28 #define RTE_DTLS_TYPE_MAX 255
30 #define RTE_DTLS_VERSION_1_2 0xFEFD
31 #define RTE_DTLS_VERSION_1_3 0xFEFC
36 __extension__
37 struct rte_dtls_hdr {
39  uint8_t type;
42 #if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN
43 
44  uint64_t sequence_number : 48;
46  uint64_t epoch : 16;
47 #elif RTE_BYTE_ORDER == RTE_BIG_ENDIAN
48 
49  uint64_t epoch : 16;
51  uint64_t sequence_number : 48;
52 #endif
53 
55 } __rte_packed;
56 
57 #ifdef __cplusplus
58 }
59 #endif
60 
61 #endif /* RTE_DTLS_H */
rte_be16_t length
Definition: rte_dtls.h:54
uint8_t type
Definition: rte_dtls.h:39
uint64_t sequence_number
Definition: rte_dtls.h:44
uint64_t epoch
Definition: rte_dtls.h:46
rte_be16_t version
Definition: rte_dtls.h:41
#define __rte_packed
Definition: rte_common.h:108
uint16_t rte_be16_t