blob: bc70b93049c5b81192145aec189fb088e94081b7 [file] [log] [blame]
Neels Hofmeyr17518fe2017-06-20 04:35:06 +02001/*! \file gsm_08_58.h
2 * GSM Radio Signalling Link messages on the A-bis interface.
Harald Welteec8b4502010-02-20 20:34:29 +01003 * 3GPP TS 08.58 version 8.6.0 Release 1999 / ETSI TS 100 596 V8.6.0 */
Neels Hofmeyr17518fe2017-06-20 04:35:06 +02004/*
5 * (C) 2008 by Harald Welte <laforge@gnumonks.org>
Harald Welteec8b4502010-02-20 20:34:29 +01006 * All Rights Reserved
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License along
19 * with this program; if not, write to the Free Software Foundation, Inc.,
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 *
22 */
23
Neels Hofmeyr17518fe2017-06-20 04:35:06 +020024#pragma once
25
Harald Welteec8b4502010-02-20 20:34:29 +010026#include <stdint.h>
27
Harald Welte8f2c7e52011-08-17 18:52:03 +020028/*! \addtogroup rsl
29 * @{
Neels Hofmeyr17518fe2017-06-20 04:35:06 +020030 * \file gsm_08_58.h */
Harald Welte8f2c7e52011-08-17 18:52:03 +020031
Neels Hofmeyr87e45502017-06-20 00:17:59 +020032/*! RSL common header */
Harald Welteec8b4502010-02-20 20:34:29 +010033struct abis_rsl_common_hdr {
Neels Hofmeyr87e45502017-06-20 00:17:59 +020034 uint8_t msg_discr; /*!< message discriminator (ABIS_RSL_MDISC_*) */
35 uint8_t msg_type; /*!< message type (\ref abis_rsl_msgtype) */
36 uint8_t data[0]; /*!< actual payload data */
Harald Welteec8b4502010-02-20 20:34:29 +010037} __attribute__ ((packed));
38
Neels Hofmeyr87e45502017-06-20 00:17:59 +020039/* RSL RLL header (Chapter 8.3) */
Harald Welteec8b4502010-02-20 20:34:29 +010040struct abis_rsl_rll_hdr {
41 struct abis_rsl_common_hdr c;
Neels Hofmeyr87e45502017-06-20 00:17:59 +020042 uint8_t ie_chan; /*!< \ref RSL_IE_CHAN_NR (tag) */
43 uint8_t chan_nr; /*!< RSL channel number (value) */
44 uint8_t ie_link_id; /*!< \ref RSL_IE_LINK_IDENT (tag) */
45 uint8_t link_id; /*!< RSL link identifier (value) */
46 uint8_t data[0]; /*!< message payload data */
Harald Welteec8b4502010-02-20 20:34:29 +010047} __attribute__ ((packed));
48
Neels Hofmeyr87e45502017-06-20 00:17:59 +020049/* RSL Dedicated Channel header (Chapter 8.3 and 8.4) */
Harald Welteec8b4502010-02-20 20:34:29 +010050struct abis_rsl_dchan_hdr {
51 struct abis_rsl_common_hdr c;
Neels Hofmeyr87e45502017-06-20 00:17:59 +020052 uint8_t ie_chan; /*!< \ref RSL_IE_CHAN_NR (tag) */
53 uint8_t chan_nr; /*!< RSL channel number (value) */
54 uint8_t data[0]; /*!< message payload data */
Harald Welteec8b4502010-02-20 20:34:29 +010055} __attribute__ ((packed));
56
Neels Hofmeyr87e45502017-06-20 00:17:59 +020057/* RSL Common Channel header (Chapter 8.5) */
Harald Welte6eb7d6c2010-07-13 13:48:13 +020058struct abis_rsl_cchan_hdr {
59 struct abis_rsl_common_hdr c;
Neels Hofmeyr87e45502017-06-20 00:17:59 +020060 uint8_t ie_chan; /*!< \ref RSL_IE_CHAN_NR (tag) */
61 uint8_t chan_nr; /*!< RSL channel number (value) */
62 uint8_t data[0]; /*!< message payload data */
Harald Welte6eb7d6c2010-07-13 13:48:13 +020063} __attribute__ ((packed));
64
Harald Welteec8b4502010-02-20 20:34:29 +010065
66/* Chapter 9.1 */
Neels Hofmeyr87e45502017-06-20 00:17:59 +020067/* RSL Message Discriminator: RLL */
Harald Welteec8b4502010-02-20 20:34:29 +010068#define ABIS_RSL_MDISC_RLL 0x02
Neels Hofmeyr87e45502017-06-20 00:17:59 +020069/* RSL Message Discriminator: Dedicated Channel */
Harald Welteec8b4502010-02-20 20:34:29 +010070#define ABIS_RSL_MDISC_DED_CHAN 0x08
Neels Hofmeyr87e45502017-06-20 00:17:59 +020071/* RSL Message Discriminator: Common Channel */
Harald Welteec8b4502010-02-20 20:34:29 +010072#define ABIS_RSL_MDISC_COM_CHAN 0x0c
Neels Hofmeyr87e45502017-06-20 00:17:59 +020073/* RSL Message Discriminator: TRX Management */
Harald Welteec8b4502010-02-20 20:34:29 +010074#define ABIS_RSL_MDISC_TRX 0x10
Neels Hofmeyr87e45502017-06-20 00:17:59 +020075/* RSL Message Discriminator: Location Service */
Harald Welteec8b4502010-02-20 20:34:29 +010076#define ABIS_RSL_MDISC_LOC 0x20
Neels Hofmeyr87e45502017-06-20 00:17:59 +020077/* RSL Message Discriminator: ip.access */
Harald Welteec8b4502010-02-20 20:34:29 +010078#define ABIS_RSL_MDISC_IPACCESS 0x7e
79#define ABIS_RSL_MDISC_TRANSP 0x01
80
Neels Hofmeyr87e45502017-06-20 00:17:59 +020081/* Check if given RSL message discriminator is transparent */
Harald Welteec8b4502010-02-20 20:34:29 +010082#define ABIS_RSL_MDISC_IS_TRANSP(x) (x & 0x01)
83
Neels Hofmeyr87e45502017-06-20 00:17:59 +020084/* RSL Message Type (Chapter 9.1) */
Harald Welteec8b4502010-02-20 20:34:29 +010085enum abis_rsl_msgtype {
86 /* Radio Link Layer Management */
87 RSL_MT_DATA_REQ = 0x01,
88 RSL_MT_DATA_IND,
89 RSL_MT_ERROR_IND,
90 RSL_MT_EST_REQ,
91 RSL_MT_EST_CONF,
92 RSL_MT_EST_IND,
93 RSL_MT_REL_REQ,
94 RSL_MT_REL_CONF,
95 RSL_MT_REL_IND,
96 RSL_MT_UNIT_DATA_REQ,
97 RSL_MT_UNIT_DATA_IND, /* 0x0b */
Andreas Eversberg816e24c2010-06-25 02:50:56 +020098 RSL_MT_SUSP_REQ, /* non-standard elements */
99 RSL_MT_SUSP_CONF,
100 RSL_MT_RES_REQ,
101 RSL_MT_RECON_REQ, /* 0x0f */
Harald Welteec8b4502010-02-20 20:34:29 +0100102
103 /* Common Channel Management / TRX Management */
104 RSL_MT_BCCH_INFO = 0x11,
105 RSL_MT_CCCH_LOAD_IND,
106 RSL_MT_CHAN_RQD,
107 RSL_MT_DELETE_IND,
108 RSL_MT_PAGING_CMD,
109 RSL_MT_IMMEDIATE_ASSIGN_CMD,
110 RSL_MT_SMS_BC_REQ,
Harald Welte6eb7d6c2010-07-13 13:48:13 +0200111 RSL_MT_CHAN_CONF, /* non-standard element */
Harald Welteec8b4502010-02-20 20:34:29 +0100112 /* empty */
113 RSL_MT_RF_RES_IND = 0x19,
114 RSL_MT_SACCH_FILL,
115 RSL_MT_OVERLOAD,
116 RSL_MT_ERROR_REPORT,
117 RSL_MT_SMS_BC_CMD,
118 RSL_MT_CBCH_LOAD_IND,
119 RSL_MT_NOT_CMD, /* 0x1f */
120
121 /* Dedicate Channel Management */
122 RSL_MT_CHAN_ACTIV = 0x21,
123 RSL_MT_CHAN_ACTIV_ACK,
124 RSL_MT_CHAN_ACTIV_NACK,
125 RSL_MT_CONN_FAIL,
126 RSL_MT_DEACTIVATE_SACCH,
127 RSL_MT_ENCR_CMD,
128 RSL_MT_HANDO_DET,
129 RSL_MT_MEAS_RES,
130 RSL_MT_MODE_MODIFY_REQ,
131 RSL_MT_MODE_MODIFY_ACK,
132 RSL_MT_MODE_MODIFY_NACK,
133 RSL_MT_PHY_CONTEXT_REQ,
134 RSL_MT_PHY_CONTEXT_CONF,
135 RSL_MT_RF_CHAN_REL,
136 RSL_MT_MS_POWER_CONTROL,
137 RSL_MT_BS_POWER_CONTROL, /* 0x30 */
138 RSL_MT_PREPROC_CONFIG,
139 RSL_MT_PREPROC_MEAS_RES,
140 RSL_MT_RF_CHAN_REL_ACK,
141 RSL_MT_SACCH_INFO_MODIFY,
142 RSL_MT_TALKER_DET,
143 RSL_MT_LISTENER_DET,
144 RSL_MT_REMOTE_CODEC_CONF_REP,
145 RSL_MT_RTD_REP,
146 RSL_MT_PRE_HANDO_NOTIF,
147 RSL_MT_MR_CODEC_MOD_REQ,
148 RSL_MT_MR_CODEC_MOD_ACK,
149 RSL_MT_MR_CODEC_MOD_NACK,
150 RSL_MT_MR_CODEC_MOD_PER,
151 RSL_MT_TFO_REP,
152 RSL_MT_TFO_MOD_REQ, /* 0x3f */
153 RSL_MT_LOCATION_INFO = 0x41,
154
155 /* ip.access specific RSL message types */
156 RSL_MT_IPAC_DIR_RETR_ENQ = 0x40,
157 RSL_MT_IPAC_PDCH_ACT = 0x48,
158 RSL_MT_IPAC_PDCH_ACT_ACK,
159 RSL_MT_IPAC_PDCH_ACT_NACK,
160 RSL_MT_IPAC_PDCH_DEACT = 0x4b,
161 RSL_MT_IPAC_PDCH_DEACT_ACK,
162 RSL_MT_IPAC_PDCH_DEACT_NACK,
163 RSL_MT_IPAC_CONNECT_MUX = 0x50,
164 RSL_MT_IPAC_CONNECT_MUX_ACK,
165 RSL_MT_IPAC_CONNECT_MUX_NACK,
166 RSL_MT_IPAC_BIND_MUX = 0x53,
167 RSL_MT_IPAC_BIND_MUX_ACK,
168 RSL_MT_IPAC_BIND_MUX_NACK,
169 RSL_MT_IPAC_DISC_MUX = 0x56,
170 RSL_MT_IPAC_DISC_MUX_ACK,
171 RSL_MT_IPAC_DISC_MUX_NACK,
172 RSL_MT_IPAC_CRCX = 0x70, /* Bind to local BTS RTP port */
173 RSL_MT_IPAC_CRCX_ACK,
174 RSL_MT_IPAC_CRCX_NACK,
175 RSL_MT_IPAC_MDCX = 0x73,
176 RSL_MT_IPAC_MDCX_ACK,
177 RSL_MT_IPAC_MDCX_NACK,
178 RSL_MT_IPAC_DLCX_IND = 0x76,
179 RSL_MT_IPAC_DLCX = 0x77,
180 RSL_MT_IPAC_DLCX_ACK,
181 RSL_MT_IPAC_DLCX_NACK,
182};
183
Neels Hofmeyr87e45502017-06-20 00:17:59 +0200184/*! Siemens vendor-specific RSL message types */
Harald Welteec8b4502010-02-20 20:34:29 +0100185enum abis_rsl_msgtype_siemens {
186 RSL_MT_SIEMENS_MRPCI = 0x41,
187 RSL_MT_SIEMENS_INTRAC_HO_COND_IND = 0x42,
188 RSL_MT_SIEMENS_INTERC_HO_COND_IND = 0x43,
189 RSL_MT_SIEMENS_FORCED_HO_REQ = 0x44,
190 RSL_MT_SIEMENS_PREF_AREA_REQ = 0x45,
191 RSL_MT_SIEMENS_PREF_AREA = 0x46,
192 RSL_MT_SIEMENS_START_TRACE = 0x47,
193 RSL_MT_SIEMENS_START_TRACE_ACK = 0x48,
194 RSL_MT_SIEMENS_STOP_TRACE = 0x49,
195 RSL_MT_SIEMENS_TRMR = 0x4a,
196 RSL_MT_SIEMENS_HO_FAIL_IND = 0x4b,
197 RSL_MT_SIEMENS_STOP_TRACE_ACK = 0x4c,
198 RSL_MT_SIEMENS_UPLF = 0x4d,
199 RSL_MT_SIEMENS_UPLB = 0x4e,
200 RSL_MT_SIEMENS_SET_SYS_INFO_10 = 0x4f,
201 RSL_MT_SIEMENS_MODIF_COND_IND = 0x50,
202};
203
Neels Hofmeyr87e45502017-06-20 00:17:59 +0200204/*! RSL Information Element Identifiers (Chapter 9.3) */
Harald Welteec8b4502010-02-20 20:34:29 +0100205enum abis_rsl_ie {
206 RSL_IE_CHAN_NR = 0x01,
207 RSL_IE_LINK_IDENT,
208 RSL_IE_ACT_TYPE,
209 RSL_IE_BS_POWER,
210 RSL_IE_CHAN_IDENT,
211 RSL_IE_CHAN_MODE,
212 RSL_IE_ENCR_INFO,
213 RSL_IE_FRAME_NUMBER,
214 RSL_IE_HANDO_REF,
215 RSL_IE_L1_INFO,
216 RSL_IE_L3_INFO,
217 RSL_IE_MS_IDENTITY,
218 RSL_IE_MS_POWER,
219 RSL_IE_PAGING_GROUP,
220 RSL_IE_PAGING_LOAD,
221 RSL_IE_PYHS_CONTEXT = 0x10,
222 RSL_IE_ACCESS_DELAY,
223 RSL_IE_RACH_LOAD,
224 RSL_IE_REQ_REFERENCE,
225 RSL_IE_RELEASE_MODE,
226 RSL_IE_RESOURCE_INFO,
227 RSL_IE_RLM_CAUSE,
228 RSL_IE_STARTNG_TIME,
229 RSL_IE_TIMING_ADVANCE,
230 RSL_IE_UPLINK_MEAS,
231 RSL_IE_CAUSE,
232 RSL_IE_MEAS_RES_NR,
233 RSL_IE_MSG_ID,
234 /* reserved */
235 RSL_IE_SYSINFO_TYPE = 0x1e,
236 RSL_IE_MS_POWER_PARAM,
237 RSL_IE_BS_POWER_PARAM,
238 RSL_IE_PREPROC_PARAM,
239 RSL_IE_PREPROC_MEAS,
240 RSL_IE_IMM_ASS_INFO, /* Phase 1 (3.6.0), later Full below */
241 RSL_IE_SMSCB_INFO = 0x24,
242 RSL_IE_MS_TIMING_OFFSET,
243 RSL_IE_ERR_MSG,
244 RSL_IE_FULL_BCCH_INFO,
245 RSL_IE_CHAN_NEEDED,
246 RSL_IE_CB_CMD_TYPE,
247 RSL_IE_SMSCB_MSG,
248 RSL_IE_FULL_IMM_ASS_INFO,
249 RSL_IE_SACCH_INFO,
250 RSL_IE_CBCH_LOAD_INFO,
251 RSL_IE_SMSCB_CHAN_INDICATOR,
252 RSL_IE_GROUP_CALL_REF,
253 RSL_IE_CHAN_DESC = 0x30,
254 RSL_IE_NCH_DRX_INFO,
255 RSL_IE_CMD_INDICATOR,
256 RSL_IE_EMLPP_PRIO,
257 RSL_IE_UIC,
258 RSL_IE_MAIN_CHAN_REF,
259 RSL_IE_MR_CONFIG,
260 RSL_IE_MR_CONTROL,
261 RSL_IE_SUP_CODEC_TYPES,
262 RSL_IE_CODEC_CONFIG,
263 RSL_IE_RTD,
264 RSL_IE_TFO_STATUS,
265 RSL_IE_LLP_APDU,
266 /* Siemens vendor-specific */
267 RSL_IE_SIEMENS_MRPCI = 0x40,
268 RSL_IE_SIEMENS_PREF_AREA_TYPE = 0x43,
269 RSL_IE_SIEMENS_ININ_CELL_HO_PAR = 0x45,
270 RSL_IE_SIEMENS_TRACE_REF_NR = 0x46,
271 RSL_IE_SIEMENS_INT_TRACE_IDX = 0x47,
272 RSL_IE_SIEMENS_L2_HDR_INFO = 0x48,
273 RSL_IE_SIEMENS_HIGHEST_RATE = 0x4e,
274 RSL_IE_SIEMENS_SUGGESTED_RATE = 0x4f,
275
276 /* ip.access */
277 RSL_IE_IPAC_SRTP_CONFIG = 0xe0,
278 RSL_IE_IPAC_PROXY_UDP = 0xe1,
279 RSL_IE_IPAC_BSCMPL_TOUT = 0xe2,
280 RSL_IE_IPAC_REMOTE_IP = 0xf0,
281 RSL_IE_IPAC_REMOTE_PORT = 0xf1,
282 RSL_IE_IPAC_RTP_PAYLOAD = 0xf2,
283 RSL_IE_IPAC_LOCAL_PORT = 0xf3,
284 RSL_IE_IPAC_SPEECH_MODE = 0xf4,
285 RSL_IE_IPAC_LOCAL_IP = 0xf5,
286 RSL_IE_IPAC_CONN_STAT = 0xf6,
287 RSL_IE_IPAC_HO_C_PARMS = 0xf7,
288 RSL_IE_IPAC_CONN_ID = 0xf8,
289 RSL_IE_IPAC_RTP_CSD_FMT = 0xf9,
290 RSL_IE_IPAC_RTP_JIT_BUF = 0xfa,
291 RSL_IE_IPAC_RTP_COMPR = 0xfb,
292 RSL_IE_IPAC_RTP_PAYLOAD2= 0xfc,
293 RSL_IE_IPAC_RTP_MPLEX = 0xfd,
294 RSL_IE_IPAC_RTP_MPLEX_ID= 0xfe,
295};
296
Harald Welte6e363e72016-11-16 16:58:52 +0100297/* Ericsson specific IEs, clash with above partially, so they're not
298 * part of the enum */
299#define RSL_IE_ERIC_INST_NR 0x48
300#define RSL_IE_ERIC_PGSL_TIMERS 0x49
301#define RSL_IE_ERIC_REPEAT_DL_FACCH 0x4a
302#define RSL_IE_ERIC_POWER_INFO 0xf0
303#define RSL_IE_ERIC_MOBILE_ID 0xf1
304#define RSL_IE_ERIC_BCCH_MAPPING 0xf2
305#define RSL_IE_ERIC_PACKET_PAG_IND 0xf3
306#define RSL_IE_ERIC_CNTR_CTRL 0xf4
307#define RSL_IE_ERIC_CNTR_CTRL_ACK 0xf5
308#define RSL_IE_ERIC_CNTR_REPORT 0xf6
309#define RSL_IE_ERIC_ICP_CONN 0xf7
310#define RSL_IE_ERIC_EMR_SUPPORT 0xf8
311#define RSL_IE_ERIC_EGPRS_REQ_REF 0xf9
312#define RSL_IE_ERIC_VGCS_REL 0xfa
313#define RSL_IE_ERIC_REP_PER_NCH 0xfb
314#define RSL_IE_ERIC_NY2 0xfc
315#define RSL_IE_ERIC_T3115 0xfd
316#define RSL_IE_ERIC_ACTIVATE_FLAG 0xfe
317#define RSL_IE_ERIC_FULL_NCH_INFO 0xff
318
Harald Welteec8b4502010-02-20 20:34:29 +0100319/* Chapter 9.3.1 */
320#define RSL_CHAN_NR_MASK 0xf8
Neels Hofmeyr15b96ff2016-07-18 23:33:48 +0200321#define RSL_CHAN_NR_1 0x08 /*< bit to add for 2nd,... lchan */
Harald Welteec8b4502010-02-20 20:34:29 +0100322#define RSL_CHAN_Bm_ACCHs 0x08
323#define RSL_CHAN_Lm_ACCHs 0x10 /* .. 0x18 */
324#define RSL_CHAN_SDCCH4_ACCH 0x20 /* .. 0x38 */
325#define RSL_CHAN_SDCCH8_ACCH 0x40 /* ...0x78 */
326#define RSL_CHAN_BCCH 0x80
327#define RSL_CHAN_RACH 0x88
328#define RSL_CHAN_PCH_AGCH 0x90
Neels Hofmeyrfd80f5a2016-07-14 03:21:05 +0200329#define RSL_CHAN_OSMO_PDCH 0xc0 /*< non-standard, for dyn TS */
Harald Welteec8b4502010-02-20 20:34:29 +0100330
331/* Chapter 9.3.3 */
332#define RSL_ACT_TYPE_INITIAL 0x00
333#define RSL_ACT_TYPE_REACT 0x80
334#define RSL_ACT_INTRA_IMM_ASS 0x00
335#define RSL_ACT_INTRA_NORM_ASS 0x01
336#define RSL_ACT_INTER_ASYNC 0x02
337#define RSL_ACT_INTER_SYNC 0x03
338#define RSL_ACT_SECOND_ADD 0x04
339#define RSL_ACT_SECOND_MULTI 0x05
Neels Hofmeyrfd80f5a2016-07-14 03:21:05 +0200340#define RSL_ACT_OSMO_PDCH 0x0f /*< non-standard, for dyn TS */
Harald Welteec8b4502010-02-20 20:34:29 +0100341
Neels Hofmeyr87e45502017-06-20 00:17:59 +0200342/*! RSL Channel Mode IF (Chapter 9.3.6) */
Harald Welteec8b4502010-02-20 20:34:29 +0100343struct rsl_ie_chan_mode {
344 uint8_t dtx_dtu;
345 uint8_t spd_ind;
346 uint8_t chan_rt;
347 uint8_t chan_rate;
348} __attribute__ ((packed));
349#define RSL_CMOD_DTXu 0x01 /* uplink */
350#define RSL_CMOD_DTXd 0x02 /* downlink */
351enum rsl_cmod_spd {
352 RSL_CMOD_SPD_SPEECH = 0x01,
353 RSL_CMOD_SPD_DATA = 0x02,
354 RSL_CMOD_SPD_SIGN = 0x03,
355};
356#define RSL_CMOD_CRT_SDCCH 0x01
357#define RSL_CMOD_CRT_TCH_Bm 0x08 /* full-rate */
358#define RSL_CMOD_CRT_TCH_Lm 0x09 /* half-rate */
359/* FIXME: More CRT types */
360/* Speech */
361#define RSL_CMOD_SP_GSM1 0x01
362#define RSL_CMOD_SP_GSM2 0x11
363#define RSL_CMOD_SP_GSM3 0x21
Harald Welteeed26112012-08-24 15:35:34 +0200364/* non-transparent data */
365#define RSL_CMOD_CSD_NT_43k5 0x74
366#define RSL_CMOD_CSD_NT_28k8 0x71
367#define RSL_CMOD_CSD_NT_14k5 0x58
368#define RSL_CMOD_CSD_NT_12k0 0x50
369#define RSL_CMOD_CSD_NT_6k0 0x51
370/* legacy #defines with wrong name */
371#define RSL_CMOD_SP_NT_14k5 RSL_CMOD_CSD_NT_14k5
372#define RSL_CMOD_SP_NT_12k0 RSL_CMOD_CSD_NT_12k0
373#define RSL_CMOD_SP_NT_6k0 RSL_CMOD_CSD_NT_6k0
374/* transparent data */
375#define RSL_CMOD_CSD_T_32000 0x38
376#define RSL_CMOD_CSD_T_29000 0x39
377#define RSL_CMOD_CSD_T_14400 0x18
378#define RSL_CMOD_CSD_T_9600 0x10
379#define RSL_CMOD_CSD_T_4800 0x11
380#define RSL_CMOD_CSD_T_2400 0x12
381#define RSL_CMOD_CSD_T_1200 0x13
382#define RSL_CMOD_CSD_T_600 0x14
383#define RSL_CMOD_CSD_T_1200_75 0x15
Harald Welteec8b4502010-02-20 20:34:29 +0100384
Neels Hofmeyr87e45502017-06-20 00:17:59 +0200385/*! RSL Channel Identification IE (Chapter 9.3.5) */
Harald Welteec8b4502010-02-20 20:34:29 +0100386struct rsl_ie_chan_ident {
387 /* GSM 04.08 10.5.2.5 */
388 struct {
389 uint8_t iei;
390 uint8_t chan_nr; /* enc_chan_nr */
391 uint8_t oct3;
392 uint8_t oct4;
393 } chan_desc;
394#if 0 /* spec says we need this but Abissim doesn't use it */
395 struct {
396 uint8_t tag;
397 uint8_t len;
398 } mobile_alloc;
399#endif
400} __attribute__ ((packed));
401
402/* Chapter 9.3.22 */
403#define RLL_CAUSE_T200_EXPIRED 0x01
404#define RLL_CAUSE_REEST_REQ 0x02
405#define RLL_CAUSE_UNSOL_UA_RESP 0x03
406#define RLL_CAUSE_UNSOL_DM_RESP 0x04
407#define RLL_CAUSE_UNSOL_DM_RESP_MF 0x05
408#define RLL_CAUSE_UNSOL_SPRV_RESP 0x06
409#define RLL_CAUSE_SEQ_ERR 0x07
410#define RLL_CAUSE_UFRM_INC_PARAM 0x08
411#define RLL_CAUSE_SFRM_INC_PARAM 0x09
412#define RLL_CAUSE_IFRM_INC_MBITS 0x0a
413#define RLL_CAUSE_IFRM_INC_LEN 0x0b
414#define RLL_CAUSE_FRM_UNIMPL 0x0c
415#define RLL_CAUSE_SABM_MF 0x0d
416#define RLL_CAUSE_SABM_INFO_NOTALL 0x0e
417
418/* Chapter 9.3.26 */
419#define RSL_ERRCLS_NORMAL 0x00
420#define RSL_ERRCLS_RESOURCE_UNAVAIL 0x20
421#define RSL_ERRCLS_SERVICE_UNAVAIL 0x30
422#define RSL_ERRCLS_SERVICE_UNIMPL 0x40
423#define RSL_ERRCLS_INVAL_MSG 0x50
424#define RSL_ERRCLS_PROTO_ERROR 0x60
425#define RSL_ERRCLS_INTERWORKING 0x70
426
427/* normal event */
428#define RSL_ERR_RADIO_IF_FAIL 0x00
429#define RSL_ERR_RADIO_LINK_FAIL 0x01
430#define RSL_ERR_HANDOVER_ACC_FAIL 0x02
431#define RSL_ERR_TALKER_ACC_FAIL 0x03
432#define RSL_ERR_OM_INTERVENTION 0x07
433#define RSL_ERR_NORMAL_UNSPEC 0x0f
434#define RSL_ERR_T_MSRFPCI_EXP 0x18
435/* resource unavailable */
436#define RSL_ERR_EQUIPMENT_FAIL 0x20
437#define RSL_ERR_RR_UNAVAIL 0x21
438#define RSL_ERR_TERR_CH_FAIL 0x22
439#define RSL_ERR_CCCH_OVERLOAD 0x23
440#define RSL_ERR_ACCH_OVERLOAD 0x24
441#define RSL_ERR_PROCESSOR_OVERLOAD 0x25
442#define RSL_ERR_RES_UNAVAIL 0x2f
443/* service or option not available */
444#define RSL_ERR_TRANSC_UNAVAIL 0x30
445#define RSL_ERR_SERV_OPT_UNAVAIL 0x3f
446/* service or option not implemented */
447#define RSL_ERR_ENCR_UNIMPL 0x40
448#define RSL_ERR_SERV_OPT_UNIMPL 0x4f
449/* invalid message */
450#define RSL_ERR_RCH_ALR_ACTV_ALLOC 0x50
451#define RSL_ERR_INVALID_MESSAGE 0x5f
452/* protocol error */
453#define RSL_ERR_MSG_DISCR 0x60
454#define RSL_ERR_MSG_TYPE 0x61
455#define RSL_ERR_MSG_SEQ 0x62
456#define RSL_ERR_IE_ERROR 0x63
457#define RSL_ERR_MAND_IE_ERROR 0x64
458#define RSL_ERR_OPT_IE_ERROR 0x65
459#define RSL_ERR_IE_NONEXIST 0x66
460#define RSL_ERR_IE_LENGTH 0x67
461#define RSL_ERR_IE_CONTENT 0x68
462#define RSL_ERR_PROTO 0x6f
463/* interworking */
464#define RSL_ERR_INTERWORKING 0x7f
465
466/* Chapter 9.3.30 */
467#define RSL_SYSTEM_INFO_8 0x00
468#define RSL_SYSTEM_INFO_1 0x01
469#define RSL_SYSTEM_INFO_2 0x02
470#define RSL_SYSTEM_INFO_3 0x03
471#define RSL_SYSTEM_INFO_4 0x04
472#define RSL_SYSTEM_INFO_5 0x05
473#define RSL_SYSTEM_INFO_6 0x06
474#define RSL_SYSTEM_INFO_7 0x07
475#define RSL_SYSTEM_INFO_16 0x08
476#define RSL_SYSTEM_INFO_17 0x09
477#define RSL_SYSTEM_INFO_2bis 0x0a
478#define RSL_SYSTEM_INFO_2ter 0x0b
479#define RSL_SYSTEM_INFO_5bis 0x0d
480#define RSL_SYSTEM_INFO_5ter 0x0e
481#define RSL_SYSTEM_INFO_10 0x0f
Harald Welte3d732272011-06-25 21:39:01 +0200482#define RSL_EXT_MEAS_ORDER 0x47
Harald Welteec8b4502010-02-20 20:34:29 +0100483#define RSL_MEAS_INFO 0x48
484#define RSL_SYSTEM_INFO_13 0x28
Philipp00b15392016-11-14 12:34:15 +0100485#define RSL_ERIC_SYSTEM_INFO_13 0x0C
Harald Welteec8b4502010-02-20 20:34:29 +0100486#define RSL_SYSTEM_INFO_2quater 0x29
487#define RSL_SYSTEM_INFO_9 0x2a
488#define RSL_SYSTEM_INFO_18 0x2b
489#define RSL_SYSTEM_INFO_19 0x2c
490#define RSL_SYSTEM_INFO_20 0x2d
491
492/* Chapter 9.3.40 */
493#define RSL_CHANNEED_ANY 0x00
494#define RSL_CHANNEED_SDCCH 0x01
495#define RSL_CHANNEED_TCH_F 0x02
496#define RSL_CHANNEED_TCH_ForH 0x03
497
Neels Hofmeyr87e45502017-06-20 00:17:59 +0200498/*! RSL Cell Broadcast Command (Chapter 9.3.45) */
Alex Badea84930182010-11-27 23:34:46 +0200499struct rsl_ie_cb_cmd_type {
500 uint8_t last_block:2;
501 uint8_t spare:1;
502 uint8_t def_bcast:1;
503 uint8_t command:4;
504} __attribute__ ((packed));
505/* ->command */
506#define RSL_CB_CMD_TYPE_NORMAL 0x00
507#define RSL_CB_CMD_TYPE_SCHEDULE 0x08
508#define RSL_CB_CMD_TYPE_DEFAULT 0x0e
509#define RSL_CB_CMD_TYPE_NULL 0x0f
510/* ->def_bcast */
511#define RSL_CB_CMD_DEFBCAST_NORMAL 0
512#define RSL_CB_CMD_DEFBCAST_NULL 1
513/* ->last_block */
514#define RSL_CB_CMD_LASTBLOCK_4 0
515#define RSL_CB_CMD_LASTBLOCK_1 1
516#define RSL_CB_CMD_LASTBLOCK_2 2
517#define RSL_CB_CMD_LASTBLOCK_3 3
518
Harald Welteec8b4502010-02-20 20:34:29 +0100519/* Chapter 3.3.2.3 Brocast control channel */
520/* CCCH-CONF, NC is not combined */
521#define RSL_BCCH_CCCH_CONF_1_NC 0x00
522#define RSL_BCCH_CCCH_CONF_1_C 0x01
523#define RSL_BCCH_CCCH_CONF_2_NC 0x02
524#define RSL_BCCH_CCCH_CONF_3_NC 0x04
525#define RSL_BCCH_CCCH_CONF_4_NC 0x06
526
527/* BS-PA-MFRMS */
528#define RSL_BS_PA_MFRMS_2 0x00
529#define RSL_BS_PA_MFRMS_3 0x01
530#define RSL_BS_PA_MFRMS_4 0x02
531#define RSL_BS_PA_MFRMS_5 0x03
532#define RSL_BS_PA_MFRMS_6 0x04
533#define RSL_BS_PA_MFRMS_7 0x05
534#define RSL_BS_PA_MFRMS_8 0x06
535#define RSL_BS_PA_MFRMS_9 0x07
536
537/* RSL_IE_IPAC_RTP_PAYLOAD[2] */
538enum rsl_ipac_rtp_payload {
539 RSL_IPAC_RTP_GSM = 1,
540 RSL_IPAC_RTP_EFR,
541 RSL_IPAC_RTP_AMR,
542 RSL_IPAC_RTP_CSD,
543 RSL_IPAC_RTP_MUX,
544};
545
546/* RSL_IE_IPAC_SPEECH_MODE, lower four bits */
547enum rsl_ipac_speech_mode_s {
548 RSL_IPAC_SPEECH_GSM_FR = 0, /* GSM FR (Type 1, FS) */
549 RSL_IPAC_SPEECH_GSM_EFR = 1, /* GSM EFR (Type 2, FS) */
550 RSL_IPAC_SPEECH_GSM_AMR_FR = 2, /* GSM AMR/FR (Type 3, FS) */
551 RSL_IPAC_SPEECH_GSM_HR = 3, /* GSM HR (Type 1, HS) */
552 RSL_IPAC_SPEECH_GSM_AMR_HR = 5, /* GSM AMR/hr (Type 3, HS) */
553 RSL_IPAC_SPEECH_AS_RTP = 0xf, /* As specified by RTP Payload IE */
554};
555/* RSL_IE_IPAC_SPEECH_MODE, upper four bits */
556enum rsl_ipac_speech_mode_m {
557 RSL_IPAC_SPEECH_M_RXTX = 0, /* Send and Receive */
558 RSL_IPAC_SPEECH_M_RX = 1, /* Receive only */
559 RSL_IPAC_SPEECH_M_TX = 2, /* Send only */
560};
561
562/* RSL_IE_IPAC_RTP_CSD_FMT, lower four bits */
563enum rsl_ipac_rtp_csd_format_d {
564 RSL_IPAC_RTP_CSD_EXT_TRAU = 0,
565 RSL_IPAC_RTP_CSD_NON_TRAU = 1,
566 RSL_IPAC_RTP_CSD_TRAU_BTS = 2,
567 RSL_IPAC_RTP_CSD_IWF_FREE = 3,
568};
569/* RSL_IE_IPAC_RTP_CSD_FMT, upper four bits */
570enum rsl_ipac_rtp_csd_format_ir {
571 RSL_IPAC_RTP_CSD_IR_8k = 0,
572 RSL_IPAC_RTP_CSD_IR_16k = 1,
573 RSL_IPAC_RTP_CSD_IR_32k = 2,
574 RSL_IPAC_RTP_CSD_IR_64k = 3,
575};
576
577/* Siemens vendor-specific RSL extensions */
578struct rsl_mrpci {
579 uint8_t power_class:3,
580 vgcs_capable:1,
581 vbs_capable:1,
582 gsm_phase:2;
583} __attribute__ ((packed));
584
585enum rsl_mrpci_pwrclass {
586 RSL_MRPCI_PWRC_1 = 0,
587 RSL_MRPCI_PWRC_2 = 1,
588 RSL_MRPCI_PWRC_3 = 2,
589 RSL_MRPCI_PWRC_4 = 3,
590 RSL_MRPCI_PWRC_5 = 4,
591};
592enum rsl_mrpci_phase {
593 RSL_MRPCI_PHASE_1 = 0,
594 /* reserved */
595 RSL_MRPCI_PHASE_2 = 2,
596 RSL_MRPCI_PHASE_2PLUS = 3,
597};
598
Holger Hans Peter Freyther0357e9b2012-12-06 11:57:31 +0100599/* 9.3.20 Release Mode */
600enum rsl_rel_mode {
601 RSL_REL_NORMAL = 0,
602 RSL_REL_LOCAL_END = 1,
603};
604
Neels Hofmeyr87e45502017-06-20 00:17:59 +0200605/*! ip.access specific embedded information elements */
Harald Weltefad57522015-12-13 11:56:36 +0100606enum rsl_ipac_embedded_ie {
607 RSL_IPAC_EIE_RXLEV = 0x00,
608 RSL_IPAC_EIE_RXQUAL = 0x01,
609 RSL_IPAC_EIE_FREQ_ERR = 0x02,
610 RSL_IPAC_EIE_TIMING_ERR = 0x03,
611 RSL_IPAC_EIE_MEAS_AVG_CFG = 0x04,
612 RSL_IPAC_EIE_BS_PWR_CTL = 0x05,
613 RSL_IPAC_EIE_MS_PWR_CTL = 0x06,
614 RSL_IPAC_EIE_HANDO_THRESH = 0x07,
615 RSL_IPAC_EIE_NCELL_DEFAULTS = 0x08,
616 RSL_IPAC_EIE_NCELL_LIST = 0x09,
617 RSL_IPAC_EIE_PC_THRESH_COMP = 0x0a,
618 RSL_IPAC_EIE_HO_THRESH_COMP = 0x0b,
619 RSL_IPAC_EIE_HO_CAUSE = 0x0c,
620 RSL_IPAC_EIE_HO_CANDIDATES = 0x0d,
621 RSL_IPAC_EIE_NCELL_BA_CHG_LIST = 0x0e,
622 RSL_IPAC_EIE_NUM_OF_MS = 0x10,
623 RSL_IPAC_EIE_HO_CAND_EXT = 0x11,
624 RSL_IPAC_EIE_NCELL_DEF_EXT = 0x12,
625 RSL_IPAC_EIE_NCELL_LIST_EXT = 0x13,
626 RSL_IPAC_EIE_MASTER_KEY = 0x14,
627 RSL_IPAC_EIE_MASTER_SALT = 0x15,
628};
629
Sylvain Munautdca7d2c2012-04-18 21:53:23 +0200630/*! @} */