\doxysection{mncc.\+h}
\label{mncc_8h_source}\index{include/osmocom/gsm/mncc.h@{include/osmocom/gsm/mncc.h}}
\textbf{ Go to the documentation of this file.}
\begin{DoxyCode}{0}
\DoxyCodeLine{1 }
\DoxyCodeLine{3 \textcolor{preprocessor}{\#pragma once}}
\DoxyCodeLine{4 }
\DoxyCodeLine{5 \textcolor{preprocessor}{\#include <osmocom/gsm/protocol/gsm\_04\_08.h>}}
\DoxyCodeLine{6 }
\DoxyCodeLine{7 \textcolor{preprocessor}{\#define GSM\_MAX\_FACILITY       128}}
\DoxyCodeLine{8 \textcolor{preprocessor}{\#define GSM\_MAX\_SSVERSION      128}}
\DoxyCodeLine{9 \textcolor{preprocessor}{\#define GSM\_MAX\_USERUSER       128}}
\DoxyCodeLine{10 }
\DoxyCodeLine{11 \textcolor{comment}{/* Expanded fields from GSM TS 04.08, Table 10.5.102 */}}
\DoxyCodeLine{12 \textcolor{keyword}{struct }gsm\_mncc\_bearer\_cap \{}
\DoxyCodeLine{13         \textcolor{keywordtype}{int}             transfer;       \textcolor{comment}{/* Information Transfer Capability, see enum gsm48\_bcap\_itcap. */}}
\DoxyCodeLine{14         \textcolor{keywordtype}{int}             mode;               \textcolor{comment}{/* Transfer Mode, see enum gsm48\_bcap\_tmod. */}}
\DoxyCodeLine{15         \textcolor{keywordtype}{int}             coding;           \textcolor{comment}{/* Coding Standard, see enum gsm48\_bcap\_coding.*/}}
\DoxyCodeLine{16         \textcolor{keywordtype}{int}             radio;             \textcolor{comment}{/* Radio Channel Requirement, see enum gsm48\_bcap\_rrq. */}}
\DoxyCodeLine{17         \textcolor{keywordtype}{int}             speech\_ctm;   \textcolor{comment}{/* CTM text telephony indication */}}
\DoxyCodeLine{18         \textcolor{keywordtype}{int}             speech\_ver[8];        \textcolor{comment}{/* Speech version indication, see enum gsm48\_bcap\_speech\_ver; -\/1 marks end */}}
\DoxyCodeLine{19         \textcolor{keyword}{struct }\{}
\DoxyCodeLine{20                 \textcolor{keyword}{enum} gsm48\_bcap\_ra         rate\_adaption;}
\DoxyCodeLine{21                 \textcolor{keyword}{enum} gsm48\_bcap\_sig\_access sig\_access;}
\DoxyCodeLine{22                 \textcolor{keywordtype}{int}                             async;}
\DoxyCodeLine{23                 \textcolor{keywordtype}{int}                             nr\_stop\_bits;}
\DoxyCodeLine{24                 \textcolor{keywordtype}{int}                             nr\_data\_bits;}
\DoxyCodeLine{25                 \textcolor{keyword}{enum} gsm48\_bcap\_user\_rate   user\_rate;}
\DoxyCodeLine{26                 \textcolor{keyword}{enum} gsm48\_bcap\_parity         parity;}
\DoxyCodeLine{27                 \textcolor{keyword}{enum} gsm48\_bcap\_interm\_rate       interm\_rate;}
\DoxyCodeLine{28                 \textcolor{keyword}{enum} gsm48\_bcap\_transp         transp;}
\DoxyCodeLine{29                 \textcolor{keyword}{enum} gsm48\_bcap\_modem\_type modem\_type;}
\DoxyCodeLine{30         \} data;}
\DoxyCodeLine{31 \};}
\DoxyCodeLine{32 }
\DoxyCodeLine{33 \textcolor{keyword}{struct }gsm\_mncc\_number \{}
\DoxyCodeLine{34         \textcolor{keywordtype}{int}             type;}
\DoxyCodeLine{35         \textcolor{keywordtype}{int}             plan;}
\DoxyCodeLine{36         \textcolor{keywordtype}{int}             present;}
\DoxyCodeLine{37         \textcolor{keywordtype}{int}             screen;}
\DoxyCodeLine{38         \textcolor{keywordtype}{char}            number[33];}
\DoxyCodeLine{39 \};}
\DoxyCodeLine{40 }
\DoxyCodeLine{41 \textcolor{keyword}{struct }gsm\_mncc\_cause \{}
\DoxyCodeLine{42         \textcolor{keywordtype}{int}             location;}
\DoxyCodeLine{43         \textcolor{keywordtype}{int}             coding;}
\DoxyCodeLine{44         \textcolor{keywordtype}{int}             rec;}
\DoxyCodeLine{45         \textcolor{keywordtype}{int}             rec\_val;}
\DoxyCodeLine{46         \textcolor{keywordtype}{int}             value;}
\DoxyCodeLine{47         \textcolor{keywordtype}{int}             diag\_len;}
\DoxyCodeLine{48         \textcolor{keywordtype}{char}            diag[32];}
\DoxyCodeLine{49 \};}
\DoxyCodeLine{50 }
\DoxyCodeLine{51 \textcolor{keyword}{struct }gsm\_mncc\_useruser \{}
\DoxyCodeLine{52         \textcolor{keywordtype}{int}             proto;}
\DoxyCodeLine{53         \textcolor{keywordtype}{char}            info[GSM\_MAX\_USERUSER + 1]; \textcolor{comment}{/* + termination char */}}
\DoxyCodeLine{54 \};}
\DoxyCodeLine{55 }
\DoxyCodeLine{56 \textcolor{keyword}{struct }gsm\_mncc\_progress \{}
\DoxyCodeLine{57         \textcolor{keywordtype}{int}             coding;}
\DoxyCodeLine{58         \textcolor{keywordtype}{int}             location;}
\DoxyCodeLine{59         \textcolor{keywordtype}{int}             descr;}
\DoxyCodeLine{60 \};}
\DoxyCodeLine{61 }
\DoxyCodeLine{62 \textcolor{keyword}{struct }gsm\_mncc\_facility \{}
\DoxyCodeLine{63         \textcolor{keywordtype}{int}             len;}
\DoxyCodeLine{64         \textcolor{keywordtype}{char}            info[GSM\_MAX\_FACILITY];}
\DoxyCodeLine{65 \};}
\DoxyCodeLine{66 }
\DoxyCodeLine{67 \textcolor{keyword}{struct }gsm\_mncc\_ssversion \{}
\DoxyCodeLine{68         \textcolor{keywordtype}{int}             len;}
\DoxyCodeLine{69         \textcolor{keywordtype}{char}            info[GSM\_MAX\_SSVERSION];}
\DoxyCodeLine{70 \};}
\DoxyCodeLine{71 }
\DoxyCodeLine{72 \textcolor{keyword}{struct }gsm\_mncc\_cccap \{}
\DoxyCodeLine{73         \textcolor{keywordtype}{int}             dtmf;}
\DoxyCodeLine{74         \textcolor{keywordtype}{int}             pcp;}
\DoxyCodeLine{75 \};}
\DoxyCodeLine{76 }
\DoxyCodeLine{77 \textcolor{keyword}{enum} \{}
\DoxyCodeLine{78         GSM\_MNCC\_BCAP\_SPEECH        = 0,}
\DoxyCodeLine{79         GSM\_MNCC\_BCAP\_UNR\_DIG      = 1,}
\DoxyCodeLine{80         GSM\_MNCC\_BCAP\_AUDIO  = 2,}
\DoxyCodeLine{81         GSM\_MNCC\_BCAP\_FAX\_G3        = 3,}
\DoxyCodeLine{82         GSM\_MNCC\_BCAP\_OTHER\_ITC = 5,}
\DoxyCodeLine{83         GSM\_MNCC\_BCAP\_RESERVED    = 7,}
\DoxyCodeLine{84 \};}
\DoxyCodeLine{85 }
\DoxyCodeLine{86 \textcolor{keyword}{struct }msgb;}
\DoxyCodeLine{87 \textcolor{keyword}{struct }msgb *osmo\_mncc\_stringify(\textcolor{keyword}{const} uint8\_t *msg, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} len);}
\DoxyCodeLine{88 }
\DoxyCodeLine{89 \textcolor{keywordtype}{void} \_osmo\_mncc\_log(\textcolor{keywordtype}{int} subsys, \textcolor{keywordtype}{int} level, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *file, \textcolor{keywordtype}{int} line, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *prefix,}
\DoxyCodeLine{90                     \textcolor{keyword}{const} uint8\_t *msg, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} len);}
\DoxyCodeLine{91 }
\DoxyCodeLine{92 \textcolor{preprocessor}{\#define osmo\_mncc\_log(ss, level, prefix, msg, len)      \(\backslash\)}}
\DoxyCodeLine{93 \textcolor{preprocessor}{        \_osmo\_mncc\_log(ss, level, \_\_FILE\_\_, \_\_LINE\_\_, prefix, msg, len);}}
\DoxyCodeLine{94 }
\DoxyCodeLine{95 \textcolor{keyword}{extern} \textcolor{keyword}{const} \textcolor{keyword}{struct }value\_string osmo\_mncc\_names[];}
\DoxyCodeLine{96 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *osmo\_mncc\_name(uint32\_t msg\_type) \{}
\DoxyCodeLine{97         \textcolor{keywordflow}{return} get\_value\_string(osmo\_mncc\_names, msg\_type);}
\DoxyCodeLine{98 \}}

\end{DoxyCode}
