\doxysection{src/gsm/gsm0808.c File Reference}
\label{gsm0808_8c}\index{src/gsm/gsm0808.c@{src/gsm/gsm0808.c}}


Helper functions regarding the TS 08.\+08 / 48.\+008 A interface, primarily message generation/encoding.  


{\ttfamily \#include \char`\"{}config.\+h\char`\"{}}\newline
{\ttfamily \#include $<$string.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/byteswap.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/endian.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/gsm/gsm0808.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/gsm/gsm0808\+\_\+lcs.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/gsm/gsm0808\+\_\+utils.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/gsm/protocol/gsm\+\_\+08\+\_\+08.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/gsm/gsm48.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/gsm/gad.\+h$>$}\newline
\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \textbf{ B}(X)~(1 $<$$<$ (GSM0808\+\_\+\+AMR\+\_\+\+MODE\+\_\+\#\#X))
\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+layer3\+\_\+aoip} (const struct \textbf{ msgb} $\ast$msg\+\_\+l3, uint16\+\_\+t nc, uint16\+\_\+t cc, int \textbf{ lac}, uint16\+\_\+t \+\_\+ci, const struct \textbf{ gsm0808\+\_\+speech\+\_\+codec\+\_\+list} $\ast$scl)
\begin{DoxyCompactList}\small\item\em Create \char`\"{}\+Complete L3 Info\char`\"{} for Ao\+IP, legacy implementation. \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+layer3\+\_\+2} (const struct \textbf{ msgb} $\ast$msg\+\_\+l3, const struct \textbf{ osmo\+\_\+cell\+\_\+global\+\_\+id} $\ast$cell, const struct \textbf{ gsm0808\+\_\+speech\+\_\+codec\+\_\+list} $\ast$scl)
\begin{DoxyCompactList}\small\item\em Create \char`\"{}\+Complete L3 Info\char`\"{} for Ao\+IP. \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+layer3} (struct \textbf{ msgb} $\ast$msg\+\_\+l3, uint16\+\_\+t nc, uint16\+\_\+t cc, int \textbf{ lac}, uint16\+\_\+t \+\_\+ci)
\begin{DoxyCompactList}\small\item\em Create \char`\"{}\+Complete L3 Info\char`\"{} for A, legacy implementation. \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+reset} (void)
\begin{DoxyCompactList}\small\item\em Create BSSMAP RESET message. \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+reset\+\_\+ack} (void)
\begin{DoxyCompactList}\small\item\em Create BSSMAP RESET ACK message. \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+clear\+\_\+complete} (void)
\begin{DoxyCompactList}\small\item\em Create BSSMAP Clear Complete message. \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+clear\+\_\+command} (uint8\+\_\+t \textbf{ cause})
\begin{DoxyCompactList}\small\item\em Create BSSMAP Clear Command message with BSSAP header {\itshape before} l3h and BSSMAP in l3h. \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+clear\+\_\+command2} (uint8\+\_\+t \textbf{ cause}, bool csfb\+\_\+ind)
\begin{DoxyCompactList}\small\item\em Create BSSMAP Clear Command message. \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+cipher} (const struct \textbf{ gsm0808\+\_\+encrypt\+\_\+info} $\ast$ei, const uint8\+\_\+t $\ast$cipher\+\_\+response\+\_\+mode)
\begin{DoxyCompactList}\small\item\em Superseded by \doxyref{gsm0808\+\_\+create\+\_\+cipher2()}{p.}{group__gsm0808_ga10e9815fbea313738b6c5616df8e5491} to include Kc128. \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+cipher2} (const struct \textbf{ gsm0808\+\_\+cipher\+\_\+mode\+\_\+command} $\ast$cmc)
\begin{DoxyCompactList}\small\item\em Create BSSMAP Cipher Mode Command message. \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+cipher\+\_\+complete} (struct \textbf{ msgb} $\ast$layer3, uint8\+\_\+t alg\+\_\+id)
\begin{DoxyCompactList}\small\item\em Create BSSMAP Cipher Mode Complete message. \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+cipher\+\_\+reject} (enum \textbf{ gsm0808\+\_\+cause} \textbf{ cause})
\begin{DoxyCompactList}\small\item\em Create BSSMAP Cipher Mode Reject message. \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+cipher\+\_\+reject\+\_\+ext} (enum \textbf{ gsm0808\+\_\+cause\+\_\+class} class, uint8\+\_\+t ext)
\begin{DoxyCompactList}\small\item\em Create BSSMAP Cipher Mode Reject message. \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+lcls\+\_\+conn\+\_\+ctrl} (enum \textbf{ gsm0808\+\_\+lcls\+\_\+config} \textbf{ config}, enum \textbf{ gsm0808\+\_\+lcls\+\_\+control} control)
\begin{DoxyCompactList}\small\item\em Create BSSMAP LCLS CONNECT CONTROL message (TS 48.\+008 3.\+2.\+1.\+91). \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+lcls\+\_\+conn\+\_\+ctrl\+\_\+ack} (enum \textbf{ gsm0808\+\_\+lcls\+\_\+status} status)
\begin{DoxyCompactList}\small\item\em Create BSSMAP LCLS CONNECT CONTROL ACK message (TS 48.\+008 3.\+2.\+1.\+92). \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+lcls\+\_\+notification} (enum \textbf{ gsm0808\+\_\+lcls\+\_\+status} status, bool break\+\_\+req)
\begin{DoxyCompactList}\small\item\em Create BSSMAP LCLS NOTIFICATION message (TS 48.\+008 3.\+2.\+1.\+93). \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+classmark\+\_\+request} (void)
\begin{DoxyCompactList}\small\item\em Create BSSMAP Classmark Request message. \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+classmark\+\_\+update} (const uint8\+\_\+t $\ast$\textbf{ cm2}, uint8\+\_\+t \textbf{ cm2\+\_\+len}, const uint8\+\_\+t $\ast$cm3, uint8\+\_\+t cm3\+\_\+len)
\begin{DoxyCompactList}\small\item\em Create BSSMAP Classmark Update message. \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+sapi\+\_\+reject\+\_\+cause} (uint8\+\_\+t \textbf{ link\+\_\+id}, uint16\+\_\+t \textbf{ cause})
\begin{DoxyCompactList}\small\item\em Create BSSMAP SAPI N Reject message. \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+sapi\+\_\+reject} (uint8\+\_\+t \textbf{ link\+\_\+id})
\begin{DoxyCompactList}\small\item\em Create BSSMAP SAPI N Reject message (with hard-\/coded cause \char`\"{}\+BSS not equipped\char`\"{}). \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+ass2} (const struct \textbf{ gsm0808\+\_\+channel\+\_\+type} $\ast$ct, const uint16\+\_\+t $\ast$cic, const struct sockaddr\+\_\+storage $\ast$ss, const struct \textbf{ gsm0808\+\_\+speech\+\_\+codec\+\_\+list} $\ast$scl, const uint32\+\_\+t $\ast$ci, const uint8\+\_\+t $\ast$kc, const struct \textbf{ osmo\+\_\+lcls} $\ast$lcls)
\begin{DoxyCompactList}\small\item\em Create BSSMAP Assignment Request message, 3GPP TS 48.\+008 §3.2.\+1.\+1. \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+ass} (const struct \textbf{ gsm0808\+\_\+channel\+\_\+type} $\ast$ct, const uint16\+\_\+t $\ast$cic, const struct sockaddr\+\_\+storage $\ast$ss, const struct \textbf{ gsm0808\+\_\+speech\+\_\+codec\+\_\+list} $\ast$scl, const uint32\+\_\+t $\ast$ci)
\begin{DoxyCompactList}\small\item\em Create BSSMAP Assignment Request message, 3GPP TS 48.\+008 §3.2.\+1.\+1. \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+ass\+\_\+compl2} (uint8\+\_\+t \textbf{ rr\+\_\+cause}, uint8\+\_\+t chosen\+\_\+channel, uint8\+\_\+t encr\+\_\+alg\+\_\+id, uint8\+\_\+t speech\+\_\+mode, const struct sockaddr\+\_\+storage $\ast$ss, const struct \textbf{ gsm0808\+\_\+speech\+\_\+codec} $\ast$sc, const struct \textbf{ gsm0808\+\_\+speech\+\_\+codec\+\_\+list} $\ast$scl, enum \textbf{ gsm0808\+\_\+lcls\+\_\+status} lcls\+\_\+bss\+\_\+status)
\begin{DoxyCompactList}\small\item\em Create BSSMAP Assignment Completed message as per 3GPP TS 48.\+008 §3.2.\+1.\+2. \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+ass\+\_\+compl} (uint8\+\_\+t \textbf{ rr\+\_\+cause}, uint8\+\_\+t chosen\+\_\+channel, uint8\+\_\+t encr\+\_\+alg\+\_\+id, uint8\+\_\+t speech\+\_\+mode, const struct sockaddr\+\_\+storage $\ast$ss, const struct \textbf{ gsm0808\+\_\+speech\+\_\+codec} $\ast$sc, const struct \textbf{ gsm0808\+\_\+speech\+\_\+codec\+\_\+list} $\ast$scl)
\begin{DoxyCompactList}\small\item\em Create BSSMAP Assignment Completed message. \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+assignment\+\_\+completed} (uint8\+\_\+t \textbf{ rr\+\_\+cause}, uint8\+\_\+t chosen\+\_\+channel, uint8\+\_\+t encr\+\_\+alg\+\_\+id, uint8\+\_\+t speech\+\_\+mode)
\begin{DoxyCompactList}\small\item\em Create BSSMAP Assignment Completed message. \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+ass\+\_\+fail} (uint8\+\_\+t \textbf{ cause}, const uint8\+\_\+t $\ast$\textbf{ rr\+\_\+cause}, const struct \textbf{ gsm0808\+\_\+speech\+\_\+codec\+\_\+list} $\ast$scl)
\begin{DoxyCompactList}\small\item\em Create BSSMAP Assignment Failure message. \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+assignment\+\_\+failure} (uint8\+\_\+t \textbf{ cause}, uint8\+\_\+t $\ast$\textbf{ rr\+\_\+cause})
\begin{DoxyCompactList}\small\item\em Create BSSMAP Assignment Failure message. \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+clear\+\_\+rqst} (uint8\+\_\+t \textbf{ cause})
\begin{DoxyCompactList}\small\item\em Create BSSMAP Clear Request message. \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+paging2} (const char $\ast$imsi, const uint32\+\_\+t $\ast$tmsi, const struct \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+list2} $\ast$cil, const uint8\+\_\+t $\ast$chan\+\_\+needed)
\begin{DoxyCompactList}\small\item\em Create BSSMAP PAGING message. \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+paging} (const char $\ast$imsi, const uint32\+\_\+t $\ast$tmsi, const struct \textbf{ gsm0808\+\_\+cell\+\_\+id\+\_\+list} $\ast$cil, const uint8\+\_\+t $\ast$chan\+\_\+needed)
\begin{DoxyCompactList}\small\item\em DEPRECATED\+: Use gsm0808\+\_\+create\+\_\+paging2 instead. \end{DoxyCompactList}\item 
static uint8\+\_\+t \textbf{ put\+\_\+old\+\_\+bss\+\_\+to\+\_\+new\+\_\+bss\+\_\+information} (struct \textbf{ msgb} $\ast$\textbf{ msg}, const struct \textbf{ gsm0808\+\_\+old\+\_\+bss\+\_\+to\+\_\+new\+\_\+bss\+\_\+info} $\ast$i)
\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+handover\+\_\+required} (const struct \textbf{ gsm0808\+\_\+handover\+\_\+required} $\ast$\textbf{ params})
\begin{DoxyCompactList}\small\item\em Create BSSMAP HANDOVER REQUIRED message. \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+handover\+\_\+required\+\_\+reject} (const struct \textbf{ gsm0808\+\_\+handover\+\_\+required\+\_\+reject} $\ast$\textbf{ params})
\begin{DoxyCompactList}\small\item\em Create BSSMAP HANDOVER REQUIRED REJECT message. \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+handover\+\_\+request} (const struct \textbf{ gsm0808\+\_\+handover\+\_\+request} $\ast$\textbf{ params})
\begin{DoxyCompactList}\small\item\em Create BSSMAP HANDOVER REQUEST message, 3GPP TS 48.\+008 3.\+2.\+1.\+8. \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+handover\+\_\+request\+\_\+ack2} (const struct \textbf{ gsm0808\+\_\+handover\+\_\+request\+\_\+ack} $\ast$\textbf{ params})
\begin{DoxyCompactList}\small\item\em Create BSSMAP HANDOVER REQUEST ACKNOWLEDGE message, 3GPP TS 48.\+008 3.\+2.\+1.\+10. \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+handover\+\_\+request\+\_\+ack} (const uint8\+\_\+t $\ast$l3\+\_\+info, uint8\+\_\+t l3\+\_\+info\+\_\+len, uint8\+\_\+t chosen\+\_\+channel, uint8\+\_\+t chosen\+\_\+encr\+\_\+alg, uint8\+\_\+t chosen\+\_\+speech\+\_\+version)
\begin{DoxyCompactList}\small\item\em Same as \doxyref{gsm0808\+\_\+create\+\_\+handover\+\_\+request\+\_\+ack2()}{p.}{group__gsm0808_ga0284dcad7523250e84c6f3877a4760a2} but with less parameters. \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+handover\+\_\+command} (const struct \textbf{ gsm0808\+\_\+handover\+\_\+command} $\ast$\textbf{ params})
\begin{DoxyCompactList}\small\item\em Create BSSMAP HANDOVER COMMAND message, 3GPP TS 48.\+008 3.\+2.\+1.\+11. \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+handover\+\_\+detect} (void)
\begin{DoxyCompactList}\small\item\em Create BSSMAP HANDOVER DETECT message, 3GPP TS 48.\+008 3.\+2.\+1.\+40. \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+handover\+\_\+succeeded} (void)
\begin{DoxyCompactList}\small\item\em Create BSSMAP HANDOVER SUCCEEDED message, 3GPP TS 48.\+008 3.\+2.\+1.\+13. \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+handover\+\_\+complete} (const struct \textbf{ gsm0808\+\_\+handover\+\_\+complete} $\ast$\textbf{ params})
\begin{DoxyCompactList}\small\item\em Create BSSMAP HANDOVER COMPLETE message, 3GPP TS 48.\+008 3.\+2.\+1.\+12. \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+handover\+\_\+failure} (const struct \textbf{ gsm0808\+\_\+handover\+\_\+failure} $\ast$\textbf{ params})
\begin{DoxyCompactList}\small\item\em Create BSSMAP HANDOVER FAILURE message, 3GPP TS 48.\+008 3.\+2.\+1.\+16. \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+handover\+\_\+performed} (const struct \textbf{ gsm0808\+\_\+handover\+\_\+performed} $\ast$\textbf{ params})
\begin{DoxyCompactList}\small\item\em Create BSSMAP HANDOVER PERFORMED message, 3GPP TS 48.\+008 3.\+2.\+1.\+25. \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+common\+\_\+id} (const char $\ast$imsi, const struct \textbf{ osmo\+\_\+plmn\+\_\+id} $\ast$selected\+\_\+plmn\+\_\+id, const struct \textbf{ osmo\+\_\+plmn\+\_\+id} $\ast$last\+\_\+used\+\_\+eutran\+\_\+plnm\+\_\+id)
\begin{DoxyCompactList}\small\item\em Create BSSMAP COMMON ID message, 3GPP TS 48.\+008 3.\+2.\+1.\+68. \end{DoxyCompactList}\item 
void \textbf{ gsm0808\+\_\+prepend\+\_\+dtap\+\_\+header} (struct \textbf{ msgb} $\ast$\textbf{ msg}, uint8\+\_\+t \textbf{ link\+\_\+id})
\begin{DoxyCompactList}\small\item\em Prepend a DTAP header to given Message Buffer. \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+dtap} (struct \textbf{ msgb} $\ast$msg\+\_\+l3, uint8\+\_\+t \textbf{ link\+\_\+id})
\begin{DoxyCompactList}\small\item\em Create BSSMAP DTAP message. \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+perform\+\_\+location\+\_\+request} (const struct \textbf{ gsm0808\+\_\+perform\+\_\+location\+\_\+request} $\ast$\textbf{ params})
\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+perform\+\_\+location\+\_\+response} (const struct \textbf{ gsm0808\+\_\+perform\+\_\+location\+\_\+response} $\ast$\textbf{ params})
\item 
int \textbf{ gsm0808\+\_\+enc\+\_\+lcs\+\_\+cause} (struct \textbf{ msgb} $\ast$\textbf{ msg}, const struct \textbf{ lcs\+\_\+cause\+\_\+ie} $\ast$\textbf{ lcs\+\_\+cause})
\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+perform\+\_\+location\+\_\+abort} (const struct \textbf{ lcs\+\_\+cause\+\_\+ie} $\ast$\textbf{ lcs\+\_\+cause})
\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+vgcs\+\_\+vbs\+\_\+setup} (const struct \textbf{ gsm0808\+\_\+vgcs\+\_\+vbs\+\_\+setup} $\ast$\textbf{ params})
\begin{DoxyCompactList}\small\item\em Create BSSMAP VGCS/\+VBS SETUP message, 3GPP TS 48.\+008 3.\+2.\+1.\+50. \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+vgcs\+\_\+vbs\+\_\+setup\+\_\+ack} (const struct \textbf{ gsm0808\+\_\+vgcs\+\_\+vbs\+\_\+setup\+\_\+ack} $\ast$\textbf{ params})
\begin{DoxyCompactList}\small\item\em Create BSSMAP VGCS/\+VBS SETUP ACK message, 3GPP TS 48.\+008 3.\+2.\+1.\+51. \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+vgcs\+\_\+vbs\+\_\+setup\+\_\+refuse} (enum \textbf{ gsm0808\+\_\+cause} \textbf{ cause})
\begin{DoxyCompactList}\small\item\em 3GPP TS 48.\+008 §3.2.\+1.\+52 VGCS/\+VBS SETUP REFUSE \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+vgcs\+\_\+vbs\+\_\+assign\+\_\+req} (const struct \textbf{ gsm0808\+\_\+vgcs\+\_\+vbs\+\_\+assign\+\_\+req} $\ast$\textbf{ params})
\begin{DoxyCompactList}\small\item\em Create BSSMAP VGCS/\+VBS ASSIGNMENT REQUEST message, 3GPP TS 48.\+008 3.\+2.\+1.\+53. \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+vgcs\+\_\+vbs\+\_\+assign\+\_\+res} (const struct \textbf{ gsm0808\+\_\+vgcs\+\_\+vbs\+\_\+assign\+\_\+res} $\ast$\textbf{ params})
\begin{DoxyCompactList}\small\item\em Create BSSMAP VGCS/\+VBS ASSIGNMENT RESULT message, 3GPP TS 48.\+008 3.\+2.\+1.\+54. \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+vgcs\+\_\+vbs\+\_\+assign\+\_\+fail} (const struct \textbf{ gsm0808\+\_\+vgcs\+\_\+vbs\+\_\+assign\+\_\+fail} $\ast$\textbf{ params})
\begin{DoxyCompactList}\small\item\em Create BSSMAP VGCS/\+VBS ASSIGNMENT FAILURE message, 3GPP TS 48.\+008 3.\+2.\+1.\+55. \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+vgcs\+\_\+queuing\+\_\+ind} (void)
\begin{DoxyCompactList}\small\item\em Create BSSMAP VGCS/\+VBS QUEUING INDICATION message, 3GPP TS 48.\+008 3.\+2.\+1.\+56. \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+uplink\+\_\+request} (const struct \textbf{ gsm0808\+\_\+uplink\+\_\+request} $\ast$\textbf{ params})
\begin{DoxyCompactList}\small\item\em Create BSSMAP (VGCS) UPLINK REQUEST message, 3GPP TS 48.\+008 3.\+2.\+1.\+57. \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+uplink\+\_\+request\+\_\+ack} (const struct \textbf{ gsm0808\+\_\+uplink\+\_\+request\+\_\+ack} $\ast$\textbf{ params})
\begin{DoxyCompactList}\small\item\em Create BSSMAP (VGCS) UPLINK REQUEST ACKNOWLEDGE message, 3GPP TS 48.\+008 3.\+2.\+1.\+58. \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+uplink\+\_\+request\+\_\+cnf} (const struct \textbf{ gsm0808\+\_\+uplink\+\_\+request\+\_\+cnf} $\ast$\textbf{ params})
\begin{DoxyCompactList}\small\item\em Create BSSMAP (VGCS) UPLINK CONFIRM message, 3GPP TS 48.\+008 3.\+2.\+1.\+59. \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+uplink\+\_\+app\+\_\+data} (const struct \textbf{ gsm0808\+\_\+uplink\+\_\+app\+\_\+data} $\ast$\textbf{ params})
\begin{DoxyCompactList}\small\item\em Create BSSMAP (VGCS) UPLINK APPLICATION DATA message, 3GPP TS 48.\+008 3.\+2.\+1.\+59a. \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+uplink\+\_\+release\+\_\+ind} (const struct \textbf{ gsm0808\+\_\+uplink\+\_\+release\+\_\+ind} $\ast$\textbf{ params})
\begin{DoxyCompactList}\small\item\em Create BSSMAP (VGCS) UPLINK RELEASE INDICATION message, 3GPP TS 48.\+008 3.\+2.\+1.\+60. \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+uplink\+\_\+reject\+\_\+cmd} (const struct \textbf{ gsm0808\+\_\+uplink\+\_\+reject\+\_\+cmd} $\ast$\textbf{ params})
\begin{DoxyCompactList}\small\item\em Create BSSMAP (VGCS) UPLINK REJECT COMMAND message, 3GPP TS 48.\+008 3.\+2.\+1.\+61. \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+uplink\+\_\+release\+\_\+cmd} (const enum \textbf{ gsm0808\+\_\+cause} \textbf{ cause})
\begin{DoxyCompactList}\small\item\em 3GPP TS 48.\+008 §3.2.\+1.\+62 (VGCS) UPLINK RELEASE COMMAND \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+uplink\+\_\+seized\+\_\+cmd} (const struct \textbf{ gsm0808\+\_\+uplink\+\_\+seized\+\_\+cmd} $\ast$\textbf{ params})
\begin{DoxyCompactList}\small\item\em Create BSSMAP (VGCS) UPLINK SEIZED COMMAND message, 3GPP TS 48.\+008 3.\+2.\+1.\+62. \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+vgcs\+\_\+additional\+\_\+info} (const struct \textbf{ gsm0808\+\_\+talker\+\_\+identity} $\ast$ti)
\begin{DoxyCompactList}\small\item\em 3GPP TS 48.\+008 §3.2.\+1.\+78 VGCS ADDITIONAL INFORMATION \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+vgcs\+\_\+vbs\+\_\+area\+\_\+cell\+\_\+info} (const struct \textbf{ gsm0808\+\_\+vgcs\+\_\+vbs\+\_\+area\+\_\+cell\+\_\+info} $\ast$\textbf{ params})
\begin{DoxyCompactList}\small\item\em Create BSSMAP VGCS/\+VBS AREA CELL INFO message, 3GPP TS 48.\+008 3.\+2.\+1.\+79. \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+vgcs\+\_\+vbs\+\_\+assign\+\_\+stat} (const struct \textbf{ gsm0808\+\_\+vgcs\+\_\+vbs\+\_\+assign\+\_\+stat} $\ast$\textbf{ params})
\begin{DoxyCompactList}\small\item\em Create BSSMAP VGCS/\+VBS ASSIGNMENT STATUS message, 3GPP TS 48.\+008 3.\+2.\+1.\+80. \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+vgcs\+\_\+sms} (const struct \textbf{ gsm0808\+\_\+sms\+\_\+to\+\_\+vgcs} $\ast$sms)
\begin{DoxyCompactList}\small\item\em 3GPP TS 48.\+008 §3.2.\+1.\+81 VGCS SMS \end{DoxyCompactList}\item 
struct \textbf{ msgb} $\ast$ \textbf{ gsm0808\+\_\+create\+\_\+notification\+\_\+data} (const struct \textbf{ gsm0808\+\_\+notification\+\_\+data} $\ast$\textbf{ params})
\begin{DoxyCompactList}\small\item\em Create BSSMAP (VGCS/\+VBS) NOTIFICATION DATA message, 3GPP TS 48.\+008 3.\+2.\+1.\+82. \end{DoxyCompactList}\item 
const struct \textbf{ tlv\+\_\+definition} $\ast$ \textbf{ gsm0808\+\_\+att\+\_\+tlvdef} (void)
\item 
const char $\ast$ \textbf{ gsm0808\+\_\+bssmap\+\_\+name} (uint8\+\_\+t \textbf{ msg\+\_\+type})
\begin{DoxyCompactList}\small\item\em Return string name of BSSMAP Message Type. \end{DoxyCompactList}\item 
const char $\ast$ \textbf{ gsm0808\+\_\+bssap\+\_\+name} (uint8\+\_\+t \textbf{ msg\+\_\+type})
\begin{DoxyCompactList}\small\item\em Return string name of BSSAP Message Type. \end{DoxyCompactList}\item 
const char $\ast$ \textbf{ gsm0808\+\_\+cause\+\_\+class\+\_\+name} (enum \textbf{ gsm0808\+\_\+cause\+\_\+class} class)
\begin{DoxyCompactList}\small\item\em Return string name of BSSMAP Cause Class name. \end{DoxyCompactList}\item 
const char $\ast$ \textbf{ gsm0808\+\_\+cause\+\_\+name} (enum \textbf{ gsm0808\+\_\+cause} \textbf{ cause})
\begin{DoxyCompactList}\small\item\em Return string name of BSSMAP Cause name. \end{DoxyCompactList}\item 
enum \textbf{ gsm0808\+\_\+cause} \textbf{ gsm0808\+\_\+get\+\_\+cause} (const struct \textbf{ tlv\+\_\+parsed} $\ast$tp)
\begin{DoxyCompactList}\small\item\em Parse Cause TLV 3GPP TS 08.\+08 §3.2.\+2.\+5. \end{DoxyCompactList}\item 
const char $\ast$ \textbf{ gsm0808\+\_\+diagnostics\+\_\+octet\+\_\+location\+\_\+str} (uint8\+\_\+t pointer)
\item 
const char $\ast$ \textbf{ gsm0808\+\_\+diagnostics\+\_\+bit\+\_\+location\+\_\+str} (uint8\+\_\+t bit\+\_\+pointer)
\end{DoxyCompactItemize}
\doxysubsection*{Variables}
\begin{DoxyCompactItemize}
\item 
static \+\_\+\+\_\+thread char \textbf{ str\+\_\+buff} [512]
\begin{DoxyCompactList}\small\item\em Char buffer to return strings from functions. \end{DoxyCompactList}\item 
static const struct \textbf{ tlv\+\_\+definition} \textbf{ bss\+\_\+att\+\_\+tlvdef}
\item 
const struct \textbf{ tlv\+\_\+definition} \textbf{ gsm0808\+\_\+old\+\_\+bss\+\_\+to\+\_\+new\+\_\+bss\+\_\+info\+\_\+att\+\_\+tlvdef}
\item 
const struct \textbf{ value\+\_\+string} \textbf{ gsm0406\+\_\+dlci\+\_\+sapi\+\_\+names} [$\,$]
\item 
static const struct \textbf{ value\+\_\+string} \textbf{ gsm0808\+\_\+msgt\+\_\+names} [$\,$]
\item 
static const struct \textbf{ value\+\_\+string} \textbf{ gsm0808\+\_\+bssap\+\_\+names} [$\,$]
\item 
const struct \textbf{ value\+\_\+string} \textbf{ gsm0808\+\_\+speech\+\_\+codec\+\_\+type\+\_\+names} [$\,$]
\item 
const struct \textbf{ value\+\_\+string} \textbf{ gsm0808\+\_\+permitted\+\_\+speech\+\_\+names} [$\,$]
\item 
const struct \textbf{ value\+\_\+string} \textbf{ gsm0808\+\_\+chosen\+\_\+enc\+\_\+alg\+\_\+names} [$\,$]
\item 
static const struct \textbf{ value\+\_\+string} \textbf{ gsm0808\+\_\+cause\+\_\+names} [$\,$]
\item 
static const struct \textbf{ value\+\_\+string} \textbf{ gsm0808\+\_\+cause\+\_\+class\+\_\+names} [$\,$]
\item 
const struct \textbf{ value\+\_\+string} \textbf{ gsm0808\+\_\+lcls\+\_\+config\+\_\+names} [$\,$]
\item 
const struct \textbf{ value\+\_\+string} \textbf{ gsm0808\+\_\+lcls\+\_\+control\+\_\+names} [$\,$]
\item 
const struct \textbf{ value\+\_\+string} \textbf{ gsm0808\+\_\+lcls\+\_\+status\+\_\+names} [$\,$]
\item 
const uint8\+\_\+t \textbf{ gsm0808\+\_\+amr\+\_\+modes\+\_\+from\+\_\+cfg} [2][16]
\item 
const struct \textbf{ value\+\_\+string} \textbf{ gsm0808\+\_\+amr\+\_\+mode\+\_\+names} [$\,$]
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Helper functions regarding the TS 08.\+08 / 48.\+008 A interface, primarily message generation/encoding. 



\doxysubsection{Macro Definition Documentation}
\mbox{\label{gsm0808_8c_aad4a8abd7704af83d1f6f07a35fe1b90}} 
\index{gsm0808.c@{gsm0808.c}!B@{B}}
\index{B@{B}!gsm0808.c@{gsm0808.c}}
\doxysubsubsection{B}
{\footnotesize\ttfamily \#define B(\begin{DoxyParamCaption}\item[{}]{X }\end{DoxyParamCaption})~(1 $<$$<$ (GSM0808\+\_\+\+AMR\+\_\+\+MODE\+\_\+\#\#X))}

