Header file for the Rime buffer (packetbuf) management. More...
#include "contiki-conf.h"
#include "net/rime/rimeaddr.h"
Go to the source code of this file.
Defines | |
#define | PACKETBUF_SIZE 128 |
The size of the packetbuf, in bytes. | |
#define | PACKETBUF_HDR_SIZE 48 |
The size of the packetbuf header, in bytes. | |
Functions | |
void | packetbuf_clear (void) |
Clear and reset the packetbuf. | |
void | packetbuf_clear_hdr (void) |
Clear and reset the header of the packetbuf. | |
void * | packetbuf_dataptr (void) |
Get a pointer to the data in the packetbuf. | |
void * | packetbuf_hdrptr (void) |
Get a pointer to the header in the packetbuf, for outbound packets. | |
uint8_t | packetbuf_hdrlen (void) |
Get the length of the header in the packetbuf, for outbound packets. | |
uint16_t | packetbuf_datalen (void) |
Get the length of the data in the packetbuf. | |
uint16_t | packetbuf_totlen (void) |
Get the total length of the header and data in the packetbuf. | |
void | packetbuf_set_datalen (uint16_t len) |
Set the length of the data in the packetbuf. | |
void | packetbuf_reference (void *ptr, uint16_t len) |
Point the packetbuf to external data. | |
int | packetbuf_is_reference (void) |
Check if the packetbuf references external data. | |
void * | packetbuf_reference_ptr (void) |
Get a pointer to external data referenced by the packetbuf. | |
void | packetbuf_compact (void) |
Compact the packetbuf. | |
int | packetbuf_copyfrom (const void *from, uint16_t len) |
Copy from external data into the packetbuf. | |
int | packetbuf_copyto (void *to) |
Copy the entire packetbuf to an external buffer. | |
int | packetbuf_copyto_hdr (uint8_t *to) |
Copy the header portion of the packetbuf to an external buffer. | |
int | packetbuf_hdralloc (int size) |
Extend the header of the packetbuf, for outbound packets. | |
int | packetbuf_hdrreduce (int size) |
Reduce the header in the packetbuf, for incoming packets. |
Header file for the Rime buffer (packetbuf) management.
Definition in file packetbuf.h.