\doxysection{src/gsm/gsm0411\+\_\+smc.c File Reference}
\label{gsm0411__smc_8c}\index{src/gsm/gsm0411\_smc.c@{src/gsm/gsm0411\_smc.c}}


Point-\/to-\/\+Point (PP) Short Message Service (SMS) as per TS 04.\+11.  


{\ttfamily \#include $<$sys/types.\+h$>$}\newline
{\ttfamily \#include $<$inttypes.\+h$>$}\newline
{\ttfamily \#include $<$string.\+h$>$}\newline
{\ttfamily \#include $<$errno.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/msgb.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/logging.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/timer.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/gsm/gsm0411\+\_\+utils.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/gsm/gsm0411\+\_\+smc.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/gsm/protocol/gsm\+\_\+04\+\_\+08.\+h$>$}\newline
\doxysubsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \textbf{ smcdownstate}
\item 
struct \textbf{ smcdatastate}
\end{DoxyCompactItemize}
\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \textbf{ MAX\+\_\+\+SMS\+\_\+\+RETRY}~2
\item 
\#define \textbf{ SMC\+\_\+\+LOG\+\_\+\+STR}~\char`\"{}SMC(\%\char`\"{} PRIu64 \char`\"{}) \char`\"{}
\item 
\#define \textbf{ SMCDOWNSLLEN}~ (sizeof(\textbf{ smcdownstatelist}) / sizeof(struct \textbf{ smcdownstate}))
\item 
\#define \textbf{ SMCDATASLLEN}~ (sizeof(\textbf{ smcdatastatelist}) / sizeof(struct \textbf{ smcdatastate}))
\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
static void \textbf{ cp\+\_\+timer\+\_\+expired} (void $\ast$\textbf{ data})
\item 
void \textbf{ gsm411\+\_\+smc\+\_\+init} (struct \textbf{ gsm411\+\_\+smc\+\_\+inst} $\ast$inst, uint64\+\_\+t id, int \textbf{ network}, int($\ast$mn\+\_\+recv)(struct \textbf{ gsm411\+\_\+smc\+\_\+inst} $\ast$inst, int \textbf{ msg\+\_\+type}, struct \textbf{ msgb} $\ast$\textbf{ msg}), int($\ast$mm\+\_\+send)(struct \textbf{ gsm411\+\_\+smc\+\_\+inst} $\ast$inst, int \textbf{ msg\+\_\+type}, struct \textbf{ msgb} $\ast$\textbf{ msg}, int cp\+\_\+msg\+\_\+type))
\item 
void \textbf{ gsm411\+\_\+smc\+\_\+clear} (struct \textbf{ gsm411\+\_\+smc\+\_\+inst} $\ast$inst)
\item 
static void \textbf{ new\+\_\+cp\+\_\+state} (struct \textbf{ gsm411\+\_\+smc\+\_\+inst} $\ast$inst, enum \textbf{ gsm411\+\_\+cp\+\_\+state} state)
\item 
static int \textbf{ gsm411\+\_\+tx\+\_\+cp\+\_\+error} (struct \textbf{ gsm411\+\_\+smc\+\_\+inst} $\ast$inst, uint8\+\_\+t \textbf{ cause})
\item 
static int \textbf{ gsm411\+\_\+mnsms\+\_\+est\+\_\+req} (struct \textbf{ gsm411\+\_\+smc\+\_\+inst} $\ast$inst, struct \textbf{ msgb} $\ast$\textbf{ msg})
\item 
static int \textbf{ gsm411\+\_\+mmsms\+\_\+send\+\_\+msg} (struct \textbf{ gsm411\+\_\+smc\+\_\+inst} $\ast$inst)
\item 
static int \textbf{ gsm411\+\_\+mmsms\+\_\+est\+\_\+cnf} (struct \textbf{ gsm411\+\_\+smc\+\_\+inst} $\ast$inst, struct \textbf{ msgb} $\ast$\textbf{ msg})
\item 
static int \textbf{ gsm411\+\_\+mmsms\+\_\+cp\+\_\+ack} (struct \textbf{ gsm411\+\_\+smc\+\_\+inst} $\ast$inst, struct \textbf{ msgb} $\ast$\textbf{ msg})
\item 
static int \textbf{ gsm411\+\_\+mmsms\+\_\+cp\+\_\+data} (struct \textbf{ gsm411\+\_\+smc\+\_\+inst} $\ast$inst, struct \textbf{ msgb} $\ast$\textbf{ msg})
\item 
static int \textbf{ gsm411\+\_\+mnsms\+\_\+data\+\_\+req} (struct \textbf{ gsm411\+\_\+smc\+\_\+inst} $\ast$inst, struct \textbf{ msgb} $\ast$\textbf{ msg})
\item 
static int \textbf{ gsm411\+\_\+mnsms\+\_\+rel\+\_\+req} (struct \textbf{ gsm411\+\_\+smc\+\_\+inst} $\ast$inst, struct \textbf{ msgb} $\ast$\textbf{ msg})
\item 
static int \textbf{ gsm411\+\_\+mmsms\+\_\+cp\+\_\+error} (struct \textbf{ gsm411\+\_\+smc\+\_\+inst} $\ast$inst, struct \textbf{ msgb} $\ast$\textbf{ msg})
\item 
static int \textbf{ gsm411\+\_\+mmsms\+\_\+rel\+\_\+ind} (struct \textbf{ gsm411\+\_\+smc\+\_\+inst} $\ast$inst, struct \textbf{ msgb} $\ast$\textbf{ msg})
\item 
static int \textbf{ gsm411\+\_\+mnsms\+\_\+abort\+\_\+req} (struct \textbf{ gsm411\+\_\+smc\+\_\+inst} $\ast$inst, struct \textbf{ msgb} $\ast$\textbf{ msg})
\item 
int \textbf{ gsm411\+\_\+smc\+\_\+send} (struct \textbf{ gsm411\+\_\+smc\+\_\+inst} $\ast$inst, int \textbf{ msg\+\_\+type}, struct \textbf{ msgb} $\ast$\textbf{ msg})
\item 
int \textbf{ gsm411\+\_\+smc\+\_\+recv} (struct \textbf{ gsm411\+\_\+smc\+\_\+inst} $\ast$inst, int \textbf{ msg\+\_\+type}, struct \textbf{ msgb} $\ast$\textbf{ msg}, int cp\+\_\+msg\+\_\+type)
\end{DoxyCompactItemize}
\doxysubsection*{Variables}
\begin{DoxyCompactItemize}
\item 
const char $\ast$ \textbf{ smc\+\_\+state\+\_\+names} [$\,$]
\item 
const struct \textbf{ value\+\_\+string} \textbf{ gsm411\+\_\+cp\+\_\+cause\+\_\+strs} [$\,$]
\item 
static const struct \textbf{ smcdownstate} \textbf{ smcdownstatelist} [$\,$]
\item 
static const struct \textbf{ smcdatastate} \textbf{ smcdatastatelist} [$\,$]
\item 
const struct \textbf{ value\+\_\+string} \textbf{ gsm411\+\_\+cp\+\_\+state\+\_\+names} [$\,$]
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Point-\/to-\/\+Point (PP) Short Message Service (SMS) as per TS 04.\+11. 

