\doxysection{src/gsm/gsm0808\+\_\+utils.c File Reference}
\label{gsm0808__utils_8c}\index{src/gsm/gsm0808\_utils.c@{src/gsm/gsm0808\_utils.c}}
{\ttfamily \#include \char`\"{}config.\+h\char`\"{}}\newline
{\ttfamily \#include $<$osmocom/core/utils.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/msgb.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/byteswap.\+h$>$}\newline
{\ttfamily \#include $<$string.\+h$>$}\newline
{\ttfamily \#include $<$errno.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/gsm/protocol/gsm\+\_\+08\+\_\+08.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/gsm/gsm48.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/gsm/gsm0808.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/gsm/gsm0808\+\_\+utils.\+h$>$}\newline
\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \textbf{ IP\+\_\+\+V4\+\_\+\+ADDR\+\_\+\+LEN}~4
\item 
\#define \textbf{ IP\+\_\+\+V6\+\_\+\+ADDR\+\_\+\+LEN}~16
\item 
\#define \textbf{ IP\+\_\+\+PORT\+\_\+\+LEN}~2
\item 
\#define \textbf{ CHANNEL\+\_\+\+TYPE\+\_\+\+ELEMENT\+\_\+\+MAXLEN}~11
\item 
\#define \textbf{ CHANNEL\+\_\+\+TYPE\+\_\+\+ELEMENT\+\_\+\+MINLEN}~3
\item 
\#define \textbf{ ENCRYPT\+\_\+\+INFO\+\_\+\+ELEMENT\+\_\+\+MINLEN}~1
\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
static void \textbf{ decode\+\_\+lai} (const uint8\+\_\+t $\ast$\textbf{ data}, struct \textbf{ osmo\+\_\+location\+\_\+area\+\_\+id} $\ast$decoded)
\item 
static int \textbf{ enc\+\_\+speech\+\_\+codec} (struct \textbf{ msgb} $\ast$\textbf{ msg}, const struct \textbf{ gsm0808\+\_\+speech\+\_\+codec} $\ast$sc)
\item 
int \textbf{ gsm0808\+\_\+enc\+\_\+speech\+\_\+codec2} (struct \textbf{ msgb} $\ast$\textbf{ msg}, const struct \textbf{ gsm0808\+\_\+speech\+\_\+codec} $\ast$sc)
\begin{DoxyCompactList}\small\item\em Encode TS 08.\+08 Speech Codec IE. \end{DoxyCompactList}\item 
uint8\+\_\+t \textbf{ gsm0808\+\_\+enc\+\_\+speech\+\_\+codec} (struct \textbf{ msgb} $\ast$\textbf{ msg}, const struct \textbf{ gsm0808\+\_\+speech\+\_\+codec} $\ast$sc)
\begin{DoxyCompactList}\small\item\em Deprecated\+: \doxyref{gsm0808\+\_\+enc\+\_\+speech\+\_\+codec2()}{p.}{group__gsm0808_ga21f5330fae0c3b4da8db2ba47adfe665} wrapper for backwards compatibility. \end{DoxyCompactList}\item 
int \textbf{ gsm0808\+\_\+dec\+\_\+speech\+\_\+codec} (struct \textbf{ gsm0808\+\_\+speech\+\_\+codec} $\ast$sc, const uint8\+\_\+t $\ast$elem, uint8\+\_\+t \textbf{ len})
\begin{DoxyCompactList}\small\item\em Decode TS 08.\+08 Speech Codec IE. \end{DoxyCompactList}\item 
int \textbf{ gsm0808\+\_\+enc\+\_\+speech\+\_\+codec\+\_\+list2} (struct \textbf{ msgb} $\ast$\textbf{ msg}, const struct \textbf{ gsm0808\+\_\+speech\+\_\+codec\+\_\+list} $\ast$scl)
\begin{DoxyCompactList}\small\item\em Encode TS 08.\+08 Speech Codec list. \end{DoxyCompactList}\item 
uint8\+\_\+t \textbf{ gsm0808\+\_\+enc\+\_\+speech\+\_\+codec\+\_\+list} (struct \textbf{ msgb} $\ast$\textbf{ msg}, const struct \textbf{ gsm0808\+\_\+speech\+\_\+codec\+\_\+list} $\ast$scl)
\begin{DoxyCompactList}\small\item\em Deprecated\+: \doxyref{gsm0808\+\_\+enc\+\_\+speech\+\_\+codec\+\_\+list2()}{p.}{group__gsm0808_ga812216127985fe502c8e5d5e32b02709} wrapper for backwards compatibility. \end{DoxyCompactList}\item 
int \textbf{ gsm0808\+\_\+dec\+\_\+speech\+\_\+codec\+\_\+list} (struct \textbf{ gsm0808\+\_\+speech\+\_\+codec\+\_\+list} $\ast$scl, const uint8\+\_\+t $\ast$elem, uint8\+\_\+t \textbf{ len})
\begin{DoxyCompactList}\small\item\em Decode TS 08.\+08 Speech Codec list IE. \end{DoxyCompactList}\item 
uint8\+\_\+t \textbf{ gsm0808\+\_\+enc\+\_\+channel\+\_\+type} (struct \textbf{ msgb} $\ast$\textbf{ msg}, const struct \textbf{ gsm0808\+\_\+channel\+\_\+type} $\ast$ct)
\begin{DoxyCompactList}\small\item\em Encode TS 08.\+08 Channel Type IE. \end{DoxyCompactList}\item 
int \textbf{ gsm0808\+\_\+dec\+\_\+channel\+\_\+type} (struct \textbf{ gsm0808\+\_\+channel\+\_\+type} $\ast$ct, const uint8\+\_\+t $\ast$elem, uint8\+\_\+t \textbf{ len})
\begin{DoxyCompactList}\small\item\em Decode TS 08.\+08 Channel Type IE. \end{DoxyCompactList}\item 
static uint8\+\_\+t \textbf{ gsm0808\+\_\+enc\+\_\+gcr} (struct \textbf{ msgb} $\ast$\textbf{ msg}, const struct \textbf{ osmo\+\_\+gcr\+\_\+parsed} $\ast$\textbf{ g})
\begin{DoxyCompactList}\small\item\em Create BSSMAP Global Call Reference, 3GPP TS 48.\+008 §3.2.\+2.\+115. \end{DoxyCompactList}\item 
static int \textbf{ gsm0808\+\_\+dec\+\_\+gcr} (struct \textbf{ osmo\+\_\+gcr\+\_\+parsed} $\ast$gcr, const struct \textbf{ tlv\+\_\+parsed} $\ast$tp)
\begin{DoxyCompactList}\small\item\em Decode BSSMAP Global Call Reference, 3GPP TS 29.\+205 Table B 2.\+1.\+9.\+1. \end{DoxyCompactList}\item 
uint8\+\_\+t \textbf{ gsm0808\+\_\+enc\+\_\+lcls} (struct \textbf{ msgb} $\ast$\textbf{ msg}, const struct \textbf{ osmo\+\_\+lcls} $\ast$lcls)
\begin{DoxyCompactList}\small\item\em Add LCLS parameters to a given msgb, 3GPP TS 48.\+008 §3.2.\+2.\+115 -\/ 3.\+2.\+2.\+120. \end{DoxyCompactList}\item 
int \textbf{ gsm0808\+\_\+dec\+\_\+lcls} (struct \textbf{ osmo\+\_\+lcls} $\ast$lcls, const struct \textbf{ tlv\+\_\+parsed} $\ast$tp)
\begin{DoxyCompactList}\small\item\em Decode LCLS parameters to a given msgb, 3GPP TS 48.\+008 §3.2.\+2.\+115 -\/ 3.\+2.\+2.\+120. \end{DoxyCompactList}\item 
char $\ast$ \textbf{ osmo\+\_\+lcls\+\_\+dump\+\_\+buf} (char $\ast$buf, size\+\_\+t buf\+\_\+len, const struct \textbf{ osmo\+\_\+lcls} $\ast$lcls)
\begin{DoxyCompactList}\small\item\em Dump LCLS parameters (GCR excluded) into string for printing. \end{DoxyCompactList}\item 
char $\ast$ \textbf{ osmo\+\_\+lcls\+\_\+dump} (const struct \textbf{ osmo\+\_\+lcls} $\ast$lcls)
\begin{DoxyCompactList}\small\item\em Dump LCLS parameters (GCR excluded) into static string buffer for printing. \end{DoxyCompactList}\item 
char $\ast$ \textbf{ osmo\+\_\+lcls\+\_\+dump\+\_\+c} (void $\ast$ctx, const struct \textbf{ osmo\+\_\+lcls} $\ast$lcls)
\item 
char $\ast$ \textbf{ osmo\+\_\+gcr\+\_\+dump\+\_\+buf} (char $\ast$buf, size\+\_\+t buf\+\_\+len, const struct \textbf{ osmo\+\_\+lcls} $\ast$lcls)
\begin{DoxyCompactList}\small\item\em Dump GCR struct into string for printing. \end{DoxyCompactList}\item 
char $\ast$ \textbf{ osmo\+\_\+gcr\+\_\+dump} (const struct \textbf{ osmo\+\_\+lcls} $\ast$lcls)
\begin{DoxyCompactList}\small\item\em Dump GCR struct into static string buffer for printing. \end{DoxyCompactList}\item 
uint8\+\_\+t \textbf{ gsm0808\+\_\+enc\+\_\+encrypt\+\_\+info} (struct \textbf{ msgb} $\ast$\textbf{ msg}, const struct \textbf{ gsm0808\+\_\+encrypt\+\_\+info} $\ast$ei)
\begin{DoxyCompactList}\small\item\em Encode TS 08.\+08 Encryption Information IE. \end{DoxyCompactList}\item 
int \textbf{ gsm0808\+\_\+dec\+\_\+encrypt\+\_\+info} (struct \textbf{ gsm0808\+\_\+encrypt\+\_\+info} $\ast$ei, const uint8\+\_\+t $\ast$elem, uint8\+\_\+t \textbf{ len})
\begin{DoxyCompactList}\small\item\em Decode TS 08.\+08 Encryption Information IE. \end{DoxyCompactList}\item 
int \textbf{ gsm0808\+\_\+enc\+\_\+kc128} (struct \textbf{ msgb} $\ast$\textbf{ msg}, const uint8\+\_\+t $\ast$kc128)
\begin{DoxyCompactList}\small\item\em Encode TS 48.\+008 Kc128 IE. \end{DoxyCompactList}\item 
int \textbf{ gsm0808\+\_\+dec\+\_\+kc128} (uint8\+\_\+t $\ast$kc128, const uint8\+\_\+t $\ast$elem, uint8\+\_\+t \textbf{ len})
\begin{DoxyCompactList}\small\item\em Decode TS 48.\+008 Kc128 IE. \end{DoxyCompactList}\item 
static void \textbf{ cell\+\_\+id\+\_\+to\+\_\+cgi} (struct \textbf{ osmo\+\_\+cell\+\_\+global\+\_\+id} $\ast$dst, enum \textbf{ CELL\+\_\+\+IDENT} discr, const union \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+u} $\ast$u)
\item 
int \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+size} (enum \textbf{ CELL\+\_\+\+IDENT} discr)
\item 
int \textbf{ gsm0808\+\_\+decode\+\_\+cell\+\_\+id\+\_\+u} (union \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+u} $\ast$out, enum \textbf{ CELL\+\_\+\+IDENT} discr, const uint8\+\_\+t $\ast$buf, unsigned int \textbf{ len})
\begin{DoxyCompactList}\small\item\em Decode a single GSM 08.\+08 Cell ID list element payload. \end{DoxyCompactList}\item 
void \textbf{ gsm0808\+\_\+msgb\+\_\+put\+\_\+cell\+\_\+id\+\_\+u} (struct \textbf{ msgb} $\ast$\textbf{ msg}, enum \textbf{ CELL\+\_\+\+IDENT} id\+\_\+discr, const union \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+u} $\ast$u)
\item 
uint8\+\_\+t \textbf{ gsm0808\+\_\+enc\+\_\+cell\+\_\+id\+\_\+list2} (struct \textbf{ msgb} $\ast$\textbf{ msg}, const struct \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+list2} $\ast$cil)
\begin{DoxyCompactList}\small\item\em Encode TS 08.\+08 Cell Identifier List IE. \end{DoxyCompactList}\item 
uint8\+\_\+t \textbf{ gsm0808\+\_\+enc\+\_\+cell\+\_\+id\+\_\+list} (struct \textbf{ msgb} $\ast$\textbf{ msg}, const struct \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+list} $\ast$cil)
\begin{DoxyCompactList}\small\item\em DEPRECATED\+: Use gsm0808\+\_\+enc\+\_\+cell\+\_\+id\+\_\+list2 instead. \end{DoxyCompactList}\item 
static int \textbf{ parse\+\_\+cell\+\_\+id\+\_\+global\+\_\+list} (struct \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+list2} $\ast$cil, const uint8\+\_\+t $\ast$\textbf{ data}, size\+\_\+t remain, size\+\_\+t $\ast$consumed)
\item 
static int \textbf{ parse\+\_\+cell\+\_\+id\+\_\+lac\+\_\+and\+\_\+ci\+\_\+list} (struct \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+list2} $\ast$cil, const uint8\+\_\+t $\ast$\textbf{ data}, size\+\_\+t remain, size\+\_\+t $\ast$consumed)
\item 
static int \textbf{ parse\+\_\+cell\+\_\+id\+\_\+ci\+\_\+list} (struct \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+list2} $\ast$cil, const uint8\+\_\+t $\ast$\textbf{ data}, size\+\_\+t remain, size\+\_\+t $\ast$consumed)
\item 
static int \textbf{ parse\+\_\+cell\+\_\+id\+\_\+lai\+\_\+and\+\_\+lac} (struct \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+list2} $\ast$cil, const uint8\+\_\+t $\ast$\textbf{ data}, size\+\_\+t remain, size\+\_\+t $\ast$consumed)
\item 
static int \textbf{ parse\+\_\+cell\+\_\+id\+\_\+lac\+\_\+list} (struct \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+list2} $\ast$cil, const uint8\+\_\+t $\ast$\textbf{ data}, size\+\_\+t remain, size\+\_\+t $\ast$consumed)
\item 
static int \textbf{ parse\+\_\+cell\+\_\+id\+\_\+sai\+\_\+list} (struct \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+list2} $\ast$cil, const uint8\+\_\+t $\ast$\textbf{ data}, size\+\_\+t remain, size\+\_\+t $\ast$consumed)
\item 
int \textbf{ gsm0808\+\_\+dec\+\_\+cell\+\_\+id\+\_\+list2} (struct \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+list2} $\ast$cil, const uint8\+\_\+t $\ast$elem, uint8\+\_\+t \textbf{ len})
\begin{DoxyCompactList}\small\item\em Decode Cell Identifier List IE. \end{DoxyCompactList}\item 
int \textbf{ gsm0808\+\_\+dec\+\_\+cell\+\_\+id\+\_\+list} (struct \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+list} $\ast$cil, const uint8\+\_\+t $\ast$elem, uint8\+\_\+t \textbf{ len})
\begin{DoxyCompactList}\small\item\em DEPRECATED\+: Use gsm0808\+\_\+dec\+\_\+cell\+\_\+id\+\_\+list2 instead. \end{DoxyCompactList}\item 
static bool \textbf{ same\+\_\+cell\+\_\+id\+\_\+list\+\_\+entries} (const struct \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+list2} $\ast$a, int ai, const struct \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+list2} $\ast$b, int bi)
\item 
int \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+list\+\_\+add} (struct \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+list2} $\ast$dst, const struct \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+list2} $\ast$src)
\begin{DoxyCompactList}\small\item\em Append entries from one Cell Identifier List to another. \end{DoxyCompactList}\item 
void \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+to\+\_\+list} (struct \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+list2} $\ast$dst, const struct \textbf{ gsm0808\+\_\+cell\+\_\+id} $\ast$src)
\begin{DoxyCompactList}\small\item\em Convert a single Cell Identifier to a Cell Identifier List with one entry. \end{DoxyCompactList}\item 
uint8\+\_\+t \textbf{ gsm0808\+\_\+enc\+\_\+cell\+\_\+id} (struct \textbf{ msgb} $\ast$\textbf{ msg}, const struct \textbf{ gsm0808\+\_\+cell\+\_\+id} $\ast$ci)
\begin{DoxyCompactList}\small\item\em Encode Cell Identifier IE (3GPP TS 48.\+008 3.\+2.\+2.\+17). \end{DoxyCompactList}\item 
int \textbf{ gsm0808\+\_\+dec\+\_\+cell\+\_\+id} (struct \textbf{ gsm0808\+\_\+cell\+\_\+id} $\ast$ci, const uint8\+\_\+t $\ast$elem, uint8\+\_\+t \textbf{ len})
\begin{DoxyCompactList}\small\item\em Decode Cell Identifier IE (3GPP TS 48.\+008 3.\+2.\+2.\+17). \end{DoxyCompactList}\item 
int \textbf{ gsm0808\+\_\+chan\+\_\+type\+\_\+to\+\_\+speech\+\_\+codec} (uint8\+\_\+t perm\+\_\+spch)
\begin{DoxyCompactList}\small\item\em Convert the representation of the permitted speech codec identifier that is used in struct \doxyref{gsm0808\+\_\+channel\+\_\+type}{p.}{structgsm0808__channel__type} to the speech codec representation we use in struct \doxyref{gsm0808\+\_\+speech\+\_\+codec}{p.}{structgsm0808__speech__codec}. \end{DoxyCompactList}\item 
int \textbf{ gsm0808\+\_\+speech\+\_\+codec\+\_\+from\+\_\+chan\+\_\+type} (struct \textbf{ gsm0808\+\_\+speech\+\_\+codec} $\ast$sc, uint8\+\_\+t perm\+\_\+spch)
\begin{DoxyCompactList}\small\item\em Extrapolate a speech codec field from a given permitted speech parameter (channel type). \end{DoxyCompactList}\item 
uint16\+\_\+t \textbf{ gsm0808\+\_\+sc\+\_\+cfg\+\_\+from\+\_\+gsm48\+\_\+mr\+\_\+cfg} (const struct \textbf{ gsm48\+\_\+multi\+\_\+rate\+\_\+conf} $\ast$cfg, bool fr)
\begin{DoxyCompactList}\small\item\em Determine a set of AMR speech codec configuration bits (S0-\/\+S15) from a given GSM 04.\+08 AMR configuration struct. \end{DoxyCompactList}\item 
int \textbf{ gsm48\+\_\+mr\+\_\+cfg\+\_\+from\+\_\+gsm0808\+\_\+sc\+\_\+cfg} (struct \textbf{ gsm48\+\_\+multi\+\_\+rate\+\_\+conf} $\ast$cfg, uint16\+\_\+t s15\+\_\+s0)
\begin{DoxyCompactList}\small\item\em Determine a GSM 04.\+08 AMR configuration struct from a set of speech codec configuration bits (S0-\/\+S15) \end{DoxyCompactList}\item 
int \textbf{ gsm0808\+\_\+get\+\_\+cipher\+\_\+reject\+\_\+cause} (const struct \textbf{ tlv\+\_\+parsed} $\ast$tp)
\item 
int \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+u\+\_\+name} (char $\ast$buf, size\+\_\+t buflen, enum \textbf{ CELL\+\_\+\+IDENT} id\+\_\+discr, const union \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+u} $\ast$u)
\begin{DoxyCompactList}\small\item\em Print a human readable name of the cell identifier to the char buffer. \end{DoxyCompactList}\item 
static bool \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+u\+\_\+match} (enum \textbf{ CELL\+\_\+\+IDENT} discr1, const union \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+u} $\ast$u1, enum \textbf{ CELL\+\_\+\+IDENT} discr2, const union \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+u} $\ast$u2, bool exact\+\_\+match)
\begin{DoxyCompactList}\small\item\em Return true if the common information between the two Cell Identifiers match. \end{DoxyCompactList}\item 
bool \textbf{ gsm0808\+\_\+cell\+\_\+ids\+\_\+match} (const struct \textbf{ gsm0808\+\_\+cell\+\_\+id} $\ast$id1, const struct \textbf{ gsm0808\+\_\+cell\+\_\+id} $\ast$id2, bool exact\+\_\+match)
\begin{DoxyCompactList}\small\item\em Return true if the common information between the two Cell Identifiers match. \end{DoxyCompactList}\item 
int \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+matches\+\_\+list} (const struct \textbf{ gsm0808\+\_\+cell\+\_\+id} $\ast$id, const struct \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+list2} $\ast$list, unsigned int match\+\_\+nr, bool exact\+\_\+match)
\begin{DoxyCompactList}\small\item\em Find an index in a Cell Identifier list that matches a given single Cell Identifer. \end{DoxyCompactList}\item 
void \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+from\+\_\+cgi} (struct \textbf{ gsm0808\+\_\+cell\+\_\+id} $\ast$cid, enum \textbf{ CELL\+\_\+\+IDENT} id\+\_\+discr, const struct \textbf{ osmo\+\_\+cell\+\_\+global\+\_\+id} $\ast$cgi)
\begin{DoxyCompactList}\small\item\em Copy information from a CGI to form a Cell Identifier of the specified kind. \end{DoxyCompactList}\item 
int \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+to\+\_\+cgi} (struct \textbf{ osmo\+\_\+cell\+\_\+global\+\_\+id} $\ast$cgi, const struct \textbf{ gsm0808\+\_\+cell\+\_\+id} $\ast$cid)
\begin{DoxyCompactList}\small\item\em Overwrite parts of cgi with values from a Cell Identifier. \end{DoxyCompactList}\item 
char $\ast$ \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+name\+\_\+buf} (char $\ast$buf, size\+\_\+t buflen, const struct \textbf{ gsm0808\+\_\+cell\+\_\+id} $\ast$cid)
\item 
const char $\ast$ \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+name} (const struct \textbf{ gsm0808\+\_\+cell\+\_\+id} $\ast$cid)
\begin{DoxyCompactList}\small\item\em Return a human readable representation of a Cell Identifier, like \char`\"{}\+LAC\+:123\char`\"{} or \char`\"{}\+CGI\+:001-\/01-\/42-\/23\char`\"{}. \end{DoxyCompactList}\item 
const char $\ast$ \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+name2} (const struct \textbf{ gsm0808\+\_\+cell\+\_\+id} $\ast$cid)
\begin{DoxyCompactList}\small\item\em Like \doxyref{gsm0808\+\_\+cell\+\_\+id\+\_\+name()}{p.}{group__gsm0808_ga2b84f9bc343dae5ee69ffcb7e504efeb} but uses a different static buffer. \end{DoxyCompactList}\item 
char $\ast$ \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+name\+\_\+c} (const void $\ast$ctx, const struct \textbf{ gsm0808\+\_\+cell\+\_\+id} $\ast$cid)
\item 
int \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+list\+\_\+name\+\_\+buf} (char $\ast$buf, size\+\_\+t buflen, const struct \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+list2} $\ast$cil)
\begin{DoxyCompactList}\small\item\em Return a human readable representation of the Cell Identifier List, like \char`\"{}\+LAC[2]\+:\{123, 456\}\char`\"{}. \end{DoxyCompactList}\item 
const char $\ast$ \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+list\+\_\+name} (const struct \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+list2} $\ast$cil)
\begin{DoxyCompactList}\small\item\em Return a human-\/readable representation of {\itshape cil} in a static buffer. \end{DoxyCompactList}\item 
char $\ast$ \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+list\+\_\+name\+\_\+c} (const void $\ast$ctx, const struct \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+list2} $\ast$cil)
\item 
char $\ast$ \textbf{ gsm0808\+\_\+channel\+\_\+type\+\_\+name\+\_\+buf} (char $\ast$buf, size\+\_\+t buf\+\_\+len, const struct \textbf{ gsm0808\+\_\+channel\+\_\+type} $\ast$ct)
\item 
const char $\ast$ \textbf{ gsm0808\+\_\+channel\+\_\+type\+\_\+name} (const struct \textbf{ gsm0808\+\_\+channel\+\_\+type} $\ast$ct)
\item 
char $\ast$ \textbf{ gsm0808\+\_\+channel\+\_\+type\+\_\+name\+\_\+c} (const void $\ast$ctx, const struct \textbf{ gsm0808\+\_\+channel\+\_\+type} $\ast$ct)
\item 
uint8\+\_\+t \textbf{ gsm0808\+\_\+enc\+\_\+group\+\_\+callref} (struct \textbf{ msgb} $\ast$\textbf{ msg}, const struct \textbf{ gsm0808\+\_\+group\+\_\+callref} $\ast$gc)
\begin{DoxyCompactList}\small\item\em Encode Group Call Reference IE (3GPP TS 48.\+008 3.\+2.\+2.\+55). \end{DoxyCompactList}\item 
int \textbf{ gsm0808\+\_\+dec\+\_\+group\+\_\+callref} (struct \textbf{ gsm0808\+\_\+group\+\_\+callref} $\ast$gc, const uint8\+\_\+t $\ast$elem, uint8\+\_\+t \textbf{ len})
\begin{DoxyCompactList}\small\item\em Decode Group Call Reference IE (3GPP TS 48.\+008 3.\+2.\+2.\+55). \end{DoxyCompactList}\item 
uint8\+\_\+t \textbf{ gsm0808\+\_\+enc\+\_\+priority} (struct \textbf{ msgb} $\ast$\textbf{ msg}, const struct \textbf{ gsm0808\+\_\+priority} $\ast$pri)
\begin{DoxyCompactList}\small\item\em Encode Priority IE (3GPP TS 48.\+008 3.\+2.\+2.\+18). \end{DoxyCompactList}\item 
int \textbf{ gsm0808\+\_\+dec\+\_\+priority} (struct \textbf{ gsm0808\+\_\+priority} $\ast$pri, const uint8\+\_\+t $\ast$elem, uint8\+\_\+t \textbf{ len})
\begin{DoxyCompactList}\small\item\em Decode Priority IE (3GPP TS 48.\+008 3.\+2.\+2.\+18). \end{DoxyCompactList}\item 
uint8\+\_\+t \textbf{ gsm0808\+\_\+enc\+\_\+vgcs\+\_\+feature\+\_\+flags} (struct \textbf{ msgb} $\ast$\textbf{ msg}, const struct \textbf{ gsm0808\+\_\+vgcs\+\_\+feature\+\_\+flags} $\ast$ff)
\begin{DoxyCompactList}\small\item\em Encode VGCS Feature Flags IE (3GPP TS 48.\+008 3.\+2.\+2.\+88). \end{DoxyCompactList}\item 
int \textbf{ gsm0808\+\_\+dec\+\_\+vgcs\+\_\+feature\+\_\+flags} (struct \textbf{ gsm0808\+\_\+vgcs\+\_\+feature\+\_\+flags} $\ast$ff, const uint8\+\_\+t $\ast$elem, uint8\+\_\+t \textbf{ len})
\begin{DoxyCompactList}\small\item\em Decode VGCS Feature Flags IE (3GPP TS 48.\+008 3.\+2.\+2.\+88). \end{DoxyCompactList}\item 
uint8\+\_\+t \textbf{ gsm0808\+\_\+enc\+\_\+data\+\_\+identity} (struct \textbf{ msgb} $\ast$\textbf{ msg}, const struct \textbf{ gsm0808\+\_\+data\+\_\+identity} $\ast$ti)
\begin{DoxyCompactList}\small\item\em Encode Data Identity IE (3GPP TS 48.\+008 3.\+2.\+2.\+99). \end{DoxyCompactList}\item 
int \textbf{ gsm0808\+\_\+dec\+\_\+data\+\_\+identity} (struct \textbf{ gsm0808\+\_\+data\+\_\+identity} $\ast$ti, const uint8\+\_\+t $\ast$elem, uint8\+\_\+t \textbf{ len})
\begin{DoxyCompactList}\small\item\em Decode Data Identity IE (3GPP TS 48.\+008 3.\+2.\+2.\+99). \end{DoxyCompactList}\item 
uint8\+\_\+t \textbf{ gsm0808\+\_\+enc\+\_\+msisdn} (struct \textbf{ msgb} $\ast$\textbf{ msg}, const char $\ast$msisdn)
\begin{DoxyCompactList}\small\item\em Encode MSISDN IE (3GPP TS 48.\+008 3.\+2.\+2.\+101). \end{DoxyCompactList}\item 
int \textbf{ gsm0808\+\_\+dec\+\_\+msisdn} (char $\ast$msisdn, const char $\ast$elem, uint8\+\_\+t \textbf{ len})
\begin{DoxyCompactList}\small\item\em Decode MSISDN IE (3GPP TS 48.\+008 3.\+2.\+2.\+101). \end{DoxyCompactList}\item 
uint8\+\_\+t \textbf{ gsm0808\+\_\+enc\+\_\+talker\+\_\+identity} (struct \textbf{ msgb} $\ast$\textbf{ msg}, const struct \textbf{ gsm0808\+\_\+talker\+\_\+identity} $\ast$ti)
\begin{DoxyCompactList}\small\item\em Encode Talker Identity IE (3GPP TS 48.\+008 3.\+2.\+2.\+91). \end{DoxyCompactList}\item 
int \textbf{ gsm0808\+\_\+dec\+\_\+talker\+\_\+identity} (struct \textbf{ gsm0808\+\_\+talker\+\_\+identity} $\ast$ti, const uint8\+\_\+t $\ast$elem, uint8\+\_\+t \textbf{ len})
\begin{DoxyCompactList}\small\item\em Decode Talker Identity IE (3GPP TS 48.\+008 3.\+2.\+2.\+91). \end{DoxyCompactList}\item 
uint8\+\_\+t \textbf{ gsm0808\+\_\+enc\+\_\+assign\+\_\+req} (struct \textbf{ msgb} $\ast$\textbf{ msg}, const enum \textbf{ gsm0808\+\_\+assignment\+\_\+requirement} ar)
\begin{DoxyCompactList}\small\item\em Encode Assignment Requirements IE (3GPP TS 48.\+008 3.\+2.\+2.\+52). \end{DoxyCompactList}\item 
int \textbf{ gsm0808\+\_\+dec\+\_\+assign\+\_\+req} (enum \textbf{ gsm0808\+\_\+assignment\+\_\+requirement} $\ast$ar, const uint8\+\_\+t $\ast$elem, uint8\+\_\+t \textbf{ len})
\begin{DoxyCompactList}\small\item\em Decode Assignment Requirements IE (3GPP TS 48.\+008 3.\+2.\+2.\+52). \end{DoxyCompactList}\item 
uint8\+\_\+t \textbf{ gsm0808\+\_\+enc\+\_\+cell\+\_\+id\+\_\+list\+\_\+segment} (struct \textbf{ msgb} $\ast$\textbf{ msg}, uint8\+\_\+t ie\+\_\+type, const struct \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+list\+\_\+segment} $\ast$ci)
\begin{DoxyCompactList}\small\item\em Encode Cell Identifier List Segment IE (3GPP TS 48.\+008 3.\+2.\+2.\+27a). \end{DoxyCompactList}\item 
int \textbf{ gsm0808\+\_\+dec\+\_\+cell\+\_\+id\+\_\+list\+\_\+segment} (struct \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+list\+\_\+segment} $\ast$ci, const uint8\+\_\+t $\ast$elem, uint8\+\_\+t \textbf{ len})
\begin{DoxyCompactList}\small\item\em Decode Cell Identifier List Segment IE (3GPP TS 48.\+008 3.\+2.\+2.\+27a). \end{DoxyCompactList}\item 
int \textbf{ gsm0808\+\_\+dec\+\_\+call\+\_\+id} (uint32\+\_\+t $\ast$ci, const uint8\+\_\+t $\ast$elem, uint8\+\_\+t \textbf{ len})
\begin{DoxyCompactList}\small\item\em Decode Call Identifier IE (3GPP TS 48.\+008 3.\+2.\+2.\+105). \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Variables}
\begin{DoxyCompactItemize}
\item 
static \+\_\+\+\_\+thread char \textbf{ dbuf} [256]
\item 
const struct \textbf{ value\+\_\+string} \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+discr\+\_\+names} [$\,$]
\begin{DoxyCompactList}\small\item\em \textbf{ value\+\_\+string}[] for enum CELL\+\_\+\+IDENT. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Macro Definition Documentation}
\mbox{\label{gsm0808__utils_8c_a61e6c311357bd957c55a2a8102c78bab}} 
\index{gsm0808\_utils.c@{gsm0808\_utils.c}!CHANNEL\_TYPE\_ELEMENT\_MAXLEN@{CHANNEL\_TYPE\_ELEMENT\_MAXLEN}}
\index{CHANNEL\_TYPE\_ELEMENT\_MAXLEN@{CHANNEL\_TYPE\_ELEMENT\_MAXLEN}!gsm0808\_utils.c@{gsm0808\_utils.c}}
\doxysubsubsection{CHANNEL\_TYPE\_ELEMENT\_MAXLEN}
{\footnotesize\ttfamily \#define CHANNEL\+\_\+\+TYPE\+\_\+\+ELEMENT\+\_\+\+MAXLEN~11}

\mbox{\label{gsm0808__utils_8c_ab0896a0077acdd6754c88e8c84f9805d}} 
\index{gsm0808\_utils.c@{gsm0808\_utils.c}!CHANNEL\_TYPE\_ELEMENT\_MINLEN@{CHANNEL\_TYPE\_ELEMENT\_MINLEN}}
\index{CHANNEL\_TYPE\_ELEMENT\_MINLEN@{CHANNEL\_TYPE\_ELEMENT\_MINLEN}!gsm0808\_utils.c@{gsm0808\_utils.c}}
\doxysubsubsection{CHANNEL\_TYPE\_ELEMENT\_MINLEN}
{\footnotesize\ttfamily \#define CHANNEL\+\_\+\+TYPE\+\_\+\+ELEMENT\+\_\+\+MINLEN~3}

\mbox{\label{gsm0808__utils_8c_a91a6cba05dec2d887bbbb5a1a7c4f216}} 
\index{gsm0808\_utils.c@{gsm0808\_utils.c}!ENCRYPT\_INFO\_ELEMENT\_MINLEN@{ENCRYPT\_INFO\_ELEMENT\_MINLEN}}
\index{ENCRYPT\_INFO\_ELEMENT\_MINLEN@{ENCRYPT\_INFO\_ELEMENT\_MINLEN}!gsm0808\_utils.c@{gsm0808\_utils.c}}
\doxysubsubsection{ENCRYPT\_INFO\_ELEMENT\_MINLEN}
{\footnotesize\ttfamily \#define ENCRYPT\+\_\+\+INFO\+\_\+\+ELEMENT\+\_\+\+MINLEN~1}

\mbox{\label{gsm0808__utils_8c_ade1746341c4c3874bcb08946240ecaa2}} 
\index{gsm0808\_utils.c@{gsm0808\_utils.c}!IP\_PORT\_LEN@{IP\_PORT\_LEN}}
\index{IP\_PORT\_LEN@{IP\_PORT\_LEN}!gsm0808\_utils.c@{gsm0808\_utils.c}}
\doxysubsubsection{IP\_PORT\_LEN}
{\footnotesize\ttfamily \#define IP\+\_\+\+PORT\+\_\+\+LEN~2}

\mbox{\label{gsm0808__utils_8c_aab9cb18659b7801df77eabb99b525326}} 
\index{gsm0808\_utils.c@{gsm0808\_utils.c}!IP\_V4\_ADDR\_LEN@{IP\_V4\_ADDR\_LEN}}
\index{IP\_V4\_ADDR\_LEN@{IP\_V4\_ADDR\_LEN}!gsm0808\_utils.c@{gsm0808\_utils.c}}
\doxysubsubsection{IP\_V4\_ADDR\_LEN}
{\footnotesize\ttfamily \#define IP\+\_\+\+V4\+\_\+\+ADDR\+\_\+\+LEN~4}

\mbox{\label{gsm0808__utils_8c_a2bbdf6db0c31faf488ceb56690a8c9ee}} 
\index{gsm0808\_utils.c@{gsm0808\_utils.c}!IP\_V6\_ADDR\_LEN@{IP\_V6\_ADDR\_LEN}}
\index{IP\_V6\_ADDR\_LEN@{IP\_V6\_ADDR\_LEN}!gsm0808\_utils.c@{gsm0808\_utils.c}}
\doxysubsubsection{IP\_V6\_ADDR\_LEN}
{\footnotesize\ttfamily \#define IP\+\_\+\+V6\+\_\+\+ADDR\+\_\+\+LEN~16}



\doxysubsection{Function Documentation}
\mbox{\label{gsm0808__utils_8c_a8069d6cf4fb5b80fb8f497f4e119d67f}} 
\index{gsm0808\_utils.c@{gsm0808\_utils.c}!cell\_id\_to\_cgi@{cell\_id\_to\_cgi}}
\index{cell\_id\_to\_cgi@{cell\_id\_to\_cgi}!gsm0808\_utils.c@{gsm0808\_utils.c}}
\doxysubsubsection{cell\_id\_to\_cgi()}
{\footnotesize\ttfamily static void cell\+\_\+id\+\_\+to\+\_\+cgi (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+cell\+\_\+global\+\_\+id} $\ast$}]{dst,  }\item[{enum \textbf{ CELL\+\_\+\+IDENT}}]{discr,  }\item[{const union \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+u} $\ast$}]{u }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ CELL\+\_\+\+IDENT\+\_\+\+BSS}, \textbf{ CELL\+\_\+\+IDENT\+\_\+\+CI}, \textbf{ CELL\+\_\+\+IDENT\+\_\+\+LAC}, \textbf{ CELL\+\_\+\+IDENT\+\_\+\+LAC\+\_\+\+AND\+\_\+\+CI}, \textbf{ CELL\+\_\+\+IDENT\+\_\+\+LAI\+\_\+\+AND\+\_\+\+LAC}, \textbf{ CELL\+\_\+\+IDENT\+\_\+\+NO\+\_\+\+CELL}, \textbf{ CELL\+\_\+\+IDENT\+\_\+\+SAI}, \textbf{ CELL\+\_\+\+IDENT\+\_\+\+UTRAN\+\_\+\+LAC\+\_\+\+RNC}, \textbf{ CELL\+\_\+\+IDENT\+\_\+\+UTRAN\+\_\+\+PLMN\+\_\+\+LAC\+\_\+\+RNC}, \textbf{ CELL\+\_\+\+IDENT\+\_\+\+UTRAN\+\_\+\+RNC}, \textbf{ CELL\+\_\+\+IDENT\+\_\+\+WHOLE\+\_\+\+GLOBAL}, \textbf{ CELL\+\_\+\+IDENT\+\_\+\+WHOLE\+\_\+\+GLOBAL\+\_\+\+PS}, \textbf{ osmo\+\_\+cell\+\_\+global\+\_\+id\+::cell\+\_\+identity}, \textbf{ osmo\+\_\+cell\+\_\+global\+\_\+id\+\_\+ps\+::cell\+\_\+identity}, \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+u\+::ci}, \textbf{ osmo\+\_\+lac\+\_\+and\+\_\+ci\+\_\+id\+::ci}, \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+u\+::global}, \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+u\+::global\+\_\+ps}, \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+u\+::lac}, \textbf{ osmo\+\_\+location\+\_\+area\+\_\+id\+::lac}, \textbf{ osmo\+\_\+routing\+\_\+area\+\_\+id\+::lac}, \textbf{ osmo\+\_\+lac\+\_\+and\+\_\+ci\+\_\+id\+::lac}, \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+u\+::lac\+\_\+and\+\_\+ci}, \textbf{ osmo\+\_\+cell\+\_\+global\+\_\+id\+::lai}, \textbf{ osmo\+\_\+service\+\_\+area\+\_\+id\+::lai}, \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+u\+::lai\+\_\+and\+\_\+lac}, \textbf{ osmo\+\_\+cell\+\_\+global\+\_\+id\+\_\+ps\+::rai}, and \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+u\+::sai}.



