@@ -269,6 +269,14 @@ extern "C" {
269269 * @note This socket option is only supported with Modem firmware 2.0.0 and newer.
270270 */
271271#define NRF_SO_SEC_HANDSHAKE_STATUS 19
272+
273+ /** @brief
274+ * Socket option to enable/disable the DTLS fragmentation extension.
275+ * See @ref nrf_so_sec_dtls_frag_ext_options for allowed values.
276+ *
277+ * @note This socket option is only supported with Modem firmware v2.0.4 and newer.
278+ */
279+ #define NRF_SO_SEC_DTLS_FRAG_EXT 20
272280/** @} */
273281
274282/**
@@ -355,7 +363,12 @@ extern "C" {
355363struct nrf_modem_sendcb_params {
356364 /** Socket handle */
357365 int fd ;
358- /** Status. Can be 0 on successful send or NRF_EAGAIN on timeout. */
366+ /** Status. Can be one of the following values:
367+ * - 0 Data sent successfully.
368+ * - [NRF_EAGAIN] The socket's @ref NRF_SO_SNDTIMEO timeout was exceeded.
369+ * - [NRF_EBADF] The socket argument is not a valid file descriptor.
370+ * - [NRF_ECONNRESET] A connection was forcibly closed by a peer.
371+ */
359372 int status ;
360373 /** Number of bytes that was sent. */
361374 size_t bytes_sent ;
@@ -560,17 +573,17 @@ struct nrf_modem_sendcb {
560573 */
561574
562575/**
563- * Disabled - The connection ID extension is not included in the client hello , so the
576+ * Disabled - The connection ID extension is not included in the Client Hello , so the
564577 * DTLS connection ID is not used.
565578 */
566579#define NRF_SO_SEC_DTLS_CID_DISABLED 0
567580/**
568- * Supported - The connection ID extension with a zero-length CID is included in the client hello ,
581+ * Supported - The connection ID extension with a zero-length CID is included in the Client Hello ,
569582 * so the modem will accept a DTLS connection ID from the server.
570583 */
571584#define NRF_SO_SEC_DTLS_CID_SUPPORTED 1
572585/**
573- * Enabled - The connection ID extension with a valid CID is included in the client hello , so the
586+ * Enabled - The connection ID extension with a valid CID is included in the Client Hello , so the
574587 * modem will request DTLS connection ID support.
575588 */
576589#define NRF_SO_SEC_DTLS_CID_ENABLED 2
@@ -604,7 +617,7 @@ struct nrf_modem_sendcb {
604617
605618/**
606619 * @defgroup nrf_so_sec_handshake_statuses TLS/DTLS Handshake statuses
607- * @brief Allowed values for DTLS connection ID status socket option.
620+ * @brief Allowed values for TLS/ DTLS Handshake status socket option.
608621 * @ingroup nrf_socket_tls
609622 * @{
610623 */
@@ -614,6 +627,32 @@ struct nrf_modem_sendcb {
614627#define NRF_SO_SEC_HANDSHAKE_STATUS_CACHED 1
615628/** @} */
616629
630+ /**
631+ * @defgroup nrf_so_sec_dtls_frag_ext_options DTLS Fragmentation extension options.
632+ * @brief Allowed values for DTLS Fragmentation extension socket option.
633+ * @ingroup nrf_socket_tls
634+ * @{
635+ */
636+ /**
637+ * Disabled - The DTLS fragmentation extension is not included in the Client Hello.
638+ */
639+ #define NRF_SO_SEC_DTLS_FRAG_EXT_DISABLED 0
640+ /**
641+ * Enabled - The DTLS fragmentation extension is included in the Client Hello with the fragment
642+ * size of 512 bytes.
643+ *
644+ * @note The user data size in send requests also becomes limited to a maximum of 512 bytes.
645+ */
646+ #define NRF_SO_SEC_DTLS_FRAG_EXT_512_ENABLED 1
647+ /**
648+ * Enabled - The DTLS fragmentation extension is included in the Client Hello with the fragment
649+ * size of 1024 bytes.
650+ *
651+ * @note The user data size in send requests also becomes limited to a maximum of 1024 bytes.
652+ */
653+ #define NRF_SO_SEC_DTLS_FRAG_EXT_1024_ENABLED 2
654+ /** @} */
655+
617656/**
618657 * @defgroup nrf_so_sec_tag_tls_decrypt Security tags for decrypting TLS traffic
619658 * @brief Reserved security tags used for decrypting TLS traffic using Nordic tools.
0 commit comments