libosmo-sigtran 2.2.1.4-74d0 Osmocom SIGTRAN library

mtp.h
Go to the documentation of this file.
1#pragma once
2
3#include <osmocom/core/utils.h>
4
5/* Q.704 14.2.1, RFC4666 3.4.5.
6 * ETSI EG 201 693 Section 5.1: MTP SI code allocations (for NI=00 (international network) only)
7 */
8 enum mtp_si_ni00 {
9 MTP_SI_SNM = 0,
10 MTP_SI_STM = 1,
11 MTP_SI_SCCP = 3,
12 MTP_SI_TUP = 4,
13 MTP_SI_ISUP = 5,
14 MTP_SI_DUP = 6, /* call related */
15 MTP_SI_DUP_FAC = 7, /* facility related */
16 MTP_SI_TESTING = 8,
17 MTP_SI_B_ISUP = 9,
18 MTP_SI_SAT_ISUP = 10,
19 MTP_SI_SPEECH = 11, /* speech processing element */
20 MTP_SI_AAL2_SIG = 12,
21 MTP_SI_BICC = 13,
22 MTP_SI_GCP = 14,
23};
24 extern const struct value_string mtp_si_vals[];
25
26/* Q.704 14.2.2: "In the case of only one national signalling network the spare code of the
27 * network indicator reserved for national use can be used, for example, to define an additional
28 * 16 User Parts (making a total of 32 User Parts) for that national signalling network."
29 * Hence, we keep service indicators for Network Indicator "International network" (00) the same
30 * as for "National network" (10), and use "Reserved for national use" to specify extension
31 * service indicators.
32 * Note we pick enum values reserved in NI00 above in order to allow forming a
33 * superset so it can still be used with other NI values. */
34 enum mtp_si_ni11 {
35 MTP_SI_NI11_OSMO_IPA = 2, /* Contains an IPA header + payload */
36};
37
38/* Q.704 14.2.2 Sub-service field (Network Indicator) */
39 enum mtp_network_indicator {
40 MTP_NI_INTERNATIONAL = 0,
41 MTP_NI_SPARE_INTERNATIONAL = 1,
42 MTP_NI_NATIONAL = 2,
43 MTP_NI_RESERVED_NATIONAL = 3
44};
45 extern const struct value_string mtp_network_indicator_vals[];
46
47
48/* Q.704 15.17.5 */
49 enum mtp_unavail_cause {
50 MTP_UNAVAIL_C_UNKNOWN = 0x0,
51 MTP_UNAVAIL_C_UNEQUIP_REM_USER = 0x1,
52 MTP_UNAVAIL_C_INACC_REM_USER = 0x2,
53 /* This field is not explicitly listed in Q.704 15.17.5, but it is
54 * explicitly described as one of four options in:
55 * Q.701 "TABLE 1" and 8.4
56 * Q.704 2.4.2
57 * Q.711 "Table 18" and 7.2.4
58 * Q.714 "Figure D.4"
59 */
60 MTP_UNAVAIL_C_CONGESTED = 0x3,
61 /* reserved */
62};
63
64 extern const struct value_string mtp_unavail_cause_vals[];
65
66 static inline const char *mtp_unavail_cause_str(enum mtp_unavail_cause cs) {
67 return get_value_string(mtp_unavail_cause_vals, cs);
68}
mtp_unavail_cause_str
static const char * mtp_unavail_cause_str(enum mtp_unavail_cause cs)
Definition: mtp.h:66
mtp_si_vals
const struct value_string mtp_si_vals[]
Definition: ss7_as_vty.c:282
mtp_network_indicator
mtp_network_indicator
Definition: mtp.h:39
MTP_NI_NATIONAL
@ MTP_NI_NATIONAL
Definition: mtp.h:42
MTP_NI_RESERVED_NATIONAL
@ MTP_NI_RESERVED_NATIONAL
Definition: mtp.h:43
MTP_NI_SPARE_INTERNATIONAL
@ MTP_NI_SPARE_INTERNATIONAL
Definition: mtp.h:41
MTP_NI_INTERNATIONAL
@ MTP_NI_INTERNATIONAL
Definition: mtp.h:40
mtp_network_indicator_vals
const struct value_string mtp_network_indicator_vals[]
Definition: ss7_vty.c:115
mtp_si_ni11
mtp_si_ni11
Definition: mtp.h:34
MTP_SI_NI11_OSMO_IPA
@ MTP_SI_NI11_OSMO_IPA
Definition: mtp.h:35
mtp_unavail_cause_vals
const struct value_string mtp_unavail_cause_vals[]
Definition: ss7.c:76
mtp_si_ni00
mtp_si_ni00
Definition: mtp.h:8
MTP_SI_GCP
@ MTP_SI_GCP
Definition: mtp.h:22
MTP_SI_BICC
@ MTP_SI_BICC
Definition: mtp.h:21
MTP_SI_ISUP
@ MTP_SI_ISUP
Definition: mtp.h:13
MTP_SI_B_ISUP
@ MTP_SI_B_ISUP
Definition: mtp.h:17
MTP_SI_SAT_ISUP
@ MTP_SI_SAT_ISUP
Definition: mtp.h:18
MTP_SI_TESTING
@ MTP_SI_TESTING
Definition: mtp.h:16
MTP_SI_DUP_FAC
@ MTP_SI_DUP_FAC
Definition: mtp.h:15
MTP_SI_DUP
@ MTP_SI_DUP
Definition: mtp.h:14
MTP_SI_SPEECH
@ MTP_SI_SPEECH
Definition: mtp.h:19
MTP_SI_SNM
@ MTP_SI_SNM
Definition: mtp.h:9
MTP_SI_STM
@ MTP_SI_STM
Definition: mtp.h:10
MTP_SI_TUP
@ MTP_SI_TUP
Definition: mtp.h:12
MTP_SI_AAL2_SIG
@ MTP_SI_AAL2_SIG
Definition: mtp.h:20
MTP_SI_SCCP
@ MTP_SI_SCCP
Definition: mtp.h:11
mtp_unavail_cause
mtp_unavail_cause
Definition: mtp.h:49
MTP_UNAVAIL_C_UNEQUIP_REM_USER
@ MTP_UNAVAIL_C_UNEQUIP_REM_USER
Definition: mtp.h:51
MTP_UNAVAIL_C_UNKNOWN
@ MTP_UNAVAIL_C_UNKNOWN
Definition: mtp.h:50
MTP_UNAVAIL_C_CONGESTED
@ MTP_UNAVAIL_C_CONGESTED
Definition: mtp.h:60
MTP_UNAVAIL_C_INACC_REM_USER
@ MTP_UNAVAIL_C_INACC_REM_USER
Definition: mtp.h:52