Referenced by \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+u\+\_\+match()}, and \textbf{ gsm0808\+\_\+enc\+\_\+cell\+\_\+id\+\_\+list2()}.

\mbox{\label{gsm0808__utils_8c_a492606a9b5e44b5d7326d2fbdf74aa75}} 
\index{gsm0808\_utils.c@{gsm0808\_utils.c}!decode\_lai@{decode\_lai}}
\index{decode\_lai@{decode\_lai}!gsm0808\_utils.c@{gsm0808\_utils.c}}
\doxysubsubsection{decode\_lai()}
{\footnotesize\ttfamily static void decode\+\_\+lai (\begin{DoxyParamCaption}\item[{const uint8\+\_\+t $\ast$}]{data,  }\item[{struct \textbf{ osmo\+\_\+location\+\_\+area\+\_\+id} $\ast$}]{decoded }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ data}, \textbf{ gsm48\+\_\+decode\+\_\+lai2()}, and \textbf{ lai}.



Referenced by \textbf{ gsm0808\+\_\+decode\+\_\+cell\+\_\+id\+\_\+u()}, \textbf{ parse\+\_\+cell\+\_\+id\+\_\+global\+\_\+list()}, \textbf{ parse\+\_\+cell\+\_\+id\+\_\+lai\+\_\+and\+\_\+lac()}, and \textbf{ parse\+\_\+cell\+\_\+id\+\_\+sai\+\_\+list()}.

\mbox{\label{gsm0808__utils_8c_ab3b401ec376742225efbdb3b7c145923}} 
\index{gsm0808\_utils.c@{gsm0808\_utils.c}!enc\_speech\_codec@{enc\_speech\_codec}}
\index{enc\_speech\_codec@{enc\_speech\_codec}!gsm0808\_utils.c@{gsm0808\_utils.c}}
\doxysubsubsection{enc\_speech\_codec()}
{\footnotesize\ttfamily static int enc\+\_\+speech\+\_\+codec (\begin{DoxyParamCaption}\item[{struct \textbf{ msgb} $\ast$}]{msg,  }\item[{const struct \textbf{ gsm0808\+\_\+speech\+\_\+codec} $\ast$}]{sc }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ gsm0808\+\_\+speech\+\_\+codec\+::cfg}, \textbf{ gsm0808\+\_\+speech\+\_\+codec\+::fi}, \textbf{ GSM0808\+\_\+\+SCT\+\_\+\+CSD}, \textbf{ GSM0808\+\_\+\+SCT\+\_\+\+EXT}, \textbf{ GSM0808\+\_\+\+SCT\+\_\+\+FR1}, \textbf{ GSM0808\+\_\+\+SCT\+\_\+\+FR2}, \textbf{ GSM0808\+\_\+\+SCT\+\_\+\+FR3}, \textbf{ GSM0808\+\_\+\+SCT\+\_\+\+FR4}, \textbf{ GSM0808\+\_\+\+SCT\+\_\+\+FR5}, \textbf{ GSM0808\+\_\+\+SCT\+\_\+\+HR1}, \textbf{ GSM0808\+\_\+\+SCT\+\_\+\+HR3}, \textbf{ GSM0808\+\_\+\+SCT\+\_\+\+HR4}, \textbf{ GSM0808\+\_\+\+SCT\+\_\+\+HR6}, \textbf{ header}, \textbf{ msg}, \textbf{ msgb\+\_\+put\+\_\+u16()}, \textbf{ msgb\+\_\+put\+\_\+u8()}, \textbf{ osmo\+\_\+ntohs}, \textbf{ gsm0808\+\_\+speech\+\_\+codec\+::pi}, \textbf{ gsm0808\+\_\+speech\+\_\+codec\+::pt}, \textbf{ gsm0808\+\_\+speech\+\_\+codec\+::tf}, and \textbf{ gsm0808\+\_\+speech\+\_\+codec\+::type}.



Referenced by \textbf{ gsm0808\+\_\+enc\+\_\+speech\+\_\+codec2()}, and \textbf{ gsm0808\+\_\+enc\+\_\+speech\+\_\+codec\+\_\+list2()}.

\mbox{\label{gsm0808__utils_8c_a9adcdf610832a8b827ebdf009e709537}} 
\index{gsm0808\_utils.c@{gsm0808\_utils.c}!gsm0808\_cell\_id\_u\_match@{gsm0808\_cell\_id\_u\_match}}
\index{gsm0808\_cell\_id\_u\_match@{gsm0808\_cell\_id\_u\_match}!gsm0808\_utils.c@{gsm0808\_utils.c}}
\doxysubsubsection{gsm0808\_cell\_id\_u\_match()}
{\footnotesize\ttfamily static bool gsm0808\+\_\+cell\+\_\+id\+\_\+u\+\_\+match (\begin{DoxyParamCaption}\item[{enum \textbf{ CELL\+\_\+\+IDENT}}]{discr1,  }\item[{const union \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+u} $\ast$}]{u1,  }\item[{enum \textbf{ CELL\+\_\+\+IDENT}}]{discr2,  }\item[{const union \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+u} $\ast$}]{u2,  }\item[{bool}]{exact\+\_\+match }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Return true if the common information between the two Cell Identifiers match. 

For example, if a LAC+\+CI is compared to LAC, return true if the LAC are the same. Note that CELL\+\_\+\+IDENT\+\_\+\+NO\+\_\+\+CELL will always return false. Also CELL\+\_\+\+IDENT\+\_\+\+BSS will always return false, since this function cannot possibly know the bounds of the BSS, so the caller must handle CELL\+\_\+\+IDENT\+\_\+\+BSS specially. 
\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em discr1} & Cell Identifier type. \\
\hline
\mbox{\texttt{ in}}  & {\em u1} & Cell Identifier value. \\
\hline
\mbox{\texttt{ in}}  & {\em discr2} & Other Cell Identifier type. \\
\hline
\mbox{\texttt{ in}}  & {\em u2} & Other Cell Identifier value. \\
\hline
\mbox{\texttt{ in}}  & {\em exact\+\_\+match} & If true, return true only if the CELL\+\_\+\+IDENT types and all values are identical. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
True if the common fields of the above match. 
\end{DoxyReturn}


References \textbf{ cell\+\_\+id\+\_\+to\+\_\+cgi()}, \textbf{ CELL\+\_\+\+IDENT\+\_\+\+BSS}, \textbf{ CELL\+\_\+\+IDENT\+\_\+\+NO\+\_\+\+CELL}, \textbf{ CELL\+\_\+\+IDENT\+\_\+\+UTRAN\+\_\+\+LAC\+\_\+\+RNC}, \textbf{ CELL\+\_\+\+IDENT\+\_\+\+UTRAN\+\_\+\+PLMN\+\_\+\+LAC\+\_\+\+RNC}, \textbf{ CELL\+\_\+\+IDENT\+\_\+\+UTRAN\+\_\+\+RNC}, and \textbf{ osmo\+\_\+cgi\+\_\+cmp()}.



Referenced by \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+matches\+\_\+list()}, and \textbf{ gsm0808\+\_\+cell\+\_\+ids\+\_\+match()}.

