\doxysection{include/osmocom/gsm/gsup.h File Reference}
\label{gsup_8h}\index{include/osmocom/gsm/gsup.h@{include/osmocom/gsm/gsup.h}}


Osmocom Generic Subscriber Update Protocol message encoder/decoder.  


{\ttfamily \#include $<$stdint.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/msgb.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/defs.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/endian.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/socket.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/gsm/gsup\+\_\+sms.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/gsm/protocol/gsm\+\_\+23\+\_\+003.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/gsm/protocol/gsm\+\_\+03\+\_\+40.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/gsm/protocol/gsm\+\_\+04\+\_\+08\+\_\+gprs.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/gsm/protocol/gsm\+\_\+08\+\_\+08.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/gsm/gsm\+\_\+utils.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/crypt/auth.\+h$>$}\newline
\doxysubsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \textbf{ osmo\+\_\+gsup\+\_\+pdp\+\_\+info}
\begin{DoxyCompactList}\small\item\em parsed/decoded PDP context information \end{DoxyCompactList}\item 
struct \textbf{ osmo\+\_\+gsup\+\_\+an\+\_\+apdu}
\begin{DoxyCompactList}\small\item\em Access\+Network\+Signal\+Info as in 3GPP TS 29.\+002. \end{DoxyCompactList}\item 
struct \textbf{ osmo\+\_\+gsup\+\_\+message}
\begin{DoxyCompactList}\small\item\em parsed/decoded GSUP protocol message \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \textbf{ OSMO\+\_\+\+GSUP\+\_\+\+PORT}~4222
\item 
\#define \textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MAX\+\_\+\+NUM\+\_\+\+PDP\+\_\+\+INFO}~10 /$\ast$ GSM 09.\+02 limits this to 50 $\ast$/
\begin{DoxyCompactList}\small\item\em Maximum nubmer of PDP inside \doxyref{osmo\+\_\+gsup\+\_\+message}{p.}{structosmo__gsup__message}. \end{DoxyCompactList}\item 
\#define \textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MAX\+\_\+\+NUM\+\_\+\+AUTH\+\_\+\+INFO}~5
\begin{DoxyCompactList}\small\item\em Maximum number of auth info inside \doxyref{osmo\+\_\+gsup\+\_\+message}{p.}{structosmo__gsup__message}. \end{DoxyCompactList}\item 
\#define \textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MAX\+\_\+\+MSISDN\+\_\+\+LEN}~9
\begin{DoxyCompactList}\small\item\em Maximum number of octets encoding MSISDN in BCD format. \end{DoxyCompactList}\item 
\#define \textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MAX\+\_\+\+CALLED\+\_\+\+PARTY\+\_\+\+BCD\+\_\+\+LEN}~43 /$\ast$ TS 24.\+008 10.\+5.\+4.\+7 $\ast$/
\item 
\#define \textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MAX\+\_\+\+PCO\+\_\+\+LEN}~251
\item 
\#define \textbf{ OSMO\+\_\+\+GSUP\+\_\+\+PDP\+\_\+\+TYPE\+\_\+\+IE}~\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+PDP\+\_\+\+ADDRESS\+\_\+\+IE} /$\ast$ Backward compat $\ast$/
\item 
\#define \textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MSGT\+\_\+\+E\+\_\+\+ROUTING\+\_\+\+ERROR}~\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MSGT\+\_\+\+ROUTING\+\_\+\+ERROR}
\item 
\#define \textbf{ OSMO\+\_\+\+GSUP\+\_\+\+IS\+\_\+\+MSGT\+\_\+\+REQUEST}(msgt)~(((msgt) \& 0b00000011) == 0b00)
\item 
\#define \textbf{ OSMO\+\_\+\+GSUP\+\_\+\+IS\+\_\+\+MSGT\+\_\+\+ERROR}(msgt)~(((msgt) \& 0b00000011) == 0b01)
\item 
\#define \textbf{ OSMO\+\_\+\+GSUP\+\_\+\+IS\+\_\+\+MSGT\+\_\+\+RESULT}(msgt)~(((msgt) \& 0b00000011) == 0b10)
\item 
\#define \textbf{ OSMO\+\_\+\+GSUP\+\_\+\+TO\+\_\+\+MSGT\+\_\+\+REQUEST}(msgt)~(((msgt) \& 0b11111100))
\item 
\#define \textbf{ OSMO\+\_\+\+GSUP\+\_\+\+TO\+\_\+\+MSGT\+\_\+\+ERROR}(msgt)~(((msgt) \& 0b11111100) $\vert$ 0b01)
\item 
\#define \textbf{ OSMO\+\_\+\+GSUP\+\_\+\+TO\+\_\+\+MSGT\+\_\+\+RESULT}(msgt)~(((msgt) \& 0b11111100) $\vert$ 0b10)
\end{DoxyCompactItemize}
\doxysubsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum \textbf{ osmo\+\_\+gsup\+\_\+iei} \{ \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+IMSI\+\_\+\+IE} = 0x01
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+CAUSE\+\_\+\+IE} = 0x02
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+AUTH\+\_\+\+TUPLE\+\_\+\+IE} = 0x03
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+PDP\+\_\+\+INFO\+\_\+\+COMPL\+\_\+\+IE} = 0x04
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+PDP\+\_\+\+INFO\+\_\+\+IE} = 0x05
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+CANCEL\+\_\+\+TYPE\+\_\+\+IE} = 0x06
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+FREEZE\+\_\+\+PTMSI\+\_\+\+IE} = 0x07
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MSISDN\+\_\+\+IE} = 0x08
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+HLR\+\_\+\+NUMBER\+\_\+\+IE} = 0x09
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MESSAGE\+\_\+\+CLASS\+\_\+\+IE} = 0x0a
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+PDP\+\_\+\+CONTEXT\+\_\+\+ID\+\_\+\+IE} = 0x10
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+PDP\+\_\+\+ADDRESS\+\_\+\+IE} = 0x11
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+ACCESS\+\_\+\+POINT\+\_\+\+NAME\+\_\+\+IE} = 0x12
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+PDP\+\_\+\+QOS\+\_\+\+IE} = 0x13
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+CHARG\+\_\+\+CHAR\+\_\+\+IE} = 0x14
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+PCO\+\_\+\+IE} = 0x15
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+RAND\+\_\+\+IE} = 0x20
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+SRES\+\_\+\+IE} = 0x21
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+KC\+\_\+\+IE} = 0x22
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+IK\+\_\+\+IE} = 0x23
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+CK\+\_\+\+IE} = 0x24
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+AUTN\+\_\+\+IE} = 0x25
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+AUTS\+\_\+\+IE} = 0x26
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+RES\+\_\+\+IE} = 0x27
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+CN\+\_\+\+DOMAIN\+\_\+\+IE} = 0x28
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+SUPPORTED\+\_\+\+RAT\+\_\+\+TYPES\+\_\+\+IE} = 0x29
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+CURRENT\+\_\+\+RAT\+\_\+\+TYPE\+\_\+\+IE} = 0x2a
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+SESSION\+\_\+\+ID\+\_\+\+IE} = 0x30
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+SESSION\+\_\+\+STATE\+\_\+\+IE} = 0x31
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+SS\+\_\+\+INFO\+\_\+\+IE} = 0x35
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+SM\+\_\+\+RP\+\_\+\+MR\+\_\+\+IE} = 0x40
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+SM\+\_\+\+RP\+\_\+\+DA\+\_\+\+IE} = 0x41
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+SM\+\_\+\+RP\+\_\+\+OA\+\_\+\+IE} = 0x42
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+SM\+\_\+\+RP\+\_\+\+UI\+\_\+\+IE} = 0x43
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+SM\+\_\+\+RP\+\_\+\+CAUSE\+\_\+\+IE} = 0x44
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+SM\+\_\+\+RP\+\_\+\+MMS\+\_\+\+IE} = 0x45
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+SM\+\_\+\+ALERT\+\_\+\+RSN\+\_\+\+IE} = 0x46
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+IMEI\+\_\+\+IE} = 0x50
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+IMEI\+\_\+\+RESULT\+\_\+\+IE} = 0x51
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+NUM\+\_\+\+VECTORS\+\_\+\+REQ\+\_\+\+IE} = 0x52
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+SOURCE\+\_\+\+NAME\+\_\+\+IE} = 0x60
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+DESTINATION\+\_\+\+NAME\+\_\+\+IE} = 0x61
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+AN\+\_\+\+APDU\+\_\+\+IE} = 0x62
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+CAUSE\+\_\+\+RR\+\_\+\+IE} = 0x63
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+CAUSE\+\_\+\+BSSAP\+\_\+\+IE} = 0x64
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+CAUSE\+\_\+\+SM\+\_\+\+IE} = 0x65
, \newline
\textbf{ \+\_\+\+OSMO\+\_\+\+GSUP\+\_\+\+IEI\+\_\+\+END\+\_\+\+MARKER}
 \}
\begin{DoxyCompactList}\small\item\em Information Element Identifiers for GSUP IEs. \end{DoxyCompactList}\item 
enum \textbf{ osmo\+\_\+gsup\+\_\+message\+\_\+type} \{ \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MSGT\+\_\+\+UPDATE\+\_\+\+LOCATION\+\_\+\+REQUEST} = 0b00000100
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MSGT\+\_\+\+UPDATE\+\_\+\+LOCATION\+\_\+\+ERROR} = 0b00000101
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MSGT\+\_\+\+UPDATE\+\_\+\+LOCATION\+\_\+\+RESULT} = 0b00000110
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MSGT\+\_\+\+SEND\+\_\+\+AUTH\+\_\+\+INFO\+\_\+\+REQUEST} = 0b00001000
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MSGT\+\_\+\+SEND\+\_\+\+AUTH\+\_\+\+INFO\+\_\+\+ERROR} = 0b00001001
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MSGT\+\_\+\+SEND\+\_\+\+AUTH\+\_\+\+INFO\+\_\+\+RESULT} = 0b00001010
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MSGT\+\_\+\+AUTH\+\_\+\+FAIL\+\_\+\+REPORT} = 0b00001011
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MSGT\+\_\+\+PURGE\+\_\+\+MS\+\_\+\+REQUEST} = 0b00001100
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MSGT\+\_\+\+PURGE\+\_\+\+MS\+\_\+\+ERROR} = 0b00001101
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MSGT\+\_\+\+PURGE\+\_\+\+MS\+\_\+\+RESULT} = 0b00001110
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MSGT\+\_\+\+INSERT\+\_\+\+DATA\+\_\+\+REQUEST} = 0b00010000
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MSGT\+\_\+\+INSERT\+\_\+\+DATA\+\_\+\+ERROR} = 0b00010001
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MSGT\+\_\+\+INSERT\+\_\+\+DATA\+\_\+\+RESULT} = 0b00010010
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MSGT\+\_\+\+DELETE\+\_\+\+DATA\+\_\+\+REQUEST} = 0b00010100
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MSGT\+\_\+\+DELETE\+\_\+\+DATA\+\_\+\+ERROR} = 0b00010101
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MSGT\+\_\+\+DELETE\+\_\+\+DATA\+\_\+\+RESULT} = 0b00010110
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MSGT\+\_\+\+LOCATION\+\_\+\+CANCEL\+\_\+\+REQUEST} = 0b00011100
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MSGT\+\_\+\+LOCATION\+\_\+\+CANCEL\+\_\+\+ERROR} = 0b00011101
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MSGT\+\_\+\+LOCATION\+\_\+\+CANCEL\+\_\+\+RESULT} = 0b00011110
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MSGT\+\_\+\+PROC\+\_\+\+SS\+\_\+\+REQUEST} = 0b00100000
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MSGT\+\_\+\+PROC\+\_\+\+SS\+\_\+\+ERROR} = 0b00100001
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MSGT\+\_\+\+PROC\+\_\+\+SS\+\_\+\+RESULT} = 0b00100010
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MSGT\+\_\+\+MO\+\_\+\+FORWARD\+\_\+\+SM\+\_\+\+REQUEST} = 0b00100100
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MSGT\+\_\+\+MO\+\_\+\+FORWARD\+\_\+\+SM\+\_\+\+ERROR} = 0b00100101
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MSGT\+\_\+\+MO\+\_\+\+FORWARD\+\_\+\+SM\+\_\+\+RESULT} = 0b00100110
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MSGT\+\_\+\+MT\+\_\+\+FORWARD\+\_\+\+SM\+\_\+\+REQUEST} = 0b00101000
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MSGT\+\_\+\+MT\+\_\+\+FORWARD\+\_\+\+SM\+\_\+\+ERROR} = 0b00101001
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MSGT\+\_\+\+MT\+\_\+\+FORWARD\+\_\+\+SM\+\_\+\+RESULT} = 0b00101010
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MSGT\+\_\+\+READY\+\_\+\+FOR\+\_\+\+SM\+\_\+\+REQUEST} = 0b00101100
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MSGT\+\_\+\+READY\+\_\+\+FOR\+\_\+\+SM\+\_\+\+ERROR} = 0b00101101
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MSGT\+\_\+\+READY\+\_\+\+FOR\+\_\+\+SM\+\_\+\+RESULT} = 0b00101110
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MSGT\+\_\+\+CHECK\+\_\+\+IMEI\+\_\+\+REQUEST} = 0b00110000
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MSGT\+\_\+\+CHECK\+\_\+\+IMEI\+\_\+\+ERROR} = 0b00110001
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MSGT\+\_\+\+CHECK\+\_\+\+IMEI\+\_\+\+RESULT} = 0b00110010
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MSGT\+\_\+\+E\+\_\+\+PREPARE\+\_\+\+HANDOVER\+\_\+\+REQUEST} = 0b00110100
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MSGT\+\_\+\+E\+\_\+\+PREPARE\+\_\+\+HANDOVER\+\_\+\+ERROR} = 0b00110101
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MSGT\+\_\+\+E\+\_\+\+PREPARE\+\_\+\+HANDOVER\+\_\+\+RESULT} = 0b00110110
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MSGT\+\_\+\+E\+\_\+\+PREPARE\+\_\+\+SUBSEQUENT\+\_\+\+HANDOVER\+\_\+\+REQUEST} = 0b00111000
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MSGT\+\_\+\+E\+\_\+\+PREPARE\+\_\+\+SUBSEQUENT\+\_\+\+HANDOVER\+\_\+\+ERROR} = 0b00111001
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MSGT\+\_\+\+E\+\_\+\+PREPARE\+\_\+\+SUBSEQUENT\+\_\+\+HANDOVER\+\_\+\+RESULT} = 0b00111010
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MSGT\+\_\+\+E\+\_\+\+SEND\+\_\+\+END\+\_\+\+SIGNAL\+\_\+\+REQUEST} = 0b00111100
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MSGT\+\_\+\+E\+\_\+\+SEND\+\_\+\+END\+\_\+\+SIGNAL\+\_\+\+ERROR} = 0b00111101
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MSGT\+\_\+\+E\+\_\+\+SEND\+\_\+\+END\+\_\+\+SIGNAL\+\_\+\+RESULT} = 0b00111110
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MSGT\+\_\+\+E\+\_\+\+PROCESS\+\_\+\+ACCESS\+\_\+\+SIGNALLING\+\_\+\+REQUEST} = 0b01000000
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MSGT\+\_\+\+E\+\_\+\+FORWARD\+\_\+\+ACCESS\+\_\+\+SIGNALLING\+\_\+\+REQUEST} = 0b01000100
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MSGT\+\_\+\+E\+\_\+\+CLOSE} = 0b01000111
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MSGT\+\_\+\+E\+\_\+\+ABORT} = 0b01001011
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MSGT\+\_\+\+ROUTING\+\_\+\+ERROR} = 0b01001110
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MSGT\+\_\+\+EPDG\+\_\+\+TUNNEL\+\_\+\+REQUEST} = 0b01010000
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MSGT\+\_\+\+EPDG\+\_\+\+TUNNEL\+\_\+\+ERROR} = 0b01010001
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MSGT\+\_\+\+EPDG\+\_\+\+TUNNEL\+\_\+\+RESULT} = 0b01010010
 \}
\begin{DoxyCompactList}\small\item\em GSUP message type Make sure that new messages follow this scheme\+:\end{DoxyCompactList}\item 
enum \textbf{ osmo\+\_\+gsup\+\_\+cancel\+\_\+type} \{ \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+CANCEL\+\_\+\+TYPE\+\_\+\+UPDATE} = 1
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+CANCEL\+\_\+\+TYPE\+\_\+\+WITHDRAW} = 2
 \}
\item 
enum \textbf{ osmo\+\_\+gsup\+\_\+cn\+\_\+domain} \{ \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+CN\+\_\+\+DOMAIN\+\_\+\+PS} = 1
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+CN\+\_\+\+DOMAIN\+\_\+\+CS} = 2
 \}
\item 
enum \textbf{ osmo\+\_\+gsup\+\_\+imei\+\_\+result} \{ \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+IMEI\+\_\+\+RESULT\+\_\+\+ACK} = 1
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+IMEI\+\_\+\+RESULT\+\_\+\+NACK} = 2
 \}
\item 
enum \textbf{ osmo\+\_\+gsup\+\_\+access\+\_\+network\+\_\+protocol} \{ \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+ACCESS\+\_\+\+NETWORK\+\_\+\+PROTOCOL\+\_\+\+TS3\+G\+\_\+48006} = 1
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+ACCESS\+\_\+\+NETWORK\+\_\+\+PROTOCOL\+\_\+\+TS3\+G\+\_\+25413} = 2
 \}
\item 
enum \textbf{ osmo\+\_\+gsup\+\_\+session\+\_\+state} \{ \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+SESSION\+\_\+\+STATE\+\_\+\+NONE} = 0x00
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+SESSION\+\_\+\+STATE\+\_\+\+BEGIN} = 0x01
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+SESSION\+\_\+\+STATE\+\_\+\+CONTINUE} = 0x02
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+SESSION\+\_\+\+STATE\+\_\+\+END} = 0x03
 \}
\begin{DoxyCompactList}\small\item\em TCAP-\/like session state. \end{DoxyCompactList}\item 
enum \textbf{ osmo\+\_\+gsup\+\_\+message\+\_\+class} \{ \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MESSAGE\+\_\+\+CLASS\+\_\+\+UNSET} = 0
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MESSAGE\+\_\+\+CLASS\+\_\+\+SUBSCRIBER\+\_\+\+MANAGEMENT} = 1
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MESSAGE\+\_\+\+CLASS\+\_\+\+SMS} = 2
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MESSAGE\+\_\+\+CLASS\+\_\+\+USSD} = 3
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MESSAGE\+\_\+\+CLASS\+\_\+\+INTER\+\_\+\+MSC} = 4
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MESSAGE\+\_\+\+CLASS\+\_\+\+IPSEC\+\_\+\+EPDG} = 5
, \newline
\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+MESSAGE\+\_\+\+CLASS\+\_\+\+ARRAYSIZE}
 \}
