\doxysection{src/gsm/gsm\+\_\+utils.c File Reference}
\label{gsm__utils_8c}\index{src/gsm/gsm\_utils.c@{src/gsm/gsm\_utils.c}}
{\ttfamily \#include $<$osmocom/core/utils.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/bitvec.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/gsm/gsm\+\_\+utils.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/gsm/meas\+\_\+rep.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/gsm/protocol/gsm\+\_\+04\+\_\+08.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/gsm/gsm0502.\+h$>$}\newline
{\ttfamily \#include $<$stdlib.\+h$>$}\newline
{\ttfamily \#include $<$stdint.\+h$>$}\newline
{\ttfamily \#include $<$string.\+h$>$}\newline
{\ttfamily \#include $<$stdbool.\+h$>$}\newline
{\ttfamily \#include $<$stdio.\+h$>$}\newline
{\ttfamily \#include $<$errno.\+h$>$}\newline
{\ttfamily \#include $<$ctype.\+h$>$}\newline
{\ttfamily \#include $<$inttypes.\+h$>$}\newline
{\ttfamily \#include $<$time.\+h$>$}\newline
{\ttfamily \#include $<$unistd.\+h$>$}\newline
{\ttfamily \#include \char`\"{}config.\+h\char`\"{}}\newline
\doxysubsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \textbf{ gsm\+\_\+freq\+\_\+range}
\end{DoxyCompactItemize}
\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \textbf{ GSM\+\_\+\+RFN\+\_\+\+THRESHOLD}~(\textbf{ GSM\+\_\+\+RFN\+\_\+\+MODULUS} / 2)
\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
static int \textbf{ gsm\+\_\+septet\+\_\+lookup} (uint8\+\_\+t ch)
\item 
uint8\+\_\+t \textbf{ gsm\+\_\+get\+\_\+octet\+\_\+len} (const uint8\+\_\+t sept\+\_\+len)
\begin{DoxyCompactList}\small\item\em Compute number of octets from number of septets. \end{DoxyCompactList}\item 
int \textbf{ gsm\+\_\+7bit\+\_\+decode\+\_\+n\+\_\+hdr} (char $\ast$text, size\+\_\+t \textbf{ n}, const uint8\+\_\+t $\ast$user\+\_\+data, uint8\+\_\+t septet\+\_\+l, uint8\+\_\+t ud\+\_\+hdr\+\_\+ind)
\begin{DoxyCompactList}\small\item\em TS 03.\+38 7-\/bit Character unpacking (6.\+2.\+1) \end{DoxyCompactList}\item 
int \textbf{ gsm\+\_\+7bit\+\_\+decode\+\_\+n} (char $\ast$text, size\+\_\+t \textbf{ n}, const uint8\+\_\+t $\ast$user\+\_\+data, uint8\+\_\+t septet\+\_\+l)
\begin{DoxyCompactList}\small\item\em Decode 7bit GSM Alphabet. \end{DoxyCompactList}\item 
int \textbf{ gsm\+\_\+7bit\+\_\+decode\+\_\+n\+\_\+ussd} (char $\ast$text, size\+\_\+t \textbf{ n}, const uint8\+\_\+t $\ast$user\+\_\+data, uint8\+\_\+t \textbf{ length})
\begin{DoxyCompactList}\small\item\em Decode 7bit GSM Alphabet (USSD) \end{DoxyCompactList}\item 
int \textbf{ gsm\+\_\+septet\+\_\+encode} (uint8\+\_\+t $\ast$result, const char $\ast$\textbf{ data})
\begin{DoxyCompactList}\small\item\em Encode a ASCII characterrs as 7-\/bit GSM alphabet (TS 03.\+38) \end{DoxyCompactList}\item 
int \textbf{ gsm\+\_\+septet\+\_\+pack} (uint8\+\_\+t $\ast$result, const uint8\+\_\+t $\ast$rdata, size\+\_\+t septet\+\_\+len, uint8\+\_\+t padding)
\begin{DoxyCompactList}\small\item\em GSM Default Alphabet 7bit to octet packing. \end{DoxyCompactList}\item 
int \textbf{ gsm\+\_\+septets2octets} (uint8\+\_\+t $\ast$result, const uint8\+\_\+t $\ast$rdata, uint8\+\_\+t septet\+\_\+len, uint8\+\_\+t padding)
\begin{DoxyCompactList}\small\item\em Backwards compatibility wrapper for gsm\+\_\+septets\+\_\+pack(), deprecated. \end{DoxyCompactList}\item 
int \textbf{ gsm\+\_\+7bit\+\_\+encode\+\_\+n} (uint8\+\_\+t $\ast$result, size\+\_\+t \textbf{ n}, const char $\ast$\textbf{ data}, int $\ast$octets)
\begin{DoxyCompactList}\small\item\em GSM 7-\/bit alphabet TS 03.\+38 6.\+2.\+1 Character packing. \end{DoxyCompactList}\item 
int \textbf{ gsm\+\_\+7bit\+\_\+encode\+\_\+n\+\_\+ussd} (uint8\+\_\+t $\ast$result, size\+\_\+t \textbf{ n}, const char $\ast$\textbf{ data}, int $\ast$octets)
\begin{DoxyCompactList}\small\item\em Encode according to GSM 7-\/bit alphabet (TS 03.\+38 6.\+2.\+1) for USSD. \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+get\+\_\+rand\+\_\+id} (uint8\+\_\+t $\ast$out, size\+\_\+t \textbf{ len})
\begin{DoxyCompactList}\small\item\em Generate random identifier We use /dev/urandom (default when GRND\+\_\+\+RANDOM flag is not set). \end{DoxyCompactList}\item 
size\+\_\+t \textbf{ gsm0858\+\_\+rsl\+\_\+ul\+\_\+meas\+\_\+enc} (const struct \textbf{ gsm\+\_\+meas\+\_\+rep\+\_\+unidir} $\ast$mru, bool dtxd\+\_\+used, uint8\+\_\+t $\ast$buf)
\begin{DoxyCompactList}\small\item\em Build the RSL uplink measurement IE (3GPP TS 08.\+58 § 9.\+3.\+25) \end{DoxyCompactList}\item 
int \textbf{ ms\+\_\+class\+\_\+gmsk\+\_\+dbm} (enum \textbf{ gsm\+\_\+band} band, int class)
\begin{DoxyCompactList}\small\item\em Convert power class to d\+Bm according to GSM TS 05.\+05. \end{DoxyCompactList}\item 
int \textbf{ ms\+\_\+pwr\+\_\+ctl\+\_\+lvl} (enum \textbf{ gsm\+\_\+band} band, unsigned int dbm)
\begin{DoxyCompactList}\small\item\em determine power control level for given d\+Bm value, as indicated by the tables in chapter 4.\+1.\+1 of GSM TS 05.\+05 \end{DoxyCompactList}\item 
int \textbf{ ms\+\_\+pwr\+\_\+dbm} (enum \textbf{ gsm\+\_\+band} band, uint8\+\_\+t lvl)
\begin{DoxyCompactList}\small\item\em Convert TS 05.\+05 power level to absolute d\+Bm value. \end{DoxyCompactList}\item 
int \textbf{ rxlev2dbm} (uint8\+\_\+t rxlev)
\begin{DoxyCompactList}\small\item\em Convert TS 05.\+08 Rx\+Lev to d\+Bm (TS 05.\+08 Chapter 8.\+1.\+4) \end{DoxyCompactList}\item 
uint8\+\_\+t \textbf{ dbm2rxlev} (int dbm)
\begin{DoxyCompactList}\small\item\em Convert RF signal level in d\+Bm to TS 05.\+08 Rx\+Lev (TS 05.\+08 Chapter 8.\+1.\+4) \end{DoxyCompactList}\item 
const char $\ast$ \textbf{ gsm\+\_\+band\+\_\+name} (enum \textbf{ gsm\+\_\+band} band)
\begin{DoxyCompactList}\small\item\em Return string name of a given GSM Band. \end{DoxyCompactList}\item 
enum \textbf{ gsm\+\_\+band} \textbf{ gsm\+\_\+band\+\_\+parse} (const char $\ast$mhz)
\begin{DoxyCompactList}\small\item\em Parse string name of a GSM band. \end{DoxyCompactList}\item 
int \textbf{ gsm\+\_\+arfcn2band\+\_\+rc} (uint16\+\_\+t \textbf{ arfcn}, enum \textbf{ gsm\+\_\+band} $\ast$band)
\begin{DoxyCompactList}\small\item\em Resolve GSM band from ARFCN. \end{DoxyCompactList}\item 
enum \textbf{ gsm\+\_\+band} \textbf{ gsm\+\_\+arfcn2band} (uint16\+\_\+t \textbf{ arfcn})
\begin{DoxyCompactList}\small\item\em Resolve GSM band from ARFCN, aborts process on invalid ARFCN. \end{DoxyCompactList}\item 
uint16\+\_\+t \textbf{ gsm\+\_\+arfcn2freq10} (uint16\+\_\+t \textbf{ arfcn}, int uplink)
\begin{DoxyCompactList}\small\item\em Convert an ARFCN to the frequency in MHz $\ast$ 10. \end{DoxyCompactList}\item 
uint16\+\_\+t \textbf{ gsm\+\_\+freq102arfcn} (uint16\+\_\+t freq10, int uplink)
\begin{DoxyCompactList}\small\item\em Convert a Frequency in MHz $\ast$ 10 to ARFCN. \end{DoxyCompactList}\item 
void \textbf{ gsm\+\_\+fn2gsmtime} (struct \textbf{ gsm\+\_\+time} $\ast$\textbf{ time}, uint32\+\_\+t fn)
\begin{DoxyCompactList}\small\item\em Parse GSM Frame Number into struct \doxyref{gsm\+\_\+time}{p.}{structgsm__time}. \end{DoxyCompactList}\item 
char $\ast$ \textbf{ gsm\+\_\+fn\+\_\+as\+\_\+gsmtime\+\_\+str} (uint32\+\_\+t fn)
\begin{DoxyCompactList}\small\item\em Parse GSM Frame Number into printable string. \end{DoxyCompactList}\item 
uint32\+\_\+t \textbf{ gsm\+\_\+gsmtime2fn} (const struct \textbf{ gsm\+\_\+time} $\ast$\textbf{ time})
\begin{DoxyCompactList}\small\item\em Encode decoded \doxyref{gsm\+\_\+time}{p.}{structgsm__time} to Frame Number. \end{DoxyCompactList}\item 
char $\ast$ \textbf{ osmo\+\_\+dump\+\_\+gsmtime\+\_\+buf} (char $\ast$buf, size\+\_\+t buf\+\_\+len, const struct \textbf{ gsm\+\_\+time} $\ast$tm)
\item 
char $\ast$ \textbf{ osmo\+\_\+dump\+\_\+gsmtime} (const struct \textbf{ gsm\+\_\+time} $\ast$tm)
\item 
char $\ast$ \textbf{ osmo\+\_\+dump\+\_\+gsmtime\+\_\+c} (const void $\ast$ctx, const struct \textbf{ gsm\+\_\+time} $\ast$tm)
\item 
uint32\+\_\+t \textbf{ gsm\+\_\+rfn2fn} (uint16\+\_\+t rfn, uint32\+\_\+t curr\+\_\+fn)
\item 
void \textbf{ bitvec\+\_\+add\+\_\+range1024} (struct \textbf{ bitvec} $\ast$bv, const struct \textbf{ gsm48\+\_\+range\+\_\+1024} $\ast$r)
\begin{DoxyCompactList}\small\item\em append range1024 encoded data to bit vector \end{DoxyCompactList}\item 
int \textbf{ gprs\+\_\+tlli\+\_\+type} (uint32\+\_\+t \textbf{ tlli})
\begin{DoxyCompactList}\small\item\em Determine GPRS TLLI Type (TS 23.\+003 Chapter 2.\+6) \end{DoxyCompactList}\item 
uint32\+\_\+t \textbf{ gprs\+\_\+tmsi2tlli} (uint32\+\_\+t p\+\_\+tmsi, enum \textbf{ gprs\+\_\+tlli\+\_\+type} \textbf{ type})
\begin{DoxyCompactList}\small\item\em Determine TLLI from P-\/\+TMSI. \end{DoxyCompactList}\item 
int \textbf{ gsm\+\_\+7bit\+\_\+decode} (char $\ast$text, const uint8\+\_\+t $\ast$user\+\_\+data, uint8\+\_\+t septet\+\_\+l)
\item 
int \textbf{ gsm\+\_\+7bit\+\_\+decode\+\_\+ussd} (char $\ast$text, const uint8\+\_\+t $\ast$user\+\_\+data, uint8\+\_\+t \textbf{ length})
\item 
int \textbf{ gsm\+\_\+7bit\+\_\+encode} (uint8\+\_\+t $\ast$result, const char $\ast$\textbf{ data})
\item 
int \textbf{ gsm\+\_\+7bit\+\_\+encode\+\_\+ussd} (uint8\+\_\+t $\ast$result, const char $\ast$\textbf{ data}, int $\ast$octets)
\item 
int \textbf{ gsm\+\_\+7bit\+\_\+encode\+\_\+oct} (uint8\+\_\+t $\ast$result, const char $\ast$\textbf{ data}, int $\ast$octets)
\end{DoxyCompactItemize}
\doxysubsection*{Variables}
\begin{DoxyCompactItemize}
\item 
static unsigned char \textbf{ gsm\+\_\+7bit\+\_\+alphabet} [$\,$]
\item 
static struct \textbf{ gsm\+\_\+freq\+\_\+range} \textbf{ gsm\+\_\+ranges} [$\,$]
\item 
const struct \textbf{ value\+\_\+string} \textbf{ osmo\+\_\+rat\+\_\+type\+\_\+names} [$\,$]
\end{DoxyCompactItemize}


\doxysubsection{Macro Definition Documentation}
\mbox{\label{gsm__utils_8c_aeb7cb0e090bdd7b65daeb693688bc7eb}} 
\index{gsm\_utils.c@{gsm\_utils.c}!GSM\_RFN\_THRESHOLD@{GSM\_RFN\_THRESHOLD}}
\index{GSM\_RFN\_THRESHOLD@{GSM\_RFN\_THRESHOLD}!gsm\_utils.c@{gsm\_utils.c}}
\doxysubsubsection{GSM\_RFN\_THRESHOLD}
{\footnotesize\ttfamily \#define GSM\+\_\+\+RFN\+\_\+\+THRESHOLD~(\textbf{ GSM\+\_\+\+RFN\+\_\+\+MODULUS} / 2)}



\doxysubsection{Function Documentation}
\mbox{\label{gsm__utils_8c_a40d332ca08e3dddf3dfbd77e3e9f3b85}} 
\index{gsm\_utils.c@{gsm\_utils.c}!dbm2rxlev@{dbm2rxlev}}
\index{dbm2rxlev@{dbm2rxlev}!gsm\_utils.c@{gsm\_utils.c}}
\doxysubsubsection{dbm2rxlev()}
{\footnotesize\ttfamily uint8\+\_\+t dbm2rxlev (\begin{DoxyParamCaption}\item[{int}]{dbm }\end{DoxyParamCaption})}



Convert RF signal level in d\+Bm to TS 05.\+08 Rx\+Lev (TS 05.\+08 Chapter 8.\+1.\+4) 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em dbm} & RF signal level in d\+Bm \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
TS 05.\+08 Rx\+Lev value 
\end{DoxyReturn}
\mbox{\label{gsm__utils_8c_a54938c22c71cc3d62ebad1de580764f6}} 
\index{gsm\_utils.c@{gsm\_utils.c}!gprs\_tlli\_type@{gprs\_tlli\_type}}
\index{gprs\_tlli\_type@{gprs\_tlli\_type}!gsm\_utils.c@{gsm\_utils.c}}
\doxysubsubsection{gprs\_tlli\_type()}
{\footnotesize\ttfamily int \textbf{ gprs\+\_\+tlli\+\_\+type} (\begin{DoxyParamCaption}\item[{uint32\+\_\+t}]{tlli }\end{DoxyParamCaption})}



Determine GPRS TLLI Type (TS 23.\+003 Chapter 2.\+6) 



References \textbf{ tlli}, \textbf{ TLLI\+\_\+\+AUXILIARY}, \textbf{ TLLI\+\_\+\+FOREIGN}, \textbf{ TLLI\+\_\+\+G\+\_\+\+RNTI}, \textbf{ TLLI\+\_\+\+LOCAL}, \textbf{ TLLI\+\_\+\+RAND\+\_\+\+G\+\_\+\+RNTI}, \textbf{ TLLI\+\_\+\+RANDOM}, and \textbf{ TLLI\+\_\+\+RESERVED}.

\mbox{\label{gsm__utils_8c_a81645092c5373185e9b87c81a64eafcd}} 
\index{gsm\_utils.c@{gsm\_utils.c}!gprs\_tmsi2tlli@{gprs\_tmsi2tlli}}
\index{gprs\_tmsi2tlli@{gprs\_tmsi2tlli}!gsm\_utils.c@{gsm\_utils.c}}
\doxysubsubsection{gprs\_tmsi2tlli()}
{\footnotesize\ttfamily uint32\+\_\+t gprs\+\_\+tmsi2tlli (\begin{DoxyParamCaption}\item[{uint32\+\_\+t}]{p\+\_\+tmsi,  }\item[{enum \textbf{ gprs\+\_\+tlli\+\_\+type}}]{type }\end{DoxyParamCaption})}



Determine TLLI from P-\/\+TMSI. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em p\+\_\+tmsi} & P-\/\+TMSI \\
\hline
\mbox{\texttt{ in}}  & {\em type} & TLLI Type we want to derive from {\itshape p\+\_\+tmsi} \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
TLLI of given type 
\end{DoxyReturn}


References \textbf{ tlli}, \textbf{ TLLI\+\_\+\+FOREIGN}, \textbf{ TLLI\+\_\+\+LOCAL}, and \textbf{ type}.

\mbox{\label{gsm__utils_8c_a89ad196372ac923893b2119900303bab}} 
\index{gsm\_utils.c@{gsm\_utils.c}!gsm0858\_rsl\_ul\_meas\_enc@{gsm0858\_rsl\_ul\_meas\_enc}}
\index{gsm0858\_rsl\_ul\_meas\_enc@{gsm0858\_rsl\_ul\_meas\_enc}!gsm\_utils.c@{gsm\_utils.c}}
\doxysubsubsection{gsm0858\_rsl\_ul\_meas\_enc()}
{\footnotesize\ttfamily size\+\_\+t gsm0858\+\_\+rsl\+\_\+ul\+\_\+meas\+\_\+enc (\begin{DoxyParamCaption}\item[{const struct \textbf{ gsm\+\_\+meas\+\_\+rep\+\_\+unidir} $\ast$}]{mru,  }\item[{bool}]{dtxd\+\_\+used,  }\item[{uint8\+\_\+t $\ast$}]{buf }\end{DoxyParamCaption})}



Build the RSL uplink measurement IE (3GPP TS 08.\+58 § 9.\+3.\+25) 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em mru} & Unidirectional measurement report structure \\
\hline
\mbox{\texttt{ in}}  & {\em dtxd\+\_\+used} & Indicates if DTXd was used during measurement report period \\
\hline
\mbox{\texttt{ out}}  & {\em buf} & Pre-\/allocated bufer for storing IE \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Number of bytes filled in buf 
\end{DoxyReturn}


References \textbf{ gsm\+\_\+meas\+\_\+rep\+\_\+unidir\+::full}, \textbf{ gsm\+\_\+rx\+\_\+lev\+\_\+qual\+::rx\+\_\+lev}, \textbf{ gsm\+\_\+rx\+\_\+lev\+\_\+qual\+::rx\+\_\+qual}, and \textbf{ gsm\+\_\+meas\+\_\+rep\+\_\+unidir\+::sub}.

\mbox{\label{gsm__utils_8c_a9c0985d27212bd4bfcfb97f3f759455f}} 
\index{gsm\_utils.c@{gsm\_utils.c}!gsm\_7bit\_decode@{gsm\_7bit\_decode}}
\index{gsm\_7bit\_decode@{gsm\_7bit\_decode}!gsm\_utils.c@{gsm\_utils.c}}
\doxysubsubsection{gsm\_7bit\_decode()}
{\footnotesize\ttfamily int gsm\+\_\+7bit\+\_\+decode (\begin{DoxyParamCaption}\item[{char $\ast$}]{text,  }\item[{const uint8\+\_\+t $\ast$}]{user\+\_\+data,  }\item[{uint8\+\_\+t}]{septet\+\_\+l }\end{DoxyParamCaption})}



References \textbf{ gsm\+\_\+7bit\+\_\+decode\+\_\+n()}, and \textbf{ GSM\+\_\+7\+BIT\+\_\+\+LEGACY\+\_\+\+MAX\+\_\+\+BUFFER\+\_\+\+SIZE}.

\mbox{\label{gsm__utils_8c_a063f743f422f88c34cc91e4bef3a3aa3}} 
\index{gsm\_utils.c@{gsm\_utils.c}!gsm\_7bit\_decode\_n@{gsm\_7bit\_decode\_n}}
\index{gsm\_7bit\_decode\_n@{gsm\_7bit\_decode\_n}!gsm\_utils.c@{gsm\_utils.c}}
\doxysubsubsection{gsm\_7bit\_decode\_n()}
{\footnotesize\ttfamily int gsm\+\_\+7bit\+\_\+decode\+\_\+n (\begin{DoxyParamCaption}\item[{char $\ast$}]{text,  }\item[{size\+\_\+t}]{n,  }\item[{const uint8\+\_\+t $\ast$}]{user\+\_\+data,  }\item[{uint8\+\_\+t}]{septet\+\_\+l }\end{DoxyParamCaption})}



Decode 7bit GSM Alphabet. 

Decode a sequence of GSM 03.\+38 encoded 7 bit characters. 

References \textbf{ gsm\+\_\+7bit\+\_\+decode\+\_\+n\+\_\+hdr()}, and \textbf{ n}.



Referenced by \textbf{ gsm\+\_\+7bit\+\_\+decode()}.

\mbox{\label{gsm__utils_8c_a7a81d425cf2ea9a1605aadd0faa73c93}} 
\index{gsm\_utils.c@{gsm\_utils.c}!gsm\_7bit\_decode\_n\_hdr@{gsm\_7bit\_decode\_n\_hdr}}
\index{gsm\_7bit\_decode\_n\_hdr@{gsm\_7bit\_decode\_n\_hdr}!gsm\_utils.c@{gsm\_utils.c}}
\doxysubsubsection{gsm\_7bit\_decode\_n\_hdr()}
{\footnotesize\ttfamily int gsm\+\_\+7bit\+\_\+decode\+\_\+n\+\_\+hdr (\begin{DoxyParamCaption}\item[{char $\ast$}]{text,  }\item[{size\+\_\+t}]{n,  }\item[{const uint8\+\_\+t $\ast$}]{user\+\_\+data,  }\item[{uint8\+\_\+t}]{septet\+\_\+l,  }\item[{uint8\+\_\+t}]{ud\+\_\+hdr\+\_\+ind }\end{DoxyParamCaption})}



TS 03.\+38 7-\/bit Character unpacking (6.\+2.\+1) 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ out}}  & {\em text} & Caller-\/provided output text buffer \\
\hline
\mbox{\texttt{ in}}  & {\em n} & Length of {\itshape text} \\
\hline
\mbox{\texttt{ in}}  & {\em user\+\_\+data} & Input Data (septets) \\
\hline
\mbox{\texttt{ in}}  & {\em septet\+\_\+l} & Number of septets in {\itshape user\+\_\+data} \\
\hline
\mbox{\texttt{ in}}  & {\em ud\+\_\+hdr\+\_\+ind} & User Data Header present in data \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
number of bytes written to {\itshape text} 
\end{DoxyReturn}


References \textbf{ gsm\+\_\+7bit\+\_\+alphabet}, \textbf{ gsm\+\_\+get\+\_\+octet\+\_\+len()}, \textbf{ gsm\+\_\+septet\+\_\+lookup()}, \textbf{ l}, \textbf{ n}, and \textbf{ OSMO\+\_\+\+ASSERT}.



Referenced by \textbf{ gsm\+\_\+7bit\+\_\+decode\+\_\+n()}, and \textbf{ gsm\+\_\+7bit\+\_\+decode\+\_\+n\+\_\+ussd()}.

\mbox{\label{gsm__utils_8c_a75a4d2a65f5fe5d0fd996503032edc5d}} 
\index{gsm\_utils.c@{gsm\_utils.c}!gsm\_7bit\_decode\_n\_ussd@{gsm\_7bit\_decode\_n\_ussd}}
\index{gsm\_7bit\_decode\_n\_ussd@{gsm\_7bit\_decode\_n\_ussd}!gsm\_utils.c@{gsm\_utils.c}}
\doxysubsubsection{gsm\_7bit\_decode\_n\_ussd()}
{\footnotesize\ttfamily int gsm\+\_\+7bit\+\_\+decode\+\_\+n\+\_\+ussd (\begin{DoxyParamCaption}\item[{char $\ast$}]{text,  }\item[{size\+\_\+t}]{n,  }\item[{const uint8\+\_\+t $\ast$}]{user\+\_\+data,  }\item[{uint8\+\_\+t}]{length }\end{DoxyParamCaption})}



Decode 7bit GSM Alphabet (USSD) 

Decode a sequence of 7 bit characters (USSD encoding). 

References \textbf{ gsm\+\_\+7bit\+\_\+decode\+\_\+n\+\_\+hdr()}, \textbf{ gsm\+\_\+get\+\_\+octet\+\_\+len()}, \textbf{ length}, and \textbf{ n}.



Referenced by \textbf{ gsm\+\_\+7bit\+\_\+decode\+\_\+ussd()}, and \textbf{ parse\+\_\+process\+\_\+uss\+\_\+req()}.

\mbox{\label{gsm__utils_8c_a1210cc0d91c19db7a279c4312da0a231}} 
\index{gsm\_utils.c@{gsm\_utils.c}!gsm\_7bit\_decode\_ussd@{gsm\_7bit\_decode\_ussd}}
\index{gsm\_7bit\_decode\_ussd@{gsm\_7bit\_decode\_ussd}!gsm\_utils.c@{gsm\_utils.c}}
\doxysubsubsection{gsm\_7bit\_decode\_ussd()}
{\footnotesize\ttfamily int gsm\+\_\+7bit\+\_\+decode\+\_\+ussd (\begin{DoxyParamCaption}\item[{char $\ast$}]{text,  }\item[{const uint8\+\_\+t $\ast$}]{user\+\_\+data,  }\item[{uint8\+\_\+t}]{length }\end{DoxyParamCaption})}



References \textbf{ gsm\+\_\+7bit\+\_\+decode\+\_\+n\+\_\+ussd()}, \textbf{ GSM\+\_\+7\+BIT\+\_\+\+LEGACY\+\_\+\+MAX\+\_\+\+BUFFER\+\_\+\+SIZE}, and \textbf{ length}.

\mbox{\label{gsm__utils_8c_a193105a0b4f273e9d92b5b262030c83d}} 
\index{gsm\_utils.c@{gsm\_utils.c}!gsm\_7bit\_encode@{gsm\_7bit\_encode}}
\index{gsm\_7bit\_encode@{gsm\_7bit\_encode}!gsm\_utils.c@{gsm\_utils.c}}
\doxysubsubsection{gsm\_7bit\_encode()}
{\footnotesize\ttfamily int gsm\+\_\+7bit\+\_\+encode (\begin{DoxyParamCaption}\item[{uint8\+\_\+t $\ast$}]{result,  }\item[{const char $\ast$}]{data }\end{DoxyParamCaption})}



References \textbf{ data}, \textbf{ gsm\+\_\+7bit\+\_\+encode\+\_\+n()}, and \textbf{ GSM\+\_\+7\+BIT\+\_\+\+LEGACY\+\_\+\+MAX\+\_\+\+BUFFER\+\_\+\+SIZE}.

\mbox{\label{gsm__utils_8c_a38fcf82318636e5080ad829f6425f5e9}} 
\index{gsm\_utils.c@{gsm\_utils.c}!gsm\_7bit\_encode\_n@{gsm\_7bit\_encode\_n}}
\index{gsm\_7bit\_encode\_n@{gsm\_7bit\_encode\_n}!gsm\_utils.c@{gsm\_utils.c}}
\doxysubsubsection{gsm\_7bit\_encode\_n()}
{\footnotesize\ttfamily int gsm\+\_\+7bit\+\_\+encode\+\_\+n (\begin{DoxyParamCaption}\item[{uint8\+\_\+t $\ast$}]{result,  }\item[{size\+\_\+t}]{n,  }\item[{const char $\ast$}]{data,  }\item[{int $\ast$}]{octets }\end{DoxyParamCaption})}



GSM 7-\/bit alphabet TS 03.\+38 6.\+2.\+1 Character packing. 

Encode a text string into GSM 03.\+38 encoded 7 bit characters.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ out}}  & {\em result} & Caller-\/provided output buffer \\
\hline
\mbox{\texttt{ in}}  & {\em n} & Maximum length of {\itshape result} in bytes \\
\hline
\mbox{\texttt{ in}}  & {\em data} & octet-\/aligned string \\
\hline
\mbox{\texttt{ out}}  & {\em octets} & Number of octets encoded \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
number of septets encoded 
\end{DoxyReturn}


References \textbf{ data}, \textbf{ gsm\+\_\+septet\+\_\+encode()}, \textbf{ gsm\+\_\+septet\+\_\+pack()}, and \textbf{ n}.



Referenced by \textbf{ gsm340\+\_\+gen\+\_\+oa()}, \textbf{ gsm\+\_\+7bit\+\_\+encode()}, \textbf{ gsm\+\_\+7bit\+\_\+encode\+\_\+n\+\_\+ussd()}, and \textbf{ gsm\+\_\+7bit\+\_\+encode\+\_\+oct()}.

\mbox{\label{gsm__utils_8c_a79cfb6c9c4d681b5c0a897730fb3137b}} 
\index{gsm\_utils.c@{gsm\_utils.c}!gsm\_7bit\_encode\_n\_ussd@{gsm\_7bit\_encode\_n\_ussd}}
\index{gsm\_7bit\_encode\_n\_ussd@{gsm\_7bit\_encode\_n\_ussd}!gsm\_utils.c@{gsm\_utils.c}}
\doxysubsubsection{gsm\_7bit\_encode\_n\_ussd()}
{\footnotesize\ttfamily int gsm\+\_\+7bit\+\_\+encode\+\_\+n\+\_\+ussd (\begin{DoxyParamCaption}\item[{uint8\+\_\+t $\ast$}]{result,  }\item[{size\+\_\+t}]{n,  }\item[{const char $\ast$}]{data,  }\item[{int $\ast$}]{octets }\end{DoxyParamCaption})}



Encode according to GSM 7-\/bit alphabet (TS 03.\+38 6.\+2.\+1) for USSD. 

Encode a text string into GSM 03.\+38 encoded 7 bit characters (USSD encoding).


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ out}}  & {\em result} & Caller-\/provided output buffer \\
\hline
\mbox{\texttt{ in}}  & {\em n} & Maximum length of {\itshape result} in bytes \\
\hline
\mbox{\texttt{ in}}  & {\em data} & octet-\/aligned string \\
\hline
\mbox{\texttt{ out}}  & {\em octets} & Number of octets encoded \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
number of septets encoded 
\end{DoxyReturn}


References \textbf{ data}, \textbf{ gsm\+\_\+7bit\+\_\+encode\+\_\+n()}, and \textbf{ n}.



Referenced by \textbf{ gsm0480\+\_\+create\+\_\+notify\+SS()}, \textbf{ gsm0480\+\_\+create\+\_\+unstructured\+SS\+\_\+\+Notify()}, \textbf{ gsm0480\+\_\+gen\+\_\+ussd\+\_\+resp\+\_\+7bit()}, and \textbf{ gsm\+\_\+7bit\+\_\+encode\+\_\+ussd()}.

\mbox{\label{gsm__utils_8c_af2fdc2d707440ab4020e549adbf9b16b}} 
\index{gsm\_utils.c@{gsm\_utils.c}!gsm\_7bit\_encode\_oct@{gsm\_7bit\_encode\_oct}}
\index{gsm\_7bit\_encode\_oct@{gsm\_7bit\_encode\_oct}!gsm\_utils.c@{gsm\_utils.c}}
\doxysubsubsection{gsm\_7bit\_encode\_oct()}
{\footnotesize\ttfamily int gsm\+\_\+7bit\+\_\+encode\+\_\+oct (\begin{DoxyParamCaption}\item[{uint8\+\_\+t $\ast$}]{result,  }\item[{const char $\ast$}]{data,  }\item[{int $\ast$}]{octets }\end{DoxyParamCaption})}



References \textbf{ data}, \textbf{ gsm\+\_\+7bit\+\_\+encode\+\_\+n()}, and \textbf{ GSM\+\_\+7\+BIT\+\_\+\+LEGACY\+\_\+\+MAX\+\_\+\+BUFFER\+\_\+\+SIZE}.

\mbox{\label{gsm__utils_8c_a25be63362315080379691ae14f7e09bd}} 
\index{gsm\_utils.c@{gsm\_utils.c}!gsm\_7bit\_encode\_ussd@{gsm\_7bit\_encode\_ussd}}
\index{gsm\_7bit\_encode\_ussd@{gsm\_7bit\_encode\_ussd}!gsm\_utils.c@{gsm\_utils.c}}
\doxysubsubsection{gsm\_7bit\_encode\_ussd()}
{\footnotesize\ttfamily int gsm\+\_\+7bit\+\_\+encode\+\_\+ussd (\begin{DoxyParamCaption}\item[{uint8\+\_\+t $\ast$}]{result,  }\item[{const char $\ast$}]{data,  }\item[{int $\ast$}]{octets }\end{DoxyParamCaption})}



References \textbf{ data}, \textbf{ gsm\+\_\+7bit\+\_\+encode\+\_\+n\+\_\+ussd()}, and \textbf{ GSM\+\_\+7\+BIT\+\_\+\+LEGACY\+\_\+\+MAX\+\_\+\+BUFFER\+\_\+\+SIZE}.

\mbox{\label{gsm__utils_8c_a3ea692a3e4645ed59249bbb213866398}} 
\index{gsm\_utils.c@{gsm\_utils.c}!gsm\_arfcn2band@{gsm\_arfcn2band}}
\index{gsm\_arfcn2band@{gsm\_arfcn2band}!gsm\_utils.c@{gsm\_utils.c}}
\doxysubsubsection{gsm\_arfcn2band()}
{\footnotesize\ttfamily enum \textbf{ gsm\+\_\+band} gsm\+\_\+arfcn2band (\begin{DoxyParamCaption}\item[{uint16\+\_\+t}]{arfcn }\end{DoxyParamCaption})}



Resolve GSM band from ARFCN, aborts process on invalid ARFCN. 

In Osmocom, we use the highest bit of the {\itshape arfcn} to indicate PCS. DEPRECATED\+: Use gsm\+\_\+arfcn2band\+\_\+rc instead. 
\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em arfcn} & Osmocom ARFCN, highest bit determines PCS mode \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
GSM Band if ARFCN is valid (part of any valid band), aborts otherwise 
\end{DoxyReturn}


References \textbf{ arfcn}, \textbf{ gsm\+\_\+arfcn2band\+\_\+rc()}, and \textbf{ osmo\+\_\+panic()}.

\mbox{\label{gsm__utils_8c_a2526084c5f9fe9df8b7567f3c4f00d2a}} 
\index{gsm\_utils.c@{gsm\_utils.c}!gsm\_arfcn2band\_rc@{gsm\_arfcn2band\_rc}}
\index{gsm\_arfcn2band\_rc@{gsm\_arfcn2band\_rc}!gsm\_utils.c@{gsm\_utils.c}}
\doxysubsubsection{gsm\_arfcn2band\_rc()}
{\footnotesize\ttfamily int gsm\+\_\+arfcn2band\+\_\+rc (\begin{DoxyParamCaption}\item[{uint16\+\_\+t}]{arfcn,  }\item[{enum \textbf{ gsm\+\_\+band} $\ast$}]{band }\end{DoxyParamCaption})}



Resolve GSM band from ARFCN. 

In Osmocom, we use the highest bit of the {\itshape arfcn} to indicate PCS 
\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em arfcn} & Osmocom ARFCN, highest bit determines PCS mode \\
\hline
\mbox{\texttt{ out}}  & {\em band} & GSM Band containing \textbackslash{}arfcn if arfcn is valid, undetermined otherwise \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 if arfcn is valid and {\itshape band} was set, negative on error 
\end{DoxyReturn}


References \textbf{ arfcn}, \textbf{ ARFCN\+\_\+\+PCS}, \textbf{ GSM\+\_\+\+BAND\+\_\+1800}, \textbf{ GSM\+\_\+\+BAND\+\_\+1900}, \textbf{ GSM\+\_\+\+BAND\+\_\+450}, \textbf{ GSM\+\_\+\+BAND\+\_\+480}, \textbf{ GSM\+\_\+\+BAND\+\_\+750}, \textbf{ GSM\+\_\+\+BAND\+\_\+810}, \textbf{ GSM\+\_\+\+BAND\+\_\+850}, and \textbf{ GSM\+\_\+\+BAND\+\_\+900}.



Referenced by \textbf{ gsm\+\_\+arfcn2band()}.

\mbox{\label{gsm__utils_8c_abfa6d93d10c7204e6b19aab256abb1c2}} 
\index{gsm\_utils.c@{gsm\_utils.c}!gsm\_arfcn2freq10@{gsm\_arfcn2freq10}}
\index{gsm\_arfcn2freq10@{gsm\_arfcn2freq10}!gsm\_utils.c@{gsm\_utils.c}}
\doxysubsubsection{gsm\_arfcn2freq10()}
{\footnotesize\ttfamily uint16\+\_\+t gsm\+\_\+arfcn2freq10 (\begin{DoxyParamCaption}\item[{uint16\+\_\+t}]{arfcn,  }\item[{int}]{uplink }\end{DoxyParamCaption})}



Convert an ARFCN to the frequency in MHz $\ast$ 10. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em arfcn} & GSM ARFCN to convert \\
\hline
\mbox{\texttt{ in}}  & {\em uplink} & Uplink (1) or Downlink (0) frequency \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Frequency in units of 1/10ths of MHz (100k\+Hz) 
\end{DoxyReturn}