\mbox{\label{gsm0808__utils_8c_ad57e079950af66a40043e5c61aad0dcb}} 
\index{gsm0808\_utils.c@{gsm0808\_utils.c}!gsm0808\_dec\_gcr@{gsm0808\_dec\_gcr}}
\index{gsm0808\_dec\_gcr@{gsm0808\_dec\_gcr}!gsm0808\_utils.c@{gsm0808\_utils.c}}
\doxysubsubsection{gsm0808\_dec\_gcr()}
{\footnotesize\ttfamily static int gsm0808\+\_\+dec\+\_\+gcr (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+gcr\+\_\+parsed} $\ast$}]{gcr,  }\item[{const struct \textbf{ tlv\+\_\+parsed} $\ast$}]{tp }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Decode BSSMAP Global Call Reference, 3GPP TS 29.\+205 Table B 2.\+1.\+9.\+1. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ out}}  & {\em gcr} & Caller-\/provided memory to store Global Call Reference \\
\hline
\mbox{\texttt{ in}}  & {\em tp} & IE values to be decoded \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
number of bytes parsed; negative on error 
\end{DoxyReturn}


References \textbf{ GSM0808\+\_\+\+IE\+\_\+\+GLOBAL\+\_\+\+CALL\+\_\+\+REF}, \textbf{ osmo\+\_\+dec\+\_\+gcr()}, \textbf{ OSMO\+\_\+\+GCR\+\_\+\+MIN\+\_\+\+LEN}, \textbf{ TLVP\+\_\+\+LEN}, and \textbf{ TLVP\+\_\+\+VAL\+\_\+\+MINLEN}.



Referenced by \textbf{ gsm0808\+\_\+dec\+\_\+lcls()}.

\mbox{\label{gsm0808__utils_8c_a10c740a7898be8139c2e4f5ac1b3d725}} 
\index{gsm0808\_utils.c@{gsm0808\_utils.c}!gsm0808\_enc\_gcr@{gsm0808\_enc\_gcr}}
\index{gsm0808\_enc\_gcr@{gsm0808\_enc\_gcr}!gsm0808\_utils.c@{gsm0808\_utils.c}}
\doxysubsubsection{gsm0808\_enc\_gcr()}
{\footnotesize\ttfamily static uint8\+\_\+t gsm0808\+\_\+enc\+\_\+gcr (\begin{DoxyParamCaption}\item[{struct \textbf{ msgb} $\ast$}]{msg,  }\item[{const struct \textbf{ osmo\+\_\+gcr\+\_\+parsed} $\ast$}]{g }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Create BSSMAP Global Call Reference, 3GPP TS 48.\+008 §3.2.\+2.\+115. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ out}}  & {\em msg} & Message Buffer for appending IE \\
\hline
\mbox{\texttt{ in}}  & {\em g} & Global Call Reference, 3GPP TS 29.\+205 Table B 2.\+1.\+9.\+1 \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
number of bytes added to {\itshape msg} or 0 on error 
\end{DoxyReturn}


