riot_sys

Function gnrc_pktbuf_reverse_snips

Source
pub unsafe extern "C" fn gnrc_pktbuf_reverse_snips(
    pkt: *mut gnrc_pktsnip_t,
) -> *mut gnrc_pktsnip_t
Expand description

@brief Reverses snip order of a packet in a write-protected manner.

This can be used to change the send/receive order of a packet (see @ref gnrc_pktsnip_t)

@note @p pkt is released on failure.

@param[in] pkt A packet. When this function fails (due to a full packet packet buffer) @p pkt will be released.

@return The reversed version of @p pkt on success @return NULL, when there is not enough space in the packet buffer to reverse the packet in a write-protected manner. @p pkt is released in that case.