References \textbf{ arfcn}, \textbf{ gsm\+\_\+freq\+\_\+range\+::arfcn\+\_\+first}, \textbf{ ARFCN\+\_\+\+FLAG\+\_\+\+MASK}, \textbf{ gsm\+\_\+freq\+\_\+range\+::arfcn\+\_\+last}, \textbf{ gsm\+\_\+freq\+\_\+range\+::flags}, \textbf{ gsm\+\_\+freq\+\_\+range\+::freq\+\_\+dl\+\_\+offset}, \textbf{ gsm\+\_\+freq\+\_\+range\+::freq\+\_\+ul\+\_\+first}, and \textbf{ gsm\+\_\+ranges}.

\mbox{\label{gsm__utils_8c_a650c05a3987ed76bed5913fcb6ab8000}} 
\index{gsm\_utils.c@{gsm\_utils.c}!gsm\_band\_name@{gsm\_band\_name}}
\index{gsm\_band\_name@{gsm\_band\_name}!gsm\_utils.c@{gsm\_utils.c}}
\doxysubsubsection{gsm\_band\_name()}
{\footnotesize\ttfamily const char $\ast$ gsm\+\_\+band\+\_\+name (\begin{DoxyParamCaption}\item[{enum \textbf{ gsm\+\_\+band}}]{band }\end{DoxyParamCaption})}



