Skip to content
Commit 7be105b8 authored by Jordan Yates's avatar Jordan Yates Committed by Johan Hedberg
Browse files

net: buf: `net_buf_remove_*` API



Adds a new family of `struct net_buf` operations that remove data from
the end of the buffer.

The semantics of `net_buf_remove_mem` have been chosen to match those of
`net_buf_pull_mem`, i.e. the return value is a pointer to the memory
that was removed.

The opposite of this function, `net_buf_remove`, would need to return
the old end of the data buffer to be useful. However this value is
always an invalid target for reading or writing data to (It points to
the middle of unused data).The existance of the function would be
misleading, therefore it is not implemented.

Fixes #31069.

Signed-off-by: default avatarJordan Yates <jordan.yates@data61.csiro.au>
parent a5cd0c0c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment