\doxysection{include/osmocom/gsm/gsm0808\+\_\+utils.h File Reference}
\label{gsm0808__utils_8h}\index{include/osmocom/gsm/gsm0808\_utils.h@{include/osmocom/gsm/gsm0808\_utils.h}}
{\ttfamily \#include $<$osmocom/gsm/protocol/gsm\+\_\+08\+\_\+08.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/gsm/protocol/gsm\+\_\+04\+\_\+08.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/gsm/gsm29205.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/gsm/gsm23003.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/gsm/gsm\+\_\+utils.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/gsm/tlv.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/gsm/gsm48.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/endian.\+h$>$}\newline
\doxysubsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
union \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+u}
\begin{DoxyCompactList}\small\item\em Instead of this, use either struct \doxyref{gsm0808\+\_\+cell\+\_\+id}{p.}{structgsm0808__cell__id} or \doxyref{gsm0808\+\_\+cell\+\_\+id\+\_\+list2}{p.}{structgsm0808__cell__id__list2}. \end{DoxyCompactList}\item 
struct \textbf{ gsm0808\+\_\+cell\+\_\+id}
\begin{DoxyCompactList}\small\item\em Parsed representation of Cell Identifier IE (3GPP TS 48.\+008 3.\+2.\+2.\+17) \end{DoxyCompactList}\item 
struct \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+list2}
\begin{DoxyCompactList}\small\item\em Parsed representation of a Cell Identifier List IE (3GPP TS 48.\+008 3.\+2.\+2.\+27). \end{DoxyCompactList}\item 
struct \textbf{ gsm0808\+\_\+priority}
\begin{DoxyCompactList}\small\item\em Packed representation of a Priority IE (GGPP TS 48.\+008 3.\+2.\+2.\+18) \end{DoxyCompactList}\item 
struct \textbf{ gsm0808\+\_\+vgcs\+\_\+feature\+\_\+flags}
\begin{DoxyCompactList}\small\item\em Packed representation of a VGCS Feature Flags IE (3GPP TS 48.\+008 3.\+2.\+2.\+88) \end{DoxyCompactList}\item 
struct \textbf{ gsm0808\+\_\+group\+\_\+callref}
\begin{DoxyCompactList}\small\item\em Packed representation of a Group Call Reference IE (3GPP TS 48.\+008 3.\+2.\+2.\+55) \end{DoxyCompactList}\item 
struct \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+list\+\_\+segment}
\begin{DoxyCompactList}\small\item\em Parsed representation of a Cell Identifier List Segment IE (3GPP TS 48.\+008 3.\+2.\+2.\+27a) \end{DoxyCompactList}\item 
struct \textbf{ gsm0808\+\_\+circuit\+\_\+pool\+\_\+list}
\item 
struct \textbf{ gsm0808\+\_\+layer\+\_\+3\+\_\+information}
\item 
struct \textbf{ gsm0808\+\_\+talker\+\_\+identity}
\item 
struct \textbf{ gsm0808\+\_\+sms\+\_\+to\+\_\+vgcs}
\item 
struct \textbf{ gsm0808\+\_\+application\+\_\+data}
\item 
struct \textbf{ gsm0808\+\_\+data\+\_\+identity}
\item 
struct \textbf{ osmo\+\_\+lcls}
\begin{DoxyCompactList}\small\item\em LCLS-\/related parameters from 3GPP TS 48.\+008. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \textbf{ GSM0808\+\_\+\+CELL\+\_\+\+ID\+\_\+\+LIST2\+\_\+\+MAXLEN}~127
\begin{DoxyCompactList}\small\item\em (225-\/1)/2 is the maximum number of elements in a cell identifier list. \end{DoxyCompactList}\item 
\#define \textbf{ CIRCUIT\+\_\+\+POOL\+\_\+\+LIST\+\_\+\+MAXLEN}~252
\begin{DoxyCompactList}\small\item\em Parsed representation of a Circuit Pool List IE (3GPP TS 48.\+008 3.\+2.\+2.\+26) \end{DoxyCompactList}\item 
\#define \textbf{ LAYER\+\_\+3\+\_\+\+INFORMATION\+\_\+\+MAXLEN}~252
\begin{DoxyCompactList}\small\item\em Parsed representation of a Layer 3 Information IE (3GPP TS 48.\+008 3.\+2.\+2.\+24) \end{DoxyCompactList}\item 
\#define \textbf{ TALKER\+\_\+\+IDENTITY\+\_\+\+MAXLEN}~17
\begin{DoxyCompactList}\small\item\em Parsed representation of a Talker Identity IE (3GPP TS 48.\+008 3.\+2.\+2.\+91) \end{DoxyCompactList}\item 
\#define \textbf{ SMS\+\_\+\+TO\+\_\+\+VGCS\+\_\+\+MAXLEN}~252
\begin{DoxyCompactList}\small\item\em Parsed representation of a SMS to VGCS IE (3GPP TS 48.\+008 3.\+2.\+2.\+92) \end{DoxyCompactList}\item 
\#define \textbf{ APP\+\_\+\+DATA\+\_\+\+MAXLEN}~9
\begin{DoxyCompactList}\small\item\em Parsed representation of a Application Data IE (3GPP TS 48.\+008 3.\+2.\+2.\+98) \end{DoxyCompactList}\item 
\#define \textbf{ GSM0808\+\_\+\+DP\+\_\+\+MASK\+\_\+\+TALKERS\+\_\+\+LISTENERS}~0x04
\item 
\#define \textbf{ GSM0808\+\_\+\+DP\+\_\+\+MASK\+\_\+\+DISPATCHERS}~0x02
\item 
\#define \textbf{ GSM0808\+\_\+\+DP\+\_\+\+MASK\+\_\+\+NETWORK\+\_\+\+APP}~0x01
\item 
\#define \textbf{ MSISDN\+\_\+\+MAXLEN}~20
\begin{DoxyCompactList}\small\item\em Parsed representation of a MSISDN IE (3GPP TS 48.\+008 3.\+2.\+2.\+101) \end{DoxyCompactList}\item 
\#define \textbf{ MODE\+\_\+\+TYPE}(\textbf{ mode},  \textbf{ type})~((\textbf{ mode} $<$$<$ 16) $\vert$ \textbf{ type})
\end{DoxyCompactItemize}
\doxysubsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum \textbf{ gsm0808\+\_\+assignment\+\_\+requirement} \{ \newline
\textbf{ GSM0808\+\_\+\+ASRQ\+\_\+\+DELAY\+\_\+\+ALLOWED} = 0x00
, \newline
\textbf{ GSM0808\+\_\+\+ASRQ\+\_\+\+IMMEDIATE} = 0x01
, \newline
\textbf{ GSM0808\+\_\+\+ASRQ\+\_\+\+IMMEDIATE\+\_\+\+ON\+\_\+\+DEMAND} = 0x02
 \}
\item 
enum \textbf{ gsm0808\+\_\+service\+\_\+flag} \{ \newline
\textbf{ GSM0808\+\_\+\+SF\+\_\+\+VBS} = 0
, \newline
\textbf{ GSM0808\+\_\+\+SF\+\_\+\+VGCS} = 1
 \}
\item 
enum \textbf{ gsm0808\+\_\+call\+\_\+priority} \{ \newline
\textbf{ GSM0808\+\_\+\+CALL\+\_\+\+PRIORITY\+\_\+\+NONE} = 0x00
, \newline
\textbf{ GSM0808\+\_\+\+CALL\+\_\+\+PRIORITY\+\_\+\+LEVEL\+\_\+4} = 0x01
, \newline
\textbf{ GSM0808\+\_\+\+CALL\+\_\+\+PRIORITY\+\_\+\+LEVEL\+\_\+3} = 0x02
, \newline
\textbf{ GSM0808\+\_\+\+CALL\+\_\+\+PRIORITY\+\_\+\+LEVEL\+\_\+2} = 0x03
, \newline
\textbf{ GSM0808\+\_\+\+CALL\+\_\+\+PRIORITY\+\_\+\+LEVEL\+\_\+1} = 0x04
, \newline
\textbf{ GSM0808\+\_\+\+CALL\+\_\+\+PRIORITY\+\_\+\+LEVEL\+\_\+0} = 0x05
, \newline
\textbf{ GSM0808\+\_\+\+CALL\+\_\+\+PRIORITY\+\_\+\+LEVEL\+\_\+B} = 0x06
, \newline
\textbf{ GSM0808\+\_\+\+CALL\+\_\+\+PRIORITY\+\_\+\+LEVEL\+\_\+A} = 0x07
 \}
\item 
enum \textbf{ gsm0808\+\_\+downlink\+\_\+dtx\+\_\+flag} \{ \newline
\textbf{ GSM0808\+\_\+\+DTX\+\_\+\+FLAG\+\_\+\+ALLOW} = 0
, \newline
\textbf{ GSM0808\+\_\+\+DTX\+\_\+\+FLAG\+\_\+\+FORBID} = 1
 \}
\item 
enum \textbf{ gsm0808\+\_\+talker\+\_\+priority} \{ \newline
\textbf{ GSM0808\+\_\+\+TALKER\+\_\+\+PRIORITY\+\_\+\+NORMAL} = 0x00
, \newline
\textbf{ GSM0808\+\_\+\+TALKER\+\_\+\+PRIORITY\+\_\+\+PRIVILEGED} = 0x01
, \newline
\textbf{ GSM0808\+\_\+\+TALKER\+\_\+\+PRIORITY\+\_\+\+EMERGENCY} = 0x02
 \}
\item 
enum \textbf{ gsm0808\+\_\+vgcs\+\_\+vbs\+\_\+cell\+\_\+status} \{ \newline
\textbf{ GSM0808\+\_\+\+CSTAT\+\_\+\+ESTABLISHED} = 0x00
, \newline
\textbf{ GSM0808\+\_\+\+CSTAT\+\_\+\+NOT\+\_\+\+ESTABLISHED1} = 0x01
, \newline
\textbf{ GSM0808\+\_\+\+CSTAT\+\_\+\+RELEASED\+\_\+\+NO\+\_\+\+USER} = 0x02
, \newline
\textbf{ GSM0808\+\_\+\+CSTAT\+\_\+\+NOT\+\_\+\+ESTABLISHED2} = 0x03
 \}
\item 
enum \textbf{ gsm0808\+\_\+application\+\_\+idndicator} \{ \newline
\textbf{ GSM0808\+\_\+\+AI\+\_\+\+APP\+\_\+\+DATA} = 0x00
, \newline
\textbf{ GSM0808\+\_\+\+AI\+\_\+\+CONFIRM\+\_\+\+APP\+\_\+\+DATA} = 0x01
 \}
\begin{DoxyCompactList}\small\item\em Packed representation of a Data Identity IE (GGPP TS 48.\+008 3.\+2.\+2.\+99) \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
struct \textbf{ gsm0808\+\_\+priority} \textbf{ \+\_\+\+\_\+attribute\+\_\+\+\_\+} ((packed))
\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\+\_\+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\+\_\+c} (void $\ast$ctx, const struct \textbf{ osmo\+\_\+lcls} $\ast$lcls)
\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 
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 
static const char $\ast$ \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+discr\+\_\+name} (enum \textbf{ CELL\+\_\+\+IDENT} id\+\_\+discr)
\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\+\_\+buf} (char $\ast$buf, size\+\_\+t buflen, const struct \textbf{ gsm0808\+\_\+cell\+\_\+id} $\ast$cid)
\item 
char $\ast$ \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+name\+\_\+c} (const void $\ast$ctx, const struct \textbf{ gsm0808\+\_\+cell\+\_\+id} $\ast$cid)
\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 
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 
char $\ast$ \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+list\+\_\+name\+\_\+c} (const void $\ast$ctx, const struct \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+list2} $\ast$cil)
\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 
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 
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 
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 
int \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+size} (enum \textbf{ CELL\+\_\+\+IDENT} discr)
\item 
uint8\+\_\+t \textbf{ gsm0808\+\_\+enc\+\_\+cause} (struct \textbf{ msgb} $\ast$\textbf{ msg}, uint16\+\_\+t \textbf{ cause})
\item 
uint8\+\_\+t \textbf{ gsm0808\+\_\+enc\+\_\+aoip\+\_\+trasp\+\_\+addr} (struct \textbf{ msgb} $\ast$\textbf{ msg}, const struct sockaddr\+\_\+storage $\ast$ss)
\item 
int \textbf{ gsm0808\+\_\+dec\+\_\+aoip\+\_\+trasp\+\_\+addr} (struct sockaddr\+\_\+storage $\ast$ss, const uint8\+\_\+t $\ast$elem, uint8\+\_\+t \textbf{ len})
\item 
int \textbf{ gsm0808\+\_\+dec\+\_\+osmux\+\_\+cid} (uint8\+\_\+t $\ast$cid, const uint8\+\_\+t $\ast$elem, uint8\+\_\+t \textbf{ len})
\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 
uint8\+\_\+t \textbf{ gsm0808\+\_\+enc\+\_\+speech\+\_\+codec} (struct \textbf{ msgb} $\ast$\textbf{ msg}, const struct \textbf{ gsm0808\+\_\+speech\+\_\+codec} $\ast$sc) \textbf{ OSMO\+\_\+\+DEPRECATED}(\char`\"{}use \textbf{ gsm0808\+\_\+enc\+\_\+speech\+\_\+codec2}() \textbf{ instead}\char`\"{})
\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\+\_\+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 
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 
uint8\+\_\+t \textbf{ gsm0808\+\_\+enc\+\_\+speech\+\_\+codec\+\_\+list} (struct \textbf{ msgb} $\ast$\textbf{ msg}, const struct \textbf{ gsm0808\+\_\+speech\+\_\+codec\+\_\+list} $\ast$scl) \textbf{ OSMO\+\_\+\+DEPRECATED}(\char`\"{}use \textbf{ gsm0808\+\_\+enc\+\_\+speech\+\_\+codec\+\_\+list2}() \textbf{ instead}\char`\"{})
\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\+\_\+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 
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 
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 
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) \textbf{ OSMO\+\_\+\+DEPRECATED}(\char`\"{}use \textbf{ gsm0808\+\_\+enc\+\_\+cell\+\_\+id\+\_\+list2} \textbf{ instead}\char`\"{})
\begin{DoxyCompactList}\small\item\em DEPRECATED\+: Use gsm0808\+\_\+enc\+\_\+cell\+\_\+id\+\_\+list2 instead. \end{DoxyCompactList}\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}) \textbf{ OSMO\+\_\+\+DEPRECATED}(\char`\"{}use \textbf{ gsm0808\+\_\+dec\+\_\+cell\+\_\+id\+\_\+list2} \textbf{ instead}\char`\"{})
\begin{DoxyCompactList}\small\item\em DEPRECATED\+: Use gsm0808\+\_\+dec\+\_\+cell\+\_\+id\+\_\+list2 instead. \end{DoxyCompactList}\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 
static enum \textbf{ gsm0808\+\_\+cause\+\_\+class} \textbf{ gsm0808\+\_\+cause\+\_\+class} (enum \textbf{ gsm0808\+\_\+cause} \textbf{ cause})
\item 
static bool \textbf{ gsm0808\+\_\+cause\+\_\+ext} (enum \textbf{ gsm0808\+\_\+cause} \textbf{ cause})
\item 
int \textbf{ gsm0808\+\_\+get\+\_\+cipher\+\_\+reject\+\_\+cause} (const struct \textbf{ tlv\+\_\+parsed} $\ast$tp) \textbf{ OSMO\+\_\+\+DEPRECATED}(\char`\"{}Use \textbf{ gsm0808\+\_\+get\+\_\+cause}() \textbf{ instead}\char`\"{})
\item 
static uint8\+\_\+t \textbf{ gsm0808\+\_\+current\+\_\+channel\+\_\+type\+\_\+1} (enum \textbf{ gsm\+\_\+chan\+\_\+t} \textbf{ type})
\item 
static enum \textbf{ gsm0808\+\_\+permitted\+\_\+speech} \textbf{ gsm0808\+\_\+permitted\+\_\+speech} (enum \textbf{ gsm\+\_\+chan\+\_\+t} \textbf{ type}, enum \textbf{ gsm48\+\_\+chan\+\_\+mode} \textbf{ mode})
\begin{DoxyCompactList}\small\item\em Return 3GPP TS 48.\+008 3.\+2.\+2.\+51 Speech Version aka permitted speech version indication in 3.\+2.\+2.\+11 Channel Type. \end{DoxyCompactList}\item 
static uint8\+\_\+t \textbf{ gsm0808\+\_\+chosen\+\_\+channel} (enum \textbf{ gsm\+\_\+chan\+\_\+t} \textbf{ type}, enum \textbf{ gsm48\+\_\+chan\+\_\+mode} \textbf{ mode})
\begin{DoxyCompactList}\small\item\em Return 3GPP TS 48.\+008 3.\+2.\+2.\+33 Chosen Channel. \end{DoxyCompactList}\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\+\_\+buf} (char $\ast$buf, size\+\_\+t buf\+\_\+len, 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\+\_\+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\+\_\+data\+\_\+identity} (struct \textbf{ msgb} $\ast$\textbf{ msg}, const struct \textbf{ gsm0808\+\_\+data\+\_\+identity} $\ast$ai)
\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$ai, 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\+\_\+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 
enum \textbf{ gsm0808\+\_\+assignment\+\_\+requirement} \textbf{ \+\_\+\+\_\+attribute\+\_\+\+\_\+}
\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_8h_a78d562962bb478ba16fc86da7016e1c1}} 
\index{gsm0808\_utils.h@{gsm0808\_utils.h}!MODE\_TYPE@{MODE\_TYPE}}
\index{MODE\_TYPE@{MODE\_TYPE}!gsm0808\_utils.h@{gsm0808\_utils.h}}
\doxysubsubsection{MODE\_TYPE}
{\footnotesize\ttfamily \#define MODE\+\_\+\+TYPE(\begin{DoxyParamCaption}\item[{}]{\textbf{ mode},  }\item[{}]{\textbf{ type} }\end{DoxyParamCaption})~((\textbf{ mode} $<$$<$ 16) $\vert$ \textbf{ type})}

