Skip to content

Commit

Permalink
nrf_modem: doc: sockets: add info on CID and CONN_SAVE socket options
Browse files Browse the repository at this point in the history
Expand the CID, CID_STATUS and CONN_SAVE socket option documentation.

Signed-off-by: Eivind Jølsgard <[email protected]>
  • Loading branch information
eivindj-nordic committed Jul 12, 2023
1 parent 131d803 commit c27c17c
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions nrf_modem/doc/sockets.rst
Original file line number Diff line number Diff line change
Expand Up @@ -275,17 +275,19 @@ NRF_SO_SEC_HANDSHAKE_STATUS

NRF_SO_SEC_DTLS_CID
Set DTLS Connection ID setting.
This socket option decides whether the modem will request or accept a DTLS connection ID when performing the server handshake.
The socket option is supported from modem firmware v1.3.x, where x is greater than or equal to 5, and v2.x.x.
The following values are accepted:

* :c:macro:`NRF_SO_SEC_DTLS_CID_DISABLED` - The DTLS connection ID is not used, and the connection ID extension is not included in the client hello.
* :c:macro:`NRF_SO_SEC_DTLS_CID_SUPPORTED` - The DTLS connection ID is supported but not used, and the connection ID extension with a zero-length CID is included in the client hello.
* :c:macro:`NRF_SO_SEC_DTLS_CID_ENABLED` - The DTLS connection ID is used, and the connection ID extension with a valid CID is included in the client hello.
* :c:macro:`NRF_SO_SEC_DTLS_CID_DISABLED` - The connection ID extension is not included in the client hello. Hence, the DTLS connection ID is not used.
* :c:macro:`NRF_SO_SEC_DTLS_CID_SUPPORTED` - The connection ID extension with a zero-length CID is included in the client hello. Hence, the modem will accept a DTLS connection ID from the server.
* :c:macro:`NRF_SO_SEC_DTLS_CID_ENABLED` - The connection ID extension with a valid CID is included in the client hello. Hence, DTLS connection ID support is requested by the modem.

The default is disabled.

NRF_SO_SEC_DTLS_CID_STATUS
Get the status of DTLS connection ID.
This socket option tells whether the connection ID is used in the current connection.
This option is read-only.
The socket option is supported from modem firmware v1.3.x, where x is greater than or equal to 5, and v2.x.x.
The following values are expected:
Expand All @@ -298,6 +300,9 @@ NRF_SO_SEC_DTLS_CID_STATUS

NRF_SO_SEC_DTLS_CONN_SAVE
Save DTLS connection.
This socket option can be used to pause a session that is not frequently used by the application. Saving the session will free memory in the modem that can be used for other connections.
If the socket is closed, the saved DTLS data is cleaned and the connection with the server is lost.

This option is write-only.
This option require a DTLS v1.2 connection with renegotiation disabled.
The socket option is supported from modem firmware v1.3.x, where x is greater than or equal to 5, and v2.x.x.
Expand Down

0 comments on commit c27c17c

Please sign in to comment.