\doxysection{gsm0411\+\_\+utils.\+h}
\label{gsm0411__utils_8h_source}\index{include/osmocom/gsm/gsm0411\_utils.h@{include/osmocom/gsm/gsm0411\_utils.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 <time.h>}}
\DoxyCodeLine{8 }
\DoxyCodeLine{9 \textcolor{comment}{/* Turn int into semi-\/octet representation: 98 => 0x89 */}}
\DoxyCodeLine{10 uint8\_t gsm411\_bcdify(uint8\_t value);}
\DoxyCodeLine{11 }
\DoxyCodeLine{12 \textcolor{comment}{/* Turn semi-\/octet representation into int: 0x89 => 98 */}}
\DoxyCodeLine{13 uint8\_t gsm411\_unbcdify(uint8\_t value);}
\DoxyCodeLine{14 }
\DoxyCodeLine{15 \textcolor{keyword}{struct }msgb *gsm411\_msgb\_alloc(\textcolor{keywordtype}{void});}
\DoxyCodeLine{16 }
\DoxyCodeLine{17 \textcolor{comment}{/* Generate 03.40 TP-\/SCTS */}}
\DoxyCodeLine{18 \textcolor{keywordtype}{void} gsm340\_gen\_scts(uint8\_t *scts, time\_t time);}
\DoxyCodeLine{19 }
\DoxyCodeLine{20 \textcolor{comment}{/* Decode 03.40 TP-\/SCTS (into utc/gmt timestamp) */}}
\DoxyCodeLine{21 time\_t gsm340\_scts(uint8\_t *scts);}
\DoxyCodeLine{22 }
\DoxyCodeLine{23 \textcolor{comment}{/* decode validity period. return minutes */}}
\DoxyCodeLine{24 \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long} gsm340\_validity\_period(uint8\_t sms\_vpf, uint8\_t *sms\_vp);}
\DoxyCodeLine{25 }
\DoxyCodeLine{26 \textcolor{comment}{/* determine coding alphabet dependent on GSM 03.38 Section 4 DCS */}}
\DoxyCodeLine{27 \textcolor{keyword}{enum} sms\_alphabet gsm338\_get\_sms\_alphabet(uint8\_t dcs);}
\DoxyCodeLine{28 }
\DoxyCodeLine{29 \textcolor{comment}{/* generate a TPDU address field compliant with 03.40 sec. 9.1.2.5 */}}
\DoxyCodeLine{30 \textcolor{keywordtype}{int} gsm340\_gen\_oa(uint8\_t *oa, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} oa\_len, uint8\_t type,}
\DoxyCodeLine{31         uint8\_t plan, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *number);}
\DoxyCodeLine{32 }
\DoxyCodeLine{33 \textcolor{comment}{/* Prefix msg with a RP header */}}
\DoxyCodeLine{34 \textcolor{keywordtype}{int} gsm411\_push\_rp\_header(\textcolor{keyword}{struct} msgb *msg, uint8\_t rp\_msg\_type,}
\DoxyCodeLine{35         uint8\_t rp\_msg\_ref);}
\DoxyCodeLine{36 }
\DoxyCodeLine{37 \textcolor{comment}{/* Prefix msg with a 04.08/04.11 CP header */}}
\DoxyCodeLine{38 \textcolor{keywordtype}{int} gsm411\_push\_cp\_header(\textcolor{keyword}{struct} msgb *msg, uint8\_t proto, uint8\_t trans,}
\DoxyCodeLine{39                              uint8\_t msg\_type);}
\DoxyCodeLine{40 }

\end{DoxyCode}
