diff --git a/sys/include/net/sock/ip.h b/sys/include/net/sock/ip.h index 6365ae3bbce4..5895a5007bac 100644 --- a/sys/include/net/sock/ip.h +++ b/sys/include/net/sock/ip.h @@ -82,6 +82,8 @@ typedef struct sock_ip sock_ip_t; * other (i.e. `(local->netif != remote->netif) && * ((local->netif != SOCK_ADDR_ANY_NETIF) || * (remote->netif != SOCK_ADDR_ANY_NETIF))` if neither is `NULL`). + * @return -ENOMEM, if the stack can't provide enough resources for `sock` to + * be created. * @return -EPROTONOSUPPORT, if `local != NULL` or `remote != NULL` and * proto is not supported by sock_ip_ep_t::family of @p local or @p * remote. @@ -150,6 +152,7 @@ int sock_ip_get_remote(sock_ip_t *sock, sock_ip_ep_t *ep); * @return -EADDRNOTAVAIL, if local of @p sock is not given. * @return -ENOBUFS, if buffer space is not large enough to store received * data. + * @return -ENOMEM, if no memory was available to receive @p data. * @return -EPROTO, if source address of received packet did not equal * the remote of @p sock. * @return -ETIMEDOUT, if @p timeout expired. @@ -181,6 +184,8 @@ ssize_t sock_ip_recv(sock_ip_t *sock, void *data, size_t max_len, * @return The number of bytes send on success. * @return -EAFNOSUPPORT, if `remote != NULL` and sock_ip_ep_t::family of * @p remote is != AF_UNSPEC and not supported. + * @return -EHOSTUNREACH, if @p remote or remote end point of @p sock is not + * reachable. * @return -ENOMEM, if no memory was available to send @p data. * @return -ENOTCONN, if `remote == NULL`, but @p sock has no remote end point. * @return -EPROTOTYPE, if `sock == NULL` and @p proto is not by diff --git a/sys/include/net/sock/udp.h b/sys/include/net/sock/udp.h index 0d5e6904a665..3bf67bb843f6 100644 --- a/sys/include/net/sock/udp.h +++ b/sys/include/net/sock/udp.h @@ -84,7 +84,8 @@ typedef struct sock_udp sock_udp_t; * `(local->netif != remote->netif) && * ((local->netif != SOCK_ADDR_ANY_NETIF) || * (remote->netif != SOCK_ADDR_ANY_NETIF))` if neither is `NULL`). - * ` + * @return -ENOMEM, if the stack can't provide enough resources for `sock` to + * be created. */ int sock_udp_create(sock_udp_t *sock, const sock_udp_ep_t *local, const sock_udp_ep_t *remote, uint16_t flags); @@ -151,6 +152,7 @@ int sock_udp_get_remote(sock_udp_t *sock, sock_udp_ep_t *ep); * @return -EADDRNOTAVAIL, if local of @p sock is not given. * @return -ENOBUFS, if buffer space is not large enough to store received * data. + * @return -ENOMEM, if no memory was available to receive @p data. * @return -EPROTO, if source address of received packet did not equal * the remote of @p sock. * @return -ETIMEDOUT, if @p timeout expired. @@ -180,6 +182,8 @@ ssize_t sock_udp_recv(sock_udp_t *sock, void *data, size_t max_len, * @return The number of bytes sent on success. * @return -EAFNOSUPPORT, if `remote != NULL` and sock_udp_ep_t::family of * @p remote is != AF_UNSPEC and not supported. + * @return -EHOSTUNREACH, if @p remote or remote end point of @p sock is not + * reachable. * @return -EINVAL, if sock_udp_ep_t::netif of @p remote is not a valid * interface or contradicts the given local interface (i.e. * neither the local end point of `sock` nor remote are assigned to