Go to the documentation of this file.
30 #ifndef NET_GNRC_PKTBUF_H
31 #define NET_GNRC_PKTBUF_H
62 #ifndef CONFIG_GNRC_PKTBUF_SIZE
63 #define CONFIG_GNRC_PKTBUF_SIZE (6144)
static void gnrc_pktbuf_release(gnrc_pktsnip_t *pkt)
Decreases gnrc_pktsnip_t::users of pkt atomically and removes it if it reaches 0 and reports GNRC_NET...
void gnrc_pktbuf_hold(gnrc_pktsnip_t *pkt, unsigned int num)
Increases gnrc_pktsnip_t::users of pkt atomically.
void gnrc_pktbuf_release_error(gnrc_pktsnip_t *pkt, uint32_t err)
Decreases gnrc_pktsnip_t::users of pkt atomically and removes it if it reaches 0 and reports a possib...
Error reporting definitions.
gnrc_pktsnip_t * gnrc_pktbuf_add(gnrc_pktsnip_t *next, const void *data, size_t size, gnrc_nettype_t type)
Adds a new gnrc_pktsnip_t and its packet to the packet buffer.
bool gnrc_pktbuf_is_sane(void)
Checks if the implementation's internal invariants still uphold.
gnrc_pktsnip_t * gnrc_pktbuf_mark(gnrc_pktsnip_t *pkt, size_t size, gnrc_nettype_t type)
Marks the first size bytes in a received packet with a new packet snip that is appended to the packet...
bool gnrc_pktbuf_is_empty(void)
Checks if packet buffer is empty.
gnrc_pktsnip_t * gnrc_pktbuf_start_write(gnrc_pktsnip_t *pkt)
Must be called once before there is a write operation on a packet snip in a thread.
General definitions for network packets and their helper functions.
Protocol type definitions.
int gnrc_pktbuf_merge(gnrc_pktsnip_t *pkt)
Merge pktsnip chain to single pktsnip.
gnrc_pktsnip_t * gnrc_pktbuf_reverse_snips(gnrc_pktsnip_t *pkt)
Reverses snip order of a packet in a write-protected manner.
int gnrc_pktbuf_realloc_data(gnrc_pktsnip_t *pkt, size_t size)
Reallocates gnrc_pktsnip_t::data of pkt in the packet buffer, without changing the content.
gnrc_nettype_t
Definition of protocol types in the network stack.
void gnrc_pktbuf_stats(void)
Prints some statistics about the packet buffer to stdout.
Macros for basic linked list operations.
gnrc_pktsnip_t * gnrc_pktbuf_remove_snip(gnrc_pktsnip_t *pkt, gnrc_pktsnip_t *snip)
Deletes a snip from a packet and the packet buffer.
#define GNRC_NETERR_SUCCESS
Error code to signalise success (no error occurred) to an gnrc_neterr subscriber.
Type to represent parts (either headers or payload) of a packet, called snips.
void gnrc_pktbuf_init(void)
Initializes packet buffer module.