Return string name of a given GSM Band. 



References \textbf{ GSM\+\_\+\+BAND\+\_\+1800}, \textbf{ GSM\+\_\+\+BAND\+\_\+1900}, \textbf{ GSM\+\_\+\+BAND\+\_\+450}, \textbf{ GSM\+\_\+\+BAND\+\_\+480}, \textbf{ GSM\+\_\+\+BAND\+\_\+750}, \textbf{ GSM\+\_\+\+BAND\+\_\+810}, \textbf{ GSM\+\_\+\+BAND\+\_\+850}, and \textbf{ GSM\+\_\+\+BAND\+\_\+900}.

\mbox{\label{gsm__utils_8c_a1fa7003e966227107b6d55de5ebd391b}} 
\index{gsm\_utils.c@{gsm\_utils.c}!gsm\_band\_parse@{gsm\_band\_parse}}
\index{gsm\_band\_parse@{gsm\_band\_parse}!gsm\_utils.c@{gsm\_utils.c}}
\doxysubsubsection{gsm\_band\_parse()}
{\footnotesize\ttfamily enum \textbf{ gsm\+\_\+band} gsm\+\_\+band\+\_\+parse (\begin{DoxyParamCaption}\item[{const char $\ast$}]{mhz }\end{DoxyParamCaption})}



Parse string name of a GSM band. 



References \textbf{ GSM\+\_\+\+BAND\+\_\+1800}, \textbf{ GSM\+\_\+\+BAND\+\_\+1900}, \textbf{ GSM\+\_\+\+BAND\+\_\+450}, \textbf{ GSM\+\_\+\+BAND\+\_\+480}, \textbf{ GSM\+\_\+\+BAND\+\_\+750}, \textbf{ GSM\+\_\+\+BAND\+\_\+810}, \textbf{ GSM\+\_\+\+BAND\+\_\+850}, and \textbf{ GSM\+\_\+\+BAND\+\_\+900}.

\mbox{\label{gsm__utils_8c_a03983eaede8e4c86846319818e178b39}} 
\index{gsm\_utils.c@{gsm\_utils.c}!gsm\_fn2gsmtime@{gsm\_fn2gsmtime}}
\index{gsm\_fn2gsmtime@{gsm\_fn2gsmtime}!gsm\_utils.c@{gsm\_utils.c}}
\doxysubsubsection{gsm\_fn2gsmtime()}
{\footnotesize\ttfamily void gsm\+\_\+fn2gsmtime (\begin{DoxyParamCaption}\item[{struct \textbf{ gsm\+\_\+time} $\ast$}]{time,  }\item[{uint32\+\_\+t}]{fn }\end{DoxyParamCaption})}



