\doxysection{gsm0411\+\_\+smr.\+h}
\label{gsm0411__smr_8h_source}\index{include/osmocom/gsm/gsm0411\_smr.h@{include/osmocom/gsm/gsm0411\_smr.h}}
\textbf{ Go to the documentation of this file.}
\begin{DoxyCode}{0}
\DoxyCodeLine{1 }
\DoxyCodeLine{5 \textcolor{preprocessor}{\#pragma once}}
\DoxyCodeLine{6 }
\DoxyCodeLine{7 \textcolor{preprocessor}{\#include <osmocom/gsm/protocol/gsm\_04\_11.h>}}
\DoxyCodeLine{8 }
\DoxyCodeLine{9 \textcolor{preprocessor}{\#define GSM411\_SM\_RL\_DATA\_REQ           0x401}}
\DoxyCodeLine{10 \textcolor{preprocessor}{\#define GSM411\_SM\_RL\_DATA\_IND           0x402}}
\DoxyCodeLine{11 \textcolor{preprocessor}{\#define GSM411\_SM\_RL\_MEM\_AVAIL\_REQ      0x403}}
\DoxyCodeLine{12 \textcolor{preprocessor}{\#define GSM411\_SM\_RL\_MEM\_AVAIL\_IND      0x404}}
\DoxyCodeLine{13 \textcolor{preprocessor}{\#define GSM411\_SM\_RL\_REPORT\_REQ         0x405}}
\DoxyCodeLine{14 \textcolor{preprocessor}{\#define GSM411\_SM\_RL\_REPORT\_IND         0x406}}
\DoxyCodeLine{15 }
\DoxyCodeLine{16 \textcolor{keyword}{struct }gsm411\_smr\_inst \{}
\DoxyCodeLine{17         uint64\_t id;          \textcolor{comment}{/* a unique id for the SMS */}}
\DoxyCodeLine{18         \textcolor{keywordtype}{int} network;             \textcolor{comment}{/* is this a MO (0) or MT (1) transfer */}}
\DoxyCodeLine{19         int (*rl\_recv) (\textcolor{keyword}{struct }gsm411\_smr\_inst *inst, \textcolor{keywordtype}{int} msg\_type,}
\DoxyCodeLine{20                         \textcolor{keyword}{struct }msgb *msg);}
\DoxyCodeLine{21         int (*mn\_send) (\textcolor{keyword}{struct }gsm411\_smr\_inst *inst, \textcolor{keywordtype}{int} msg\_type,}
\DoxyCodeLine{22                         \textcolor{keyword}{struct }msgb *msg);}
\DoxyCodeLine{23 }
\DoxyCodeLine{24         \textcolor{keyword}{enum} gsm411\_rp\_state rp\_state;}
\DoxyCodeLine{25         \textcolor{keyword}{struct }osmo\_timer\_list rp\_timer;}
\DoxyCodeLine{26 \};}
\DoxyCodeLine{27 }
\DoxyCodeLine{28 \textcolor{keyword}{extern} \textcolor{keyword}{const} \textcolor{keyword}{struct }value\_string gsm411\_rp\_cause\_strs[];}
\DoxyCodeLine{29 }
\DoxyCodeLine{30 \textcolor{comment}{/* init a new instance */}}
\DoxyCodeLine{31 \textcolor{keywordtype}{void} gsm411\_smr\_init(\textcolor{keyword}{struct} gsm411\_smr\_inst *inst, uint64\_t \textcolor{keywordtype}{id}, \textcolor{keywordtype}{int} network,}
\DoxyCodeLine{32         \textcolor{keywordtype}{int} (*rl\_recv) (\textcolor{keyword}{struct} gsm411\_smr\_inst *inst, \textcolor{keywordtype}{int} msg\_type,}
\DoxyCodeLine{33                         \textcolor{keyword}{struct} msgb *msg),}
\DoxyCodeLine{34         \textcolor{keywordtype}{int} (*mn\_send) (\textcolor{keyword}{struct} gsm411\_smr\_inst *inst, \textcolor{keywordtype}{int} msg\_type,}
\DoxyCodeLine{35                         \textcolor{keyword}{struct} msgb *msg));}
\DoxyCodeLine{36 }
\DoxyCodeLine{37 \textcolor{comment}{/* clear instance */}}
\DoxyCodeLine{38 \textcolor{keywordtype}{void} gsm411\_smr\_clear(\textcolor{keyword}{struct} gsm411\_smr\_inst *inst);}
\DoxyCodeLine{39 }
\DoxyCodeLine{40 \textcolor{comment}{/* message from upper layer */}}
\DoxyCodeLine{41 \textcolor{keywordtype}{int} gsm411\_smr\_send(\textcolor{keyword}{struct} gsm411\_smr\_inst *inst, \textcolor{keywordtype}{int} msg\_type,}
\DoxyCodeLine{42         \textcolor{keyword}{struct} msgb *msg);}
\DoxyCodeLine{43 }
\DoxyCodeLine{44 \textcolor{comment}{/* message from lower layer */}}
\DoxyCodeLine{45 \textcolor{keywordtype}{int} gsm411\_smr\_recv(\textcolor{keyword}{struct} gsm411\_smr\_inst *inst, \textcolor{keywordtype}{int} msg\_type,}
\DoxyCodeLine{46         \textcolor{keyword}{struct} msgb *msg);}
\DoxyCodeLine{47 }
\DoxyCodeLine{48 \textcolor{keyword}{extern} \textcolor{keyword}{const} \textcolor{keyword}{struct }value\_string gsm411\_rp\_state\_names[];}
\DoxyCodeLine{49 }
\DoxyCodeLine{50 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *gsm411\_rp\_state\_name(\textcolor{keyword}{enum} gsm411\_rp\_state rp\_state) \{}
\DoxyCodeLine{51         \textcolor{keywordflow}{return} get\_value\_string(gsm411\_rp\_state\_names, rp\_state);}
\DoxyCodeLine{52 \}}
\DoxyCodeLine{53 }

\end{DoxyCode}
