\doxysection{src/osmux.c File Reference}
\label{osmux_8c}\index{src/osmux.c@{src/osmux.c}}


Osmocom multiplex protocol helpers.  


{\ttfamily \#include $<$stdio.\+h$>$}\newline
{\ttfamily \#include $<$string.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/msgb.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/timer.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/timer\+\_\+compat.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/select.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/talloc.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/logging.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/netif/amr.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/netif/rtp.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/netif/osmux.\+h$>$}\newline
{\ttfamily \#include $<$arpa/inet.\+h$>$}\newline
\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \textbf{ SNPRINTF\+\_\+\+BUFFER\+\_\+\+SIZE}(ret,  remain,  offset)
\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
int \textbf{ osmux\+\_\+snprintf} (char $\ast$buf, size\+\_\+t size, struct msgb $\ast$msg)
\begin{DoxyCompactList}\small\item\em Print osmux header fields and payload from msg into buffer buf. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Osmocom multiplex protocol helpers. 



\doxysubsection{Macro Definition Documentation}
\mbox{\label{osmux_8c_a6aef25db0cf5336a997cae7c402e55be}} 
\index{osmux.c@{osmux.c}!SNPRINTF\_BUFFER\_SIZE@{SNPRINTF\_BUFFER\_SIZE}}
\index{SNPRINTF\_BUFFER\_SIZE@{SNPRINTF\_BUFFER\_SIZE}!osmux.c@{osmux.c}}
\doxysubsubsection{SNPRINTF\_BUFFER\_SIZE}
{\footnotesize\ttfamily \#define SNPRINTF\+\_\+\+BUFFER\+\_\+\+SIZE(\begin{DoxyParamCaption}\item[{}]{ret,  }\item[{}]{remain,  }\item[{}]{offset }\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{        \textcolor{keywordflow}{if} (ret < 0)                                    \(\backslash\)}
\DoxyCodeLine{                ret = 0;                                \(\backslash\)}
\DoxyCodeLine{        offset += ret;                                  \(\backslash\)}
\DoxyCodeLine{        if (ret > remain)                               \(\backslash\)}
\DoxyCodeLine{                ret = remain;                           \(\backslash\)}
\DoxyCodeLine{        remain -\/= ret;}

\end{DoxyCode}
