The queuebuf module handles buffers that are queued.
Data Structures | |
struct | queuebuf |
struct | queuebuf_data |
struct | queuebuf_ref |
Files | |
file | queuebuf.c |
Implementation of the Rime queue buffers | |
file | queuebuf.h |
Header file for the Rime queue buffer management | |
Macros | |
#define | _DEBUG_ 0 |
#define | PRINTF(...) |
#define | QUEUEBUF_DEBUG 0 |
#define | QUEUEBUF_NUM QUEUEBUF_CONF_NUM |
#define | QUEUEBUF_REF_NUM 2 |
#define | QUEUEBUF_STATS 0 |
#define | QUEUEBUFRAM_NUM QUEUEBUF_NUM |
#define | WITH_SWAP 0 |
Functions | |
if (packetbuf_is_reference()) | |
if (buf!=NULL) | |
if (buf==NULL) | |
MEMB (bufmem, struct queuebuf, QUEUEBUF_NUM) | |
MEMB (refbufmem, struct queuebuf_ref, QUEUEBUF_REF_NUM) | |
MEMB (buframmem, struct queuebuf_data, QUEUEBUFRAM_NUM) | |
linkaddr_t * | queuebuf_addr (struct queuebuf *b, uint8_t type) |
packetbuf_attr_t | queuebuf_attr (struct queuebuf *b, uint8_t type) |
int | queuebuf_datalen (struct queuebuf *b) |
void * | queuebuf_dataptr (struct queuebuf *b) |
void | queuebuf_debug_print (void) |
void | queuebuf_free (struct queuebuf *buf) |
void | queuebuf_init (void) |
static struct queuebuf_data * | queuebuf_load_to_ram (struct queuebuf *b) |
struct queuebuf * | queuebuf_new_from_packetbuf (void) |
void | queuebuf_to_packetbuf (struct queuebuf *b) |
void | queuebuf_update_attr_from_packetbuf (struct queuebuf *buf) |
Variables | |
buf = memb_alloc(&bufmem) | |
else | |
struct queuebuf *struct queuebuf_ref * | rbuf |
#define _DEBUG_ 0 |
#define PRINTF | ( | ... | ) |
Referenced by if().
#define QUEUEBUF_DEBUG 0 |
#define QUEUEBUF_NUM QUEUEBUF_CONF_NUM |
Referenced by queuebuf_init().
#define QUEUEBUF_REF_NUM 2 |
#define QUEUEBUF_STATS 0 |
#define QUEUEBUFRAM_NUM QUEUEBUF_NUM |
#define WITH_SWAP 0 |
if | ( | packetbuf_is_reference() | ) |
if | ( | buf! | = NULL | ) |
References RIMESTATS_ADD.
MEMB | ( | bufmem | , |
struct queuebuf | , | ||
QUEUEBUF_NUM | |||
) |
MEMB | ( | refbufmem | , |
struct queuebuf_ref | , | ||
QUEUEBUF_REF_NUM | |||
) |
MEMB | ( | buframmem | , |
struct queuebuf_data | , | ||
QUEUEBUFRAM_NUM | |||
) |
linkaddr_t * queuebuf_addr | ( | struct queuebuf * | b, |
uint8_t | type | ||
) |
References packetbuf_addr::addr, queuebuf_data::addrs, PACKETBUF_ADDR_FIRST, and queuebuf_load_to_ram().
packetbuf_attr_t queuebuf_attr | ( | struct queuebuf * | b, |
uint8_t | type | ||
) |
References queuebuf_data::attrs, queuebuf_load_to_ram(), and packetbuf_attr::val.
Referenced by packet_sent().
int queuebuf_datalen | ( | struct queuebuf * | b | ) |
References queuebuf_data::len, and queuebuf_load_to_ram().
void * queuebuf_dataptr | ( | struct queuebuf * | b | ) |
References queuebuf_data::data, memb_inmemb(), NULL, queuebuf_load_to_ram(), and queuebuf_ref::ref.
void queuebuf_debug_print | ( | void | ) |
References list_head(), list_item_next(), NULL, and printf.
void queuebuf_free | ( | struct queuebuf * | buf | ) |
References list_remove(), memb_free(), memb_inmemb(), printf, and queuebuf::ram_ptr.
Referenced by free_packet(), new_route(), output(), packetqueue_dequeue(), remove_queued_packet(), send_packet(), and timedout().
void queuebuf_init | ( | void | ) |
References i, memb_init(), and QUEUEBUF_NUM.
Referenced by main().
|
static |
References queuebuf::ram_ptr.
Referenced by queuebuf_addr(), queuebuf_attr(), queuebuf_datalen(), queuebuf_dataptr(), queuebuf_to_packetbuf(), and queuebuf_update_attr_from_packetbuf().
struct queuebuf* queuebuf_new_from_packetbuf | ( | void | ) |
Referenced by output(), packetqueue_enqueue_packetbuf(), phase_wait(), send_packet(), and uip_over_mesh_send().
void queuebuf_to_packetbuf | ( | struct queuebuf * | b | ) |
References queuebuf_data::addrs, queuebuf_data::attrs, queuebuf_data::data, queuebuf_ref::hdr, queuebuf_ref::hdrlen, queuebuf_data::len, queuebuf_ref::len, memb_inmemb(), packetbuf_attr_copyfrom(), packetbuf_clear(), packetbuf_copyfrom(), packetbuf_hdralloc(), packetbuf_hdrptr(), queuebuf_load_to_ram(), and queuebuf_ref::ref.
Referenced by new_route(), output(), qsend_list(), send_list(), and send_packet().
void queuebuf_update_attr_from_packetbuf | ( | struct queuebuf * | buf | ) |
References queuebuf_data::addrs, queuebuf_data::attrs, packetbuf_attr_copyto(), and queuebuf_load_to_ram().
Referenced by packet_sent().
return buf = memb_alloc(&bufmem) |
Referenced by arg_free(), frame802154_create(), if(), PROCESS_THREAD(), and PT_THREAD().
else |