\doxysection{sua.\+h}
\label{sua_8h_source}\index{include/osmocom/sigtran/protocol/sua.h@{include/osmocom/sigtran/protocol/sua.h}}
\textbf{ Go to the documentation of this file.}
\begin{DoxyCode}{0}
\DoxyCodeLine{1 \textcolor{comment}{/* RFC 3868 SUA SCCP User Adaption */}}
\DoxyCodeLine{2 }
\DoxyCodeLine{3 \textcolor{comment}{/* (C) 2012 by Harald Welte <laforge@gnumonks.org>}}
\DoxyCodeLine{4 \textcolor{comment}{ *}}
\DoxyCodeLine{5 \textcolor{comment}{ * All Rights Reserved}}
\DoxyCodeLine{6 \textcolor{comment}{ *}}
\DoxyCodeLine{7 \textcolor{comment}{ * This program is free software; you can redistribute it and/or modify}}
\DoxyCodeLine{8 \textcolor{comment}{ * it under the terms of the GNU General Public License as}}
\DoxyCodeLine{9 \textcolor{comment}{ * published by the Free Software Foundation; either version 2 of the}}
\DoxyCodeLine{10 \textcolor{comment}{ * License, or (at your option) any later version.}}
\DoxyCodeLine{11 \textcolor{comment}{ *}}
\DoxyCodeLine{12 \textcolor{comment}{ * This program is distributed in the hope that it will be useful,}}
\DoxyCodeLine{13 \textcolor{comment}{ * but WITHOUT ANY WARRANTY; without even the implied warranty of}}
\DoxyCodeLine{14 \textcolor{comment}{ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the}}
\DoxyCodeLine{15 \textcolor{comment}{ * GNU General Public License for more details.}}
\DoxyCodeLine{16 \textcolor{comment}{ *}}
\DoxyCodeLine{17 \textcolor{comment}{ * You should have received a copy of the GNU General Public License}}
\DoxyCodeLine{18 \textcolor{comment}{ * along with this program.  If not, see <http://www.gnu.org/licenses/>.}}
\DoxyCodeLine{19 \textcolor{comment}{ */}}
\DoxyCodeLine{20 }
\DoxyCodeLine{21 \textcolor{preprocessor}{\#pragma once}}
\DoxyCodeLine{22 \textcolor{preprocessor}{\#include <stdint.h>}}
\DoxyCodeLine{23 }
\DoxyCodeLine{24 \textcolor{preprocessor}{\#include <osmocom/sigtran/protocol/m3ua.h>}}
\DoxyCodeLine{25 }
\DoxyCodeLine{26 \textcolor{preprocessor}{\#define SUA\_VERSION     1}}
\DoxyCodeLine{27 \textcolor{preprocessor}{\#define SUA\_PPID        4}}
\DoxyCodeLine{28 \textcolor{preprocessor}{\#define SUA\_PORT        14001}}
\DoxyCodeLine{29 }
\DoxyCodeLine{30 \textcolor{comment}{/* 3.1.2 Message Classes */}}
\DoxyCodeLine{31 \textcolor{preprocessor}{\#define SUA\_MSGC\_MGMT   0}}
\DoxyCodeLine{32 \textcolor{preprocessor}{\#define SUA\_MSGC\_SNM    2}}
\DoxyCodeLine{33 \textcolor{preprocessor}{\#define SUA\_MSGC\_ASPSM  3}}
\DoxyCodeLine{34 \textcolor{preprocessor}{\#define SUA\_MSGC\_ASPTM  4}}
\DoxyCodeLine{35 \textcolor{preprocessor}{\#define SUA\_MSGC\_CL     7}}
\DoxyCodeLine{36 \textcolor{preprocessor}{\#define SUA\_MSGC\_CO     8}}
\DoxyCodeLine{37 \textcolor{preprocessor}{\#define SUA\_MSGC\_RKM    9}}
\DoxyCodeLine{38 }
\DoxyCodeLine{39 \textcolor{comment}{/* 3.1.3 Message Types */}}
\DoxyCodeLine{40 \textcolor{preprocessor}{\#define SUA\_MGMT\_ERR    0}}
\DoxyCodeLine{41 \textcolor{preprocessor}{\#define SUA\_MGMT\_NTFY   1}}
\DoxyCodeLine{42 }
\DoxyCodeLine{43 \textcolor{preprocessor}{\#define SUA\_SNM\_DUNA    1}}
\DoxyCodeLine{44 \textcolor{preprocessor}{\#define SUA\_SNM\_DAVA    2}}
\DoxyCodeLine{45 \textcolor{preprocessor}{\#define SUA\_SNM\_DAUD    3}}
\DoxyCodeLine{46 \textcolor{preprocessor}{\#define SUA\_SNM\_SCON    4}}
\DoxyCodeLine{47 \textcolor{preprocessor}{\#define SUA\_SNM\_DUPU    5}}
\DoxyCodeLine{48 \textcolor{preprocessor}{\#define SUA\_SNM\_DRST    6}}
\DoxyCodeLine{49 }
\DoxyCodeLine{50 \textcolor{preprocessor}{\#define SUA\_ASPSM\_UP            1}}
\DoxyCodeLine{51 \textcolor{preprocessor}{\#define SUA\_ASPSM\_DOWN          2}}
\DoxyCodeLine{52 \textcolor{preprocessor}{\#define SUA\_ASPSM\_BEAT          3}}
\DoxyCodeLine{53 \textcolor{preprocessor}{\#define SUA\_ASPSM\_UP\_ACK        4}}
\DoxyCodeLine{54 \textcolor{preprocessor}{\#define SUA\_ASPSM\_DOWN\_ACK      5}}
\DoxyCodeLine{55 \textcolor{preprocessor}{\#define SUA\_ASPSM\_BEAT\_ACK      6}}
\DoxyCodeLine{56 }
\DoxyCodeLine{57 \textcolor{preprocessor}{\#define SUA\_ASPTM\_ACTIVE        1}}
\DoxyCodeLine{58 \textcolor{preprocessor}{\#define SUA\_ASPTM\_INACTIVE      2}}
\DoxyCodeLine{59 \textcolor{preprocessor}{\#define SUA\_ASPTM\_ACTIVE\_ACK    3}}
\DoxyCodeLine{60 \textcolor{preprocessor}{\#define SUA\_ASPTM\_INACTIVE\_ACK  4}}
\DoxyCodeLine{61 }
\DoxyCodeLine{62 \textcolor{preprocessor}{\#define SUA\_RKM\_REG\_REQ         1}}
\DoxyCodeLine{63 \textcolor{preprocessor}{\#define SUA\_RKM\_REG\_RSP         2}}
\DoxyCodeLine{64 \textcolor{preprocessor}{\#define SUA\_RKM\_DEREG\_REQ       3}}
\DoxyCodeLine{65 \textcolor{preprocessor}{\#define SUA\_RKM\_DEREG\_RSP       4}}
\DoxyCodeLine{66 }
\DoxyCodeLine{67 \textcolor{preprocessor}{\#define SUA\_CL\_CLDT             1}}
\DoxyCodeLine{68 \textcolor{preprocessor}{\#define SUA\_CL\_CLDR             2}}
\DoxyCodeLine{69 }
\DoxyCodeLine{70 \textcolor{preprocessor}{\#define SUA\_CO\_CORE             1}}
\DoxyCodeLine{71 \textcolor{preprocessor}{\#define SUA\_CO\_COAK             2}}
\DoxyCodeLine{72 \textcolor{preprocessor}{\#define SUA\_CO\_COREF            3}}
\DoxyCodeLine{73 \textcolor{preprocessor}{\#define SUA\_CO\_RELRE            4}}
\DoxyCodeLine{74 \textcolor{preprocessor}{\#define SUA\_CO\_RELCO            5}}
\DoxyCodeLine{75 \textcolor{preprocessor}{\#define SUA\_CO\_RESCO            6}}
\DoxyCodeLine{76 \textcolor{preprocessor}{\#define SUA\_CO\_RESRE            7}}
\DoxyCodeLine{77 \textcolor{preprocessor}{\#define SUA\_CO\_CODT             8}}
\DoxyCodeLine{78 \textcolor{preprocessor}{\#define SUA\_CO\_CODA             9}}
\DoxyCodeLine{79 \textcolor{preprocessor}{\#define SUA\_CO\_COERR            10}}
\DoxyCodeLine{80 \textcolor{preprocessor}{\#define SUA\_CO\_COIT             11 }\textcolor{comment}{/* Connection Oriented Inactiviy Test */}\textcolor{preprocessor}{}}
\DoxyCodeLine{81 }
\DoxyCodeLine{82 \textcolor{preprocessor}{\#define SUA\_IEI\_INFO\_STRING     M3UA\_IEI\_INFO\_STRING}}
\DoxyCodeLine{83 \textcolor{preprocessor}{\#define SUA\_IEI\_ROUTE\_CTX       M3UA\_IEI\_ROUTE\_CTX}}
\DoxyCodeLine{84 \textcolor{preprocessor}{\#define SUA\_IEI\_DIAG\_INFO       M3UA\_IEI\_DIAG\_INFO}}
\DoxyCodeLine{85 \textcolor{preprocessor}{\#define SUA\_IEI\_HEARTBT\_DATA    M3UA\_IEI\_HEARDBT\_DATA}}
\DoxyCodeLine{86 \textcolor{preprocessor}{\#define SUA\_IEI\_TRAF\_MODE\_TYP   M3UA\_IEI\_TRAF\_MODE\_TYP}}
\DoxyCodeLine{87 \textcolor{preprocessor}{\#define SUA\_IEI\_ERR\_CODE        M3UA\_IEI\_ERR\_CODE}}
\DoxyCodeLine{88 \textcolor{preprocessor}{\#define SUA\_IEI\_STATUS          M3UA\_IEI\_STATUS}}
\DoxyCodeLine{89 \textcolor{preprocessor}{\#define SUA\_IEI\_ASP\_ID          M3UA\_IEI\_ASP\_ID}}
\DoxyCodeLine{90 \textcolor{preprocessor}{\#define SUA\_IEI\_AFFECTED\_PC     M3UA\_IEI\_AFFECTED\_PC}}
\DoxyCodeLine{91 \textcolor{preprocessor}{\#define SUA\_IEI\_CORR\_ID         M3UA\_IEI\_CORR\_ID}}
\DoxyCodeLine{92 \textcolor{preprocessor}{\#define SUA\_IEI\_REG\_RESULT      0x0014}}
\DoxyCodeLine{93 \textcolor{preprocessor}{\#define SUA\_IEI\_DEREG\_RESULT    0x0015}}
\DoxyCodeLine{94 }
\DoxyCodeLine{95 \textcolor{comment}{/* 3.10 SUA specific parameters */}}
\DoxyCodeLine{96 }
\DoxyCodeLine{97 \textcolor{preprocessor}{\#define SUA\_IEI\_S7\_HOP\_CTR      0x0101}}
\DoxyCodeLine{98 \textcolor{preprocessor}{\#define SUA\_IEI\_SRC\_ADDR        0x0102}}
\DoxyCodeLine{99 \textcolor{preprocessor}{\#define SUA\_IEI\_DEST\_ADDR       0x0103}}
\DoxyCodeLine{100 \textcolor{preprocessor}{\#define SUA\_IEI\_SRC\_REF         0x0104}}
\DoxyCodeLine{101 \textcolor{preprocessor}{\#define SUA\_IEI\_DEST\_REF        0x0105}}
\DoxyCodeLine{102 \textcolor{preprocessor}{\#define SUA\_IEI\_CAUSE           0x0106}}
\DoxyCodeLine{103 \textcolor{preprocessor}{\#define SUA\_IEI\_SEQ\_NR          0x0107}}
\DoxyCodeLine{104 \textcolor{preprocessor}{\#define SUA\_IEI\_RX\_SEQ\_NR       0x0108}}
\DoxyCodeLine{105 \textcolor{preprocessor}{\#define SUA\_IEI\_ASP\_CAPA        0x0109}}
\DoxyCodeLine{106 \textcolor{preprocessor}{\#define SUA\_IEI\_CREDIT          0x010A}}
\DoxyCodeLine{107 \textcolor{preprocessor}{\#define SUA\_IEI\_DATA            0x010B}}
\DoxyCodeLine{108 \textcolor{preprocessor}{\#define SUA\_IEI\_USER\_CAUSE      0x010C}}
\DoxyCodeLine{109 \textcolor{preprocessor}{\#define SUA\_IEI\_NET\_APPEARANCE  0x010D}}
\DoxyCodeLine{110 \textcolor{preprocessor}{\#define SUA\_IEI\_ROUTING\_KEY     0x010E}}
\DoxyCodeLine{111 \textcolor{preprocessor}{\#define SUA\_IEI\_DRN             0x010F}}
\DoxyCodeLine{112 \textcolor{preprocessor}{\#define SUA\_IEI\_TID             0x0110}}
\DoxyCodeLine{113 \textcolor{preprocessor}{\#define SUA\_IEI\_SMI             0x0112}}
\DoxyCodeLine{114 \textcolor{preprocessor}{\#define SUA\_IEI\_IMPORTANCE      0x0113}}
\DoxyCodeLine{115 \textcolor{preprocessor}{\#define SUA\_IEI\_MSG\_PRIO        0x0114}}
\DoxyCodeLine{116 \textcolor{preprocessor}{\#define SUA\_IEI\_PROTO\_CLASS     0x0115}}
\DoxyCodeLine{117 \textcolor{preprocessor}{\#define SUA\_IEI\_SEQ\_CTRL        0x0116}}
\DoxyCodeLine{118 \textcolor{preprocessor}{\#define SUA\_IEI\_SEGMENTATION    0x0117}}
\DoxyCodeLine{119 \textcolor{preprocessor}{\#define SUA\_IEI\_CONG\_LEVEL      0x0118}}
\DoxyCodeLine{120 }
\DoxyCodeLine{121 \textcolor{preprocessor}{\#define SUA\_IEI\_GT      0x8001}}
\DoxyCodeLine{122 \textcolor{preprocessor}{\#define SUA\_IEI\_PC      0x8002}}
\DoxyCodeLine{123 \textcolor{preprocessor}{\#define SUA\_IEI\_SSN     0x8003}}
\DoxyCodeLine{124 \textcolor{preprocessor}{\#define SUA\_IEI\_IPv4    0x8004}}
\DoxyCodeLine{125 \textcolor{preprocessor}{\#define SUA\_IEI\_HOST    0x8005}}
\DoxyCodeLine{126 \textcolor{preprocessor}{\#define SUA\_IEI\_IPv6    0x8006}}
\DoxyCodeLine{127 }
\DoxyCodeLine{128 \textcolor{preprocessor}{\#define SUA\_RI\_GT       1}}
\DoxyCodeLine{129 \textcolor{preprocessor}{\#define SUA\_RI\_SSN\_PC   2}}
\DoxyCodeLine{130 \textcolor{preprocessor}{\#define SUA\_RI\_HOST     3}}
\DoxyCodeLine{131 \textcolor{preprocessor}{\#define SUA\_RI\_SSN\_IP   4}}
\DoxyCodeLine{132 }
\DoxyCodeLine{133 \textcolor{preprocessor}{\#define SUA\_CAUSE\_T\_MASK        0xff00}}
\DoxyCodeLine{134 \textcolor{preprocessor}{\#define SUA\_CAUSE\_T\_RETURN      0x0100}}
\DoxyCodeLine{135 \textcolor{preprocessor}{\#define SUA\_CAUSE\_T\_REFUSAL     0x0200}}
\DoxyCodeLine{136 \textcolor{preprocessor}{\#define SUA\_CAUSE\_T\_RELEASE     0x0300}}
\DoxyCodeLine{137 \textcolor{preprocessor}{\#define SUA\_CAUSE\_T\_RESET       0x0400}}
\DoxyCodeLine{138 \textcolor{preprocessor}{\#define SUA\_CAUSE\_T\_ERROR       0x0500}}
\DoxyCodeLine{139 }
\DoxyCodeLine{140 \textcolor{comment}{/* 3.9.12 Error: Identical to M3UA, extended by two at the bottom */}}
\DoxyCodeLine{141 \textcolor{preprocessor}{\#define SUA\_ERR\_INVALID\_VERSION         M3UA\_ERR\_INVALID\_VERSION}}
\DoxyCodeLine{142 \textcolor{preprocessor}{\#define SUA\_ERR\_UNSUPP\_MSG\_CLASS        M3UA\_ERR\_UNSUPP\_MSG\_CLASS}}
\DoxyCodeLine{143 \textcolor{preprocessor}{\#define SUA\_ERR\_UNSUPP\_MSG\_TYPE         M3UA\_ERR\_UNSUPP\_MSG\_TYPE}}
\DoxyCodeLine{144 \textcolor{preprocessor}{\#define SUA\_ERR\_UNSUPP\_TRAF\_MOD\_TYP     M3UA\_ERR\_UNSUPP\_TRAF\_MOD\_TYP}}
\DoxyCodeLine{145 \textcolor{preprocessor}{\#define SUA\_ERR\_UNEXPECTED\_MSG          M3UA\_ERR\_UNEXPECTED\_MSG}}
\DoxyCodeLine{146 \textcolor{preprocessor}{\#define SUA\_ERR\_PROTOCOL\_ERR            M3UA\_ERR\_PROTOCOL\_ERR}}
\DoxyCodeLine{147 \textcolor{preprocessor}{\#define SUA\_ERR\_INVAL\_STREAM\_ID         M3UA\_ERR\_INVAL\_STREAM\_ID}}
\DoxyCodeLine{148 \textcolor{preprocessor}{\#define SUA\_ERR\_REFUSED\_MGMT\_BLOCKING   M3UA\_ERR\_REFUSED\_MGMT\_BLOCKING}}
\DoxyCodeLine{149 \textcolor{preprocessor}{\#define SUA\_ERR\_ASP\_ID\_REQD             M3UA\_ERR\_ASP\_ID\_REQD}}
\DoxyCodeLine{150 \textcolor{preprocessor}{\#define SUA\_ERR\_INVAL\_ASP\_ID            M3UA\_ERR\_INVAL\_ASP\_ID}}
\DoxyCodeLine{151 \textcolor{preprocessor}{\#define SUA\_ERR\_INVAL\_PARAM\_VAL         M3UA\_ERR\_INVAL\_PARAM\_VAL}}
\DoxyCodeLine{152 \textcolor{preprocessor}{\#define SUA\_ERR\_PARAM\_FIELD\_ERR         M3UA\_ERR\_PARAM\_FIELD\_ERR}}
\DoxyCodeLine{153 \textcolor{preprocessor}{\#define SUA\_ERR\_UNEXP\_PARAM             M3UA\_ERR\_UNEXP\_PARAM}}
\DoxyCodeLine{154 \textcolor{preprocessor}{\#define SUA\_ERR\_DEST\_STATUS\_UNKN        M3UA\_ERR\_DEST\_STATUS\_UNKN}}
\DoxyCodeLine{155 \textcolor{preprocessor}{\#define SUA\_ERR\_INVAL\_NET\_APPEAR        M3UA\_ERR\_INVAL\_NET\_APPEAR}}
\DoxyCodeLine{156 \textcolor{preprocessor}{\#define SUA\_ERR\_MISSING\_PARAM           M3UA\_ERR\_MISSING\_PARAM}}
\DoxyCodeLine{157 \textcolor{preprocessor}{\#define SUA\_ERR\_INVAL\_ROUT\_CTX          M3UA\_ERR\_INVAL\_ROUT\_CTX}}
\DoxyCodeLine{158 \textcolor{preprocessor}{\#define SUA\_ERR\_NO\_CONFGD\_AS\_FOR\_ASP    M3UA\_ERR\_NO\_CONFGD\_AS\_FOR\_ASP}}
\DoxyCodeLine{159 \textcolor{preprocessor}{\#define SUA\_ERR\_SUBSYS\_STATUS\_UNKN      0x1b}}
\DoxyCodeLine{160 \textcolor{preprocessor}{\#define SUA\_ERR\_INVAL\_LOADSH\_LEVEL      0x1c}}

\end{DoxyCode}