\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
static const char $\ast$ \textbf{ osmo\+\_\+gsup\+\_\+message\+\_\+type\+\_\+name} (enum \textbf{ osmo\+\_\+gsup\+\_\+message\+\_\+type} val)
\item 
static const char $\ast$ \textbf{ osmo\+\_\+gsup\+\_\+session\+\_\+state\+\_\+name} (enum \textbf{ osmo\+\_\+gsup\+\_\+session\+\_\+state} val)
\item 
static const char $\ast$ \textbf{ osmo\+\_\+gsup\+\_\+message\+\_\+class\+\_\+name} (enum \textbf{ osmo\+\_\+gsup\+\_\+message\+\_\+class} val)
\item 
int \textbf{ osmo\+\_\+gsup\+\_\+decode} (const uint8\+\_\+t $\ast$const\+\_\+data, size\+\_\+t data\+\_\+len, struct \textbf{ osmo\+\_\+gsup\+\_\+message} $\ast$gsup\+\_\+msg)
\begin{DoxyCompactList}\small\item\em Decode (parse) a GSUP message. \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+gsup\+\_\+encode} (struct \textbf{ msgb} $\ast$\textbf{ msg}, const struct \textbf{ osmo\+\_\+gsup\+\_\+message} $\ast$gsup\+\_\+msg)
\begin{DoxyCompactList}\small\item\em Encode a GSUP message. \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+gsup\+\_\+get\+\_\+err\+\_\+msg\+\_\+type} (enum \textbf{ osmo\+\_\+gsup\+\_\+message\+\_\+type} type\+\_\+in)
\begin{DoxyCompactList}\small\item\em return the error message type corresponding to {\itshape type\+\_\+in}. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Variables}
\begin{DoxyCompactItemize}
\item 
const struct \textbf{ value\+\_\+string} \textbf{ osmo\+\_\+gsup\+\_\+message\+\_\+type\+\_\+names} [$\,$]
\item 
const struct \textbf{ value\+\_\+string} \textbf{ osmo\+\_\+gsup\+\_\+session\+\_\+state\+\_\+names} [$\,$]
\item 
const struct \textbf{ value\+\_\+string} \textbf{ osmo\+\_\+gsup\+\_\+message\+\_\+class\+\_\+names} [$\,$]
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Osmocom Generic Subscriber Update Protocol message encoder/decoder. 



\doxysubsection{Macro Definition Documentation}
\mbox{\label{gsup_8h_ab5f5a50760897012778594e8369e05b6}} 
\index{gsup.h@{gsup.h}!OSMO\_GSUP\_PDP\_TYPE\_IE@{OSMO\_GSUP\_PDP\_TYPE\_IE}}
\index{OSMO\_GSUP\_PDP\_TYPE\_IE@{OSMO\_GSUP\_PDP\_TYPE\_IE}!gsup.h@{gsup.h}}
\doxysubsubsection{OSMO\_GSUP\_PDP\_TYPE\_IE}
{\footnotesize\ttfamily \#define OSMO\+\_\+\+GSUP\+\_\+\+PDP\+\_\+\+TYPE\+\_\+\+IE~\textbf{ OSMO\+\_\+\+GSUP\+\_\+\+PDP\+\_\+\+ADDRESS\+\_\+\+IE} /$\ast$ Backward compat $\ast$/}

