net: pkt: Fix net_pkt_pull() documentation

Fix the net_pkt_pull() documentation and mention that the
function can remove data from the start of the network packet.
The function is meant to work similar way net_buf_pull() but
it can handle multiple net_buf fragments.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
This commit is contained in:
Jukka Rissanen 2025-06-04 18:55:19 +03:00 committed by Dan Kalowsky
commit a2ff40e112

View file

@ -2564,11 +2564,12 @@ static inline size_t net_pkt_get_len(struct net_pkt *pkt)
int net_pkt_update_length(struct net_pkt *pkt, size_t length); int net_pkt_update_length(struct net_pkt *pkt, size_t length);
/** /**
* @brief Remove data from the packet at current location * @brief Remove data from the start of the packet.
* *
* @details net_pkt's cursor should be properly initialized and, * @details net_pkt's cursor should be properly initialized.
* eventually, properly positioned using net_pkt_skip/read/write.
* Note that net_pkt's cursor is reset by this function. * Note that net_pkt's cursor is reset by this function.
* This functions works in similar way as net_buf_pull(),
* but it can handle multiple net_buf fragments.
* *
* @param pkt Network packet * @param pkt Network packet
* @param length Number of bytes to be removed * @param length Number of bytes to be removed