\doxysection{include/osmocom/core/msgb.h File Reference}
\label{msgb_8h}\index{include/osmocom/core/msgb.h@{include/osmocom/core/msgb.h}}
{\ttfamily \#include $<$stdint.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/linuxlist.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/utils.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/bits.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/defs.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/panic.\+h$>$}\newline
\doxysubsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \textbf{ msgb}
\begin{DoxyCompactList}\small\item\em Osmocom message buffer. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \textbf{ MSGB\+\_\+\+DEBUG}
\item 
\#define \textbf{ MSGB\+\_\+\+ABORT}(\textbf{ msg},  fmt,  args ...)
\item 
\#define \textbf{ msgb\+\_\+l1}(m)~((void $\ast$)((m)-\/$>$l1h))
\begin{DoxyCompactList}\small\item\em obtain L1 header of msgb \end{DoxyCompactList}\item 
\#define \textbf{ msgb\+\_\+l2}(m)~((void $\ast$)((m)-\/$>$l2h))
\begin{DoxyCompactList}\small\item\em obtain L2 header of msgb \end{DoxyCompactList}\item 
\#define \textbf{ msgb\+\_\+l3}(m)~((void $\ast$)((m)-\/$>$l3h))
\begin{DoxyCompactList}\small\item\em obtain L3 header of msgb \end{DoxyCompactList}\item 
\#define \textbf{ msgb\+\_\+l4}(m)~((void $\ast$)((m)-\/$>$l4h))
\begin{DoxyCompactList}\small\item\em obtain L4 header of msgb \end{DoxyCompactList}\item 
\#define \textbf{ msgb\+\_\+sms}(m)~\textbf{ msgb\+\_\+l4}(m)
\begin{DoxyCompactList}\small\item\em obtain SMS header of msgb \end{DoxyCompactList}\item 
\#define \textbf{ msgb\+\_\+eq\+\_\+data}(\textbf{ msg},  \textbf{ data},  \textbf{ len})~ \textbf{ \+\_\+msgb\+\_\+eq}(\+\_\+\+\_\+\+FILE\+\_\+\+\_\+, \+\_\+\+\_\+\+LINE\+\_\+\+\_\+, \+\_\+\+\_\+func\+\_\+\+\_\+, 0, \textbf{ msg}, \textbf{ data}, \textbf{ len}, false)
\begin{DoxyCompactList}\small\item\em Compare\+: check data in msgb against given data. \end{DoxyCompactList}\item 
\#define \textbf{ msgb\+\_\+eq\+\_\+l1\+\_\+data}(\textbf{ msg},  \textbf{ data},  \textbf{ len})~ \textbf{ \+\_\+msgb\+\_\+eq}(\+\_\+\+\_\+\+FILE\+\_\+\+\_\+, \+\_\+\+\_\+\+LINE\+\_\+\+\_\+, \+\_\+\+\_\+func\+\_\+\+\_\+, 1, \textbf{ msg}, \textbf{ data}, \textbf{ len}, false)
\begin{DoxyCompactList}\small\item\em Compare\+: check L1 data in msgb against given data. \end{DoxyCompactList}\item 
\#define \textbf{ msgb\+\_\+eq\+\_\+l2\+\_\+data}(\textbf{ msg},  \textbf{ data},  \textbf{ len})~ \textbf{ \+\_\+msgb\+\_\+eq}(\+\_\+\+\_\+\+FILE\+\_\+\+\_\+, \+\_\+\+\_\+\+LINE\+\_\+\+\_\+, \+\_\+\+\_\+func\+\_\+\+\_\+, 2, \textbf{ msg}, \textbf{ data}, \textbf{ len}, false)
\begin{DoxyCompactList}\small\item\em Compare\+: check L2 data in msgb against given data. \end{DoxyCompactList}\item 
\#define \textbf{ msgb\+\_\+eq\+\_\+l3\+\_\+data}(\textbf{ msg},  \textbf{ data},  \textbf{ len})~ \textbf{ \+\_\+msgb\+\_\+eq}(\+\_\+\+\_\+\+FILE\+\_\+\+\_\+, \+\_\+\+\_\+\+LINE\+\_\+\+\_\+, \+\_\+\+\_\+func\+\_\+\+\_\+, 3, \textbf{ msg}, \textbf{ data}, \textbf{ len}, false)
\begin{DoxyCompactList}\small\item\em Compare\+: check L3 data in msgb against given data. \end{DoxyCompactList}\item 
\#define \textbf{ msgb\+\_\+eq\+\_\+l4\+\_\+data}(\textbf{ msg},  \textbf{ data},  \textbf{ len})~ \textbf{ \+\_\+msgb\+\_\+eq}(\+\_\+\+\_\+\+FILE\+\_\+\+\_\+, \+\_\+\+\_\+\+LINE\+\_\+\+\_\+, \+\_\+\+\_\+func\+\_\+\+\_\+, 4, \textbf{ msg}, \textbf{ data}, \textbf{ len}, false)
\begin{DoxyCompactList}\small\item\em Compare\+: check L4 data in msgb against given data. \end{DoxyCompactList}\item 
\#define \textbf{ msgb\+\_\+eq\+\_\+data\+\_\+print}(\textbf{ msg},  \textbf{ data},  \textbf{ len})~ \textbf{ \+\_\+msgb\+\_\+eq}(\+\_\+\+\_\+\+FILE\+\_\+\+\_\+, \+\_\+\+\_\+\+LINE\+\_\+\+\_\+, \+\_\+\+\_\+func\+\_\+\+\_\+, 0, \textbf{ msg}, \textbf{ data}, \textbf{ len}, true)
\begin{DoxyCompactList}\small\item\em Compare and print\+: check data in msgb against given data and print errors if any. \end{DoxyCompactList}\item 
\#define \textbf{ msgb\+\_\+eq\+\_\+l1\+\_\+data\+\_\+print}(\textbf{ msg},  \textbf{ data},  \textbf{ len})~ \textbf{ \+\_\+msgb\+\_\+eq}(\+\_\+\+\_\+\+FILE\+\_\+\+\_\+, \+\_\+\+\_\+\+LINE\+\_\+\+\_\+, \+\_\+\+\_\+func\+\_\+\+\_\+, 1, \textbf{ msg}, \textbf{ data}, \textbf{ len}, true)
\begin{DoxyCompactList}\small\item\em Compare and print\+: check L1 data in msgb against given data and print errors if any. \end{DoxyCompactList}\item 
\#define \textbf{ msgb\+\_\+eq\+\_\+l2\+\_\+data\+\_\+print}(\textbf{ msg},  \textbf{ data},  \textbf{ len})~ \textbf{ \+\_\+msgb\+\_\+eq}(\+\_\+\+\_\+\+FILE\+\_\+\+\_\+, \+\_\+\+\_\+\+LINE\+\_\+\+\_\+, \+\_\+\+\_\+func\+\_\+\+\_\+, 2, \textbf{ msg}, \textbf{ data}, \textbf{ len}, true)
\begin{DoxyCompactList}\small\item\em Compare and print\+: check L2 data in msgb against given data and print errors if any. \end{DoxyCompactList}\item 
\#define \textbf{ msgb\+\_\+eq\+\_\+l3\+\_\+data\+\_\+print}(\textbf{ msg},  \textbf{ data},  \textbf{ len})~ \textbf{ \+\_\+msgb\+\_\+eq}(\+\_\+\+\_\+\+FILE\+\_\+\+\_\+, \+\_\+\+\_\+\+LINE\+\_\+\+\_\+, \+\_\+\+\_\+func\+\_\+\+\_\+, 3, \textbf{ msg}, \textbf{ data}, \textbf{ len}, true)
\begin{DoxyCompactList}\small\item\em Compare and print\+: check L3 data in msgb against given data and print errors if any. \end{DoxyCompactList}\item 
\#define \textbf{ msgb\+\_\+eq\+\_\+l4\+\_\+data\+\_\+print}(\textbf{ msg},  \textbf{ data},  \textbf{ len})~ \textbf{ \+\_\+msgb\+\_\+eq}(\+\_\+\+\_\+\+FILE\+\_\+\+\_\+, \+\_\+\+\_\+\+LINE\+\_\+\+\_\+, \+\_\+\+\_\+func\+\_\+\+\_\+, 4, \textbf{ msg}, \textbf{ data}, \textbf{ len}, true)
\begin{DoxyCompactList}\small\item\em Compare and print\+: check L4 data in msgb against given data and print errors if any. \end{DoxyCompactList}\item 
\#define \textbf{ msgb\+\_\+eq}(msg1,  msg2)~\textbf{ msgb\+\_\+eq\+\_\+data}(msg1, \textbf{ msgb\+\_\+data}(msg2), \textbf{ msgb\+\_\+length}(msg2))
\begin{DoxyCompactList}\small\item\em Compare msgbs. \end{DoxyCompactList}\item 
\#define \textbf{ msgb\+\_\+eq\+\_\+l1}(msg1,  msg2)~\textbf{ msgb\+\_\+eq\+\_\+l1\+\_\+data}(msg1, \textbf{ msgb\+\_\+l1}(msg2), \textbf{ msgb\+\_\+l1len}(msg2))
\begin{DoxyCompactList}\small\item\em Compare msgbs L1 content. \end{DoxyCompactList}\item 
\#define \textbf{ msgb\+\_\+eq\+\_\+l2}(msg1,  msg2)~\textbf{ msgb\+\_\+eq\+\_\+l2\+\_\+data}(msg1, \textbf{ msgb\+\_\+l2}(msg2), \textbf{ msgb\+\_\+l2len}(msg2))
\begin{DoxyCompactList}\small\item\em Compare msgbs L2 content. \end{DoxyCompactList}\item 
\#define \textbf{ msgb\+\_\+eq\+\_\+l3}(msg1,  msg2)~\textbf{ msgb\+\_\+eq\+\_\+l3\+\_\+data}(msg1, \textbf{ msgb\+\_\+l3}(msg2), \textbf{ msgb\+\_\+l3len}(msg2))
\begin{DoxyCompactList}\small\item\em Compare msgbs L3 content. \end{DoxyCompactList}\item 
\#define \textbf{ msgb\+\_\+eq\+\_\+l4}(msg1,  msg2)~\textbf{ msgb\+\_\+eq\+\_\+l4\+\_\+data}(msg1, \textbf{ msgb\+\_\+l4}(msg2), \textbf{ msgb\+\_\+l4len}(msg2))
\begin{DoxyCompactList}\small\item\em Compare msgbs L4 content. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
struct \textbf{ msgb} $\ast$ \textbf{ msgb\+\_\+alloc\+\_\+c} (const void $\ast$ctx, uint16\+\_\+t size, const char $\ast$\textbf{ name})
\begin{DoxyCompactList}\small\item\em Allocate a new message buffer from given talloc context. \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ msgb\+\_\+alloc} (uint16\+\_\+t size, const char $\ast$\textbf{ name})
\begin{DoxyCompactList}\small\item\em Allocate a new message buffer from tall\+\_\+msgb\+\_\+ctx. \end{DoxyCompactList}\item 
void \textbf{ msgb\+\_\+free} (struct \textbf{ msgb} $\ast$m)
\begin{DoxyCompactList}\small\item\em Release given message buffer. \end{DoxyCompactList}\item 
void \textbf{ msgb\+\_\+enqueue} (struct \textbf{ llist\+\_\+head} $\ast$queue, struct \textbf{ msgb} $\ast$\textbf{ msg})
\begin{DoxyCompactList}\small\item\em Enqueue message buffer to tail of a queue. \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ msgb\+\_\+dequeue} (struct \textbf{ llist\+\_\+head} $\ast$queue)
\begin{DoxyCompactList}\small\item\em Dequeue message buffer from head of queue. \end{DoxyCompactList}\item 
void \textbf{ msgb\+\_\+reset} (struct \textbf{ msgb} $\ast$\textbf{ msg})
\begin{DoxyCompactList}\small\item\em Re-\/set all message buffer pointers. \end{DoxyCompactList}\item 
uint16\+\_\+t \textbf{ msgb\+\_\+length} (const struct \textbf{ msgb} $\ast$\textbf{ msg})
\begin{DoxyCompactList}\small\item\em get length of message buffer \end{DoxyCompactList}\item 
const char $\ast$ \textbf{ msgb\+\_\+hexdump} (const struct \textbf{ msgb} $\ast$\textbf{ msg})
\begin{DoxyCompactList}\small\item\em Return a (static) buffer containing a hexdump of the msg. \end{DoxyCompactList}\item 
char $\ast$ \textbf{ msgb\+\_\+hexdump\+\_\+buf} (char $\ast$buf, size\+\_\+t buf\+\_\+len, const struct \textbf{ msgb} $\ast$\textbf{ msg})
\begin{DoxyCompactList}\small\item\em fill user-\/provided buffer with hexdump of the msg. \end{DoxyCompactList}\item 
char $\ast$ \textbf{ msgb\+\_\+hexdump\+\_\+c} (const void $\ast$ctx, const struct \textbf{ msgb} $\ast$\textbf{ msg})
\begin{DoxyCompactList}\small\item\em Return a dynamically allocated buffer containing a hexdump of the msg. \end{DoxyCompactList}\item 
int \textbf{ msgb\+\_\+resize\+\_\+area} (struct \textbf{ msgb} $\ast$\textbf{ msg}, uint8\+\_\+t $\ast$area, int old\+\_\+size, int new\+\_\+size)
\begin{DoxyCompactList}\small\item\em Resize an area within an msgb. \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ msgb\+\_\+copy} (const struct \textbf{ msgb} $\ast$\textbf{ msg}, const char $\ast$\textbf{ name})
\begin{DoxyCompactList}\small\item\em Copy an msgb. \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ msgb\+\_\+copy\+\_\+c} (const void $\ast$ctx, const struct \textbf{ msgb} $\ast$\textbf{ msg}, const char $\ast$\textbf{ name})
\begin{DoxyCompactList}\small\item\em Copy an msgb. \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ msgb\+\_\+copy\+\_\+resize} (const struct \textbf{ msgb} $\ast$\textbf{ msg}, uint16\+\_\+t new\+\_\+len, const char $\ast$\textbf{ name})
\begin{DoxyCompactList}\small\item\em Copy an msgb with memory reallocation. \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ msgb\+\_\+copy\+\_\+resize\+\_\+c} (const void $\ast$ctx, const struct \textbf{ msgb} $\ast$\textbf{ msg}, uint16\+\_\+t new\+\_\+len, const char $\ast$\textbf{ name})
\begin{DoxyCompactList}\small\item\em Copy an msgb with memory reallocation. \end{DoxyCompactList}\item 
static int \textbf{ msgb\+\_\+test\+\_\+invariant} (const struct \textbf{ msgb} $\ast$\textbf{ msg})
\begin{DoxyCompactList}\small\item\em Check a message buffer for consistency. \end{DoxyCompactList}\item 
static void \textbf{ msgb\+\_\+queue\+\_\+free} (struct \textbf{ llist\+\_\+head} $\ast$queue)
\begin{DoxyCompactList}\small\item\em Free all msgbs from a queue built with \doxyref{msgb\+\_\+enqueue()}{p.}{group__msgb_gacb8dd9493eb7fc266ce159e3325c6504}. \end{DoxyCompactList}\item 
static void \textbf{ msgb\+\_\+enqueue\+\_\+count} (struct \textbf{ llist\+\_\+head} $\ast$queue, struct \textbf{ msgb} $\ast$\textbf{ msg}, unsigned int $\ast$count)
\begin{DoxyCompactList}\small\item\em Enqueue message buffer to tail of a queue and increment queue size counter. \end{DoxyCompactList}\item 
static struct \textbf{ msgb} $\ast$ \textbf{ msgb\+\_\+dequeue\+\_\+count} (struct \textbf{ llist\+\_\+head} $\ast$queue, unsigned int $\ast$count)
\begin{DoxyCompactList}\small\item\em Dequeue message buffer from head of queue and decrement queue size counter. \end{DoxyCompactList}\item 
static unsigned int \textbf{ msgb\+\_\+l1len} (const struct \textbf{ msgb} $\ast$\textbf{ msgb})
\begin{DoxyCompactList}\small\item\em determine length of L1 message \end{DoxyCompactList}\item 
static unsigned int \textbf{ msgb\+\_\+l2len} (const struct \textbf{ msgb} $\ast$\textbf{ msgb})
\begin{DoxyCompactList}\small\item\em determine length of L2 message \end{DoxyCompactList}\item 
static unsigned int \textbf{ msgb\+\_\+l3len} (const struct \textbf{ msgb} $\ast$\textbf{ msgb})
\begin{DoxyCompactList}\small\item\em determine length of L3 message \end{DoxyCompactList}\item 
static unsigned int \textbf{ msgb\+\_\+l4len} (const struct \textbf{ msgb} $\ast$\textbf{ msgb})
\begin{DoxyCompactList}\small\item\em determine length of L4 message \end{DoxyCompactList}\item 
static unsigned int \textbf{ msgb\+\_\+headlen} (const struct \textbf{ msgb} $\ast$\textbf{ msgb})
\begin{DoxyCompactList}\small\item\em determine the length of the header \end{DoxyCompactList}\item 
static int \textbf{ msgb\+\_\+tailroom} (const struct \textbf{ msgb} $\ast$\textbf{ msgb})
\begin{DoxyCompactList}\small\item\em determine how much tail room is left in msgb \end{DoxyCompactList}\item 
static int \textbf{ msgb\+\_\+headroom} (const struct \textbf{ msgb} $\ast$\textbf{ msgb})
\begin{DoxyCompactList}\small\item\em determine the amount of headroom in msgb \end{DoxyCompactList}\item 
static unsigned char $\ast$ \textbf{ msgb\+\_\+put} (struct \textbf{ msgb} $\ast$\textbf{ msgb}, unsigned int \textbf{ len})
\begin{DoxyCompactList}\small\item\em append data to end of message buffer \end{DoxyCompactList}\item 
static void \textbf{ msgb\+\_\+put\+\_\+u8} (struct \textbf{ msgb} $\ast$\textbf{ msgb}, uint8\+\_\+t word)
\begin{DoxyCompactList}\small\item\em append a uint8 value to the end of the message \end{DoxyCompactList}\item 
static void \textbf{ msgb\+\_\+put\+\_\+u16} (struct \textbf{ msgb} $\ast$\textbf{ msgb}, uint16\+\_\+t word)
\begin{DoxyCompactList}\small\item\em append a uint16 value to the end of the message \end{DoxyCompactList}\item 
static void \textbf{ msgb\+\_\+put\+\_\+u32} (struct \textbf{ msgb} $\ast$\textbf{ msgb}, uint32\+\_\+t word)
\begin{DoxyCompactList}\small\item\em append a uint32 value to the end of the message \end{DoxyCompactList}\item 
static unsigned char $\ast$ \textbf{ msgb\+\_\+get} (struct \textbf{ msgb} $\ast$\textbf{ msgb}, unsigned int \textbf{ len})
\begin{DoxyCompactList}\small\item\em remove data from end of message \end{DoxyCompactList}\item 
static uint8\+\_\+t \textbf{ msgb\+\_\+get\+\_\+u8} (struct \textbf{ msgb} $\ast$\textbf{ msgb})
\begin{DoxyCompactList}\small\item\em remove uint8 from end of message \end{DoxyCompactList}\item 
static uint16\+\_\+t \textbf{ msgb\+\_\+get\+\_\+u16} (struct \textbf{ msgb} $\ast$\textbf{ msgb})
\begin{DoxyCompactList}\small\item\em remove uint16 from end of message \end{DoxyCompactList}\item 
static uint32\+\_\+t \textbf{ msgb\+\_\+get\+\_\+u32} (struct \textbf{ msgb} $\ast$\textbf{ msgb})
\begin{DoxyCompactList}\small\item\em remove uint32 from end of message \end{DoxyCompactList}\item 
static unsigned char $\ast$ \textbf{ msgb\+\_\+push} (struct \textbf{ msgb} $\ast$\textbf{ msgb}, unsigned int \textbf{ len})
\begin{DoxyCompactList}\small\item\em prepend (push) some data to start of message \end{DoxyCompactList}\item 
static void \textbf{ msgb\+\_\+push\+\_\+u8} (struct \textbf{ msgb} $\ast$\textbf{ msg}, uint8\+\_\+t word)
\begin{DoxyCompactList}\small\item\em prepend a uint8 value to the head of the message \end{DoxyCompactList}\item 
static void \textbf{ msgb\+\_\+push\+\_\+u16} (struct \textbf{ msgb} $\ast$\textbf{ msg}, uint16\+\_\+t word)
\begin{DoxyCompactList}\small\item\em prepend a uint16 value to the head of the message \end{DoxyCompactList}\item 
static void \textbf{ msgb\+\_\+push\+\_\+u32} (struct \textbf{ msgb} $\ast$\textbf{ msg}, uint32\+\_\+t word)
\begin{DoxyCompactList}\small\item\em prepend a uint32 value to the head of the message \end{DoxyCompactList}\item 
static unsigned char $\ast$ \textbf{ msgb\+\_\+push\+\_\+tl} (struct \textbf{ msgb} $\ast$\textbf{ msgb}, uint8\+\_\+t tag)
\item 
static unsigned char $\ast$ \textbf{ msgb\+\_\+pull} (struct \textbf{ msgb} $\ast$\textbf{ msgb}, unsigned int \textbf{ len})
\begin{DoxyCompactList}\small\item\em remove (pull) a header from the front of the message buffer \end{DoxyCompactList}\item 
static unsigned char $\ast$ \textbf{ msgb\+\_\+pull\+\_\+to\+\_\+l3} (struct \textbf{ msgb} $\ast$\textbf{ msg})
\begin{DoxyCompactList}\small\item\em remove (pull) all headers in front of l3h from the message buffer. \end{DoxyCompactList}\item 
static unsigned char $\ast$ \textbf{ msgb\+\_\+pull\+\_\+to\+\_\+l2} (struct \textbf{ msgb} $\ast$\textbf{ msg})
\begin{DoxyCompactList}\small\item\em remove (pull) all headers in front of l2h from the message buffer. \end{DoxyCompactList}\item 
static uint8\+\_\+t \textbf{ msgb\+\_\+pull\+\_\+u8} (struct \textbf{ msgb} $\ast$\textbf{ msgb})
\begin{DoxyCompactList}\small\item\em remove uint8 from front of message \end{DoxyCompactList}\item 
static uint16\+\_\+t \textbf{ msgb\+\_\+pull\+\_\+u16} (struct \textbf{ msgb} $\ast$\textbf{ msgb})
\begin{DoxyCompactList}\small\item\em remove uint16 from front of message \end{DoxyCompactList}\item 
static uint32\+\_\+t \textbf{ msgb\+\_\+pull\+\_\+u32} (struct \textbf{ msgb} $\ast$\textbf{ msgb})
\begin{DoxyCompactList}\small\item\em remove uint32 from front of message \end{DoxyCompactList}\item 
static void \textbf{ msgb\+\_\+reserve} (struct \textbf{ msgb} $\ast$\textbf{ msg}, int \textbf{ len})
\begin{DoxyCompactList}\small\item\em Increase headroom of empty msgb, reducing the tailroom. \end{DoxyCompactList}\item 
static int \textbf{ msgb\+\_\+trim} (struct \textbf{ msgb} $\ast$\textbf{ msg}, int \textbf{ len})
\begin{DoxyCompactList}\small\item\em Trim the msgb to a given absolute length. \end{DoxyCompactList}\item 
static int \textbf{ msgb\+\_\+l3trim} (struct \textbf{ msgb} $\ast$\textbf{ msg}, int l3len)
\begin{DoxyCompactList}\small\item\em Trim the msgb to a given layer3 length. \end{DoxyCompactList}\item 
static struct \textbf{ msgb} $\ast$ \textbf{ msgb\+\_\+alloc\+\_\+headroom\+\_\+c} (const void $\ast$ctx, uint16\+\_\+t size, uint16\+\_\+t headroom, const char $\ast$\textbf{ name})
\begin{DoxyCompactList}\small\item\em Allocate message buffer with specified headroom from specified talloc context. \end{DoxyCompactList}\item 
static struct \textbf{ msgb} $\ast$ \textbf{ msgb\+\_\+alloc\+\_\+headroom} (uint16\+\_\+t size, uint16\+\_\+t headroom, const char $\ast$\textbf{ name})
\begin{DoxyCompactList}\small\item\em Allocate message buffer with specified headroom. \end{DoxyCompactList}\item 
bool \textbf{ \+\_\+msgb\+\_\+eq} (const char $\ast$\textbf{ file}, size\+\_\+t line, const char $\ast$func, uint8\+\_\+t \textbf{ level}, const struct \textbf{ msgb} $\ast$\textbf{ msg}, const uint8\+\_\+t $\ast$\textbf{ data}, size\+\_\+t \textbf{ len}, bool print)
\begin{DoxyCompactList}\small\item\em Compare and print\+: check data in msgb against given data and print errors if any. \end{DoxyCompactList}\item 
uint8\+\_\+t $\ast$ \textbf{ msgb\+\_\+data} (const struct \textbf{ msgb} $\ast$\textbf{ msg})
\begin{DoxyCompactList}\small\item\em get pointer to data section of message buffer \end{DoxyCompactList}\item 
void $\ast$ \textbf{ msgb\+\_\+talloc\+\_\+ctx\+\_\+init} (void $\ast$root\+\_\+ctx, unsigned int pool\+\_\+size)
\begin{DoxyCompactList}\small\item\em Initialize a msgb talloc context for \doxyref{msgb\+\_\+alloc}{p.}{group__msgb_ga25906d049cbad1bf2d5a785319268ea8}. \end{DoxyCompactList}\item 
void \textbf{ msgb\+\_\+set\+\_\+talloc\+\_\+ctx} (void $\ast$ctx)
\begin{DoxyCompactList}\small\item\em Set the talloc context for \doxyref{msgb\+\_\+alloc}{p.}{group__msgb_ga25906d049cbad1bf2d5a785319268ea8} Deprecated, use \doxyref{msgb\+\_\+talloc\+\_\+ctx\+\_\+init()}{p.}{group__msgb_ga66fd1ee6b6667bf707fcef99ee2fb7db} instead. \end{DoxyCompactList}\item 
int \textbf{ msgb\+\_\+printf} (struct \textbf{ msgb} $\ast$\textbf{ msgb}, const char $\ast$format,...)
\begin{DoxyCompactList}\small\item\em Print a string to the end of message buffer. \end{DoxyCompactList}\item 
static const char $\ast$ \textbf{ msgb\+\_\+hexdump\+\_\+l1} (const struct \textbf{ msgb} $\ast$\textbf{ msg})
\item 
static const char $\ast$ \textbf{ msgb\+\_\+hexdump\+\_\+l2} (const struct \textbf{ msgb} $\ast$\textbf{ msg})
\item 
static const char $\ast$ \textbf{ msgb\+\_\+hexdump\+\_\+l3} (const struct \textbf{ msgb} $\ast$\textbf{ msg})
\item 
static const char $\ast$ \textbf{ msgb\+\_\+hexdump\+\_\+l4} (const struct \textbf{ msgb} $\ast$\textbf{ msg})
\end{DoxyCompactItemize}
