Skip to content
Snippets Groups Projects
Unverified Commit 58f496de authored by Marian Buschsieweke's avatar Marian Buschsieweke
Browse files

netdev_driver_t::recv: Extend doc on size feature

Some drivers return on netdev_driver_t::recv() not the actual frame size, but
an upper bound estimation of it. The upper layer code is already prepared to
handle that. This brings the doc in sync with the code.
parent e81b6191
No related branches found
No related tags found
No related merge requests found
...@@ -318,8 +318,8 @@ typedef struct netdev_driver { ...@@ -318,8 +318,8 @@ typedef struct netdev_driver {
* Supposed to be called from * Supposed to be called from
* @ref netdev_t::event_callback "netdev->event_callback()" * @ref netdev_t::event_callback "netdev->event_callback()"
* *
* If @p buf == NULL and @p len == 0, returns the packet size without * If @p buf == NULL and @p len == 0, returns the packet size -- or an upper
* dropping it. * bound estimation of the size -- without dropping the packet.
* If @p buf == NULL and @p len > 0, drops the packet and returns the packet * If @p buf == NULL and @p len > 0, drops the packet and returns the packet
* size. * size.
* *
...@@ -342,7 +342,7 @@ typedef struct netdev_driver { ...@@ -342,7 +342,7 @@ typedef struct netdev_driver {
* *
* @return `-ENOBUFS` if supplied buffer is too small * @return `-ENOBUFS` if supplied buffer is too small
* @return number of bytes read if buf != NULL * @return number of bytes read if buf != NULL
* @return packet size if buf == NULL * @return packet size (or upper bound estimation) if buf == NULL
*/ */
int (*recv)(netdev_t *dev, void *buf, size_t len, void *info); int (*recv)(netdev_t *dev, void *buf, size_t len, void *info);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment