#pragma once #include #include struct pbuf { pbuf *next{}; void const *payload{}; std::uint16_t tot_len{}; std::uint16_t len{}; std::bool_t freed{}; }; auto pbuf_copy_partial(pbuf const *buffer, void *destination, std::uint16_t length, std::uint16_t offset) -> std::uint16_t; auto pbuf_free(pbuf *buffer) -> std::uint8_t;