Parse GSM Frame Number into struct \doxyref{gsm\+\_\+time}{p.}{structgsm__time}. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ out}}  & {\em time} & Caller-\/provided memory for \doxyref{gsm\+\_\+time}{p.}{structgsm__time} \\
\hline
\mbox{\texttt{ in}}  & {\em fn} & GSM Frame Number \\
\hline
\end{DoxyParams}


References \textbf{ time}.



Referenced by \textbf{ gsm\+\_\+fn\+\_\+as\+\_\+gsmtime\+\_\+str()}, \textbf{ l2\+\_\+ph\+\_\+chan\+\_\+conf()}, and \textbf{ l2\+\_\+ph\+\_\+rach\+\_\+ind()}.

\mbox{\label{gsm__utils_8c_a04260546b5802656f5f9e67d3eb15b7a}} 
\index{gsm\_utils.c@{gsm\_utils.c}!gsm\_fn\_as\_gsmtime\_str@{gsm\_fn\_as\_gsmtime\_str}}
\index{gsm\_fn\_as\_gsmtime\_str@{gsm\_fn\_as\_gsmtime\_str}!gsm\_utils.c@{gsm\_utils.c}}
\doxysubsubsection{gsm\_fn\_as\_gsmtime\_str()}
{\footnotesize\ttfamily char $\ast$ gsm\+\_\+fn\+\_\+as\+\_\+gsmtime\+\_\+str (\begin{DoxyParamCaption}\item[{uint32\+\_\+t}]{fn }\end{DoxyParamCaption})}



Parse GSM Frame Number into printable string. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em fn} & GSM Frame Number \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
pointer to printable string 
\end{DoxyReturn}


References \textbf{ gsm\+\_\+time\+::fn}, \textbf{ gsm\+\_\+fn2gsmtime()}, \textbf{ osmo\+\_\+dump\+\_\+gsmtime()}, and \textbf{ time}.

