libosmocore  0.9.3
Osmocom core library
src/msgb.c File Reference
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <osmocom/core/msgb.h>
#include <osmocom/core/talloc.h>

Functions

struct msgbmsgb_alloc (uint16_t size, const char *name)
 Allocate a new message buffer.
void msgb_free (struct msgb *m)
 Release given message buffer.
void msgb_enqueue (struct llist_head *queue, struct msgb *msg)
 Enqueue message buffer to tail of a queue.
struct msgbmsgb_dequeue (struct llist_head *queue)
 Dequeue message buffer from head of queue.
void msgb_reset (struct msgb *msg)
 Re-set all message buffer pointers.
uint8_t * msgb_data (const struct msgb *msg)
 get pointer to data section of message buffer
uint16_t msgb_length (const struct msgb *msg)
 get length of message buffer
void msgb_set_talloc_ctx (void *ctx)
 Set the talloc context for msgb_alloc.
const char * msgb_hexdump (const struct msgb *msg)
 Return a (static) buffer containing a hexdump of the msg.

Variables

void * tall_msgb_ctx

Detailed Description