References \textbf{ g}, \textbf{ GSM0808\+\_\+\+IE\+\_\+\+GLOBAL\+\_\+\+CALL\+\_\+\+REF}, \textbf{ len}, \textbf{ msg}, \textbf{ msgb\+\_\+tl\+\_\+put()}, and \textbf{ osmo\+\_\+enc\+\_\+gcr()}.



Referenced by \textbf{ gsm0808\+\_\+enc\+\_\+lcls()}.

\mbox{\label{gsm0808__utils_8c_a8527f783e3ef9892c0494ca41dceba17}} 
\index{gsm0808\_utils.c@{gsm0808\_utils.c}!parse\_cell\_id\_ci\_list@{parse\_cell\_id\_ci\_list}}
\index{parse\_cell\_id\_ci\_list@{parse\_cell\_id\_ci\_list}!gsm0808\_utils.c@{gsm0808\_utils.c}}
\doxysubsubsection{parse\_cell\_id\_ci\_list()}
{\footnotesize\ttfamily static int parse\+\_\+cell\+\_\+id\+\_\+ci\+\_\+list (\begin{DoxyParamCaption}\item[{struct \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+list2} $\ast$}]{cil,  }\item[{const uint8\+\_\+t $\ast$}]{data,  }\item[{size\+\_\+t}]{remain,  }\item[{size\+\_\+t $\ast$}]{consumed }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+u\+::ci}, \textbf{ data}, \textbf{ GSM0808\+\_\+\+CELL\+\_\+\+ID\+\_\+\+LIST2\+\_\+\+MAXLEN}, and \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+list2\+::id\+\_\+list}.



