doc: doxygen: remove rst utilities

We no longer render Doxygen content in Sphinx after the removal of
breathe, so let's remove rst related aliases from Doxyfile. Also adjust
some headers that contained rst content.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
This commit is contained in:
Gerard Marull-Paretas 2024-10-24 13:21:01 +02:00 committed by Dan Kalowsky
parent a673316b4f
commit a258ab32d1
3 changed files with 143 additions and 211 deletions

View file

@ -279,9 +279,7 @@ TAB_SIZE = 8
# with the commands \{ and \} for these it is advised to use the version @{ and # with the commands \{ and \} for these it is advised to use the version @{ and
# @} or use a double escape (\\{ and \\}) # @} or use a double escape (\\{ and \\})
ALIASES = "rst=\verbatim embed:rst:leading-asterisk" \ ALIASES = "kconfig{1}=\verbatim \1 \endverbatim" \
endrst=\endverbatim \
"kconfig{1}=\htmlonly <code>\1</code> \endhtmlonly \xmlonly <verbatim>embed:rst:inline :kconfig:option:`\1`</verbatim> \endxmlonly" \
"req{1}=\ref ZEPH_\1 \"ZEPH-\1\"" \ "req{1}=\ref ZEPH_\1 \"ZEPH-\1\"" \
"satisfy{1}=\xrefitem satisfy \"Satisfies requirement\" \"Requirement Implementation\" \1" \ "satisfy{1}=\xrefitem satisfy \"Satisfies requirement\" \"Requirement Implementation\" \1" \
"verify{1}=\xrefitem verify \"Verifies requirement\" \"Requirement Verification\" \1" \ "verify{1}=\xrefitem verify \"Verifies requirement\" \"Requirement Verification\" \1" \
@ -289,14 +287,14 @@ ALIASES = "rst=\verbatim embed:rst:leading-asterisk" \
"kconfig_dep{2}=\attention Available only when the following Kconfig options are enabled: \kconfig{\1}, \kconfig{\2}." \ "kconfig_dep{2}=\attention Available only when the following Kconfig options are enabled: \kconfig{\1}, \kconfig{\2}." \
"kconfig_dep{3}=\attention Available only when the following Kconfig options are enabled: \kconfig{\1}, \kconfig{\2}, \kconfig{\3}." \ "kconfig_dep{3}=\attention Available only when the following Kconfig options are enabled: \kconfig{\1}, \kconfig{\2}, \kconfig{\3}." \
"funcprops=\par \"Function properties (list may not be complete)\"" \ "funcprops=\par \"Function properties (list may not be complete)\"" \
"reschedule=\htmlonly reschedule \endhtmlonly \xmlonly <verbatim>embed:rst:inline :ref:`api_term_reschedule`</verbatim> \endxmlonly" \ "reschedule=\qualifier reschedule" \
"sleep=\htmlonly sleep \endhtmlonly \xmlonly <verbatim>embed:rst:inline :ref:`api_term_sleep`</verbatim> \endxmlonly" \ "sleep=\qualifier sleep" \
"no_wait=\htmlonly no-wait \endhtmlonly \xmlonly <verbatim>embed:rst:inline :ref:`api_term_no-wait`</verbatim> \endxmlonly" \ "no_wait=\qualifier no-wait" \
"isr_ok=\htmlonly isr-ok \endhtmlonly \xmlonly <verbatim>embed:rst:inline :ref:`api_term_isr-ok`</verbatim> \endxmlonly" \ "isr_ok=\qualifier isr-ok" \
"pre_kernel_ok=\htmlonly pre-kernel-ok \endhtmlonly \xmlonly <verbatim>embed:rst:inline :ref:`api_term_pre-kernel-ok`</verbatim> \endxmlonly" \ "pre_kernel_ok=\qualifier pre-kernel-ok" \
"async=\htmlonly async \endhtmlonly \xmlonly <verbatim>embed:rst:inline :ref:`api_term_async`</verbatim> \endxmlonly" \ "async=\qualifier async" \
"atomic_api=As for all atomic APIs, includes a full/sequentially-consistent memory barrier (where applicable)." \ "atomic_api=As for all atomic APIs, includes a full/sequentially-consistent memory barrier (where applicable)." \
"supervisor=\htmlonly supervisor \endhtmlonly \xmlonly <verbatim>embed:rst:inline :ref:`api_term_supervisor`</verbatim> \endxmlonly" "supervisor=\qualifier supervisor"
# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
# only. Doxygen will then generate output that is more tailored for C. For # only. Doxygen will then generate output that is more tailored for C. For

View file

