\doxysection{include/osmocom/core/gsmtap\+\_\+util.h File Reference}
\label{gsmtap__util_8h}\index{include/osmocom/core/gsmtap\_util.h@{include/osmocom/core/gsmtap\_util.h}}
{\ttfamily \#include $<$stdint.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/write\+\_\+queue.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/select.\+h$>$}\newline
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
uint8\+\_\+t \textbf{ chantype\+\_\+rsl2gsmtap2} (uint8\+\_\+t rsl\+\_\+chantype, uint8\+\_\+t \textbf{ link\+\_\+id}, bool user\+\_\+plane)
\begin{DoxyCompactList}\small\item\em convert RSL channel number to GSMTAP channel type \end{DoxyCompactList}\item 
uint8\+\_\+t \textbf{ chantype\+\_\+rsl2gsmtap} (uint8\+\_\+t rsl\+\_\+chantype, uint8\+\_\+t \textbf{ link\+\_\+id})
\begin{DoxyCompactList}\small\item\em convert RSL channel number to GSMTAP channel type \end{DoxyCompactList}\item 
void \textbf{ chantype\+\_\+gsmtap2rsl} (uint8\+\_\+t gsmtap\+\_\+chantype, uint8\+\_\+t $\ast$rsl\+\_\+chantype, uint8\+\_\+t $\ast$\textbf{ link\+\_\+id})
\begin{DoxyCompactList}\small\item\em convert GSMTAP channel type to RSL channel number + Link ID \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsmtap\+\_\+makemsg\+\_\+ex} (uint8\+\_\+t \textbf{ type}, uint16\+\_\+t \textbf{ arfcn}, uint8\+\_\+t \textbf{ ts}, uint8\+\_\+t chan\+\_\+type, uint8\+\_\+t ss, uint32\+\_\+t fn, int8\+\_\+t \textbf{ signal\+\_\+dbm}, int8\+\_\+t snr, const uint8\+\_\+t $\ast$\textbf{ data}, unsigned int \textbf{ len})
\begin{DoxyCompactList}\small\item\em create an arbitrary type GSMTAP message \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsmtap\+\_\+makemsg} (uint16\+\_\+t \textbf{ arfcn}, uint8\+\_\+t \textbf{ ts}, uint8\+\_\+t chan\+\_\+type, uint8\+\_\+t ss, uint32\+\_\+t fn, int8\+\_\+t \textbf{ signal\+\_\+dbm}, int8\+\_\+t snr, const uint8\+\_\+t $\ast$\textbf{ data}, unsigned int \textbf{ len})
\begin{DoxyCompactList}\small\item\em create L1/\+L2 data and put it into GSMTAP \end{DoxyCompactList}\item 
int \textbf{ gsmtap\+\_\+inst\+\_\+fd} (struct \textbf{ gsmtap\+\_\+inst} $\ast$gti)
\begin{DoxyCompactList}\small\item\em Deprecated, use \doxyref{gsmtap\+\_\+inst\+\_\+fd2()}{p.}{group__gsmtap_gade1327e89e4b4fe0e08bf9947ec99a04} instead. \end{DoxyCompactList}\item 
int \textbf{ gsmtap\+\_\+inst\+\_\+fd2} (const struct \textbf{ gsmtap\+\_\+inst} $\ast$gti)
\begin{DoxyCompactList}\small\item\em obtain the file descriptor associated with a gsmtap instance \end{DoxyCompactList}\item 
int \textbf{ gsmtap\+\_\+source\+\_\+init\+\_\+fd} (const char $\ast$\textbf{ host}, uint16\+\_\+t port)
\item 
int \textbf{ gsmtap\+\_\+source\+\_\+init\+\_\+fd2} (const char $\ast$local\+\_\+host, uint16\+\_\+t local\+\_\+port, const char $\ast$rem\+\_\+host, uint16\+\_\+t rem\+\_\+port)
\item 
int \textbf{ gsmtap\+\_\+source\+\_\+add\+\_\+sink\+\_\+fd} (int gsmtap\+\_\+fd)
\item 
struct \textbf{ gsmtap\+\_\+inst} $\ast$ \textbf{ gsmtap\+\_\+source\+\_\+init} (const char $\ast$\textbf{ host}, uint16\+\_\+t port, int ofd\+\_\+wq\+\_\+mode)
\item 
struct \textbf{ gsmtap\+\_\+inst} $\ast$ \textbf{ gsmtap\+\_\+source\+\_\+init2} (const char $\ast$local\+\_\+host, uint16\+\_\+t local\+\_\+port, const char $\ast$rem\+\_\+host, uint16\+\_\+t rem\+\_\+port, int ofd\+\_\+wq\+\_\+mode)
\item 
void \textbf{ gsmtap\+\_\+source\+\_\+free} (struct \textbf{ gsmtap\+\_\+inst} $\ast$gti)
\item 
int \textbf{ gsmtap\+\_\+source\+\_\+add\+\_\+sink} (struct \textbf{ gsmtap\+\_\+inst} $\ast$gti)
\item 
int \textbf{ gsmtap\+\_\+sendmsg} (struct \textbf{ gsmtap\+\_\+inst} $\ast$gti, struct \textbf{ msgb} $\ast$\textbf{ msg})
\item 
int \textbf{ gsmtap\+\_\+sendmsg\+\_\+free} (struct \textbf{ gsmtap\+\_\+inst} $\ast$gti, struct \textbf{ msgb} $\ast$\textbf{ msg})
\item 
int \textbf{ gsmtap\+\_\+send\+\_\+ex} (struct \textbf{ gsmtap\+\_\+inst} $\ast$gti, uint8\+\_\+t \textbf{ type}, uint16\+\_\+t \textbf{ arfcn}, uint8\+\_\+t \textbf{ ts}, uint8\+\_\+t chan\+\_\+type, uint8\+\_\+t ss, uint32\+\_\+t fn, int8\+\_\+t \textbf{ signal\+\_\+dbm}, int8\+\_\+t snr, const uint8\+\_\+t $\ast$\textbf{ data}, unsigned int \textbf{ len})
\item 
int \textbf{ gsmtap\+\_\+send} (struct \textbf{ gsmtap\+\_\+inst} $\ast$gti, uint16\+\_\+t \textbf{ arfcn}, uint8\+\_\+t \textbf{ ts}, uint8\+\_\+t chan\+\_\+type, uint8\+\_\+t ss, uint32\+\_\+t fn, int8\+\_\+t \textbf{ signal\+\_\+dbm}, int8\+\_\+t snr, const uint8\+\_\+t $\ast$\textbf{ data}, unsigned int \textbf{ len})
\end{DoxyCompactItemize}
\doxysubsection*{Variables}
\begin{DoxyCompactItemize}
\item 
const struct \textbf{ value\+\_\+string} \textbf{ gsmtap\+\_\+gsm\+\_\+channel\+\_\+names} [$\,$]
\item 
const struct \textbf{ value\+\_\+string} \textbf{ gsmtap\+\_\+type\+\_\+names} [$\,$]
\end{DoxyCompactItemize}