Referenced by \textbf{ gsm0808\+\_\+dec\+\_\+cell\+\_\+id\+\_\+list2()}.

\mbox{\label{gsm0808__utils_8c_a462888a789090ee1e411149180fc59e4}} 
\index{gsm0808\_utils.c@{gsm0808\_utils.c}!parse\_cell\_id\_global\_list@{parse\_cell\_id\_global\_list}}
\index{parse\_cell\_id\_global\_list@{parse\_cell\_id\_global\_list}!gsm0808\_utils.c@{gsm0808\_utils.c}}
\doxysubsubsection{parse\_cell\_id\_global\_list()}
{\footnotesize\ttfamily static int parse\+\_\+cell\+\_\+id\+\_\+global\+\_\+list (\begin{DoxyParamCaption}\item[{struct \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+list2} $\ast$}]{cil,  }\item[{const uint8\+\_\+t $\ast$}]{data,  }\item[{size\+\_\+t}]{remain,  }\item[{size\+\_\+t $\ast$}]{consumed }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ data}, \textbf{ decode\+\_\+lai()}, \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+u\+::global}, \textbf{ GSM0808\+\_\+\+CELL\+\_\+\+ID\+\_\+\+LIST2\+\_\+\+MAXLEN}, \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+list2\+::id\+\_\+list}, and \textbf{ osmo\+\_\+cell\+\_\+global\+\_\+id\+::lai}.



