\doxysection{msgb Struct Reference}
\label{structmsgb}\index{msgb@{msgb}}


Osmocom message buffer.  




{\ttfamily \#include $<$msgb.\+h$>$}

\doxysubsection*{Data Fields}
\begin{DoxyCompactItemize}
\item 
struct \textbf{ llist\+\_\+head} \textbf{ list}
\begin{DoxyCompactList}\small\item\em linked list header \end{DoxyCompactList}\item 
\begin{tabbing}
xx\=xx\=xx\=xx\=xx\=xx\=xx\=xx\=xx\=\kill
union \{\\
\>void $\ast$ \textbf{ dst}\\
\>\>{\em reference of origin/destination }\\
\>struct gsm\_bts\_trx $\ast$ \textbf{ trx}\\
\}; \\

\end{tabbing}\item 
struct gsm\+\_\+lchan $\ast$ \textbf{ lchan}
\begin{DoxyCompactList}\small\item\em logical channel \end{DoxyCompactList}\item 
unsigned char $\ast$ \textbf{ l1h}
\begin{DoxyCompactList}\small\item\em pointer to Layer1 header (if any) \end{DoxyCompactList}\item 
unsigned char $\ast$ \textbf{ l2h}
\begin{DoxyCompactList}\small\item\em pointer to A-\/bis layer 2 header\+: OML, RSL(\+RLL), NS \end{DoxyCompactList}\item 
unsigned char $\ast$ \textbf{ l3h}
\begin{DoxyCompactList}\small\item\em pointer to Layer 3 header. \end{DoxyCompactList}\item 
unsigned char $\ast$ \textbf{ l4h}
\begin{DoxyCompactList}\small\item\em pointer to layer 4 header \end{DoxyCompactList}\item 
unsigned long \textbf{ cb} [5]
\begin{DoxyCompactList}\small\item\em control buffer \end{DoxyCompactList}\item 
uint16\+\_\+t \textbf{ data\+\_\+len}
\begin{DoxyCompactList}\small\item\em length of underlying data array \end{DoxyCompactList}\item 
uint16\+\_\+t \textbf{ len}
\begin{DoxyCompactList}\small\item\em length of bytes used in msgb \end{DoxyCompactList}\item 
unsigned char $\ast$ \textbf{ head}
\begin{DoxyCompactList}\small\item\em start of underlying memory buffer \end{DoxyCompactList}\item 
unsigned char $\ast$ \textbf{ tail}
\begin{DoxyCompactList}\small\item\em end of message in buffer \end{DoxyCompactList}\item 
unsigned char $\ast$ \textbf{ data}
\begin{DoxyCompactList}\small\item\em start of message in buffer \end{DoxyCompactList}\item 
unsigned char \textbf{ \+\_\+data} [0]
\begin{DoxyCompactList}\small\item\em optional immediate data array \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Osmocom message buffer. 

\doxysubsection{Field Documentation}
\mbox{\label{structmsgb_af82ef60187efc02a21d405147343d6a9}} 
\doxysubsubsection{}
{\footnotesize\ttfamily union  \{ ... \}  msgb\+::@17}

\mbox{\label{structmsgb_a61fa77b4345e3a6db6d58a39c5e83177}} 
\index{msgb@{msgb}!\_data@{\_data}}
\index{\_data@{\_data}!msgb@{msgb}}
\doxysubsubsection{\_data}
{\footnotesize\ttfamily unsigned char msgb\+::\+\_\+data[0]}



optional immediate data array 



Referenced by \textbf{ msgb\+\_\+copy\+\_\+resize\+\_\+c()}, \textbf{ msgb\+\_\+push()}, and \textbf{ msgb\+\_\+put()}.

\mbox{\label{structmsgb_a031626e62e3cd95929910a78b58e27a8}} 
\index{msgb@{msgb}!cb@{cb}}
\index{cb@{cb}!msgb@{msgb}}
\doxysubsubsection{cb}
{\footnotesize\ttfamily unsigned long msgb\+::cb[5]}



control buffer 

\mbox{\label{structmsgb_a3a36fd9330070d1e56d0503dde190803}} 
\index{msgb@{msgb}!data@{data}}
\index{data@{data}!msgb@{msgb}}
\doxysubsubsection{data}
{\footnotesize\ttfamily unsigned char$\ast$ msgb\+::data}



start of message in buffer 



Referenced by \textbf{ msgb\+\_\+copy\+\_\+resize\+\_\+c()}, \textbf{ msgb\+\_\+headroom()}, \textbf{ msgb\+\_\+pull()}, \textbf{ msgb\+\_\+push()}, and \textbf{ osmo\+\_\+sercomm\+\_\+drv\+\_\+pull()}.

\mbox{\label{structmsgb_ad9e56fcc205b34f6ae481b64c197b44d}} 
\index{msgb@{msgb}!data\_len@{data\_len}}
\index{data\_len@{data\_len}!msgb@{msgb}}
\doxysubsubsection{data\_len}
{\footnotesize\ttfamily uint16\+\_\+t msgb\+::data\+\_\+len}



length of underlying data array 



Referenced by \textbf{ msgb\+\_\+headlen()}, \textbf{ msgb\+\_\+push()}, \textbf{ msgb\+\_\+put()}, and \textbf{ msgb\+\_\+tailroom()}.

\mbox{\label{structmsgb_a3f5d086ad586cfcb8c805b152befa9a1}} 
\index{msgb@{msgb}!dst@{dst}}
\index{dst@{dst}!msgb@{msgb}}
\doxysubsubsection{dst}
{\footnotesize\ttfamily void$\ast$ msgb\+::dst}



reference of origin/destination 

\mbox{\label{structmsgb_afb91181f130ef44fea8cacd94bf2d516}} 
\index{msgb@{msgb}!head@{head}}
\index{head@{head}!msgb@{msgb}}
\doxysubsubsection{head}
{\footnotesize\ttfamily unsigned char$\ast$ msgb\+::head}



start of underlying memory buffer 



Referenced by \textbf{ msgb\+\_\+copy\+\_\+resize\+\_\+c()}, \textbf{ msgb\+\_\+headroom()}, \textbf{ msgb\+\_\+push()}, \textbf{ msgb\+\_\+put()}, and \textbf{ msgb\+\_\+tailroom()}.

\mbox{\label{structmsgb_afcf0eda8d8acc8744a3e0d7b29c0d99a}} 
\index{msgb@{msgb}!l1h@{l1h}}
\index{l1h@{l1h}!msgb@{msgb}}
\doxysubsubsection{l1h}
{\footnotesize\ttfamily unsigned char$\ast$ msgb\+::l1h}



pointer to Layer1 header (if any) 



Referenced by \textbf{ msgb\+\_\+copy\+\_\+resize\+\_\+c()}, and \textbf{ msgb\+\_\+l1len()}.

\mbox{\label{structmsgb_a078a458fb0d6f2dd10a95cb1344ad385}} 
\index{msgb@{msgb}!l2h@{l2h}}
\index{l2h@{l2h}!msgb@{msgb}}
\doxysubsubsection{l2h}
{\footnotesize\ttfamily unsigned char$\ast$ msgb\+::l2h}



pointer to A-\/bis layer 2 header\+: OML, RSL(\+RLL), NS 



Referenced by \textbf{ msgb\+\_\+copy\+\_\+resize\+\_\+c()}, and \textbf{ msgb\+\_\+l2len()}.

\mbox{\label{structmsgb_a6bffebeedd2a24ecafd656cf6136a1eb}} 
\index{msgb@{msgb}!l3h@{l3h}}
\index{l3h@{l3h}!msgb@{msgb}}
\doxysubsubsection{l3h}
{\footnotesize\ttfamily unsigned char$\ast$ msgb\+::l3h}



pointer to Layer 3 header. 

For OML\+: FOM; RSL\+: 04.\+08; GPRS\+: BSSGP 

Referenced by \textbf{ msgb\+\_\+copy\+\_\+resize\+\_\+c()}, and \textbf{ msgb\+\_\+l3len()}.

\mbox{\label{structmsgb_aba32a66d2e545ceed675bbba031ad5fc}} 
\index{msgb@{msgb}!l4h@{l4h}}
\index{l4h@{l4h}!msgb@{msgb}}
\doxysubsubsection{l4h}
{\footnotesize\ttfamily unsigned char$\ast$ msgb\+::l4h}



pointer to layer 4 header 



Referenced by \textbf{ msgb\+\_\+copy\+\_\+resize\+\_\+c()}, and \textbf{ msgb\+\_\+l4len()}.

\mbox{\label{structmsgb_a61f8ce8f46dafe4f0d327beea9153098}} 
\index{msgb@{msgb}!lchan@{lchan}}
\index{lchan@{lchan}!msgb@{msgb}}
\doxysubsubsection{lchan}
{\footnotesize\ttfamily struct gsm\+\_\+lchan$\ast$ msgb\+::lchan}



logical channel 

\mbox{\label{structmsgb_a14fb7865aeb5b81cb00e9c643c29a810}} 
\index{msgb@{msgb}!len@{len}}
\index{len@{len}!msgb@{msgb}}
\doxysubsubsection{len}
{\footnotesize\ttfamily uint16\+\_\+t msgb\+::len}



length of bytes used in msgb 



Referenced by \textbf{ msgb\+\_\+copy\+\_\+resize\+\_\+c()}, \textbf{ msgb\+\_\+get()}, \textbf{ msgb\+\_\+headlen()}, \textbf{ msgb\+\_\+pull()}, \textbf{ msgb\+\_\+push()}, \textbf{ msgb\+\_\+push\+\_\+tl()}, and \textbf{ msgb\+\_\+put()}.

\mbox{\label{structmsgb_adf938257627add0f055a45a206b2a451}} 
\index{msgb@{msgb}!list@{list}}
\index{list@{list}!msgb@{msgb}}
\doxysubsubsection{list}
{\footnotesize\ttfamily struct \textbf{ llist\+\_\+head} msgb\+::list}



linked list header 

\mbox{\label{structmsgb_a8caeb3b88050ba337edde4fd90741d85}} 
\index{msgb@{msgb}!tail@{tail}}
\index{tail@{tail}!msgb@{msgb}}
\doxysubsubsection{tail}
{\footnotesize\ttfamily unsigned char$\ast$ msgb\+::tail}



end of message in buffer 



Referenced by \textbf{ iofd\+\_\+poll\+\_\+ofd\+\_\+cb\+\_\+recvmsg\+\_\+sendmsg()}, \textbf{ msgb\+\_\+copy\+\_\+resize\+\_\+c()}, \textbf{ msgb\+\_\+get()}, \textbf{ msgb\+\_\+l1len()}, \textbf{ msgb\+\_\+l2len()}, \textbf{ msgb\+\_\+l3len()}, \textbf{ msgb\+\_\+l4len()}, \textbf{ msgb\+\_\+printf()}, \textbf{ msgb\+\_\+put()}, \textbf{ msgb\+\_\+tailroom()}, and \textbf{ osmo\+\_\+sercomm\+\_\+drv\+\_\+pull()}.

\mbox{\label{structmsgb_aa5d3dd9938edbc55c5dbc0472f364df7}} 
\index{msgb@{msgb}!trx@{trx}}
\index{trx@{trx}!msgb@{msgb}}
\doxysubsubsection{trx}
{\footnotesize\ttfamily struct gsm\+\_\+bts\+\_\+trx$\ast$ msgb\+::trx}



The documentation for this struct was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
include/osmocom/core/\textbf{ msgb.\+h}\end{DoxyCompactItemize}
