Skip to content

Commit

Permalink
nrf_modem: doc: cleanup function references
Browse files Browse the repository at this point in the history
Clean up function references.
Add nrf_accept and nrf_setdnsaddr to list of supported functions.

Signed-off-by: Andreas Moltumyr <[email protected]>
  • Loading branch information
anhmolt committed Mar 7, 2024
1 parent c54c110 commit be72571
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion nrf_modem/doc/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ Socket polling API
******************

Necessary data types and defines to poll for
events on one or more sockets using nrf_poll().
events on one or more sockets using :c:func:`nrf_poll`.

.. doxygengroup:: nrf_socket_api_poll
:project: nrfxlib
Expand Down
4 changes: 2 additions & 2 deletions nrf_modem/doc/fault_handling.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ Socket APIs that require communication with the modem, return ``-1`` and set ``e

Although the modem has crashed, any data which was stored by the Modem library, including data that was delivered to the Modem library by the modem, remains available until the Modem library is shut down.
This includes incoming network data, which was received before the crash but has not been read by the application.
The application can read that data as normal, using the :c:func:`recv` function.
When no more data is available, the :c:func:`recv` function returns ``-1`` and sets ``errno`` to ``NRF_ESHUTDOWN``.
The application can read that data as normal, using the :c:func:`nrf_recv` and the :c:func:`nrf_recvfrom` functions.
When no more data is available, the :c:func:`nrf_recv` and the :c:func:`nrf_recvfrom` functions return ``-1`` and set ``errno`` to ``NRF_ESHUTDOWN``.

Ongoing API calls
*****************
Expand Down
2 changes: 1 addition & 1 deletion nrf_modem/doc/sockets/rai.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ After enabling RAI, you control it using the :c:func:`nrf_setsockopt` function w
Code examples
*************

The following code snippets illustrate some cases on how to apply RAI using the :c:func:`nrf_setsockopt()` function.
The following code snippets illustrate some cases on how to apply RAI using the :c:func:`nrf_setsockopt` function.

An example that shows how to use ``NRF_RAI_LAST`` when sending a UDP packet:

Expand Down
6 changes: 4 additions & 2 deletions nrf_modem/doc/sockets/socket_options_func.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Following is a list of supported functions:
* :c:func:`nrf_connect`
* :c:func:`nrf_bind`
* :c:func:`nrf_listen`
* :c:func:`nrf_accept`
* :c:func:`nrf_send`
* :c:func:`nrf_sendto`
* :c:func:`nrf_recv`
Expand All @@ -34,6 +35,7 @@ Following is a list of supported functions:
* :c:func:`nrf_freeifaddrs`
* :c:func:`nrf_inet_pton`
* :c:func:`nrf_inet_ntop`
* :c:func:`nrf_setdnsaddr`

The library supports up to eight networking sockets.

Expand All @@ -55,7 +57,7 @@ The following table shows all socket options supported by the Modem library.
+-----------------+---------------------------------+------------------------+------------+--------------------------------------------------------------------------------------------+
| NRF_SOL_SOCKET | NRF_SO_BINDTOPDN | ``int`` | set | Bind this socket to a specific PDN ID. |
+-----------------+---------------------------------+------------------------+------------+--------------------------------------------------------------------------------------------+
| NRF_SOL_SOCKET | NRF_SO_POLLCB | ``struct nrf_pollcb`` | set | Set callbacks for poll() events on sockets. |
| NRF_SOL_SOCKET | NRF_SO_POLLCB | ``struct nrf_pollcb`` | set | Set callbacks for :c:func:`nrf_poll` events on sockets. |
+-----------------+---------------------------------+------------------------+------------+--------------------------------------------------------------------------------------------+
| NRF_SOL_SOCKET | NRF_SO_EXCEPTIONAL_DATA | ``int`` | get/set | Send data on socket as part of exceptional event. |
+-----------------+---------------------------------+------------------------+------------+--------------------------------------------------------------------------------------------+
Expand Down Expand Up @@ -294,7 +296,7 @@ NRF_SO_SEC_ROLE
* :c:macro:`NRF_SO_SEC_ROLE_SERVER` - Server role

The default role is client.
For TLS, the choice is implicit from the usage of ``listen()``, ``accept()`` and ``connect()``.
For TLS, the choice is implicit from the usage of :c:func:`nrf_listen`, :c:func:`nrf_accept` and :c:func:`nrf_connect`.

NRF_SO_SEC_SESSION_CACHE
This option controls TLS session caching.
Expand Down

0 comments on commit be72571

Please sign in to comment.