Referenced by \textbf{ gsm0808\+\_\+dec\+\_\+cell\+\_\+id\+\_\+list2()}.

\mbox{\label{gsm0808__utils_8c_ae332e3a694ce67cd131d9d2a23ca99ba}} 
\index{gsm0808\_utils.c@{gsm0808\_utils.c}!parse\_cell\_id\_lac\_and\_ci\_list@{parse\_cell\_id\_lac\_and\_ci\_list}}
\index{parse\_cell\_id\_lac\_and\_ci\_list@{parse\_cell\_id\_lac\_and\_ci\_list}!gsm0808\_utils.c@{gsm0808\_utils.c}}
\doxysubsubsection{parse\_cell\_id\_lac\_and\_ci\_list()}
{\footnotesize\ttfamily static int parse\+\_\+cell\+\_\+id\+\_\+lac\+\_\+and\+\_\+ci\+\_\+list (\begin{DoxyParamCaption}\item[{struct \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+list2} $\ast$}]{cil,  }\item[{const uint8\+\_\+t $\ast$}]{data,  }\item[{size\+\_\+t}]{remain,  }\item[{size\+\_\+t $\ast$}]{consumed }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ data}, \textbf{ GSM0808\+\_\+\+CELL\+\_\+\+ID\+\_\+\+LIST2\+\_\+\+MAXLEN}, \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+list2\+::id\+\_\+list}, \textbf{ osmo\+\_\+lac\+\_\+and\+\_\+ci\+\_\+id\+::lac}, and \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+u\+::lac\+\_\+and\+\_\+ci}.