@ -332,13 +332,11 @@ __syscall void *zsock_get_context_object(int sock);
* @brief Create a network socket * @brief Create a network socket
* *
* @details * @details
* @rst * See POSIX.1-2017 article
* See `POSIX.1-2017 article * http://pubs.opengroup.org/onlinepubs/9699919799/functions/socket.html
* <http://pubs.opengroup.org/onlinepubs/9699919799/functions/socket.html>`__
* for normative description. * for normative description.
* This function is also exposed as ``socket()`` * This function is also exposed as `socket()`
* if :kconfig:option:`CONFIG_POSIX_API` is defined. * if @kconfig{CONFIG_POSIX_API} is defined.
* @endrst
* *
* If CONFIG_USERSPACE is enabled, the caller will be granted access to the * If CONFIG_USERSPACE is enabled, the caller will be granted access to the
* context object associated with the returned file descriptor. * context object associated with the returned file descriptor.
@ -351,13 +349,11 @@ __syscall int zsock_socket(int family, int type, int proto);
* @brief Create an unnamed pair of connected sockets * @brief Create an unnamed pair of connected sockets
* *
* @details * @details
* @rst * See POSIX.1-2017 article
* See `POSIX.1-2017 article * https://pubs.opengroup.org/onlinepubs/009695399/functions/socketpair.html
* <https://pubs.opengroup.org/onlinepubs/009695399/functions/socketpair.html>`__
* for normative description. * for normative description.
* This function is also exposed as ``socketpair()`` * This function is also exposed as `socketpair()`
* if :kconfig:option:`CONFIG_POSIX_API` is defined. * if @kconfig{CONFIG_POSIX_API} is defined.
* @endrst
*/ */
__syscall int zsock_socketpair(int family, int type, int proto, int *sv); __syscall int zsock_socketpair(int family, int type, int proto, int *sv);
@ -365,12 +361,10 @@ __syscall int zsock_socketpair(int family, int type, int proto, int *sv);
* @brief Close a network socket * @brief Close a network socket
* *
* @details * @details
* @rst
* Close a network socket. * Close a network socket.
* This function is also exposed as ``close()`` * This function is also exposed as `close()`
* if :kconfig:option:`CONFIG_POSIX_API` is defined (in which case it * if @kconfig{CONFIG_POSIX_API} is defined (in which case it
* may conflict with generic POSIX ``close()`` function). * may conflict with generic POSIX `close()` function).
* @endrst
*/ */
__syscall int zsock_close(int sock); __syscall int zsock_close(int sock);
@ -378,14 +372,12 @@ __syscall int zsock_close(int sock);
* @brief Shutdown socket send/receive operations * @brief Shutdown socket send/receive operations
* *
* @details * @details
* @rst * See POSIX.1-2017 article
* See `POSIX.1-2017 article * http://pubs.opengroup.org/onlinepubs/9699919799/functions/shutdown.html
* <http://pubs.opengroup.org/onlinepubs/9699919799/functions/shutdown.html>`__
* for normative description, but currently this function has no effect in * for normative description, but currently this function has no effect in
* Zephyr and provided solely for compatibility with existing code. * Zephyr and provided solely for compatibility with existing code.
* This function is also exposed as ``shutdown()`` * This function is also exposed as `shutdown()`
* if :kconfig:option:`CONFIG_POSIX_API` is defined. * if @kconfig{CONFIG_POSIX_API} is defined.
* @endrst
*/ */
__syscall int zsock_shutdown(int sock, int how); __syscall int zsock_shutdown(int sock, int how);
@ -393,13 +385,11 @@ __syscall int zsock_shutdown(int sock, int how);
* @brief Bind a socket to a local network address * @brief Bind a socket to a local network address
* *
* @details * @details
* @rst * See POSIX.1-2017 article
* See `POSIX.1-2017 article * http://pubs.opengroup.org/onlinepubs/9699919799/functions/bind.html
* <http://pubs.opengroup.org/onlinepubs/9699919799/functions/bind.html>`__
* for normative description. * for normative description.
* This function is also exposed as ``bind()`` * This function is also exposed as `bind()`
* if :kconfig:option:`CONFIG_POSIX_API` is defined. * if @kconfig{CONFIG_POSIX_API} is defined.
* @endrst
*/ */
__syscall int zsock_bind(int sock, const struct sockaddr *addr, __syscall int zsock_bind(int sock, const struct sockaddr *addr,
socklen_t addrlen); socklen_t addrlen);
@ -408,13 +398,11 @@ __syscall int zsock_bind(int sock, const struct sockaddr *addr,
* @brief Connect a socket to a peer network address * @brief Connect a socket to a peer network address
* *
* @details * @details
* @rst * See POSIX.1-2017 article
* See `POSIX.1-2017 article * http://pubs.opengroup.org/onlinepubs/9699919799/functions/connect.html
* <http://pubs.opengroup.org/onlinepubs/9699919799/functions/connect.html>`__
* for normative description. * for normative description.
* This function is also exposed as ``connect()`` * This function is also exposed as `connect()`
* if :kconfig:option:`CONFIG_POSIX_API` is defined. * if @kconfig{CONFIG_POSIX_API} is defined.
* @endrst
*/ */
__syscall int zsock_connect(int sock, const struct sockaddr *addr, __syscall int zsock_connect(int sock, const struct sockaddr *addr,
socklen_t addrlen); socklen_t addrlen);
@ -423,13 +411,11 @@ __syscall int zsock_connect(int sock, const struct sockaddr *addr,
* @brief Set up a STREAM socket to accept peer connections * @brief Set up a STREAM socket to accept peer connections
* *
* @details * @details
* @rst * See POSIX.1-2017 article
* See `POSIX.1-2017 article * http://pubs.opengroup.org/onlinepubs/9699919799/functions/listen.html
* <http://pubs.opengroup.org/onlinepubs/9699919799/functions/listen.html>`__
* for normative description. * for normative description.
* This function is also exposed as ``listen()`` * This function is also exposed as `listen()`
* if :kconfig:option:`CONFIG_POSIX_API` is defined. * if @kconfig{CONFIG_POSIX_API} is defined.
* @endrst
*/ */
__syscall int zsock_listen(int sock, int backlog); __syscall int zsock_listen(int sock, int backlog);
@ -437,13 +423,11 @@ __syscall int zsock_listen(int sock, int backlog);
* @brief Accept a connection on listening socket * @brief Accept a connection on listening socket
* *
* @details * @details
* @rst * See POSIX.1-2017 article
* See `POSIX.1-2017 article * http://pubs.opengroup.org/onlinepubs/9699919799/functions/accept.html
* <http://pubs.opengroup.org/onlinepubs/9699919799/functions/accept.html>`__
* for normative description. * for normative description.
* This function is also exposed as ``accept()`` * This function is also exposed as `accept()`
* if :kconfig:option:`CONFIG_POSIX_API` is defined. * if @kconfig{CONFIG_POSIX_API} is defined.
* @endrst
*/ */
__syscall int zsock_accept(int sock, struct sockaddr *addr, socklen_t *addrlen); __syscall int zsock_accept(int sock, struct sockaddr *addr, socklen_t *addrlen);
@ -451,13 +435,11 @@ __syscall int zsock_accept(int sock, struct sockaddr *addr, socklen_t *addrlen);
* @brief Send data to an arbitrary network address * @brief Send data to an arbitrary network address
* *
* @details * @details
* @rst * See POSIX.1-2017 article
* See `POSIX.1-2017 article * http://pubs.opengroup.org/onlinepubs/9699919799/functions/sendto.html
* <http://pubs.opengroup.org/onlinepubs/9699919799/functions/sendto.html>`__
* for normative description. * for normative description.
* This function is also exposed as ``sendto()`` * This function is also exposed as `sendto()`
* if :kconfig:option:`CONFIG_POSIX_API` is defined. * if @kconfig{CONFIG_POSIX_API} is defined.
* @endrst
*/ */
__syscall ssize_t zsock_sendto(int sock, const void *buf, size_t len, __syscall ssize_t zsock_sendto(int sock, const void *buf, size_t len,
int flags, const struct sockaddr *dest_addr, int flags, const struct sockaddr *dest_addr,
@ -467,13 +449,11 @@ __syscall ssize_t zsock_sendto(int sock, const void *buf, size_t len,
* @brief Send data to a connected peer * @brief Send data to a connected peer
* *
* @details * @details
* @rst * See POSIX.1-2017 article
* See `POSIX.1-2017 article * http://pubs.opengroup.org/onlinepubs/9699919799/functions/send.html
* <http://pubs.opengroup.org/onlinepubs/9699919799/functions/send.html>`__
* for normative description. * for normative description.
* This function is also exposed as ``send()`` * This function is also exposed as `send()`
* if :kconfig:option:`CONFIG_POSIX_API` is defined. * if @kconfig{CONFIG_POSIX_API} is defined.
* @endrst
*/ */
static inline ssize_t zsock_send(int sock, const void *buf, size_t len, static inline ssize_t zsock_send(int sock, const void *buf, size_t len,
int flags) int flags)
@ -485,13 +465,11 @@ static inline ssize_t zsock_send(int sock, const void *buf, size_t len,
* @brief Send data to an arbitrary network address * @brief Send data to an arbitrary network address
* *
* @details * @details
* @rst * See POSIX.1-2017 article
* See `POSIX.1-2017 article * http://pubs.opengroup.org/onlinepubs/9699919799/functions/sendmsg.html
* <http://pubs.opengroup.org/onlinepubs/9699919799/functions/sendmsg.html>`__
* for normative description. * for normative description.
* This function is also exposed as ``sendmsg()`` * This function is also exposed as `sendmsg()`
* if :kconfig:option:`CONFIG_POSIX_API` is defined. * if @kconfig{CONFIG_POSIX_API} is defined.
* @endrst
*/ */
__syscall ssize_t zsock_sendmsg(int sock, const struct msghdr *msg, __syscall ssize_t zsock_sendmsg(int sock, const struct msghdr *msg,
int flags); int flags);
@ -500,13 +478,11 @@ __syscall ssize_t zsock_sendmsg(int sock, const struct msghdr *msg,
* @brief Receive data from an arbitrary network address * @brief Receive data from an arbitrary network address
* *
* @details * @details
* @rst * See POSIX.1-2017 article
* See `POSIX.1-2017 article * http://pubs.opengroup.org/onlinepubs/9699919799/functions/recvfrom.html
* <http://pubs.opengroup.org/onlinepubs/9699919799/functions/recvfrom.html>`__
* for normative description. * for normative description.
* This function is also exposed as ``recvfrom()`` * This function is also exposed as `recvfrom()`
* if :kconfig:option:`CONFIG_POSIX_API` is defined. * if @kconfig{CONFIG_POSIX_API} is defined.
* @endrst
*/ */
__syscall ssize_t zsock_recvfrom(int sock, void *buf, size_t max_len, __syscall ssize_t zsock_recvfrom(int sock, void *buf, size_t max_len,
int flags, struct sockaddr *src_addr, int flags, struct sockaddr *src_addr,
@ -516,13 +492,11 @@ __syscall ssize_t zsock_recvfrom(int sock, void *buf, size_t max_len,
* @brief Receive a message from an arbitrary network address * @brief Receive a message from an arbitrary network address
* *
* @details * @details
* @rst * See POSIX.1-2017 article
* See `POSIX.1-2017 article * http://pubs.opengroup.org/onlinepubs/9699919799/functions/recvmsg.html
* <http://pubs.opengroup.org/onlinepubs/9699919799/functions/recvmsg.html>`__
* for normative description. * for normative description.
* This function is also exposed as ``recvmsg()`` * This function is also exposed as `recvmsg()`
* if :kconfig:option:`CONFIG_POSIX_API` is defined. * if @kconfig{CONFIG_POSIX_API} is defined.
* @endrst
*/ */
__syscall ssize_t zsock_recvmsg(int sock, struct msghdr *msg, int flags); __syscall ssize_t zsock_recvmsg(int sock, struct msghdr *msg, int flags);
@ -530,13 +504,11 @@ __syscall ssize_t zsock_recvmsg(int sock, struct msghdr *msg, int flags);
* @brief Receive data from a connected peer * @brief Receive data from a connected peer
* *
* @details * @details
* @rst * See POSIX.1-2017 article
* See `POSIX.1-2017 article * http://pubs.opengroup.org/onlinepubs/9699919799/functions/recv.html
* <http://pubs.opengroup.org/onlinepubs/9699919799/functions/recv.html>`__
* for normative description. * for normative description.
* This function is also exposed as ``recv()`` * This function is also exposed as `recv()`
* if :kconfig:option:`CONFIG_POSIX_API` is defined. * if @kconfig{CONFIG_POSIX_API} is defined.
* @endrst
*/ */
static inline ssize_t zsock_recv(int sock, void *buf, size_t max_len, static inline ssize_t zsock_recv(int sock, void *buf, size_t max_len,
int flags) int flags)
@ -548,13 +520,11 @@ static inline ssize_t zsock_recv(int sock, void *buf, size_t max_len,
* @brief Control blocking/non-blocking mode of a socket * @brief Control blocking/non-blocking mode of a socket
* *
* @details * @details
* @rst
* This functions allow to (only) configure a socket for blocking or * This functions allow to (only) configure a socket for blocking or
* non-blocking operation (O_NONBLOCK). * non-blocking operation (O_NONBLOCK).
* This function is also exposed as ``fcntl()`` * This function is also exposed as `fcntl()`
* if :kconfig:option:`CONFIG_POSIX_API` is defined (in which case * if @kconfig{CONFIG_POSIX_API} is defined (in which case
* it may conflict with generic POSIX ``fcntl()`` function). * it may conflict with generic POSIX `fcntl()` function).
* @endrst
*/ */
__syscall int zsock_fcntl_impl(int sock, int cmd, int flags); __syscall int zsock_fcntl_impl(int sock, int cmd, int flags);
@ -583,18 +553,16 @@ static inline int zsock_fcntl_wrapper(int sock, int cmd, ...)
* @brief Control underlying socket parameters * @brief Control underlying socket parameters
* *
* @details * @details
* @rst * See POSIX.1-2017 article
* See `POSIX.1-2017 article * https://pubs.opengroup.org/onlinepubs/9699919799/functions/ioctl.html
* <https://pubs.opengroup.org/onlinepubs/9699919799/functions/ioctl.html>`__
* for normative description. * for normative description.
* This function enables querying or manipulating underlying socket parameters. * This function enables querying or manipulating underlying socket parameters.
* Currently supported @p request values include ``ZFD_IOCTL_FIONBIO``, and * Currently supported @p request values include `ZFD_IOCTL_FIONBIO`, and
* ``ZFD_IOCTL_FIONREAD``, to set non-blocking mode, and query the number of * `ZFD_IOCTL_FIONREAD`, to set non-blocking mode, and query the number of
* bytes available to read, respectively. * bytes available to read, respectively.
* This function is also exposed as ``ioctl()`` * This function is also exposed as `ioctl()`
* if :kconfig:option:`CONFIG_POSIX_API` is defined (in which case * if @kconfig{CONFIG_POSIX_API} is defined (in which case
* it may conflict with generic POSIX ``ioctl()`` function). * it may conflict with generic POSIX `ioctl()` function).
* @endrst
*/ */
__syscall int zsock_ioctl_impl(int sock, unsigned long request, va_list ap); __syscall int zsock_ioctl_impl(int sock, unsigned long request, va_list ap);
@ -620,14 +588,12 @@ static inline int zsock_ioctl_wrapper(int sock, unsigned long request, ...)
* @brief Efficiently poll multiple sockets for events * @brief Efficiently poll multiple sockets for events
* *
* @details * @details
* @rst * See POSIX.1-2017 article
* See `POSIX.1-2017 article * http://pubs.opengroup.org/onlinepubs/9699919799/functions/poll.html
* <http://pubs.opengroup.org/onlinepubs/9699919799/functions/poll.html>`__
* for normative description. * for normative description.
* This function is also exposed as ``poll()`` * This function is also exposed as `poll()`
* if :kconfig:option:`CONFIG_POSIX_API` is defined (in which case * if @kconfig{CONFIG_POSIX_API} is defined (in which case
* it may conflict with generic POSIX ``poll()`` function). * it may conflict with generic POSIX `poll()` function).
* @endrst
*/ */
static inline int zsock_poll(struct zsock_pollfd *fds, int nfds, int timeout) static inline int zsock_poll(struct zsock_pollfd *fds, int nfds, int timeout)
{ {
@ -638,16 +604,14 @@ static inline int zsock_poll(struct zsock_pollfd *fds, int nfds, int timeout)
* @brief Get various socket options * @brief Get various socket options
* *
* @details * @details
* @rst * See POSIX.1-2017 article
* See `POSIX.1-2017 article * http://pubs.opengroup.org/onlinepubs/9699919799/functions/getsockopt.html
* <http://pubs.opengroup.org/onlinepubs/9699919799/functions/getsockopt.html>`__
* for normative description. In Zephyr this function supports a subset of * for normative description. In Zephyr this function supports a subset of
* socket options described by POSIX, but also some additional options * socket options described by POSIX, but also some additional options
* available in Linux (some options are dummy and provided to ease porting * available in Linux (some options are dummy and provided to ease porting
* of existing code). * of existing code).
* This function is also exposed as ``getsockopt()`` * This function is also exposed as `getsockopt()`
* if :kconfig:option:`CONFIG_POSIX_API` is defined. * if @kconfig{CONFIG_POSIX_API} is defined.
* @endrst
*/ */
__syscall int zsock_getsockopt(int sock, int level, int optname, __syscall int zsock_getsockopt(int sock, int level, int optname,
void *optval, socklen_t *optlen); void *optval, socklen_t *optlen);
@ -656,16 +620,14 @@ __syscall int zsock_getsockopt(int sock, int level, int optname,
* @brief Set various socket options * @brief Set various socket options
* *
* @details * @details
* @rst * See POSIX.1-2017 article
* See `POSIX.1-2017 article * http://pubs.opengroup.org/onlinepubs/9699919799/functions/setsockopt.html
* <http://pubs.opengroup.org/onlinepubs/9699919799/functions/setsockopt.html>`__
* for normative description. In Zephyr this function supports a subset of * for normative description. In Zephyr this function supports a subset of
* socket options described by POSIX, but also some additional options * socket options described by POSIX, but also some additional options
* available in Linux (some options are dummy and provided to ease porting * available in Linux (some options are dummy and provided to ease porting
* of existing code). * of existing code).
* This function is also exposed as ``setsockopt()`` * This function is also exposed as `setsockopt()`
* if :kconfig:option:`CONFIG_POSIX_API` is defined. * if @kconfig{CONFIG_POSIX_API} is defined.
* @endrst
*/ */
__syscall int zsock_setsockopt(int sock, int level, int optname, __syscall int zsock_setsockopt(int sock, int level, int optname,
const void *optval, socklen_t optlen); const void *optval, socklen_t optlen);
@ -674,13 +636,11 @@ __syscall int zsock_setsockopt(int sock, int level, int optname,
* @brief Get peer name * @brief Get peer name
* *
* @details * @details
* @rst * See POSIX.1-2017 article
* See `POSIX.1-2017 article * http://pubs.opengroup.org/onlinepubs/9699919799/functions/getpeername.html
* <http://pubs.opengroup.org/onlinepubs/9699919799/functions/getpeername.html>`__
* for normative description. * for normative description.
* This function is also exposed as ``getpeername()`` * This function is also exposed as `getpeername()`
* if :kconfig:option:`CONFIG_POSIX_API` is defined. * if @kconfig{CONFIG_POSIX_API} is defined.
* @endrst
*/ */
__syscall int zsock_getpeername(int sock, struct sockaddr *addr, __syscall int zsock_getpeername(int sock, struct sockaddr *addr,
socklen_t *addrlen); socklen_t *addrlen);
@ -689,13 +649,11 @@ __syscall int zsock_getpeername(int sock, struct sockaddr *addr,
* @brief Get socket name * @brief Get socket name
* *
* @details * @details
* @rst * See POSIX.1-2017 article
* See `POSIX.1-2017 article * http://pubs.opengroup.org/onlinepubs/9699919799/functions/getsockname.html
* <http://pubs.opengroup.org/onlinepubs/9699919799/functions/getsockname.html>`__
* for normative description. * for normative description.
* This function is also exposed as ``getsockname()`` * This function is also exposed as `getsockname()`
* if :kconfig:option:`CONFIG_POSIX_API` is defined. * if @kconfig{CONFIG_POSIX_API} is defined.
* @endrst
*/ */
__syscall int zsock_getsockname(int sock, struct sockaddr *addr, __syscall int zsock_getsockname(int sock, struct sockaddr *addr,
socklen_t *addrlen); socklen_t *addrlen);
@ -704,13 +662,11 @@ __syscall int zsock_getsockname(int sock, struct sockaddr *addr,
* @brief Get local host name * @brief Get local host name
* *
* @details * @details
* @rst * See POSIX.1-2017 article
* See `POSIX.1-2017 article * http://pubs.opengroup.org/onlinepubs/9699919799/functions/gethostname.html
* <http://pubs.opengroup.org/onlinepubs/9699919799/functions/gethostname.html>`__
* for normative description. * for normative description.
* This function is also exposed as ``gethostname()`` * This function is also exposed as `gethostname()`
* if :kconfig:option:`CONFIG_POSIX_API` is defined. * if @kconfig{CONFIG_POSIX_API} is defined.
* @endrst
*/ */
__syscall int zsock_gethostname(char *buf, size_t len); __syscall int zsock_gethostname(char *buf, size_t len);
@ -718,13 +674,11 @@ __syscall int zsock_gethostname(char *buf, size_t len);
* @brief Convert network address from internal to numeric ASCII form * @brief Convert network address from internal to numeric ASCII form
* *
* @details * @details
* @rst * See POSIX.1-2017 article
* See `POSIX.1-2017 article * http://pubs.opengroup.org/onlinepubs/9699919799/functions/inet_ntop.html
* <http://pubs.opengroup.org/onlinepubs/9699919799/functions/inet_ntop.html>`__
* for normative description. * for normative description.
* This function is also exposed as ``inet_ntop()`` * This function is also exposed as `inet_ntop()`
* if :kconfig:option:`CONFIG_POSIX_API` is defined. * if @kconfig{CONFIG_POSIX_API} is defined.
* @endrst
*/ */
static inline char *zsock_inet_ntop(sa_family_t family, const void *src, static inline char *zsock_inet_ntop(sa_family_t family, const void *src,
char *dst, size_t size) char *dst, size_t size)
@ -736,13 +690,11 @@ static inline char *zsock_inet_ntop(sa_family_t family, const void *src,
* @brief Convert network address from numeric ASCII form to internal representation * @brief Convert network address from numeric ASCII form to internal representation
* *
* @details * @details
* @rst * See POSIX.1-2017 article
* See `POSIX.1-2017 article * http://pubs.opengroup.org/onlinepubs/9699919799/functions/inet_pton.html
* <http://pubs.opengroup.org/onlinepubs/9699919799/functions/inet_pton.html>`__
* for normative description. * for normative description.
* This function is also exposed as ``inet_pton()`` * This function is also exposed as `inet_pton()`
* if :kconfig:option:`CONFIG_POSIX_API` is defined. * if @kconfig{CONFIG_POSIX_API} is defined.
* @endrst
*/ */
__syscall int zsock_inet_pton(sa_family_t family, const char *src, void *dst); __syscall int zsock_inet_pton(sa_family_t family, const char *src, void *dst);
@ -781,13 +733,11 @@ __syscall int z_zsock_getaddrinfo_internal(const char *host,
* @brief Resolve a domain name to one or more network addresses * @brief Resolve a domain name to one or more network addresses
* *
* @details * @details
* @rst * See POSIX.1-2017 article
* See `POSIX.1-2017 article * http://pubs.opengroup.org/onlinepubs/9699919799/functions/getaddrinfo.html
* <http://pubs.opengroup.org/onlinepubs/9699919799/functions/getaddrinfo.html>`__
* for normative description. * for normative description.
* This function is also exposed as ``getaddrinfo()`` * This function is also exposed as `getaddrinfo()`
* if :kconfig:option:`CONFIG_POSIX_API` is defined. * if @kconfig{CONFIG_POSIX_API} is defined.
* @endrst
*/ */
int zsock_getaddrinfo(const char *host, const char *service, int zsock_getaddrinfo(const char *host, const char *service,
const struct zsock_addrinfo *hints, const struct zsock_addrinfo *hints,
@ -797,13 +747,11 @@ int zsock_getaddrinfo(const char *host, const char *service,
* @brief Free results returned by zsock_getaddrinfo() * @brief Free results returned by zsock_getaddrinfo()
* *
* @details * @details
* @rst * See POSIX.1-2017 article
* See `POSIX.1-2017 article * http://pubs.opengroup.org/onlinepubs/9699919799/functions/freeaddrinfo.html
* <http://pubs.opengroup.org/onlinepubs/9699919799/functions/freeaddrinfo.html>`__
* for normative description. * for normative description.
* This function is also exposed as ``freeaddrinfo()`` * This function is also exposed as `freeaddrinfo()`
* if :kconfig:option:`CONFIG_POSIX_API` is defined. * if @kconfig{CONFIG_POSIX_API} is defined.
* @endrst
*/ */
void zsock_freeaddrinfo(struct zsock_addrinfo *ai); void zsock_freeaddrinfo(struct zsock_addrinfo *ai);
@ -811,13 +759,11 @@ void zsock_freeaddrinfo(struct zsock_addrinfo *ai);
* @brief Convert zsock_getaddrinfo() error code to textual message * @brief Convert zsock_getaddrinfo() error code to textual message
* *
* @details * @details
* @rst * See POSIX.1-2017 article
* See `POSIX.1-2017 article * http://pubs.opengroup.org/onlinepubs/9699919799/functions/gai_strerror.html
* <http://pubs.opengroup.org/onlinepubs/9699919799/functions/gai_strerror.html>`__
* for normative description. * for normative description.
* This function is also exposed as ``gai_strerror()`` * This function is also exposed as `gai_strerror()`
* if :kconfig:option:`CONFIG_POSIX_API` is defined. * if @kconfig{CONFIG_POSIX_API} is defined.
* @endrst
*/ */
const char *zsock_gai_strerror(int errcode); const char *zsock_gai_strerror(int errcode);
@ -848,13 +794,11 @@ const char *zsock_gai_strerror(int errcode);
* @brief Resolve a network address to a domain name or ASCII address * @brief Resolve a network address to a domain name or ASCII address
* *
* @details * @details
* @rst * See POSIX.1-2017 article
* See `POSIX.1-2017 article * http://pubs.opengroup.org/onlinepubs/9699919799/functions/getnameinfo.html
* <http://pubs.opengroup.org/onlinepubs/9699919799/functions/getnameinfo.html>`__
* for normative description. * for normative description.
* This function is also exposed as ``getnameinfo()`` * This function is also exposed as `getnameinfo()`
* if :kconfig:option:`CONFIG_POSIX_API` is defined. * if @kconfig{CONFIG_POSIX_API} is defined.
* @endrst
*/ */
int zsock_getnameinfo(const struct sockaddr *addr, socklen_t addrlen, int zsock_getnameinfo(const struct sockaddr *addr, socklen_t addrlen,
char *host, socklen_t hostlen, char *host, socklen_t hostlen,

View file

@ -36,17 +36,15 @@ typedef struct zvfs_fd_set zsock_fd_set;
* @brief Legacy function to poll multiple sockets for events * @brief Legacy function to poll multiple sockets for events
* *
* @details * @details
* @rst * See POSIX.1-2017 article
* See `POSIX.1-2017 article * http://pubs.opengroup.org/onlinepubs/9699919799/functions/select.html
* <http://pubs.opengroup.org/onlinepubs/9699919799/functions/select.html>`__
* for normative description. This function is provided to ease porting of * for normative description. This function is provided to ease porting of
* existing code and not recommended for usage due to its inefficiency, * existing code and not recommended for usage due to its inefficiency,
* use zsock_poll() instead. In Zephyr this function works only with * use zsock_poll() instead. In Zephyr this function works only with
* sockets, not arbitrary file descriptors. * sockets, not arbitrary file descriptors.
* This function is also exposed as ``select()`` * This function is also exposed as `select()`
* if :kconfig:option:`CONFIG_POSIX_API` is defined (in which case * if @kconfig{CONFIG_POSIX_API} is defined (in which case
* it may conflict with generic POSIX ``select()`` function). * it may conflict with generic POSIX `select()` function).
* @endrst
*/ */
static inline int zsock_select(int nfds, zsock_fd_set *readfds, zsock_fd_set *writefds, static inline int zsock_select(int nfds, zsock_fd_set *readfds, zsock_fd_set *writefds,
zsock_fd_set *exceptfds, struct zsock_timeval *timeout) zsock_fd_set *exceptfds, struct zsock_timeval *timeout)
@ -66,13 +64,11 @@ static inline int zsock_select(int nfds, zsock_fd_set *readfds, zsock_fd_set *wr
* @brief Initialize (clear) fd_set * @brief Initialize (clear) fd_set
* *
* @details * @details
* @rst * See POSIX.1-2017 article
* See `POSIX.1-2017 article * http://pubs.opengroup.org/onlinepubs/9699919799/functions/select.html
* <http://pubs.opengroup.org/onlinepubs/9699919799/functions/select.html>`__
* for normative description. * for normative description.
* This function is also exposed as ``FD_ZERO()`` * This function is also exposed as `FD_ZERO()`
* if :kconfig:option:`CONFIG_POSIX_API` is defined. * if @kconfig{CONFIG_POSIX_API} is defined.
* @endrst
*/ */
static inline void ZSOCK_FD_ZERO(zsock_fd_set *set) static inline void ZSOCK_FD_ZERO(zsock_fd_set *set)
{ {
@ -83,13 +79,11 @@ static inline void ZSOCK_FD_ZERO(zsock_fd_set *set)
* @brief Check whether socket is a member of fd_set * @brief Check whether socket is a member of fd_set
* *
* @details * @details
* @rst * See POSIX.1-2017 article
* See `POSIX.1-2017 article * http://pubs.opengroup.org/onlinepubs/9699919799/functions/select.html
* <http://pubs.opengroup.org/onlinepubs/9699919799/functions/select.html>`__
* for normative description. * for normative description.
* This function is also exposed as ``FD_ISSET()`` * This function is also exposed as `FD_ISSET()`
* if :kconfig:option:`CONFIG_POSIX_API` is defined. * if @kconfig{CONFIG_POSIX_API} is defined.
* @endrst
*/ */
static inline int ZSOCK_FD_ISSET(int fd, zsock_fd_set *set) static inline int ZSOCK_FD_ISSET(int fd, zsock_fd_set *set)
{ {
@ -100,13 +94,11 @@ static inline int ZSOCK_FD_ISSET(int fd, zsock_fd_set *set)
* @brief Remove socket from fd_set * @brief Remove socket from fd_set
* *
* @details * @details
* @rst * See POSIX.1-2017 article
* See `POSIX.1-2017 article * http://pubs.opengroup.org/onlinepubs/9699919799/functions/select.html
* <http://pubs.opengroup.org/onlinepubs/9699919799/functions/select.html>`__
* for normative description. * for normative description.
* This function is also exposed as ``FD_CLR()`` * This function is also exposed as `FD_CLR()`
* if :kconfig:option:`CONFIG_POSIX_API` is defined. * if @kconfig{CONFIG_POSIX_API} is defined.
* @endrst
*/ */
static inline void ZSOCK_FD_CLR(int fd, zsock_fd_set *set) static inline void ZSOCK_FD_CLR(int fd, zsock_fd_set *set)
{ {
@ -117,13 +109,11 @@ static inline void ZSOCK_FD_CLR(int fd, zsock_fd_set *set)
* @brief Add socket to fd_set * @brief Add socket to fd_set
* *
* @details * @details
* @rst * See POSIX.1-2017 article
* See `POSIX.1-2017 article * http://pubs.opengroup.org/onlinepubs/9699919799/functions/select.html
* <http://pubs.opengroup.org/onlinepubs/9699919799/functions/select.html>`__
* for normative description. * for normative description.
* This function is also exposed as ``FD_SET()`` * This function is also exposed as `FD_SET()`
* if :kconfig:option:`CONFIG_POSIX_API` is defined. * if @kconfig{CONFIG_POSIX_API} is defined.
* @endrst
*/ */
static inline void ZSOCK_FD_SET(int fd, zsock_fd_set *set) static inline void ZSOCK_FD_SET(int fd, zsock_fd_set *set)
{ {