@@ -601,6 +601,15 @@ extern "C" {
601601#define NRF_SEC_TAG_TLS_DECRYPT_19 (NRF_SEC_TAG_TLS_DECRYPT_BASE + 19)
602602/** @} */
603603
604+ /**
605+ * @defgroup nrf_so_sec_tag_tls_invalid Invalid security tag
606+ * @brief Designated value that represents an invalid @sa nrf_sec_tag_t.
607+ * @ingroup nrf_socket_tls
608+ * @{
609+ */
610+ #define NRF_SEC_TAG_TLS_INVALID 0xFFFFFFFF
611+ /** @} */
612+
604613/**
605614 * @addtogroup nrf_socket_api
606615 * @{
@@ -773,7 +782,7 @@ struct nrf_ifaddrs {
773782/** @brief
774783 * Security tags used on the TLS socket.
775784 *
776- * More than one security tags may be used on a socket.
785+ * More than one security tag may be used on a socket.
777786 * If more than one tag is used on the socket, pass an array of security tags.
778787 *
779788 * A maximum of @ref NRF_SOCKET_TLS_MAX_SEC_TAG_LIST_SIZE tags can be set per socket.
@@ -1147,6 +1156,34 @@ void nrf_freeifaddrs(struct nrf_ifaddrs *ifa);
11471156 */
11481157int nrf_setdnsaddr (int family , const void * in_addr , nrf_socklen_t in_size );
11491158
1159+ /**
1160+ * @brief Enable or disable data traffic through the socket interface.
1161+ *
1162+ * @details
1163+ * This function can be used to disable all data traffic through the socket interface.
1164+ *
1165+ * When enabled is set to false, all sockets are closed and no new sockets can be opened.
1166+ * DNS operations are also disabled. The affected functions indicate an error and set @c errno
1167+ * to NRF_EACCES when data is disabled.
1168+ *
1169+ * @param enabled Whether to enable or disable data.
1170+ *
1171+ * @retval 0 on success.
1172+ * @retval -1 on error, and set @c errno to indicate the reason.
1173+ */
1174+ int nrf_socket_data_enabled_set (bool enabled );
1175+
1176+ /**
1177+ * @brief Get the state of data traffic through the socket interface.
1178+ *
1179+ * @details
1180+ * This function can be used to get the state of data traffic through the socket interface.
1181+ *
1182+ * @retval true if data is enabled.
1183+ * @retval false if data is disabled.
1184+ */
1185+ bool nrf_socket_data_enabled_get (void );
1186+
11501187/** @} */
11511188
11521189#ifdef __cplusplus
0 commit comments