Skip to content

Commit 9c6b6e7

Browse files
[nrf noup] include: net: add TLS_DTLS_FRAG_EXT to NCS extensions
nrf-squash! [nrf noup] include: net: add NCS extensions The TLS_DTLS_FRAG_EXT socket option is used to enable and disable the DTLS fragmentation extension. Signed-off-by: Kacper Radoszewski <[email protected]>
1 parent 71ebd2b commit 9c6b6e7

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

include/zephyr/net/socket_ncs.h

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,27 @@ extern "C" {
6969
#define TLS_DTLS_HANDSHAKE_STATUS_FULL 0
7070
#define TLS_DTLS_HANDSHAKE_STATUS_CACHED 1
7171

72+
/** Socket option to enable the DTLS fragmentation extension.
73+
* Accepted values for the option are: @ref DTLS_FRAG_EXT_DISABLED,
74+
* @ref DTLS_FRAG_EXT_512_ENABLED, @ref DTLS_FRAG_EXT_1024_ENABLED.
75+
*/
76+
#define TLS_DTLS_FRAG_EXT (NET_SOCKET_NCS_BASE + 22)
77+
78+
/** Disabled - The DTLS fragmentation extension is not included in the Client Hello. */
79+
#define DTLS_FRAG_EXT_DISABLED 0
80+
/** Enabled - The DTLS fragmentation extension is included in the Client Hello with the fragment
81+
* size of 512 bytes.
82+
*
83+
* @note The user data size in send requests also becomes limited to a maximum of 512 bytes.
84+
*/
85+
#define DTLS_FRAG_EXT_512_ENABLED 1
86+
/** Enabled - The DTLS fragmentation extension is included in the Client Hello with the fragment
87+
* size of 1024 bytes.
88+
*
89+
* @note The user data size in send requests also becomes limited to a maximum of 1024 bytes.
90+
*/
91+
#define DTLS_FRAG_EXT_1024_ENABLED 2
92+
7293
/* NCS specific socket options */
7394

7495
/** sockopt: enable sending data as part of exceptional events */

0 commit comments

Comments
 (0)