\doxysection{gsmtap\+\_\+util.\+h}
\label{gsmtap__util_8h_source}\index{include/osmocom/core/gsmtap\_util.h@{include/osmocom/core/gsmtap\_util.h}}
\textbf{ Go to the documentation of this file.}
\begin{DoxyCode}{0}
\DoxyCodeLine{1 \textcolor{preprocessor}{\#pragma once}}
\DoxyCodeLine{2 }
\DoxyCodeLine{3 \textcolor{preprocessor}{\#include <stdint.h>}}
\DoxyCodeLine{4 \textcolor{preprocessor}{\#include <stdbool.h>}}
\DoxyCodeLine{5 \textcolor{preprocessor}{\#include <osmocom/core/write\_queue.h>}}
\DoxyCodeLine{6 \textcolor{preprocessor}{\#include <osmocom/core/select.h>}}
\DoxyCodeLine{7 }
\DoxyCodeLine{12 uint8\_t chantype\_rsl2gsmtap2(uint8\_t rsl\_chantype, uint8\_t rsl\_link\_id, \textcolor{keywordtype}{bool} user\_plane);}
\DoxyCodeLine{13 }
\DoxyCodeLine{14 uint8\_t chantype\_rsl2gsmtap(uint8\_t rsl\_chantype, uint8\_t rsl\_link\_id)}
\DoxyCodeLine{15         OSMO\_DEPRECATED(\textcolor{stringliteral}{"{}Use chantype\_rsl2gsmtap2() instead"{}});}
\DoxyCodeLine{16 }
\DoxyCodeLine{17 \textcolor{keywordtype}{void} chantype\_gsmtap2rsl(uint8\_t gsmtap\_chantype, uint8\_t *rsl\_chantype, uint8\_t *link\_id);}
\DoxyCodeLine{18 }
\DoxyCodeLine{19 \textcolor{keyword}{struct }msgb *gsmtap\_makemsg\_ex(uint8\_t type, uint16\_t arfcn, uint8\_t ts, uint8\_t chan\_type,}
\DoxyCodeLine{20                             uint8\_t ss, uint32\_t fn, int8\_t signal\_dbm,}
\DoxyCodeLine{21                             int8\_t snr, \textcolor{keyword}{const} uint8\_t *data, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} len);}
\DoxyCodeLine{22 }
\DoxyCodeLine{23 \textcolor{keyword}{struct }msgb *gsmtap\_makemsg(uint16\_t arfcn, uint8\_t ts, uint8\_t chan\_type,}
\DoxyCodeLine{24                             uint8\_t ss, uint32\_t fn, int8\_t signal\_dbm,}
\DoxyCodeLine{25                             int8\_t snr, \textcolor{keyword}{const} uint8\_t *data, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} len);}
\DoxyCodeLine{26 }
\DoxyCodeLine{28 \textcolor{keyword}{struct }gsmtap\_inst;}
\DoxyCodeLine{29 }
\DoxyCodeLine{30 \textcolor{keywordtype}{int} gsmtap\_inst\_fd(\textcolor{keyword}{struct} gsmtap\_inst *gti)}
\DoxyCodeLine{31         OSMO\_DEPRECATED(\textcolor{stringliteral}{"{}Use gsmtap\_inst\_fd2() instead"{}});}
\DoxyCodeLine{32 }
\DoxyCodeLine{33 \textcolor{keywordtype}{int} gsmtap\_inst\_fd2(\textcolor{keyword}{const} \textcolor{keyword}{struct} gsmtap\_inst *gti);}
\DoxyCodeLine{34 }
\DoxyCodeLine{35 \textcolor{keywordtype}{int} gsmtap\_source\_init\_fd(\textcolor{keyword}{const} \textcolor{keywordtype}{char} *host, uint16\_t port);}
\DoxyCodeLine{36 \textcolor{keywordtype}{int} gsmtap\_source\_init\_fd2(\textcolor{keyword}{const} \textcolor{keywordtype}{char} *local\_host, uint16\_t local\_port, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *rem\_host, uint16\_t rem\_port);}
\DoxyCodeLine{37 }
\DoxyCodeLine{38 \textcolor{keywordtype}{int} gsmtap\_source\_add\_sink\_fd(\textcolor{keywordtype}{int} gsmtap\_fd);}
\DoxyCodeLine{39 }
\DoxyCodeLine{40 \textcolor{keyword}{struct }gsmtap\_inst *gsmtap\_source\_init(\textcolor{keyword}{const} \textcolor{keywordtype}{char} *host, uint16\_t port,}
\DoxyCodeLine{41                                         \textcolor{keywordtype}{int} ofd\_wq\_mode);}
\DoxyCodeLine{42 \textcolor{keyword}{struct }gsmtap\_inst *gsmtap\_source\_init2(\textcolor{keyword}{const} \textcolor{keywordtype}{char} *local\_host, uint16\_t local\_port,}
\DoxyCodeLine{43                                         \textcolor{keyword}{const} \textcolor{keywordtype}{char} *rem\_host, uint16\_t rem\_port, \textcolor{keywordtype}{int} ofd\_wq\_mode);}
\DoxyCodeLine{44 }
\DoxyCodeLine{45 \textcolor{keywordtype}{void} gsmtap\_source\_free(\textcolor{keyword}{struct} gsmtap\_inst *gti);}
\DoxyCodeLine{46 }
\DoxyCodeLine{47 \textcolor{keywordtype}{int} gsmtap\_source\_set\_nonblock(\textcolor{keyword}{struct} gsmtap\_inst *gti, \textcolor{keywordtype}{int} on);}
\DoxyCodeLine{48 \textcolor{keywordtype}{int} gsmtap\_source\_add\_sink(\textcolor{keyword}{struct} gsmtap\_inst *gti);}
\DoxyCodeLine{49 }
\DoxyCodeLine{50 \textcolor{keywordtype}{bool} gsmtap\_source\_using\_wq(\textcolor{keyword}{const} \textcolor{keyword}{struct} gsmtap\_inst *gti);}
\DoxyCodeLine{51 }
\DoxyCodeLine{52 \textcolor{keywordtype}{int} gsmtap\_sendmsg(\textcolor{keyword}{struct} gsmtap\_inst *gti, \textcolor{keyword}{struct} msgb *msg);}
\DoxyCodeLine{53 \textcolor{keywordtype}{int} gsmtap\_sendmsg\_free(\textcolor{keyword}{struct} gsmtap\_inst *gti, \textcolor{keyword}{struct} msgb *msg);}
\DoxyCodeLine{54 }
\DoxyCodeLine{55 \textcolor{keywordtype}{int} gsmtap\_send\_ex(\textcolor{keyword}{struct} gsmtap\_inst *gti, uint8\_t type, uint16\_t arfcn, uint8\_t ts,}
\DoxyCodeLine{56                 uint8\_t chan\_type, uint8\_t ss, uint32\_t fn,}
\DoxyCodeLine{57                 int8\_t signal\_dbm, int8\_t snr, \textcolor{keyword}{const} uint8\_t *data,}
\DoxyCodeLine{58                 \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} len);}
\DoxyCodeLine{59 }
\DoxyCodeLine{60 \textcolor{keywordtype}{int} gsmtap\_send(\textcolor{keyword}{struct} gsmtap\_inst *gti, uint16\_t arfcn, uint8\_t ts,}
\DoxyCodeLine{61                 uint8\_t chan\_type, uint8\_t ss, uint32\_t fn,}
\DoxyCodeLine{62                 int8\_t signal\_dbm, int8\_t snr, \textcolor{keyword}{const} uint8\_t *data,}
\DoxyCodeLine{63                 \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} len);}
\DoxyCodeLine{64 }
\DoxyCodeLine{65 \textcolor{keyword}{extern} \textcolor{keyword}{const} \textcolor{keyword}{struct }value\_string gsmtap\_gsm\_channel\_names[];}
\DoxyCodeLine{66 \textcolor{keyword}{extern} \textcolor{keyword}{const} \textcolor{keyword}{struct }value\_string gsmtap\_type\_names[];}
\DoxyCodeLine{67 }

\end{DoxyCode}
