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

netdev_driver_t::recv: Clarified small buf case

Clarified in the documentation how netdev_driver_t::recv() should behave in case
the size of the buffer in parameter buf (indicated by parameter len) is to small
to fit the received frame.
parent 87055d7b
No related branches found
No related tags found
No related merge requests found
...@@ -323,6 +323,13 @@ typedef struct netdev_driver { ...@@ -323,6 +323,13 @@ typedef struct netdev_driver {
* 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.
* *
* If called with @p buf != NULL and @p len is smaller than the received
* packet:
* - The received packet is dropped
* - The content in @p buf becomes invalid. (The driver may use the memory
* to implement the dropping - or may not change it.)
* - `-ENOBUFS` is returned
*
* @param[in] dev network device descriptor. Must not be NULL. * @param[in] dev network device descriptor. Must not be NULL.
* @param[out] buf buffer to write into or NULL to return the packet * @param[out] buf buffer to write into or NULL to return the packet
* size. * size.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment