\doxysection{sccp\+\_\+sap.\+h}
\label{sccp__sap_8h_source}\index{include/osmocom/sigtran/sccp\_sap.h@{include/osmocom/sigtran/sccp\_sap.h}}
\textbf{ Go to the documentation of this file.}
\begin{DoxyCode}{0}
\DoxyCodeLine{1 \textcolor{preprocessor}{\#pragma once}}
\DoxyCodeLine{2 }
\DoxyCodeLine{3 \textcolor{comment}{/* SCCP User SAP description */}}
\DoxyCodeLine{4 }
\DoxyCodeLine{5 \textcolor{comment}{/* (C) 2015-\/2017 by Harald Welte <laforge@gnumonks.org>}}
\DoxyCodeLine{6 \textcolor{comment}{ * All Rights Reserved}}
\DoxyCodeLine{7 \textcolor{comment}{ *}}
\DoxyCodeLine{8 \textcolor{comment}{ * This program is free software; you can redistribute it and/or modify}}
\DoxyCodeLine{9 \textcolor{comment}{ * it under the terms of the GNU General Public License as published by}}
\DoxyCodeLine{10 \textcolor{comment}{ * the Free Software Foundation; either version 2 of the License, or}}
\DoxyCodeLine{11 \textcolor{comment}{ * (at your option) any later version.}}
\DoxyCodeLine{12 \textcolor{comment}{ *}}
\DoxyCodeLine{13 \textcolor{comment}{ * This program is distributed in the hope that it will be useful,}}
\DoxyCodeLine{14 \textcolor{comment}{ * but WITHOUT ANY WARRANTY; without even the implied warranty of}}
\DoxyCodeLine{15 \textcolor{comment}{ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the}}
\DoxyCodeLine{16 \textcolor{comment}{ * GNU General Public License for more details.}}
\DoxyCodeLine{17 \textcolor{comment}{ *}}
\DoxyCodeLine{18 \textcolor{comment}{ * You should have received a copy of the GNU General Public License}}
\DoxyCodeLine{19 \textcolor{comment}{ * along with this program.  If not, see <http://www.gnu.org/licenses/>.}}
\DoxyCodeLine{20 \textcolor{comment}{ *}}
\DoxyCodeLine{21 \textcolor{comment}{ */}}
\DoxyCodeLine{22 }
\DoxyCodeLine{23 \textcolor{preprocessor}{\#include <stdint.h>}}
\DoxyCodeLine{24 \textcolor{preprocessor}{\#include <osmocom/core/prim.h>}}
\DoxyCodeLine{25 \textcolor{preprocessor}{\#include <osmocom/sigtran/sigtran\_sap.h>}}
\DoxyCodeLine{26 }
\DoxyCodeLine{27 \textcolor{preprocessor}{\#include <netinet/in.h>}}
\DoxyCodeLine{28 }
\DoxyCodeLine{29 \textcolor{comment}{/* detailed coding of primitives at the SAP\_SCCP\_USER */}}
\DoxyCodeLine{30 }
\DoxyCodeLine{32 \textcolor{keyword}{enum} osmo\_scu\_prim\_type \{}
\DoxyCodeLine{33         \textcolor{comment}{/* connection oriented, 6.1.1 */}}
\DoxyCodeLine{34         OSMO\_SCU\_PRIM\_N\_CONNECT,}
\DoxyCodeLine{35         OSMO\_SCU\_PRIM\_N\_DATA,}
\DoxyCodeLine{36         OSMO\_SCU\_PRIM\_N\_EXPEDITED\_DATA,}
\DoxyCodeLine{37         OSMO\_SCU\_PRIM\_N\_DISCONNECT,}
\DoxyCodeLine{38         OSMO\_SCU\_PRIM\_N\_RESET,}
\DoxyCodeLine{39         OSMO\_SCU\_PRIM\_N\_INFORM,}
\DoxyCodeLine{40         \textcolor{comment}{/* connectionless, 6.2.2 */}}
\DoxyCodeLine{41         OSMO\_SCU\_PRIM\_N\_UNITDATA,}
\DoxyCodeLine{42         OSMO\_SCU\_PRIM\_N\_NOTICE,}
\DoxyCodeLine{43         \textcolor{comment}{/* management */}}
\DoxyCodeLine{44         OSMO\_SCU\_PRIM\_N\_COORD,}
\DoxyCodeLine{45         OSMO\_SCU\_PRIM\_N\_STATE,}
\DoxyCodeLine{46         OSMO\_SCU\_PRIM\_N\_PCSTATE,}
\DoxyCodeLine{47 \};}
\DoxyCodeLine{48 }
\DoxyCodeLine{49 \textcolor{preprocessor}{\#define OSMO\_SCCP\_ADDR\_T\_GT     0x0001 }\textcolor{comment}{/* global title */}\textcolor{preprocessor}{}}
\DoxyCodeLine{50 \textcolor{preprocessor}{\#define OSMO\_SCCP\_ADDR\_T\_PC     0x0002 }\textcolor{comment}{/* signalling point code */}\textcolor{preprocessor}{}}
\DoxyCodeLine{51 \textcolor{preprocessor}{\#define OSMO\_SCCP\_ADDR\_T\_SSN    0x0004 }\textcolor{comment}{/* subsystem number */}\textcolor{preprocessor}{}}
\DoxyCodeLine{52 \textcolor{preprocessor}{\#define OSMO\_SCCP\_ADDR\_T\_IPv4   0x0008}}
\DoxyCodeLine{53 \textcolor{preprocessor}{\#define OSMO\_SCCP\_ADDR\_T\_IPv6   0x0010}}
\DoxyCodeLine{54 \textcolor{preprocessor}{\#define OSMO\_SCCP\_ADDR\_T\_MASK   0x001f}}
\DoxyCodeLine{55 }
\DoxyCodeLine{56 \textcolor{comment}{/* Q.713 3.4.1 + RFC 3868 3.10.2.3 */}}
\DoxyCodeLine{57 \textcolor{keyword}{enum} osmo\_sccp\_routing\_ind \{}
\DoxyCodeLine{58         OSMO\_SCCP\_RI\_NONE,}
\DoxyCodeLine{59         OSMO\_SCCP\_RI\_GT,}
\DoxyCodeLine{60         OSMO\_SCCP\_RI\_SSN\_PC,}
\DoxyCodeLine{61         OSMO\_SCCP\_RI\_SSN\_IP,}
\DoxyCodeLine{62 \};}
\DoxyCodeLine{63 }
\DoxyCodeLine{64 \textcolor{keyword}{extern} \textcolor{keyword}{const} \textcolor{keyword}{struct }value\_string osmo\_sccp\_routing\_ind\_names[];}
\DoxyCodeLine{65 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *osmo\_sccp\_routing\_ind\_name(\textcolor{keyword}{enum} osmo\_sccp\_routing\_ind val)}
\DoxyCodeLine{66 \{ \textcolor{keywordflow}{return} get\_value\_string(osmo\_sccp\_routing\_ind\_names, val); \}}
\DoxyCodeLine{67 }
\DoxyCodeLine{68 }
\DoxyCodeLine{69 \textcolor{comment}{/* Q.713 3.4.1 + RFC 3868 3.10.2.3 */}}
\DoxyCodeLine{70 \textcolor{keyword}{enum} osmo\_sccp\_gti \{}
\DoxyCodeLine{71         OSMO\_SCCP\_GTI\_NO\_GT,}
\DoxyCodeLine{72         OSMO\_SCCP\_GTI\_NAI\_ONLY,}
\DoxyCodeLine{73         OSMO\_SCCP\_GTI\_TT\_ONLY,}
\DoxyCodeLine{74         OSMO\_SCCP\_GTI\_TT\_NPL\_ENC,}
\DoxyCodeLine{75         OSMO\_SCCP\_GTI\_TT\_NPL\_ENC\_NAI,}
\DoxyCodeLine{76 \};}
\DoxyCodeLine{77 }
\DoxyCodeLine{78 \textcolor{keyword}{extern} \textcolor{keyword}{const} \textcolor{keyword}{struct }value\_string osmo\_sccp\_gti\_names[];}
\DoxyCodeLine{79 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *osmo\_sccp\_gti\_name(\textcolor{keyword}{enum} osmo\_sccp\_gti val)}
\DoxyCodeLine{80 \{ \textcolor{keywordflow}{return} get\_value\_string(osmo\_sccp\_gti\_names, val); \}}
\DoxyCodeLine{81 }
\DoxyCodeLine{82 \textcolor{comment}{/* RFC 3868 3.10.2.3 */}}
\DoxyCodeLine{83 \textcolor{keyword}{enum} osmo\_sccp\_npi \{}
\DoxyCodeLine{84         OSMO\_SCCP\_NPI\_UNKNOWN = 0,}
\DoxyCodeLine{85         OSMO\_SCCP\_NPI\_E164\_ISDN          = 1,}
\DoxyCodeLine{86         OSMO\_SCCP\_NPI\_GEERIC                = 2,}
\DoxyCodeLine{87         OSMO\_SCCP\_NPI\_X121\_DATA          = 3,}
\DoxyCodeLine{88         OSMO\_SCCP\_NPI\_F69\_TELEX          = 4,}
\DoxyCodeLine{89         OSMO\_SCCP\_NPI\_E210\_MARITIME  = 5,}
\DoxyCodeLine{90         OSMO\_SCCP\_NPI\_E212\_LAND          = 6,}
\DoxyCodeLine{91         OSMO\_SCCP\_NPI\_E214\_ISDN\_MOBILE    = 7,}
\DoxyCodeLine{92         OSMO\_SCCP\_NPI\_PRIVATE              = 14,}
\DoxyCodeLine{93 \};}
\DoxyCodeLine{94 }
\DoxyCodeLine{95 \textcolor{comment}{/* Q.713 3.4.2.3.1 + RFC 3868 3.10.2.3 */}}
\DoxyCodeLine{96 \textcolor{keyword}{enum} osmo\_sccp\_nai \{}
\DoxyCodeLine{97         OSMO\_SCCP\_NAI\_UNKNOWN              = 0,}
\DoxyCodeLine{98         OSMO\_SCCP\_NAI\_SUBSCR                = 1,}
\DoxyCodeLine{99         OSMO\_SCCP\_NAI\_RES\_NAT\_USE      = 2,}
\DoxyCodeLine{100         OSMO\_SCCP\_NAI\_NATL            = 3,}
\DoxyCodeLine{101         OSMO\_SCCP\_NAI\_INTL            = 4,}
\DoxyCodeLine{102         \textcolor{comment}{/* 5.. 255: Spare */}}
\DoxyCodeLine{103 \};}
\DoxyCodeLine{104 }
\DoxyCodeLine{105 \textcolor{comment}{/* Q.713 3.4.2.2 */}}
\DoxyCodeLine{106 \textcolor{keyword}{enum} osmo\_sccp\_ssn \{}
\DoxyCodeLine{107         \textcolor{comment}{/* globally standardised for GSM/UMTS: 1-\/31 */}}
\DoxyCodeLine{108         OSMO\_SCCP\_SSN\_MGMT            = 1,}
\DoxyCodeLine{109         OSMO\_SCCP\_SSN\_ISUP            = 3,}
\DoxyCodeLine{110         OSMO\_SCCP\_SSN\_OMAP            = 4,}
\DoxyCodeLine{111         OSMO\_SCCP\_SSN\_MAP              = 5,}
\DoxyCodeLine{112         OSMO\_SCCP\_SSN\_HLR              = 6,}
\DoxyCodeLine{113         OSMO\_SCCP\_SSN\_VLR              = 7,}
\DoxyCodeLine{114         OSMO\_SCCP\_SSN\_MSC              = 8,}
\DoxyCodeLine{115         OSMO\_SCCP\_SSN\_EIR              = 9,}
\DoxyCodeLine{116         OSMO\_SCCP\_SSN\_AUC              = 0x0a,}
\DoxyCodeLine{117         \textcolor{comment}{/* Q.713 */}}
\DoxyCodeLine{118         OSMO\_SCCP\_SSN\_ISDN\_SS              = 0x0b,}
\DoxyCodeLine{119         OSMO\_SCCP\_SSN\_RES\_INTL            = 0x0c,}
\DoxyCodeLine{120         OSMO\_SCCP\_SSN\_BISDN          = 0x0d,}
\DoxyCodeLine{121         OSMO\_SCCP\_SSN\_TC\_TEST              = 0x0e,}
\DoxyCodeLine{122         \textcolor{comment}{/* national network SSN for wihin and between GSM/UMTS: 129-\/150 */}}
\DoxyCodeLine{123         OSMO\_SCCP\_SSN\_RANAP          = 142,}
\DoxyCodeLine{124         OSMO\_SCCP\_SSN\_RNSAP          = 143,}
\DoxyCodeLine{125         OSMO\_SCCP\_SSN\_GMLC\_MAP            = 145,}
\DoxyCodeLine{126         OSMO\_SCCP\_SSN\_CAP              = 146,}
\DoxyCodeLine{127         OSMO\_SCCP\_SSN\_gsmSCF\_MAP        = 147,}
\DoxyCodeLine{128         OSMO\_SCCP\_SSN\_SIWF\_MAP            = 148,}
\DoxyCodeLine{129         OSMO\_SCCP\_SSN\_SGSN\_MAP            = 149,}
\DoxyCodeLine{130         OSMO\_SCCP\_SSN\_GGSN\_MAP            = 150,}
\DoxyCodeLine{131         \textcolor{comment}{/* national network SSN within GSM/UMTS: 32-\/128 + 151-\/254 */}}
\DoxyCodeLine{132         OSMO\_SCCP\_SSN\_PCAP            = 249,}
\DoxyCodeLine{133         OSMO\_SCCP\_SSN\_BSC\_BSSAP\_LE    = 250,}
\DoxyCodeLine{134         OSMO\_SCCP\_SSN\_MSC\_BSSAP\_LE    = 251,}
\DoxyCodeLine{135         OSMO\_SCCP\_SSN\_SMLC\_BSSAP\_LE  = 252,}
\DoxyCodeLine{136         OSMO\_SCCP\_SSN\_BSS\_OAM              = 253,}
\DoxyCodeLine{137         OSMO\_SCCP\_SSN\_BSSAP          = 254,}
\DoxyCodeLine{138 \};}
\DoxyCodeLine{139 }
\DoxyCodeLine{140 \textcolor{comment}{/* Q.711 6.3.2.2.5 Signalling point status */}}
\DoxyCodeLine{141 \textcolor{keyword}{enum} osmo\_sccp\_sp\_status \{}
\DoxyCodeLine{142         OSMO\_SCCP\_SP\_S\_INACCESSIBLE  = 1,}
\DoxyCodeLine{143         OSMO\_SCCP\_SP\_S\_CONGESTED        = 2,}
\DoxyCodeLine{144         OSMO\_SCCP\_SP\_S\_ACCESSIBLE      = 3,}
\DoxyCodeLine{145 \};}
\DoxyCodeLine{146 }
\DoxyCodeLine{147 \textcolor{keyword}{extern} \textcolor{keyword}{const} \textcolor{keyword}{struct }value\_string osmo\_sccp\_sp\_status\_names[];}
\DoxyCodeLine{148 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *osmo\_sccp\_sp\_status\_name(\textcolor{keyword}{enum} osmo\_sccp\_sp\_status val)}
\DoxyCodeLine{149 \{}
\DoxyCodeLine{150         \textcolor{keywordflow}{return} get\_value\_string(osmo\_sccp\_sp\_status\_names, val);}
\DoxyCodeLine{151 \}}
\DoxyCodeLine{152 }
\DoxyCodeLine{153 \textcolor{comment}{/* Q.711 6.3.2.2.6 Remote SCCP status */}}
\DoxyCodeLine{154 \textcolor{keyword}{enum} osmo\_sccp\_rem\_sccp\_status \{}
\DoxyCodeLine{155         OSMO\_SCCP\_REM\_SCCP\_S\_AVAILABLE                    = 1,}
\DoxyCodeLine{156         OSMO\_SCCP\_REM\_SCCP\_S\_UNAVAILABLE\_UNKNOWN        = 2,}
\DoxyCodeLine{157         OSMO\_SCCP\_REM\_SCCP\_S\_UNEQUIPPED                  = 3,}
\DoxyCodeLine{158         OSMO\_SCCP\_REM\_SCCP\_S\_INACCESSIBLE              = 4,}
\DoxyCodeLine{159         OSMO\_SCCP\_REM\_SCCP\_S\_CONGESTED                    = 5,}
\DoxyCodeLine{160 \};}
\DoxyCodeLine{161 }
\DoxyCodeLine{162 \textcolor{keyword}{extern} \textcolor{keyword}{const} \textcolor{keyword}{struct }value\_string osmo\_sccp\_rem\_sccp\_status\_names[];}
\DoxyCodeLine{163 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *osmo\_sccp\_rem\_sccp\_status\_name(\textcolor{keyword}{enum} osmo\_sccp\_rem\_sccp\_status val)}
\DoxyCodeLine{164 \{}
\DoxyCodeLine{165         \textcolor{keywordflow}{return} get\_value\_string(osmo\_sccp\_rem\_sccp\_status\_names, val);}
\DoxyCodeLine{166 \}}
\DoxyCodeLine{167 }
\DoxyCodeLine{168 \textcolor{comment}{/* legacy shim for name change */}}
\DoxyCodeLine{169 \textcolor{preprocessor}{\#define OSMO\_SCCP\_SSN\_SMLC\_BSSAP OSMO\_SCCP\_SSN\_SMLC\_BSSAP\_LE}}
\DoxyCodeLine{170 }
\DoxyCodeLine{171 \textcolor{keyword}{extern} \textcolor{keyword}{const} \textcolor{keyword}{struct }value\_string osmo\_sccp\_ssn\_names[];}
\DoxyCodeLine{172 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *osmo\_sccp\_ssn\_name(\textcolor{keyword}{enum} osmo\_sccp\_ssn val)}
\DoxyCodeLine{173 \{ \textcolor{keywordflow}{return} get\_value\_string(osmo\_sccp\_ssn\_names, val); \}}
\DoxyCodeLine{174 }
\DoxyCodeLine{175 \textcolor{keyword}{struct }osmo\_sccp\_gt \{}
\DoxyCodeLine{176         uint8\_t gti;}
\DoxyCodeLine{177         uint8\_t tt;}
\DoxyCodeLine{178         uint32\_t npi;}
\DoxyCodeLine{179         uint32\_t nai;}
\DoxyCodeLine{180         \textcolor{keywordtype}{char} digits[32];}
\DoxyCodeLine{181 \};}
\DoxyCodeLine{182 }
\DoxyCodeLine{183 \textcolor{keyword}{struct }osmo\_sccp\_addr \{}
\DoxyCodeLine{184         uint32\_t presence;}
\DoxyCodeLine{185         \textcolor{keyword}{enum} osmo\_sccp\_routing\_ind ri;}
\DoxyCodeLine{186         \textcolor{keyword}{struct }osmo\_sccp\_gt gt;}
\DoxyCodeLine{187         uint32\_t pc;}
\DoxyCodeLine{188         uint32\_t ssn;}
\DoxyCodeLine{189         \textcolor{keyword}{union }\{}
\DoxyCodeLine{190                 \textcolor{keyword}{struct }in\_addr v4;}
\DoxyCodeLine{191                 \textcolor{keyword}{struct }in6\_addr v6;}
\DoxyCodeLine{192         \} ip;}
\DoxyCodeLine{193         \textcolor{comment}{/* we don't do hostnames */}}
\DoxyCodeLine{194 \};}
\DoxyCodeLine{195 }
\DoxyCodeLine{196 \textcolor{comment}{/* OSMO\_SCU\_PRIM\_N\_CONNECT */}}
\DoxyCodeLine{197 \textcolor{keyword}{struct }osmo\_scu\_connect\_param \{}
\DoxyCodeLine{198         \textcolor{keyword}{struct }osmo\_sccp\_addr called\_addr;}
\DoxyCodeLine{199         \textcolor{keyword}{struct }osmo\_sccp\_addr calling\_addr;}
\DoxyCodeLine{200         \textcolor{keyword}{struct }osmo\_sccp\_addr responding\_addr;}
\DoxyCodeLine{201         \textcolor{comment}{//struct osmo\_sccp\_qos\_pars qos\_pars;}}
\DoxyCodeLine{202         uint32\_t sccp\_class;}
\DoxyCodeLine{203         uint32\_t importance;}
\DoxyCodeLine{204         uint32\_t conn\_id;}
\DoxyCodeLine{205         \textcolor{comment}{/* user data */}}
\DoxyCodeLine{206 \};}
\DoxyCodeLine{207 }
\DoxyCodeLine{208 \textcolor{comment}{/* OSMO\_SCU\_PRIM\_N\_DATA / OSMO\_SCU\_PRIM\_N\_EXPEDITED\_DATA */}}
\DoxyCodeLine{209 \textcolor{keyword}{struct }osmo\_scu\_data\_param \{}
\DoxyCodeLine{210         uint32\_t conn\_id;}
\DoxyCodeLine{211         uint32\_t importance;}
\DoxyCodeLine{212         \textcolor{comment}{/* user data */}}
\DoxyCodeLine{213 \};}
\DoxyCodeLine{214 }
\DoxyCodeLine{215 \textcolor{keyword}{enum} osmo\_sccp\_originator \{}
\DoxyCodeLine{216         OSMO\_SCCP\_ORIG\_NS\_PROVIDER,}
\DoxyCodeLine{217         OSMO\_SCCP\_ORIG\_NS\_USER,}
\DoxyCodeLine{218         OSMO\_SCCP\_ORIG\_UNDEFINED,}
\DoxyCodeLine{219 \};}
\DoxyCodeLine{220 }
\DoxyCodeLine{221 \textcolor{comment}{/* OSMO\_SCU\_PRIM\_N\_DISCONNECT */}}
\DoxyCodeLine{222 \textcolor{keyword}{struct }osmo\_scu\_disconn\_param \{}
\DoxyCodeLine{223         \textcolor{keyword}{enum} osmo\_sccp\_originator originator;}
\DoxyCodeLine{224         \textcolor{keyword}{struct }osmo\_sccp\_addr responding\_addr;}
\DoxyCodeLine{225         uint32\_t cause;}
\DoxyCodeLine{226         uint32\_t conn\_id;}
\DoxyCodeLine{227         uint32\_t importance;}
\DoxyCodeLine{228         \textcolor{comment}{/* user data */}}
\DoxyCodeLine{229 \};}
\DoxyCodeLine{230 }
\DoxyCodeLine{231 \textcolor{comment}{/* OSMO\_SCU\_PRIM\_N\_RESET */}}
\DoxyCodeLine{232 \textcolor{keyword}{struct }osmo\_scu\_reset\_param \{}
\DoxyCodeLine{233         \textcolor{keyword}{enum} osmo\_sccp\_originator originator;}
\DoxyCodeLine{234         uint32\_t cause;}
\DoxyCodeLine{235         uint32\_t conn\_id;}
\DoxyCodeLine{236 \};}
\DoxyCodeLine{237 }
\DoxyCodeLine{238 \textcolor{comment}{/* OSMO\_SCU\_PRIM\_N\_UNITDATA */}}
\DoxyCodeLine{239 \textcolor{comment}{/* NOTE: Ideally there should have been a "{}bool in\_sequence\_control\_present"{},}}
\DoxyCodeLine{240 \textcolor{comment}{ * but that was found too late, so instead set:}}
\DoxyCodeLine{241 \textcolor{comment}{ * "{}in\_sequence\_control = OSMO\_SCU\_UNITDATA\_PARAM\_SEQUENCE\_CONTROL\_NOT\_PRESENT"{}}}
\DoxyCodeLine{242 \textcolor{comment}{ * to mark the field not present (aka select Protocol Class 0).}}
\DoxyCodeLine{243 \textcolor{comment}{ * See ITU-\/T Q.711 6.2.1 for more information.}}
\DoxyCodeLine{244 \textcolor{comment}{ */}}
\DoxyCodeLine{245 \textcolor{preprocessor}{\#define OSMO\_SCU\_UNITDATA\_REQ\_P\_SEQUENCE\_CONTROL\_NOT\_PRESENT 0xffffffff}}
\DoxyCodeLine{246 \textcolor{keyword}{struct }osmo\_scu\_unitdata\_param \{}
\DoxyCodeLine{247         \textcolor{keyword}{struct }osmo\_sccp\_addr called\_addr;}
\DoxyCodeLine{248         \textcolor{keyword}{struct }osmo\_sccp\_addr calling\_addr;}
\DoxyCodeLine{249         uint32\_t in\_sequence\_control;}
\DoxyCodeLine{250         uint32\_t return\_option;}
\DoxyCodeLine{251         uint32\_t importance;}
\DoxyCodeLine{252         \textcolor{comment}{/* user data */}}
\DoxyCodeLine{253 \};}
\DoxyCodeLine{254 }
\DoxyCodeLine{255 \textcolor{comment}{/* OSMO\_SCU\_PRIM\_N\_NOTICE */}}
\DoxyCodeLine{256 \textcolor{keyword}{struct }osmo\_scu\_notice\_param \{}
\DoxyCodeLine{257         \textcolor{keyword}{struct }osmo\_sccp\_addr called\_addr;}
\DoxyCodeLine{258         \textcolor{keyword}{struct }osmo\_sccp\_addr calling\_addr;}
\DoxyCodeLine{259         \textcolor{comment}{/* ITU Q.711 6.2.2.2.4 "{}Reason for return"{}:}}
\DoxyCodeLine{260 \textcolor{comment}{         * enum sccp\_return\_cause (ITU Q.713 3.12), as per ITU Q.713 A.5. */}}
\DoxyCodeLine{261         uint32\_t cause;}
\DoxyCodeLine{262         uint32\_t importance; \textcolor{comment}{/* ITU Q.711 6.2.2.2.6, Q.713 3.19 */}}
\DoxyCodeLine{263         \textcolor{comment}{/* user data */}}
\DoxyCodeLine{264 \};}
\DoxyCodeLine{265 }
\DoxyCodeLine{266 \textcolor{comment}{/* OSMO\_SCU\_PRIM\_N\_STATE */}}
\DoxyCodeLine{267 \textcolor{keyword}{struct }osmo\_scu\_state\_param \{}
\DoxyCodeLine{268         uint32\_t affected\_pc;}
\DoxyCodeLine{269         uint32\_t affected\_ssn;}
\DoxyCodeLine{270         \textcolor{keywordtype}{bool} user\_in\_service; \textcolor{comment}{/* true: UIS; false: UOS */}}
\DoxyCodeLine{271         uint32\_t ssn\_multiplicity\_ind;}
\DoxyCodeLine{272 \};}
\DoxyCodeLine{273 }
\DoxyCodeLine{274 \textcolor{comment}{/* OSMO\_SCU\_PRIM\_N\_PCSTATE */}}
\DoxyCodeLine{275 \textcolor{keyword}{struct }osmo\_scu\_pcstate\_param \{}
\DoxyCodeLine{276         uint32\_t affected\_pc;}
\DoxyCodeLine{277         uint32\_t restricted\_importance\_level;}
\DoxyCodeLine{278         \textcolor{keyword}{enum} osmo\_sccp\_sp\_status sp\_status;}
\DoxyCodeLine{279         \textcolor{keyword}{enum} osmo\_sccp\_rem\_sccp\_status remote\_sccp\_status;}
\DoxyCodeLine{280 \};}
\DoxyCodeLine{281 }
\DoxyCodeLine{282 \textcolor{keyword}{struct }osmo\_scu\_prim \{}
\DoxyCodeLine{283         \textcolor{keyword}{struct }osmo\_prim\_hdr oph;}
\DoxyCodeLine{284         \textcolor{keyword}{union }\{}
\DoxyCodeLine{285                 \textcolor{keyword}{struct }osmo\_scu\_connect\_param connect;}
\DoxyCodeLine{286                 \textcolor{keyword}{struct }osmo\_scu\_data\_param data;}
\DoxyCodeLine{287                 \textcolor{keyword}{struct }osmo\_scu\_disconn\_param disconnect;}
\DoxyCodeLine{288                 \textcolor{keyword}{struct }osmo\_scu\_reset\_param reset;}
\DoxyCodeLine{289                 \textcolor{keyword}{struct }osmo\_scu\_unitdata\_param unitdata;}
\DoxyCodeLine{290                 \textcolor{keyword}{struct }osmo\_scu\_notice\_param notice;}
\DoxyCodeLine{291                 \textcolor{keyword}{struct }osmo\_scu\_state\_param state;}
\DoxyCodeLine{292                 \textcolor{keyword}{struct }osmo\_scu\_pcstate\_param pcstate;}
\DoxyCodeLine{293         \} u;}
\DoxyCodeLine{294 \};}
\DoxyCodeLine{295 }
\DoxyCodeLine{296 \textcolor{preprocessor}{\#define msgb\_scu\_prim(msg) ((struct osmo\_scu\_prim *)(msg)-\/>l1h)}}
\DoxyCodeLine{297 }
\DoxyCodeLine{298 \textcolor{keyword}{extern} \textcolor{keyword}{const} \textcolor{keyword}{struct }value\_string osmo\_scu\_prim\_type\_names[];}
\DoxyCodeLine{299 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *osmo\_scu\_prim\_type\_name(\textcolor{keyword}{enum} osmo\_scu\_prim\_type val)}
\DoxyCodeLine{300 \{}
\DoxyCodeLine{301         \textcolor{keywordflow}{return} get\_value\_string(osmo\_scu\_prim\_type\_names, val);}
\DoxyCodeLine{302 \}}
\DoxyCodeLine{303 }
\DoxyCodeLine{304 \textcolor{keywordtype}{int} osmo\_scu\_prim\_hdr\_name\_buf(\textcolor{keywordtype}{char} *buf, \textcolor{keywordtype}{size\_t} buflen, \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_prim\_hdr *oph);}
\DoxyCodeLine{305 \textcolor{keywordtype}{char} *osmo\_scu\_prim\_hdr\_name\_c(\textcolor{keywordtype}{void} *ctx, \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_prim\_hdr *oph);}
\DoxyCodeLine{306 \textcolor{keywordtype}{char} *osmo\_scu\_prim\_name(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_prim\_hdr *oph);}
\DoxyCodeLine{307 }
\DoxyCodeLine{308 \textcolor{keyword}{struct }osmo\_ss7\_instance;}
\DoxyCodeLine{309 \textcolor{keyword}{struct }osmo\_sccp\_instance;}
\DoxyCodeLine{310 \textcolor{keyword}{struct }osmo\_sccp\_user;}
\DoxyCodeLine{311 }
\DoxyCodeLine{312 \textcolor{keywordtype}{void} osmo\_sccp\_vty\_init(\textcolor{keywordtype}{void});}
\DoxyCodeLine{313 }
\DoxyCodeLine{314 \textcolor{keyword}{struct }osmo\_sccp\_instance *osmo\_sccp\_instance\_create(\textcolor{keyword}{struct} osmo\_ss7\_instance *ss7, \textcolor{keywordtype}{void} *priv);}
\DoxyCodeLine{315 \textcolor{keywordtype}{void} osmo\_sccp\_instance\_destroy(\textcolor{keyword}{struct} osmo\_sccp\_instance *inst);}
\DoxyCodeLine{316 \textcolor{keyword}{struct }osmo\_ss7\_instance *osmo\_sccp\_get\_ss7(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_sccp\_instance *sccp);}
\DoxyCodeLine{317 \textcolor{keyword}{struct }osmo\_sccp\_instance *osmo\_sccp\_get\_sccp(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_sccp\_user *scu);}
\DoxyCodeLine{318 \textcolor{keywordtype}{void} osmo\_sccp\_set\_priv(\textcolor{keyword}{struct} osmo\_sccp\_instance *sccp, \textcolor{keywordtype}{void} *priv);}
\DoxyCodeLine{319 \textcolor{keywordtype}{void} *osmo\_sccp\_get\_priv(\textcolor{keyword}{struct} osmo\_sccp\_instance *sccp);}
\DoxyCodeLine{320 }
\DoxyCodeLine{321 \textcolor{keywordtype}{void} osmo\_sccp\_user\_unbind(\textcolor{keyword}{struct} osmo\_sccp\_user *scu);}
\DoxyCodeLine{322 \textcolor{keywordtype}{void} osmo\_sccp\_user\_set\_priv(\textcolor{keyword}{struct} osmo\_sccp\_user *scu, \textcolor{keywordtype}{void} *priv);}
\DoxyCodeLine{323 \textcolor{keywordtype}{void} *osmo\_sccp\_user\_get\_priv(\textcolor{keyword}{struct} osmo\_sccp\_user *scu);}
\DoxyCodeLine{324 }
\DoxyCodeLine{325 \textcolor{keyword}{struct }osmo\_sccp\_user *osmo\_sccp\_user\_bind\_pc(\textcolor{keyword}{struct} osmo\_sccp\_instance *inst, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *name,}
\DoxyCodeLine{326                                               osmo\_prim\_cb prim\_cb, uint16\_t ssn, uint32\_t pc);}
\DoxyCodeLine{327 }
\DoxyCodeLine{328 \textcolor{keyword}{struct }osmo\_sccp\_user *osmo\_sccp\_user\_bind(\textcolor{keyword}{struct} osmo\_sccp\_instance *inst, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *name,}
\DoxyCodeLine{329                                            osmo\_prim\_cb prim\_cb, uint16\_t ssn);}
\DoxyCodeLine{330 \textcolor{keyword}{struct }osmo\_sccp\_user *osmo\_sccp\_user\_find(\textcolor{keyword}{struct} osmo\_sccp\_instance *inst, uint16\_t ssn, uint32\_t pc);}
\DoxyCodeLine{331 }
\DoxyCodeLine{332 \textcolor{keywordtype}{int} osmo\_sccp\_user\_sap\_down(\textcolor{keyword}{struct} osmo\_sccp\_user *scu, \textcolor{keyword}{struct} osmo\_prim\_hdr *oph);}
\DoxyCodeLine{333 \textcolor{keywordtype}{int} osmo\_sccp\_user\_sap\_down\_nofree(\textcolor{keyword}{struct} osmo\_sccp\_user *scu, \textcolor{keyword}{struct} osmo\_prim\_hdr *oph);}
\DoxyCodeLine{334 }
\DoxyCodeLine{335 \textcolor{keywordtype}{int} osmo\_sccp\_addr\_create(\textcolor{keyword}{struct} osmo\_ss7\_instance *inst, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *name, \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_sccp\_addr *dest\_addr);}
\DoxyCodeLine{336 \textcolor{keywordtype}{int} osmo\_sccp\_addr\_update(\textcolor{keyword}{struct} osmo\_ss7\_instance *inst, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *name, \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_sccp\_addr *dest\_addr);}
\DoxyCodeLine{337 \textcolor{keyword}{struct }osmo\_ss7\_instance *osmo\_sccp\_addr\_by\_name(\textcolor{keyword}{struct} osmo\_sccp\_addr *dest\_addr, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *name);}
\DoxyCodeLine{338 \textcolor{keywordtype}{int} osmo\_sccp\_addr\_by\_name\_local(\textcolor{keyword}{struct} osmo\_sccp\_addr *dest\_addr, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *name,}
\DoxyCodeLine{339                                  \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_ss7\_instance *inst);}
\DoxyCodeLine{340 \textcolor{keyword}{const} \textcolor{keywordtype}{char} *osmo\_sccp\_name\_by\_addr(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_sccp\_addr *addr);}
\DoxyCodeLine{341 \textcolor{keywordtype}{void} osmo\_sccp\_local\_addr\_by\_instance(\textcolor{keyword}{struct} osmo\_sccp\_addr *dest\_addr,}
\DoxyCodeLine{342                                       \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_sccp\_instance *inst,}
\DoxyCodeLine{343                                       uint32\_t ssn);}
\DoxyCodeLine{344 }
\DoxyCodeLine{345 \textcolor{keywordtype}{bool} osmo\_sccp\_check\_addr(\textcolor{keyword}{struct} osmo\_sccp\_addr *addr, uint32\_t presence);}
\DoxyCodeLine{346 \textcolor{keywordtype}{int} osmo\_sccp\_addr\_cmp(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_sccp\_addr *a, \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_sccp\_addr *b, uint32\_t presence\_criteria);}
\DoxyCodeLine{347 \textcolor{keywordtype}{int} osmo\_sccp\_addr\_ri\_cmp(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_sccp\_addr *a, \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_sccp\_addr *b);}
\DoxyCodeLine{348 \textcolor{keywordtype}{int} osmo\_sccp\_gt\_cmp(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_sccp\_gt *a, \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_sccp\_gt *b);}
\DoxyCodeLine{349 }
\DoxyCodeLine{350 \textcolor{keyword}{const} \textcolor{keywordtype}{char} *osmo\_sccp\_user\_name(\textcolor{keyword}{struct} osmo\_sccp\_user *scu);}
\DoxyCodeLine{351 }
\DoxyCodeLine{352 \textcolor{keywordtype}{int} osmo\_sccp\_instance\_next\_conn\_id(\textcolor{keyword}{struct} osmo\_sccp\_instance *sccp);}

\end{DoxyCode}
