\doxysection{GMR-\/1 GSMtap helpers}
\label{group__gsmtap}\index{GMR-\/1 GSMtap helpers@{GMR-\/1 GSMtap helpers}}
\doxysubsection*{Files}
\begin{DoxyCompactItemize}
\item 
file \textbf{ gsmtap.\+h}
\begin{DoxyCompactList}\small\item\em Osmocom GMR-\/1 GSMtap helpers header. \end{DoxyCompactList}\item 
file \textbf{ gsmtap.\+c}
\begin{DoxyCompactList}\small\item\em Osmocom GMR-\/1 GSMtap helpers header. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\label{group__gsmtap_ga2fa99893aabc3b82458803a914fee39a}} 
uint8\+\_\+t \textbf{ chantype\+\_\+rsl2gsmtap2} (uint8\+\_\+t rsl\+\_\+chantype, uint8\+\_\+t link\+\_\+id, bool user\+\_\+plane)
\item 
\mbox{\label{group__gsmtap_ga14574d2d831766b848e5ff93b89e8338}} 
uint8\+\_\+t \textbf{ chantype\+\_\+rsl2gsmtap} (uint8\+\_\+t rsl\+\_\+chantype, uint8\+\_\+t link\+\_\+id)
\item 
\mbox{\label{group__gsmtap_ga3567072c254391b92eabf48ed71f9aac}} 
void \textbf{ chantype\+\_\+gsmtap2rsl} (uint8\+\_\+t gsmtap\+\_\+chantype, uint8\+\_\+t $\ast$rsl\+\_\+chantype, uint8\+\_\+t $\ast$link\+\_\+id)
\item 
\mbox{\label{group__gsmtap_ga4de6489fab3bff7590e53dd9859e3c44}} 
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$data, unsigned int len)
\item 
\mbox{\label{group__gsmtap_ga03a4ac0d6f7a80807415476fdc804da6}} 
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$data, unsigned int len)
\item 
\mbox{\label{group__gsmtap_gad201f805caa17a143201ecce09a21208}} 
int \textbf{ gsmtap\+\_\+inst\+\_\+fd} (struct \textbf{ gsmtap\+\_\+inst} $\ast$gti)
\item 
\mbox{\label{group__gsmtap_gade1327e89e4b4fe0e08bf9947ec99a04}} 
int \textbf{ gsmtap\+\_\+inst\+\_\+fd2} (const struct \textbf{ gsmtap\+\_\+inst} $\ast$gti)
\item 
\mbox{\label{group__gsmtap_gadd7e1c24b0af2f07c1df3ef12fd2a3b3}} 
int \textbf{ gsmtap\+\_\+source\+\_\+init\+\_\+fd} (const char $\ast$host, uint16\+\_\+t port)
\item 
\mbox{\label{group__gsmtap_gaac97f186f5b781a7f15bd9273e2821b0}} 
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 
\mbox{\label{group__gsmtap_ga0edfda6bec2d5b85a6b97823c806f676}} 
int \textbf{ gsmtap\+\_\+source\+\_\+add\+\_\+sink\+\_\+fd} (int gsmtap\+\_\+fd)
\item 
\mbox{\label{group__gsmtap_ga8f0bdeba378d233f34057e63e2d3a6d3}} 
struct \textbf{ gsmtap\+\_\+inst} $\ast$ \textbf{ gsmtap\+\_\+source\+\_\+init} (const char $\ast$host, uint16\+\_\+t port, int ofd\+\_\+wq\+\_\+mode)
\item 
\mbox{\label{group__gsmtap_ga3e9f314f1a5098f65770a8616d5cac56}} 
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 
\mbox{\label{group__gsmtap_gac12a6850de80b00a9ce4ab1261a67a55}} 
void \textbf{ gsmtap\+\_\+source\+\_\+free} (struct \textbf{ gsmtap\+\_\+inst} $\ast$gti)
\item 
\mbox{\label{group__gsmtap_ga08387e8de5e7633d897cd6c2f685a467}} 
int \textbf{ gsmtap\+\_\+source\+\_\+add\+\_\+sink} (struct \textbf{ gsmtap\+\_\+inst} $\ast$gti)
\item 
\mbox{\label{group__gsmtap_ga41ee3b7cd837968637a122aa83ea5af3}} 
int \textbf{ gsmtap\+\_\+sendmsg} (struct \textbf{ gsmtap\+\_\+inst} $\ast$gti, struct \textbf{ msgb} $\ast$msg)
\item 
\mbox{\label{group__gsmtap_gaa05d2bb112ac9d2d80ed7dfe2926c519}} 
int \textbf{ gsmtap\+\_\+sendmsg\+\_\+free} (struct \textbf{ gsmtap\+\_\+inst} $\ast$gti, struct \textbf{ msgb} $\ast$msg)
\item 
\mbox{\label{group__gsmtap_gaa998fa989a15883ea67ec5eea58a9283}} 
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$data, unsigned int len)
\item 
\mbox{\label{group__gsmtap_gae1e4e260037809eb70765c3c6044a2e4}} 
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$data, unsigned int len)
\item 
\mbox{\label{group__gsmtap_gacfc8888cc97a3728af1247a279365f5d}} 
\textbf{ osmo\+\_\+static\+\_\+assert} (offsetof(struct \textbf{ gsmtap\+\_\+inst}, wq)==offsetof(struct \textbf{ \+\_\+gsmtap\+\_\+inst\+\_\+legacy}, wq), gsmtap\+\_\+inst\+\_\+new\+\_\+wq\+\_\+offset\+\_\+equals\+\_\+legacy\+\_\+wq\+\_\+offset)
\item 
struct \textbf{ msgb} $\ast$ \textbf{ gmr1\+\_\+gsmtap\+\_\+makemsg} (uint8\+\_\+t chan\+\_\+type, uint32\+\_\+t fn, uint8\+\_\+t tn, const uint8\+\_\+t $\ast$l2, int len)
\begin{DoxyCompactList}\small\item\em Helper to build GSM tap message with GMR-\/1 payload. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Variables}
\begin{DoxyCompactItemize}
\item 
\mbox{\label{group__gsmtap_ga4f9601754c2db0434194ebdf0742ccb9}} 
const struct \textbf{ value\+\_\+string} \textbf{ gsmtap\+\_\+gsm\+\_\+channel\+\_\+names} [$\,$]
\item 
\mbox{\label{group__gsmtap_gac6ab8513b1e0e8505b89847a4f9a4a09}} 
const struct \textbf{ value\+\_\+string} \textbf{ gsmtap\+\_\+type\+\_\+names} [$\,$]
\item 
\mbox{\label{group__gsmtap_ga4f9601754c2db0434194ebdf0742ccb9}} 
const struct \textbf{ value\+\_\+string} \textbf{ gsmtap\+\_\+gsm\+\_\+channel\+\_\+names} [$\,$]
\item 
\mbox{\label{group__gsmtap_gac6ab8513b1e0e8505b89847a4f9a4a09}} 
const struct \textbf{ value\+\_\+string} \textbf{ gsmtap\+\_\+type\+\_\+names} [$\,$]
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}


