libosmogsm 1.13.1.1-afb4 Osmocom GSM library

gsm_44_068.h
Go to the documentation of this file.
1#pragma once
2#include <stdint.h>
3#include <osmocom/core/utils.h>
4
5/* Group Call Control (GCC) is an ETSI/3GPP standard protocol used between
6 * MS (Mobile Station) and MSC (Mobile Switchting Center) in 2G/GSM-R network.
7 * It is specified in 3GPP TS 44.068.
8 *
9 * (C) 2023 by Sysmocom s.f.m.c. GmbH
10 * All Rights Reserved
11 *
12 * Author: Andreas Eversberg
13 *
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 2 of the License, or
17 * (at your option) any later version.
18 *
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with this program. If not, see <http://www.gnu.org/licenses/>.
26 *
27 * SPDX-License-Identifier: GPL-2.0+
28 */
29
30/* 9 Information Element Identifiers */
31 enum osmo_gsm44068_iei {
32 OSMO_GSM44068_IEI_MOBILE_IDENTITY = 0x17,
33 OSMO_GSM44068_IEI_USER_USER = 0x7E,
34 OSMO_GSM44068_IEI_CALL_STATE = 0xA0,
35 OSMO_GSM44068_IEI_STATE_ATTRIBUTES = 0xB0,
36 OSMO_GSM44068_IEI_TALKER_PRIORITY = 0xC0,
37 OSMO_GSM44068_IEI_SMS_INDICATIONS = 0xD0,
38};
39
40/* 9.3 Message Type */
41 enum osmo_gsm44068_msg_type {
42 OSMO_GSM44068_MSGT_IMMEDIATE_SETUP = 0x31,
43 OSMO_GSM44068_MSGT_SETUP = 0x32,
44 OSMO_GSM44068_MSGT_CONNECT = 0x33,
45 OSMO_GSM44068_MSGT_TERMINATION = 0x34,
46 OSMO_GSM44068_MSGT_TERMINATION_REQUEST = 0x35,
47 OSMO_GSM44068_MSGT_TERMINATION_REJECT = 0x36,
48 OSMO_GSM44068_MSGT_STATUS = 0x38,
49 OSMO_GSM44068_MSGT_GET_STATUS = 0x39,
50 OSMO_GSM44068_MSGT_SET_PARAMETER = 0x3a,
51 OSMO_GSM44068_MSGT_IMMEDIATE_SETUP_2 = 0x3b,
52};
53
54/* Table 9.2 priority */
55 enum osmo_gsm44068_priority_level {
56 OSMO_GSM44068_PRIO_LEVEL_4 = 0x1,
57 OSMO_GSM44068_PRIO_LEVEL_3 = 0x2,
58 OSMO_GSM44068_PRIO_LEVEL_2 = 0x3,
59 OSMO_GSM44068_PRIO_LEVEL_1 = 0x4,
60 OSMO_GSM44068_PRIO_LEVEL_0 = 0x5,
61 OSMO_GSM44068_PRIO_LEVEL_B = 0x6,
62 OSMO_GSM44068_PRIO_LEVEL_A = 0x7,
63};
64
65/* 9.4.2 Call State */
66 enum osmo_gsm44068_call_state {
67 OSMO_GSM44068_CSTATE_U0 = 0x0,
68 OSMO_GSM44068_CSTATE_U1 = 0x1,
69 OSMO_GSM44068_CSTATE_U2sl_U2 = 0x2,
70 OSMO_GSM44068_CSTATE_U3 = 0x3,
71 OSMO_GSM44068_CSTATE_U4 = 0x4,
72 OSMO_GSM44068_CSTATE_U5 = 0x5,
73 OSMO_GSM44068_CSTATE_U0p = 0x6,
74 OSMO_GSM44068_CSTATE_U2wr_U6 = 0x7,
75 OSMO_GSM44068_CSTATE_U2r = 0x8,
76 OSMO_GSM44068_CSTATE_U2ws = 0x9,
77 OSMO_GSM44068_CSTATE_U2sr = 0xa,
78 OSMO_GSM44068_CSTATE_U2nc = 0xb,
79};
80
81/* 9.4.3 Cause */
82 enum osmo_gsm44068_cause {
83 OSMO_GSM44068_CAUSE_ILLEGAL_MS = 0x03,
84 OSMO_GSM44068_CAUSE_IMEI_NOT_ACCEPTED = 0x05,
85 OSMO_GSM44068_CAUSE_ILLEGAL_ME = 0x06,
86 OSMO_GSM44068_CAUSE_SERVICE_NOT_AUTHORIZED = 0x08,
87 OSMO_GSM44068_CAUSE_APP_NOT_SUPPORTED_ON_PROTO = 0x09,
88 OSMO_GSM44068_CAUSE_RR_CONNECTION_ABORTED = 0x0a,
89 OSMO_GSM44068_CAUSE_NORMAL_CALL_CLEARING = 0x10,
90 OSMO_GSM44068_CAUSE_NETWORK_FAILURE = 0x11,
91 OSMO_GSM44068_CAUSE_BUSY = 0x14,
92 OSMO_GSM44068_CAUSE_CONGESTION = 0x16,
93 OSMO_GSM44068_CAUSE_USER_NOT_ORIGINATOR = 0x17,
94 OSMO_GSM44068_CAUSE_NET_WANTS_TO_MAINTAIN_CALL = 0x18,
95 OSMO_GSM44068_CAUSE_RESPONSE_TO_GET_STATUS = 0x1e,
96 OSMO_GSM44068_CAUSE_SERVICE_OPTION_NOT_SUBSCR = 0x20,
97 OSMO_GSM44068_CAUSE_REQUESTED_SERVICE_NOT_SUB = 0x21,
98 OSMO_GSM44068_CAUSE_SERVICE_OPTION_OOO = 0x22,
99 OSMO_GSM44068_CAUSE_CALL_CANNOT_BE_IDENTIFIED = 0x26,
100 OSMO_GSM44068_CAUSE_RETRY_UPON_ENTRY_NEW_CALL = 0x30, /* up to 0x3f */
101 OSMO_GSM44068_CAUSE_INVALID_TRANSACTION_ID = 0x51,
102 OSMO_GSM44068_CAUSE_SEMANTICALLY_INCORRECT_MSG = 0x5f,
103 OSMO_GSM44068_CAUSE_INVALID_MANDATORY_INFO = 0x60,
104 OSMO_GSM44068_CAUSE_MESSAGE_TYPE_NON_EXISTENT = 0x61,
105 OSMO_GSM44068_CAUSE_MESSAGE_TYPE_NOT_COMPAT = 0x62,
106 OSMO_GSM44068_CAUSE_IE_NON_EXISTENT = 0x63,
107 OSMO_GSM44068_CAUSE_IE_NOT_COMPAT = 0x64,
108 OSMO_GSM44068_CAUSE_PROTOCOL_ERROR = 0x70,
109};
110
111/* 9.4.4 Originator Indication */
112#define OSMO_GSM44068_OI_MS_IS_ORIGINATOR 0x01
113
114/* 9.4.7 State Attributes */
115#define OSMO_GSM44068_DA_DOWNLINK_ATTACHED 0x08
116#define OSMO_GSM44068_UA_UPLINK_ATTACHED 0x04
117#define OSMO_GSM44068_COMM_T 0x02
118
119/* 9.4.9 Talker Priority */
120 enum osmo_gsm44068_talker_priority {
121 OSMO_GSM44068_PRIO_NORMAL = 0x0,
122 OSMO_GSM44068_PRIO_PRIVILEGED = 0x1,
123 OSMO_GSM44068_PRIO_EMERGENCY = 0x2,
124};
125
126/* 9.4.10 SMS Indications */
127#define OSMO_GSM44068_DC_DATA_CONFIDENTALLY_RQD 0x02
128#define OSMO_GSM44068_GP_GUARANTEED_PRIVACY_RQD 0x01
129
130 extern const struct value_string osmo_gsm44068_msg_type_names[];
131 extern const struct value_string osmo_gsm44068_priority_level_names[];
132 extern const struct value_string osmo_gsm44068_cause_names[];
133 extern const struct value_string osmo_gsm44068_call_state_names[];
134 extern const struct value_string osmo_gsm44068_talker_priority_names[];
135
136 extern const struct tlv_definition osmo_gsm44068_att_tlvdef;
osmo_gsm44068_priority_level_names
const struct value_string osmo_gsm44068_priority_level_names[]
Definition: gsm44068.c:48
osmo_gsm44068_call_state_names
const struct value_string osmo_gsm44068_call_state_names[]
Definition: gsm44068.c:89
osmo_gsm44068_att_tlvdef
const struct tlv_definition osmo_gsm44068_att_tlvdef
Definition: gsm44068.c:112
osmo_gsm44068_talker_priority_names
const struct value_string osmo_gsm44068_talker_priority_names[]
Definition: gsm44068.c:105
osmo_gsm44068_cause
osmo_gsm44068_cause
Definition: gsm_44_068.h:82
OSMO_GSM44068_CAUSE_IE_NON_EXISTENT
@ OSMO_GSM44068_CAUSE_IE_NON_EXISTENT
Definition: gsm_44_068.h:106
OSMO_GSM44068_CAUSE_SERVICE_OPTION_OOO
@ OSMO_GSM44068_CAUSE_SERVICE_OPTION_OOO
Definition: gsm_44_068.h:98
OSMO_GSM44068_CAUSE_IMEI_NOT_ACCEPTED
@ OSMO_GSM44068_CAUSE_IMEI_NOT_ACCEPTED
Definition: gsm_44_068.h:84
OSMO_GSM44068_CAUSE_INVALID_TRANSACTION_ID
@ OSMO_GSM44068_CAUSE_INVALID_TRANSACTION_ID
Definition: gsm_44_068.h:101
OSMO_GSM44068_CAUSE_NET_WANTS_TO_MAINTAIN_CALL
@ OSMO_GSM44068_CAUSE_NET_WANTS_TO_MAINTAIN_CALL
Definition: gsm_44_068.h:94
OSMO_GSM44068_CAUSE_RESPONSE_TO_GET_STATUS
@ OSMO_GSM44068_CAUSE_RESPONSE_TO_GET_STATUS
Definition: gsm_44_068.h:95
OSMO_GSM44068_CAUSE_MESSAGE_TYPE_NOT_COMPAT
@ OSMO_GSM44068_CAUSE_MESSAGE_TYPE_NOT_COMPAT
Definition: gsm_44_068.h:105
OSMO_GSM44068_CAUSE_CONGESTION
@ OSMO_GSM44068_CAUSE_CONGESTION
Definition: gsm_44_068.h:92
OSMO_GSM44068_CAUSE_SERVICE_OPTION_NOT_SUBSCR
@ OSMO_GSM44068_CAUSE_SERVICE_OPTION_NOT_SUBSCR
Definition: gsm_44_068.h:96
OSMO_GSM44068_CAUSE_ILLEGAL_ME
@ OSMO_GSM44068_CAUSE_ILLEGAL_ME
Definition: gsm_44_068.h:85
OSMO_GSM44068_CAUSE_NORMAL_CALL_CLEARING
@ OSMO_GSM44068_CAUSE_NORMAL_CALL_CLEARING
Definition: gsm_44_068.h:89
OSMO_GSM44068_CAUSE_PROTOCOL_ERROR
@ OSMO_GSM44068_CAUSE_PROTOCOL_ERROR
Definition: gsm_44_068.h:108
OSMO_GSM44068_CAUSE_BUSY
@ OSMO_GSM44068_CAUSE_BUSY
Definition: gsm_44_068.h:91
OSMO_GSM44068_CAUSE_APP_NOT_SUPPORTED_ON_PROTO
@ OSMO_GSM44068_CAUSE_APP_NOT_SUPPORTED_ON_PROTO
Definition: gsm_44_068.h:87
OSMO_GSM44068_CAUSE_CALL_CANNOT_BE_IDENTIFIED
@ OSMO_GSM44068_CAUSE_CALL_CANNOT_BE_IDENTIFIED
Definition: gsm_44_068.h:99
OSMO_GSM44068_CAUSE_SEMANTICALLY_INCORRECT_MSG
@ OSMO_GSM44068_CAUSE_SEMANTICALLY_INCORRECT_MSG
Definition: gsm_44_068.h:102
OSMO_GSM44068_CAUSE_RR_CONNECTION_ABORTED
@ OSMO_GSM44068_CAUSE_RR_CONNECTION_ABORTED
Definition: gsm_44_068.h:88
OSMO_GSM44068_CAUSE_USER_NOT_ORIGINATOR
@ OSMO_GSM44068_CAUSE_USER_NOT_ORIGINATOR
Definition: gsm_44_068.h:93
OSMO_GSM44068_CAUSE_INVALID_MANDATORY_INFO
@ OSMO_GSM44068_CAUSE_INVALID_MANDATORY_INFO
Definition: gsm_44_068.h:103
OSMO_GSM44068_CAUSE_REQUESTED_SERVICE_NOT_SUB
@ OSMO_GSM44068_CAUSE_REQUESTED_SERVICE_NOT_SUB
Definition: gsm_44_068.h:97
OSMO_GSM44068_CAUSE_ILLEGAL_MS
@ OSMO_GSM44068_CAUSE_ILLEGAL_MS
Definition: gsm_44_068.h:83
OSMO_GSM44068_CAUSE_NETWORK_FAILURE
@ OSMO_GSM44068_CAUSE_NETWORK_FAILURE
Definition: gsm_44_068.h:90
OSMO_GSM44068_CAUSE_RETRY_UPON_ENTRY_NEW_CALL
@ OSMO_GSM44068_CAUSE_RETRY_UPON_ENTRY_NEW_CALL
Definition: gsm_44_068.h:100
OSMO_GSM44068_CAUSE_MESSAGE_TYPE_NON_EXISTENT
@ OSMO_GSM44068_CAUSE_MESSAGE_TYPE_NON_EXISTENT
Definition: gsm_44_068.h:104
OSMO_GSM44068_CAUSE_IE_NOT_COMPAT
@ OSMO_GSM44068_CAUSE_IE_NOT_COMPAT
Definition: gsm_44_068.h:107
OSMO_GSM44068_CAUSE_SERVICE_NOT_AUTHORIZED
@ OSMO_GSM44068_CAUSE_SERVICE_NOT_AUTHORIZED
Definition: gsm_44_068.h:86
osmo_gsm44068_call_state
osmo_gsm44068_call_state
Definition: gsm_44_068.h:66
OSMO_GSM44068_CSTATE_U0
@ OSMO_GSM44068_CSTATE_U0
Definition: gsm_44_068.h:67
OSMO_GSM44068_CSTATE_U5
@ OSMO_GSM44068_CSTATE_U5
Definition: gsm_44_068.h:72
OSMO_GSM44068_CSTATE_U2wr_U6
@ OSMO_GSM44068_CSTATE_U2wr_U6
Definition: gsm_44_068.h:74
OSMO_GSM44068_CSTATE_U2sl_U2
@ OSMO_GSM44068_CSTATE_U2sl_U2
Definition: gsm_44_068.h:69
OSMO_GSM44068_CSTATE_U2nc
@ OSMO_GSM44068_CSTATE_U2nc
Definition: gsm_44_068.h:78
OSMO_GSM44068_CSTATE_U2ws
@ OSMO_GSM44068_CSTATE_U2ws
Definition: gsm_44_068.h:76
OSMO_GSM44068_CSTATE_U2r
@ OSMO_GSM44068_CSTATE_U2r
Definition: gsm_44_068.h:75
OSMO_GSM44068_CSTATE_U4
@ OSMO_GSM44068_CSTATE_U4
Definition: gsm_44_068.h:71
OSMO_GSM44068_CSTATE_U0p
@ OSMO_GSM44068_CSTATE_U0p
Definition: gsm_44_068.h:73
OSMO_GSM44068_CSTATE_U3
@ OSMO_GSM44068_CSTATE_U3
Definition: gsm_44_068.h:70
OSMO_GSM44068_CSTATE_U1
@ OSMO_GSM44068_CSTATE_U1
Definition: gsm_44_068.h:68
OSMO_GSM44068_CSTATE_U2sr
@ OSMO_GSM44068_CSTATE_U2sr
Definition: gsm_44_068.h:77
osmo_gsm44068_cause_names
const struct value_string osmo_gsm44068_cause_names[]
Definition: gsm44068.c:59
osmo_gsm44068_msg_type
osmo_gsm44068_msg_type
Definition: gsm_44_068.h:41
OSMO_GSM44068_MSGT_TERMINATION_REQUEST
@ OSMO_GSM44068_MSGT_TERMINATION_REQUEST
Definition: gsm_44_068.h:46
OSMO_GSM44068_MSGT_CONNECT
@ OSMO_GSM44068_MSGT_CONNECT
Definition: gsm_44_068.h:44
OSMO_GSM44068_MSGT_STATUS
@ OSMO_GSM44068_MSGT_STATUS
Definition: gsm_44_068.h:48
OSMO_GSM44068_MSGT_GET_STATUS
@ OSMO_GSM44068_MSGT_GET_STATUS
Definition: gsm_44_068.h:49
OSMO_GSM44068_MSGT_IMMEDIATE_SETUP_2
@ OSMO_GSM44068_MSGT_IMMEDIATE_SETUP_2
Definition: gsm_44_068.h:51
OSMO_GSM44068_MSGT_SETUP
@ OSMO_GSM44068_MSGT_SETUP
Definition: gsm_44_068.h:43
OSMO_GSM44068_MSGT_SET_PARAMETER
@ OSMO_GSM44068_MSGT_SET_PARAMETER
Definition: gsm_44_068.h:50
OSMO_GSM44068_MSGT_IMMEDIATE_SETUP
@ OSMO_GSM44068_MSGT_IMMEDIATE_SETUP
Definition: gsm_44_068.h:42
OSMO_GSM44068_MSGT_TERMINATION
@ OSMO_GSM44068_MSGT_TERMINATION
Definition: gsm_44_068.h:45
OSMO_GSM44068_MSGT_TERMINATION_REJECT
@ OSMO_GSM44068_MSGT_TERMINATION_REJECT
Definition: gsm_44_068.h:47
osmo_gsm44068_priority_level
osmo_gsm44068_priority_level
Definition: gsm_44_068.h:55
OSMO_GSM44068_PRIO_LEVEL_A
@ OSMO_GSM44068_PRIO_LEVEL_A
Definition: gsm_44_068.h:62
OSMO_GSM44068_PRIO_LEVEL_1
@ OSMO_GSM44068_PRIO_LEVEL_1
Definition: gsm_44_068.h:59
OSMO_GSM44068_PRIO_LEVEL_4
@ OSMO_GSM44068_PRIO_LEVEL_4
Definition: gsm_44_068.h:56
OSMO_GSM44068_PRIO_LEVEL_B
@ OSMO_GSM44068_PRIO_LEVEL_B
Definition: gsm_44_068.h:61
OSMO_GSM44068_PRIO_LEVEL_0
@ OSMO_GSM44068_PRIO_LEVEL_0
Definition: gsm_44_068.h:60
OSMO_GSM44068_PRIO_LEVEL_3
@ OSMO_GSM44068_PRIO_LEVEL_3
Definition: gsm_44_068.h:57
OSMO_GSM44068_PRIO_LEVEL_2
@ OSMO_GSM44068_PRIO_LEVEL_2
Definition: gsm_44_068.h:58
osmo_gsm44068_talker_priority
osmo_gsm44068_talker_priority
Definition: gsm_44_068.h:120
OSMO_GSM44068_PRIO_NORMAL
@ OSMO_GSM44068_PRIO_NORMAL
Definition: gsm_44_068.h:121
OSMO_GSM44068_PRIO_EMERGENCY
@ OSMO_GSM44068_PRIO_EMERGENCY
Definition: gsm_44_068.h:123
OSMO_GSM44068_PRIO_PRIVILEGED
@ OSMO_GSM44068_PRIO_PRIVILEGED
Definition: gsm_44_068.h:122
osmo_gsm44068_iei
osmo_gsm44068_iei
Definition: gsm_44_068.h:31
OSMO_GSM44068_IEI_TALKER_PRIORITY
@ OSMO_GSM44068_IEI_TALKER_PRIORITY
Definition: gsm_44_068.h:36
OSMO_GSM44068_IEI_SMS_INDICATIONS
@ OSMO_GSM44068_IEI_SMS_INDICATIONS
Definition: gsm_44_068.h:37
OSMO_GSM44068_IEI_CALL_STATE
@ OSMO_GSM44068_IEI_CALL_STATE
Definition: gsm_44_068.h:34
OSMO_GSM44068_IEI_MOBILE_IDENTITY
@ OSMO_GSM44068_IEI_MOBILE_IDENTITY
Definition: gsm_44_068.h:32
OSMO_GSM44068_IEI_USER_USER
@ OSMO_GSM44068_IEI_USER_USER
Definition: gsm_44_068.h:33
OSMO_GSM44068_IEI_STATE_ATTRIBUTES
@ OSMO_GSM44068_IEI_STATE_ATTRIBUTES
Definition: gsm_44_068.h:35
osmo_gsm44068_msg_type_names
const struct value_string osmo_gsm44068_msg_type_names[]
Definition: gsm44068.c:34
tlv_definition
Definition of All 256 IE / TLV.
Definition: tlv.h:527
value_string
utils.h