\doxysection{mtp.\+h}
\label{mtp_8h_source}\index{include/osmocom/sigtran/protocol/mtp.h@{include/osmocom/sigtran/protocol/mtp.h}}
\textbf{ Go to the documentation of this file.}
\begin{DoxyCode}{0}
\DoxyCodeLine{1 \textcolor{preprocessor}{\#pragma once}}
\DoxyCodeLine{2 }
\DoxyCodeLine{3 \textcolor{preprocessor}{\#include <osmocom/core/utils.h>}}
\DoxyCodeLine{4 }
\DoxyCodeLine{5 \textcolor{comment}{/* Q.704 14.2.1, RFC4666 3.4.5.}}
\DoxyCodeLine{6 \textcolor{comment}{ * ETSI EG 201 693 Section 5.1: MTP SI code allocations (for NI=00 (international network) only)}}
\DoxyCodeLine{7 \textcolor{comment}{ */}}
\DoxyCodeLine{8 \textcolor{keyword}{enum} mtp\_si\_ni00 \{}
\DoxyCodeLine{9         MTP\_SI\_SNM    = 0,}
\DoxyCodeLine{10         MTP\_SI\_STM    = 1,}
\DoxyCodeLine{11         MTP\_SI\_SCCP  = 3,}
\DoxyCodeLine{12         MTP\_SI\_TUP    = 4,}
\DoxyCodeLine{13         MTP\_SI\_ISUP  = 5,}
\DoxyCodeLine{14         MTP\_SI\_DUP    = 6, \textcolor{comment}{/* call related */}}
\DoxyCodeLine{15         MTP\_SI\_DUP\_FAC    = 7, \textcolor{comment}{/* facility related */}}
\DoxyCodeLine{16         MTP\_SI\_TESTING    = 8,}
\DoxyCodeLine{17         MTP\_SI\_B\_ISUP      = 9,}
\DoxyCodeLine{18         MTP\_SI\_SAT\_ISUP = 10,}
\DoxyCodeLine{19         MTP\_SI\_SPEECH      = 11, \textcolor{comment}{/* speech processing element */}}
\DoxyCodeLine{20         MTP\_SI\_AAL2\_SIG  = 12,}
\DoxyCodeLine{21         MTP\_SI\_BICC  = 13,}
\DoxyCodeLine{22         MTP\_SI\_GCP    = 14,}
\DoxyCodeLine{23 \};}
\DoxyCodeLine{24 \textcolor{keyword}{extern} \textcolor{keyword}{const} \textcolor{keyword}{struct }value\_string mtp\_si\_vals[];}
\DoxyCodeLine{25 }
\DoxyCodeLine{26 \textcolor{comment}{/* Q.704 14.2.2: "{}In the case of only one national signalling network the spare code of the}}
\DoxyCodeLine{27 \textcolor{comment}{ * network indicator reserved for national use can be used, for example, to define an additional}}
\DoxyCodeLine{28 \textcolor{comment}{ * 16 User Parts (making a total of 32 User Parts) for that national signalling network."{}}}
\DoxyCodeLine{29 \textcolor{comment}{ * Hence, we keep service indicators for Network Indicator "{}International network"{} (00) the same}}
\DoxyCodeLine{30 \textcolor{comment}{ * as for "{}National network"{} (10), and use "{}Reserved for national use"{} to specify extension}}
\DoxyCodeLine{31 \textcolor{comment}{ * service indicators.}}
\DoxyCodeLine{32 \textcolor{comment}{ * Note we pick enum values reserved in NI00 above in order to allow forming a}}
\DoxyCodeLine{33 \textcolor{comment}{ * superset so it can still be used with other NI values. */}}
\DoxyCodeLine{34 \textcolor{keyword}{enum} mtp\_si\_ni11 \{}
\DoxyCodeLine{35         MTP\_SI\_NI11\_OSMO\_IPA = 2, \textcolor{comment}{/* Contains an IPA header + payload */}}
\DoxyCodeLine{36 \};}
\DoxyCodeLine{37 }
\DoxyCodeLine{38 \textcolor{comment}{/* Q.704 14.2.2 Sub-\/service field (Network Indicator) */}}
\DoxyCodeLine{39 \textcolor{keyword}{enum} mtp\_network\_indicator \{}
\DoxyCodeLine{40         MTP\_NI\_INTERNATIONAL                = 0,}
\DoxyCodeLine{41         MTP\_NI\_SPARE\_INTERNATIONAL    = 1,}
\DoxyCodeLine{42         MTP\_NI\_NATIONAL                  = 2,}
\DoxyCodeLine{43         MTP\_NI\_RESERVED\_NATIONAL        = 3}
\DoxyCodeLine{44 \};}
\DoxyCodeLine{45 \textcolor{keyword}{extern} \textcolor{keyword}{const} \textcolor{keyword}{struct }value\_string mtp\_network\_indicator\_vals[];}
\DoxyCodeLine{46 }
\DoxyCodeLine{47 }
\DoxyCodeLine{48 \textcolor{comment}{/* Q.704 15.17.5 */}}
\DoxyCodeLine{49 \textcolor{keyword}{enum} mtp\_unavail\_cause \{}
\DoxyCodeLine{50         MTP\_UNAVAIL\_C\_UNKNOWN              = 0x0,}
\DoxyCodeLine{51         MTP\_UNAVAIL\_C\_UNEQUIP\_REM\_USER    = 0x1,}
\DoxyCodeLine{52         MTP\_UNAVAIL\_C\_INACC\_REM\_USER        = 0x2,}
\DoxyCodeLine{53         \textcolor{comment}{/* This field is not explicitly listed in Q.704 15.17.5, but it is}}
\DoxyCodeLine{54 \textcolor{comment}{         * explicitly described as one of four options in:}}
\DoxyCodeLine{55 \textcolor{comment}{         * Q.701 "{}TABLE 1"{} and 8.4}}
\DoxyCodeLine{56 \textcolor{comment}{         * Q.704 2.4.2}}
\DoxyCodeLine{57 \textcolor{comment}{         * Q.711 "{}Table 18"{} and 7.2.4}}
\DoxyCodeLine{58 \textcolor{comment}{         * Q.714 "{}Figure D.4"{}}}
\DoxyCodeLine{59 \textcolor{comment}{         */}}
\DoxyCodeLine{60         MTP\_UNAVAIL\_C\_CONGESTED          = 0x3,}
\DoxyCodeLine{61         \textcolor{comment}{/* reserved */}}
\DoxyCodeLine{62 \};}
\DoxyCodeLine{63 }
\DoxyCodeLine{64 \textcolor{keyword}{extern} \textcolor{keyword}{const} \textcolor{keyword}{struct }value\_string mtp\_unavail\_cause\_vals[];}
\DoxyCodeLine{65 }
\DoxyCodeLine{66 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *mtp\_unavail\_cause\_str(\textcolor{keyword}{enum} mtp\_unavail\_cause cs) \{}
\DoxyCodeLine{67         \textcolor{keywordflow}{return} get\_value\_string(mtp\_unavail\_cause\_vals, cs);}
\DoxyCodeLine{68 \}}

\end{DoxyCode}