\mbox{\label{gsm__utils_8c_a0966dafc049ea830941e4350814da7c1}} 
\index{gsm\_utils.c@{gsm\_utils.c}!gsm\_freq102arfcn@{gsm\_freq102arfcn}}
\index{gsm\_freq102arfcn@{gsm\_freq102arfcn}!gsm\_utils.c@{gsm\_utils.c}}
\doxysubsubsection{gsm\_freq102arfcn()}
{\footnotesize\ttfamily uint16\+\_\+t gsm\+\_\+freq102arfcn (\begin{DoxyParamCaption}\item[{uint16\+\_\+t}]{freq10,  }\item[{int}]{uplink }\end{DoxyParamCaption})}



Convert a Frequency in MHz $\ast$ 10 to ARFCN. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em freq10} & Frequency in units of 1/10ths of MHz (100k\+Hz) \\
\hline
\mbox{\texttt{ in}}  & {\em uplink} & Frequency is Uplink (1) or Downlink (0) \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
ARFCN in case of success; 0xffff on error 
\end{DoxyReturn}


References \textbf{ arfcn}, \textbf{ gsm\+\_\+freq\+\_\+range\+::arfcn\+\_\+first}, \textbf{ gsm\+\_\+freq\+\_\+range\+::arfcn\+\_\+last}, \textbf{ ARFCN\+\_\+\+UPLINK}, \textbf{ gsm\+\_\+freq\+\_\+range\+::flags}, \textbf{ gsm\+\_\+freq\+\_\+range\+::freq\+\_\+dl\+\_\+offset}, \textbf{ gsm\+\_\+freq\+\_\+range\+::freq\+\_\+ul\+\_\+first}, and \textbf{ gsm\+\_\+ranges}.

\mbox{\label{gsm__utils_8c_ae344c384beeff74e364f3bcbe5630146}} 
\index{gsm\_utils.c@{gsm\_utils.c}!gsm\_get\_octet\_len@{gsm\_get\_octet\_len}}
\index{gsm\_get\_octet\_len@{gsm\_get\_octet\_len}!gsm\_utils.c@{gsm\_utils.c}}
\doxysubsubsection{gsm\_get\_octet\_len()}
{\footnotesize\ttfamily uint8\+\_\+t gsm\+\_\+get\+\_\+octet\+\_\+len (\begin{DoxyParamCaption}\item[{const uint8\+\_\+t}]{sept\+\_\+len }\end{DoxyParamCaption})}



Compute number of octets from number of septets. 

For instance\+: 47 septets need 41,125 = 42 octets. 
\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em sept\+\_\+len} & Number of septets \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Number of octets required 
\end{DoxyReturn}


Referenced by \textbf{ gsm\+\_\+7bit\+\_\+decode\+\_\+n\+\_\+hdr()}, and \textbf{ gsm\+\_\+7bit\+\_\+decode\+\_\+n\+\_\+ussd()}.

\mbox{\label{gsm__utils_8c_a4fcb2d00394ab3a9976a2232fa1aec5e}} 
\index{gsm\_utils.c@{gsm\_utils.c}!gsm\_gsmtime2fn@{gsm\_gsmtime2fn}}
\index{gsm\_gsmtime2fn@{gsm\_gsmtime2fn}!gsm\_utils.c@{gsm\_utils.c}}
\doxysubsubsection{gsm\_gsmtime2fn()}
{\footnotesize\ttfamily uint32\+\_\+t gsm\+\_\+gsmtime2fn (\begin{DoxyParamCaption}\item[{const struct \textbf{ gsm\+\_\+time} $\ast$}]{time }\end{DoxyParamCaption})}



Encode decoded \doxyref{gsm\+\_\+time}{p.}{structgsm__time} to Frame Number. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em time} & GSM Time in decoded structure \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
GSM Frame Number 
\end{DoxyReturn}


References \textbf{ gsm\+\_\+time\+::fn}, \textbf{ GSM\+\_\+\+MAX\+\_\+\+FN}, \textbf{ OSMO\+\_\+\+MOD\+\_\+\+FLR}, and \textbf{ time}.

\mbox{\label{gsm__utils_8c_ad6becb4339b7ca4d7f3d00aededa0b70}} 
\index{gsm\_utils.c@{gsm\_utils.c}!gsm\_rfn2fn@{gsm\_rfn2fn}}
\index{gsm\_rfn2fn@{gsm\_rfn2fn}!gsm\_utils.c@{gsm\_utils.c}}
\doxysubsubsection{gsm\_rfn2fn()}
{\footnotesize\ttfamily uint32\+\_\+t gsm\+\_\+rfn2fn (\begin{DoxyParamCaption}\item[{uint16\+\_\+t}]{rfn,  }\item[{uint32\+\_\+t}]{curr\+\_\+fn }\end{DoxyParamCaption})}



References \textbf{ gsm\+\_\+fn2rfn()}, \textbf{ GSM\+\_\+\+MAX\+\_\+\+FN}, \textbf{ GSM\+\_\+\+RFN\+\_\+\+MODULUS}, \textbf{ GSM\+\_\+\+RFN\+\_\+\+THRESHOLD}, \textbf{ GSM\+\_\+\+TDMA\+\_\+\+FN\+\_\+\+DIFF}, \textbf{ GSM\+\_\+\+TDMA\+\_\+\+FN\+\_\+\+SUB}, \textbf{ GSM\+\_\+\+TDMA\+\_\+\+FN\+\_\+\+SUM}, and \textbf{ OSMO\+\_\+\+ASSERT}.

\mbox{\label{gsm__utils_8c_a29185670b3aca45651f1d77e1bb7c6b7}} 
\index{gsm\_utils.c@{gsm\_utils.c}!gsm\_septet\_encode@{gsm\_septet\_encode}}
\index{gsm\_septet\_encode@{gsm\_septet\_encode}!gsm\_utils.c@{gsm\_utils.c}}
\doxysubsubsection{gsm\_septet\_encode()}
{\footnotesize\ttfamily int gsm\+\_\+septet\+\_\+encode (\begin{DoxyParamCaption}\item[{uint8\+\_\+t $\ast$}]{result,  }\item[{const char $\ast$}]{data }\end{DoxyParamCaption})}



Encode a ASCII characterrs as 7-\/bit GSM alphabet (TS 03.\+38) 

This function converts a zero-\/terminated input string {\itshape data} from ASCII into octet-\/aligned 7-\/bit GSM characters. No packing is performed.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ out}}  & {\em result} & caller-\/allocated output buffer \\
\hline
\mbox{\texttt{ in}}  & {\em data} & input data, ASCII \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
number of octets used in {\itshape result} 
\end{DoxyReturn}


References \textbf{ data}, and \textbf{ gsm\+\_\+7bit\+\_\+alphabet}.



Referenced by \textbf{ gsm\+\_\+7bit\+\_\+encode\+\_\+n()}.

\mbox{\label{gsm__utils_8c_a132cac5e514726d9373b681ff7751066}} 
\index{gsm\_utils.c@{gsm\_utils.c}!gsm\_septet\_lookup@{gsm\_septet\_lookup}}
\index{gsm\_septet\_lookup@{gsm\_septet\_lookup}!gsm\_utils.c@{gsm\_utils.c}}
\doxysubsubsection{gsm\_septet\_lookup()}
{\footnotesize\ttfamily static int gsm\+\_\+septet\+\_\+lookup (\begin{DoxyParamCaption}\item[{uint8\+\_\+t}]{ch }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ gsm\+\_\+7bit\+\_\+alphabet}.



Referenced by \textbf{ gsm\+\_\+7bit\+\_\+decode\+\_\+n\+\_\+hdr()}.

\mbox{\label{gsm__utils_8c_a0510de16d812e1e028e09764a55c220d}} 
\index{gsm\_utils.c@{gsm\_utils.c}!gsm\_septet\_pack@{gsm\_septet\_pack}}
\index{gsm\_septet\_pack@{gsm\_septet\_pack}!gsm\_utils.c@{gsm\_utils.c}}
\doxysubsubsection{gsm\_septet\_pack()}
{\footnotesize\ttfamily int gsm\+\_\+septet\+\_\+pack (\begin{DoxyParamCaption}\item[{uint8\+\_\+t $\ast$}]{result,  }\item[{const uint8\+\_\+t $\ast$}]{rdata,  }\item[{size\+\_\+t}]{septet\+\_\+len,  }\item[{uint8\+\_\+t}]{padding }\end{DoxyParamCaption})}



GSM Default Alphabet 7bit to octet packing. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ out}}  & {\em result} & Caller-\/provided output buffer \\
\hline
\mbox{\texttt{ in}}  & {\em rdata} & Input data septets \\
\hline
\mbox{\texttt{ in}}  & {\em septet\+\_\+len} & Length of {\itshape rdata} \\
\hline
\mbox{\texttt{ in}}  & {\em padding} & padding bits at start \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
number of bytes used in {\itshape result} 
\end{DoxyReturn}