\doxysubsection{Function Documentation}
\mbox{\label{group__gsmtap_gaade0b34d5438103fb3376d6061b0193d}} 
\index{GMR-\/1 GSMtap helpers@{GMR-\/1 GSMtap helpers}!gmr1\_gsmtap\_makemsg@{gmr1\_gsmtap\_makemsg}}
\index{gmr1\_gsmtap\_makemsg@{gmr1\_gsmtap\_makemsg}!GMR-\/1 GSMtap helpers@{GMR-\/1 GSMtap helpers}}
\doxysubsubsection{gmr1\_gsmtap\_makemsg()}
{\footnotesize\ttfamily struct \textbf{ msgb} $\ast$ gmr1\+\_\+gsmtap\+\_\+makemsg (\begin{DoxyParamCaption}\item[{uint8\+\_\+t}]{chan\+\_\+type,  }\item[{uint32\+\_\+t}]{fn,  }\item[{uint8\+\_\+t}]{tn,  }\item[{const uint8\+\_\+t $\ast$}]{l2,  }\item[{int}]{len }\end{DoxyParamCaption})}



Helper to build GSM tap message with GMR-\/1 payload. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em chan\+\_\+type} & Type of channel (one of GSMTAP\+\_\+\+GMR1\+\_\+xxx) \\
\hline
\mbox{\texttt{ in}}  & {\em l2} & Packet of L2 data to encapsulate \\
\hline
\mbox{\texttt{ in}}  & {\em len} & Length of the l2 data in bytes \\
\hline
\end{DoxyParams}


References \textbf{ gsmtap\+\_\+hdr\+::antenna\+\_\+nr}, \textbf{ gsmtap\+\_\+hdr\+::frame\+\_\+number}, \textbf{ GSMTAP\+\_\+\+TYPE\+\_\+\+GMR1\+\_\+\+UM}, \textbf{ GSMTAP\+\_\+\+VERSION}, \textbf{ gsmtap\+\_\+hdr\+::hdr\+\_\+len}, \textbf{ msgb\+\_\+alloc()}, \textbf{ msgb\+\_\+put()}, \textbf{ gsmtap\+\_\+hdr\+::signal\+\_\+dbm}, \textbf{ gsmtap\+\_\+hdr\+::snr\+\_\+db}, \textbf{ gsmtap\+\_\+hdr\+::sub\+\_\+slot}, \textbf{ gsmtap\+\_\+hdr\+::sub\+\_\+type}, \textbf{ gsmtap\+\_\+hdr\+::timeslot}, \textbf{ gsmtap\+\_\+hdr\+::type}, and \textbf{ gsmtap\+\_\+hdr\+::version}.