Referenced by \textbf{ gsm0808\+\_\+dec\+\_\+cell\+\_\+id\+\_\+list2()}.

\mbox{\label{gsm0808__utils_8c_a031e54b3c8a50df86115ae93fcaa6960}} 
\index{gsm0808\_utils.c@{gsm0808\_utils.c}!parse\_cell\_id\_lac\_list@{parse\_cell\_id\_lac\_list}}
\index{parse\_cell\_id\_lac\_list@{parse\_cell\_id\_lac\_list}!gsm0808\_utils.c@{gsm0808\_utils.c}}
\doxysubsubsection{parse\_cell\_id\_lac\_list()}
{\footnotesize\ttfamily static int parse\+\_\+cell\+\_\+id\+\_\+lac\+\_\+list (\begin{DoxyParamCaption}\item[{struct \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+list2} $\ast$}]{cil,  }\item[{const uint8\+\_\+t $\ast$}]{data,  }\item[{size\+\_\+t}]{remain,  }\item[{size\+\_\+t $\ast$}]{consumed }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ data}, \textbf{ GSM0808\+\_\+\+CELL\+\_\+\+ID\+\_\+\+LIST2\+\_\+\+MAXLEN}, \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+list2\+::id\+\_\+list}, and \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+u\+::lac}.



Referenced by \textbf{ gsm0808\+\_\+dec\+\_\+cell\+\_\+id\+\_\+list2()}.

\mbox{\label{gsm0808__utils_8c_af9135c6fb090cf13ced84362c64eeddd}} 
\index{gsm0808\_utils.c@{gsm0808\_utils.c}!parse\_cell\_id\_lai\_and\_lac@{parse\_cell\_id\_lai\_and\_lac}}
\index{parse\_cell\_id\_lai\_and\_lac@{parse\_cell\_id\_lai\_and\_lac}!gsm0808\_utils.c@{gsm0808\_utils.c}}
\doxysubsubsection{parse\_cell\_id\_lai\_and\_lac()}
{\footnotesize\ttfamily static int parse\+\_\+cell\+\_\+id\+\_\+lai\+\_\+and\+\_\+lac (\begin{DoxyParamCaption}\item[{struct \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+list2} $\ast$}]{cil,  }\item[{const uint8\+\_\+t $\ast$}]{data,  }\item[{size\+\_\+t}]{remain,  }\item[{size\+\_\+t $\ast$}]{consumed }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ data}, \textbf{ decode\+\_\+lai()}, \textbf{ GSM0808\+\_\+\+CELL\+\_\+\+ID\+\_\+\+LIST2\+\_\+\+MAXLEN}, \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+list2\+::id\+\_\+list}, and \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+u\+::lai\+\_\+and\+\_\+lac}.



Referenced by \textbf{ gsm0808\+\_\+dec\+\_\+cell\+\_\+id\+\_\+list2()}.

\mbox{\label{gsm0808__utils_8c_a763f3a515a6bcc99d327118975b95b59}} 
\index{gsm0808\_utils.c@{gsm0808\_utils.c}!parse\_cell\_id\_sai\_list@{parse\_cell\_id\_sai\_list}}
\index{parse\_cell\_id\_sai\_list@{parse\_cell\_id\_sai\_list}!gsm0808\_utils.c@{gsm0808\_utils.c}}
\doxysubsubsection{parse\_cell\_id\_sai\_list()}
{\footnotesize\ttfamily static int parse\+\_\+cell\+\_\+id\+\_\+sai\+\_\+list (\begin{DoxyParamCaption}\item[{struct \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+list2} $\ast$}]{cil,  }\item[{const uint8\+\_\+t $\ast$}]{data,  }\item[{size\+\_\+t}]{remain,  }\item[{size\+\_\+t $\ast$}]{consumed }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ data}, \textbf{ decode\+\_\+lai()}, \textbf{ GSM0808\+\_\+\+CELL\+\_\+\+ID\+\_\+\+LIST2\+\_\+\+MAXLEN}, \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+list2\+::id\+\_\+list}, \textbf{ osmo\+\_\+service\+\_\+area\+\_\+id\+::lai}, and \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+u\+::sai}.



Referenced by \textbf{ gsm0808\+\_\+dec\+\_\+cell\+\_\+id\+\_\+list2()}.

\mbox{\label{gsm0808__utils_8c_a1f4767c3c72baf5ec3d2690de958c4fd}} 
\index{gsm0808\_utils.c@{gsm0808\_utils.c}!same\_cell\_id\_list\_entries@{same\_cell\_id\_list\_entries}}
\index{same\_cell\_id\_list\_entries@{same\_cell\_id\_list\_entries}!gsm0808\_utils.c@{gsm0808\_utils.c}}
\doxysubsubsection{same\_cell\_id\_list\_entries()}
{\footnotesize\ttfamily static bool same\+\_\+cell\+\_\+id\+\_\+list\+\_\+entries (\begin{DoxyParamCaption}\item[{const struct \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+list2} $\ast$}]{a,  }\item[{int}]{ai,  }\item[{const struct \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+list2} $\ast$}]{b,  }\item[{int}]{bi }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



References \textbf{ msgb\+::data}, \textbf{ msgb\+::data\+\_\+len}, \textbf{ gsm0808\+\_\+enc\+\_\+cell\+\_\+id\+\_\+list2()}, \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+list2\+::id\+\_\+discr}, \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+list2\+::id\+\_\+list}, \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+list2\+::id\+\_\+list\+\_\+len}, \textbf{ msgb\+::len}, and \textbf{ msgb\+\_\+reset()}.



Referenced by \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+list\+\_\+add()}.



\doxysubsection{Variable Documentation}
\mbox{\label{gsm0808__utils_8c_a8c2dafceff5f5610a5c6cd1e53b0ce00}} 
\index{gsm0808\_utils.c@{gsm0808\_utils.c}!dbuf@{dbuf}}
\index{dbuf@{dbuf}!gsm0808\_utils.c@{gsm0808\_utils.c}}
\doxysubsubsection{dbuf}
{\footnotesize\ttfamily \+\_\+\+\_\+thread char dbuf[256]\hspace{0.3cm}{\ttfamily [static]}}



Referenced by \textbf{ osmo\+\_\+gcr\+\_\+dump()}, \textbf{ osmo\+\_\+gcr\+\_\+dump\+\_\+buf()}, \textbf{ osmo\+\_\+lcls\+\_\+dump()}, and \textbf{ osmo\+\_\+lcls\+\_\+dump\+\_\+buf()}.