References \textbf{ data}.



Referenced by \textbf{ gsm\+\_\+7bit\+\_\+encode\+\_\+n()}, and \textbf{ gsm\+\_\+septets2octets()}.

\mbox{\label{gsm__utils_8c_a71a71532b351907921320be2a7187459}} 
\index{gsm\_utils.c@{gsm\_utils.c}!gsm\_septets2octets@{gsm\_septets2octets}}
\index{gsm\_septets2octets@{gsm\_septets2octets}!gsm\_utils.c@{gsm\_utils.c}}
\doxysubsubsection{gsm\_septets2octets()}
{\footnotesize\ttfamily int gsm\+\_\+septets2octets (\begin{DoxyParamCaption}\item[{uint8\+\_\+t $\ast$}]{result,  }\item[{const uint8\+\_\+t $\ast$}]{rdata,  }\item[{uint8\+\_\+t}]{septet\+\_\+len,  }\item[{uint8\+\_\+t}]{padding }\end{DoxyParamCaption})}



Backwards compatibility wrapper for gsm\+\_\+septets\+\_\+pack(), deprecated. 



References \textbf{ gsm\+\_\+septet\+\_\+pack()}.

\mbox{\label{gsm__utils_8c_a7ea20e9ed9ecc0a60ade3faf81871edb}} 
\index{gsm\_utils.c@{gsm\_utils.c}!ms\_class\_gmsk\_dbm@{ms\_class\_gmsk\_dbm}}
\index{ms\_class\_gmsk\_dbm@{ms\_class\_gmsk\_dbm}!gsm\_utils.c@{gsm\_utils.c}}
\doxysubsubsection{ms\_class\_gmsk\_dbm()}
{\footnotesize\ttfamily int ms\+\_\+class\+\_\+gmsk\+\_\+dbm (\begin{DoxyParamCaption}\item[{enum \textbf{ gsm\+\_\+band}}]{band,  }\item[{int}]{class }\end{DoxyParamCaption})}



Convert power class to d\+Bm according to GSM TS 05.\+05. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em band} & GSM frequency band \\
\hline
\mbox{\texttt{ in}}  & {\em class} & GSM power class \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
maximum transmit power of power class in d\+Bm, negative on error 
\end{DoxyReturn}


References \textbf{ GSM\+\_\+\+BAND\+\_\+1800}, \textbf{ GSM\+\_\+\+BAND\+\_\+1900}, \textbf{ GSM\+\_\+\+BAND\+\_\+450}, \textbf{ GSM\+\_\+\+BAND\+\_\+480}, \textbf{ GSM\+\_\+\+BAND\+\_\+750}, \textbf{ GSM\+\_\+\+BAND\+\_\+810}, \textbf{ GSM\+\_\+\+BAND\+\_\+850}, and \textbf{ GSM\+\_\+\+BAND\+\_\+900}.

\mbox{\label{gsm__utils_8c_a480695532e5647f6403768db3842dc02}} 
\index{gsm\_utils.c@{gsm\_utils.c}!ms\_pwr\_ctl\_lvl@{ms\_pwr\_ctl\_lvl}}
\index{ms\_pwr\_ctl\_lvl@{ms\_pwr\_ctl\_lvl}!gsm\_utils.c@{gsm\_utils.c}}
\doxysubsubsection{ms\_pwr\_ctl\_lvl()}
{\footnotesize\ttfamily int ms\+\_\+pwr\+\_\+ctl\+\_\+lvl (\begin{DoxyParamCaption}\item[{enum \textbf{ gsm\+\_\+band}}]{band,  }\item[{unsigned int}]{dbm }\end{DoxyParamCaption})}



determine power control level for given d\+Bm value, as indicated by the tables in chapter 4.\+1.\+1 of GSM TS 05.\+05 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em GSM} & frequency band \\
\hline
\mbox{\texttt{ in}}  & {\em dbm} & RF power value in d\+Bm \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
TS 05.\+05 power control level 
\end{DoxyReturn}


References \textbf{ GSM\+\_\+\+BAND\+\_\+1800}, \textbf{ GSM\+\_\+\+BAND\+\_\+1900}, \textbf{ GSM\+\_\+\+BAND\+\_\+450}, \textbf{ GSM\+\_\+\+BAND\+\_\+480}, \textbf{ GSM\+\_\+\+BAND\+\_\+750}, \textbf{ GSM\+\_\+\+BAND\+\_\+810}, \textbf{ GSM\+\_\+\+BAND\+\_\+850}, and \textbf{ GSM\+\_\+\+BAND\+\_\+900}.

\mbox{\label{gsm__utils_8c_af1a932df543020d87413668cbba66b9f}} 
\index{gsm\_utils.c@{gsm\_utils.c}!ms\_pwr\_dbm@{ms\_pwr\_dbm}}
\index{ms\_pwr\_dbm@{ms\_pwr\_dbm}!gsm\_utils.c@{gsm\_utils.c}}
\doxysubsubsection{ms\_pwr\_dbm()}
{\footnotesize\ttfamily int ms\+\_\+pwr\+\_\+dbm (\begin{DoxyParamCaption}\item[{enum \textbf{ gsm\+\_\+band}}]{band,  }\item[{uint8\+\_\+t}]{lvl }\end{DoxyParamCaption})}



Convert TS 05.\+05 power level to absolute d\+Bm value. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em band} & GSM frequency band \\
\hline
\mbox{\texttt{ in}}  & {\em lvl} & TS 05.\+05 power control level \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
RF power level in d\+Bm 
\end{DoxyReturn}


References \textbf{ GSM\+\_\+\+BAND\+\_\+1800}, \textbf{ GSM\+\_\+\+BAND\+\_\+1900}, \textbf{ GSM\+\_\+\+BAND\+\_\+450}, \textbf{ GSM\+\_\+\+BAND\+\_\+480}, \textbf{ GSM\+\_\+\+BAND\+\_\+750}, \textbf{ GSM\+\_\+\+BAND\+\_\+810}, \textbf{ GSM\+\_\+\+BAND\+\_\+850}, and \textbf{ GSM\+\_\+\+BAND\+\_\+900}.

\mbox{\label{gsm__utils_8c_acc0292d87248739afc7eb2afbe458f80}} 
\index{gsm\_utils.c@{gsm\_utils.c}!osmo\_dump\_gsmtime@{osmo\_dump\_gsmtime}}
\index{osmo\_dump\_gsmtime@{osmo\_dump\_gsmtime}!gsm\_utils.c@{gsm\_utils.c}}
\doxysubsubsection{osmo\_dump\_gsmtime()}
{\footnotesize\ttfamily char $\ast$ osmo\+\_\+dump\+\_\+gsmtime (\begin{DoxyParamCaption}\item[{const struct \textbf{ gsm\+\_\+time} $\ast$}]{tm }\end{DoxyParamCaption})}



References \textbf{ osmo\+\_\+dump\+\_\+gsmtime\+\_\+buf()}.



Referenced by \textbf{ gsm\+\_\+fn\+\_\+as\+\_\+gsmtime\+\_\+str()}.

\mbox{\label{gsm__utils_8c_add331b4c175d2e82943f7a50d4337cb8}} 
\index{gsm\_utils.c@{gsm\_utils.c}!osmo\_dump\_gsmtime\_buf@{osmo\_dump\_gsmtime\_buf}}
\index{osmo\_dump\_gsmtime\_buf@{osmo\_dump\_gsmtime\_buf}!gsm\_utils.c@{gsm\_utils.c}}
\doxysubsubsection{osmo\_dump\_gsmtime\_buf()}
{\footnotesize\ttfamily char $\ast$ osmo\+\_\+dump\+\_\+gsmtime\+\_\+buf (\begin{DoxyParamCaption}\item[{char $\ast$}]{buf,  }\item[{size\+\_\+t}]{buf\+\_\+len,  }\item[{const struct \textbf{ gsm\+\_\+time} $\ast$}]{tm }\end{DoxyParamCaption})}



References \textbf{ gsm\+\_\+time\+::fn}, \textbf{ gsm\+\_\+time\+::t1}, \textbf{ gsm\+\_\+time\+::t2}, and \textbf{ gsm\+\_\+time\+::t3}.



Referenced by \textbf{ osmo\+\_\+dump\+\_\+gsmtime()}, and \textbf{ osmo\+\_\+dump\+\_\+gsmtime\+\_\+c()}.

\mbox{\label{gsm__utils_8c_a116042280c8352d9c7bbaf9bf7ba1909}} 
\index{gsm\_utils.c@{gsm\_utils.c}!osmo\_dump\_gsmtime\_c@{osmo\_dump\_gsmtime\_c}}
\index{osmo\_dump\_gsmtime\_c@{osmo\_dump\_gsmtime\_c}!gsm\_utils.c@{gsm\_utils.c}}
\doxysubsubsection{osmo\_dump\_gsmtime\_c()}
{\footnotesize\ttfamily char $\ast$ osmo\+\_\+dump\+\_\+gsmtime\+\_\+c (\begin{DoxyParamCaption}\item[{const void $\ast$}]{ctx,  }\item[{const struct \textbf{ gsm\+\_\+time} $\ast$}]{tm }\end{DoxyParamCaption})}



References \textbf{ osmo\+\_\+dump\+\_\+gsmtime\+\_\+buf()}.

\mbox{\label{gsm__utils_8c_a5b09d21926d3a35ced829f61dc0bb790}} 
\index{gsm\_utils.c@{gsm\_utils.c}!osmo\_get\_rand\_id@{osmo\_get\_rand\_id}}
\index{osmo\_get\_rand\_id@{osmo\_get\_rand\_id}!gsm\_utils.c@{gsm\_utils.c}}
\doxysubsubsection{osmo\_get\_rand\_id()}
{\footnotesize\ttfamily int osmo\+\_\+get\+\_\+rand\+\_\+id (\begin{DoxyParamCaption}\item[{uint8\+\_\+t $\ast$}]{out,  }\item[{size\+\_\+t}]{len }\end{DoxyParamCaption})}



Generate random identifier We use /dev/urandom (default when GRND\+\_\+\+RANDOM flag is not set). 

Both /dev/(u)random numbers are coming from the same CSPRNG anyway (at least on GNU/\+Linux $>$= 4.\+8). See also RFC4086. 
\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ out}}  & {\em out} & Buffer to be filled with random data \\
\hline
\mbox{\texttt{ in}}  & {\em len} & Number of random bytes required \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success, or a negative error code on error. 
\end{DoxyReturn}


References \textbf{ ENOTSUP}, \textbf{ len}, and \textbf{ OSMO\+\_\+\+MAX\+\_\+\+RAND\+\_\+\+ID\+\_\+\+LEN}.

\mbox{\label{gsm__utils_8c_a8d7eb8255d6849331f4171b5f7960f83}} 
\index{gsm\_utils.c@{gsm\_utils.c}!rxlev2dbm@{rxlev2dbm}}
\index{rxlev2dbm@{rxlev2dbm}!gsm\_utils.c@{gsm\_utils.c}}
\doxysubsubsection{rxlev2dbm()}
{\footnotesize\ttfamily int rxlev2dbm (\begin{DoxyParamCaption}\item[{uint8\+\_\+t}]{rxlev }\end{DoxyParamCaption})}



Convert TS 05.\+08 Rx\+Lev to d\+Bm (TS 05.\+08 Chapter 8.\+1.\+4) 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em rxlev} & TS 05.\+08 Rx\+Lev value \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Received RF power in d\+Bm 
\end{DoxyReturn}


\doxysubsection{Variable Documentation}
\mbox{\label{gsm__utils_8c_aa7ec9a09a83907203e9681b9d91a7714}} 
\index{gsm\_utils.c@{gsm\_utils.c}!gsm\_7bit\_alphabet@{gsm\_7bit\_alphabet}}
\index{gsm\_7bit\_alphabet@{gsm\_7bit\_alphabet}!gsm\_utils.c@{gsm\_utils.c}}
\doxysubsubsection{gsm\_7bit\_alphabet}
{\footnotesize\ttfamily unsigned char gsm\+\_\+7bit\+\_\+alphabet[$\,$]\hspace{0.3cm}{\ttfamily [static]}}

{\bfseries Initial value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{= \{}
\DoxyCodeLine{        0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x0a, 0xff, 0xff, 0x0d, 0xff,}
\DoxyCodeLine{        0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,}
\DoxyCodeLine{        0xff, 0xff, 0x20, 0x21, 0x22, 0x23, 0x02, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c,}
\DoxyCodeLine{        0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b,}
\DoxyCodeLine{        0x3c, 0x3d, 0x3e, 0x3f, 0x00, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a,}
\DoxyCodeLine{        0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59,}
\DoxyCodeLine{        0x5a, 0x3c, 0x2f, 0x3e, 0x14, 0x11, 0xff, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68,}
\DoxyCodeLine{        0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,}
\DoxyCodeLine{        0x78, 0x79, 0x7a, 0x28, 0x40, 0x29, 0x3d, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,}
\DoxyCodeLine{        0xff, 0xff, 0x0c, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x5e, 0xff, 0xff,}
\DoxyCodeLine{        0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x40, 0xff, 0x01, 0xff,}
\DoxyCodeLine{        0x03, 0xff, 0x7b, 0x7d, 0xff, 0xff, 0xff, 0xff, 0xff, 0x5c, 0xff, 0xff, 0xff, 0xff, 0xff,}
\DoxyCodeLine{        0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x5b, 0x7e, 0x5d, 0xff, 0x7c, 0xff, 0xff, 0xff,}
\DoxyCodeLine{        0xff, 0x5b, 0x0e, 0x1c, 0x09, 0xff, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x5d,}
\DoxyCodeLine{        0xff, 0xff, 0xff, 0xff, 0x5c, 0xff, 0x0b, 0xff, 0xff, 0xff, 0x5e, 0xff, 0xff, 0x1e, 0x7f,}
\DoxyCodeLine{        0xff, 0xff, 0xff, 0x7b, 0x0f, 0x1d, 0xff, 0x04, 0x05, 0xff, 0xff, 0x07, 0xff, 0xff, 0xff,}
\DoxyCodeLine{        0xff, 0x7d, 0x08, 0xff, 0xff, 0xff, 0x7c, 0xff, 0x0c, 0x06, 0xff, 0xff, 0x7e, 0xff, 0xff}
\DoxyCodeLine{\}}

\end{DoxyCode}


Referenced by \textbf{ gsm\+\_\+7bit\+\_\+decode\+\_\+n\+\_\+hdr()}, \textbf{ gsm\+\_\+septet\+\_\+encode()}, and \textbf{ gsm\+\_\+septet\+\_\+lookup()}.

\mbox{\label{gsm__utils_8c_aa3bd882c4763c4212a983991956cf514}} 
\index{gsm\_utils.c@{gsm\_utils.c}!gsm\_ranges@{gsm\_ranges}}
\index{gsm\_ranges@{gsm\_ranges}!gsm\_utils.c@{gsm\_utils.c}}
\doxysubsubsection{gsm\_ranges}
{\footnotesize\ttfamily struct \textbf{ gsm\+\_\+freq\+\_\+range} gsm\+\_\+ranges[$\,$]\hspace{0.3cm}{\ttfamily [static]}}

{\bfseries Initial value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{= \{}
\DoxyCodeLine{        \{ 512,  810, 18502, 800, ARFCN\_PCS \},  }
\DoxyCodeLine{        \{   0,  124,  8900, 450, 0 \},           }
\DoxyCodeLine{        \{ 955, 1023,  8762, 450, 0 \},           }
\DoxyCodeLine{        \{ 128,  251,  8242, 450, 0 \},           }
\DoxyCodeLine{        \{ 512,  885, 17102, 950, 0 \},           }
\DoxyCodeLine{        \{ 259,  293,  4506, 100, 0 \},           }
\DoxyCodeLine{        \{ 306,  340,  4790, 100, 0 \},           }
\DoxyCodeLine{        \{ 350,  425,  8060, 450, 0 \},           }
\DoxyCodeLine{        \{ 438,  511,  7472, 300, 0 \},           }
\DoxyCodeLine{        \{  \}}
\DoxyCodeLine{\}}

\end{DoxyCode}


Referenced by \textbf{ gsm\+\_\+arfcn2freq10()}, and \textbf{ gsm\+\_\+freq102arfcn()}.

\mbox{\label{gsm__utils_8c_aa1c66d15e1eae4970b3598883ecd3598}} 
\index{gsm\_utils.c@{gsm\_utils.c}!osmo\_rat\_type\_names@{osmo\_rat\_type\_names}}
\index{osmo\_rat\_type\_names@{osmo\_rat\_type\_names}!gsm\_utils.c@{gsm\_utils.c}}
\doxysubsubsection{osmo\_rat\_type\_names}
{\footnotesize\ttfamily const struct \textbf{ value\+\_\+string} osmo\+\_\+rat\+\_\+type\+\_\+names[$\,$]}

{\bfseries Initial value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{= \{}
\DoxyCodeLine{        \{ OSMO\_RAT\_UNKNOWN, \textcolor{stringliteral}{"{}unknown"{}} \},}
\DoxyCodeLine{        \{ OSMO\_RAT\_GERAN\_A, \textcolor{stringliteral}{"{}GERAN-\/A"{}} \},}
\DoxyCodeLine{        \{ OSMO\_RAT\_UTRAN\_IU, \textcolor{stringliteral}{"{}UTRAN-\/Iu"{}} \},}
\DoxyCodeLine{        \{ OSMO\_RAT\_EUTRAN\_SGS, \textcolor{stringliteral}{"{}EUTRAN-\/SGs"{}} \},}
\DoxyCodeLine{        \{\}}
\DoxyCodeLine{\}}

\end{DoxyCode}


Referenced by \textbf{ osmo\+\_\+rat\+\_\+type\+\_\+name()}.

