blob: 7dc3569342d2cf2e8f61353ca38f34a288f1b048 [file] [log] [blame]
Harald Welteec8b4502010-02-20 20:34:29 +01001#ifndef PROTO_GSM_08_58_H
2#define PROTO_GSM_08_58_H
3
4/* GSM Radio Signalling Link messages on the A-bis interface
5 * 3GPP TS 08.58 version 8.6.0 Release 1999 / ETSI TS 100 596 V8.6.0 */
6
7/* (C) 2008 by Harald Welte <laforge@gnumonks.org>
8 * All Rights Reserved
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License along
21 * with this program; if not, write to the Free Software Foundation, Inc.,
22 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 *
24 */
25
26#include <stdint.h>
27
28struct abis_rsl_common_hdr {
29 uint8_t msg_discr;
30 uint8_t msg_type;
31 uint8_t data[0];
32} __attribute__ ((packed));
33
34/* Chapter 8.3 */
35struct abis_rsl_rll_hdr {
36 struct abis_rsl_common_hdr c;
37 uint8_t ie_chan;
38 uint8_t chan_nr;
39 uint8_t ie_link_id;
40 uint8_t link_id;
41 uint8_t data[0];
42} __attribute__ ((packed));
43
44/* Chapter 8.3 and 8.4 */
45struct abis_rsl_dchan_hdr {
46 struct abis_rsl_common_hdr c;
47 uint8_t ie_chan;
48 uint8_t chan_nr;
49 uint8_t data[0];
50} __attribute__ ((packed));
51
52
53/* Chapter 9.1 */
54#define ABIS_RSL_MDISC_RLL 0x02
55#define ABIS_RSL_MDISC_DED_CHAN 0x08
56#define ABIS_RSL_MDISC_COM_CHAN 0x0c
57#define ABIS_RSL_MDISC_TRX 0x10
58#define ABIS_RSL_MDISC_LOC 0x20
59#define ABIS_RSL_MDISC_IPACCESS 0x7e
60#define ABIS_RSL_MDISC_TRANSP 0x01
61
62#define ABIS_RSL_MDISC_IS_TRANSP(x) (x & 0x01)
63
64/* Chapter 9.1 */
65enum abis_rsl_msgtype {
66 /* Radio Link Layer Management */
67 RSL_MT_DATA_REQ = 0x01,
68 RSL_MT_DATA_IND,
69 RSL_MT_ERROR_IND,
70 RSL_MT_EST_REQ,
71 RSL_MT_EST_CONF,
72 RSL_MT_EST_IND,
73 RSL_MT_REL_REQ,
74 RSL_MT_REL_CONF,
75 RSL_MT_REL_IND,
76 RSL_MT_UNIT_DATA_REQ,
77 RSL_MT_UNIT_DATA_IND, /* 0x0b */
Andreas Eversberg816e24c2010-06-25 02:50:56 +020078 RSL_MT_SUSP_REQ, /* non-standard elements */
79 RSL_MT_SUSP_CONF,
80 RSL_MT_RES_REQ,
81 RSL_MT_RECON_REQ, /* 0x0f */
Harald Welteec8b4502010-02-20 20:34:29 +010082
83 /* Common Channel Management / TRX Management */
84 RSL_MT_BCCH_INFO = 0x11,
85 RSL_MT_CCCH_LOAD_IND,
86 RSL_MT_CHAN_RQD,
87 RSL_MT_DELETE_IND,
88 RSL_MT_PAGING_CMD,
89 RSL_MT_IMMEDIATE_ASSIGN_CMD,
90 RSL_MT_SMS_BC_REQ,
91 /* empty */
92 RSL_MT_RF_RES_IND = 0x19,
93 RSL_MT_SACCH_FILL,
94 RSL_MT_OVERLOAD,
95 RSL_MT_ERROR_REPORT,
96 RSL_MT_SMS_BC_CMD,
97 RSL_MT_CBCH_LOAD_IND,
98 RSL_MT_NOT_CMD, /* 0x1f */
99
100 /* Dedicate Channel Management */
101 RSL_MT_CHAN_ACTIV = 0x21,
102 RSL_MT_CHAN_ACTIV_ACK,
103 RSL_MT_CHAN_ACTIV_NACK,
104 RSL_MT_CONN_FAIL,
105 RSL_MT_DEACTIVATE_SACCH,
106 RSL_MT_ENCR_CMD,
107 RSL_MT_HANDO_DET,
108 RSL_MT_MEAS_RES,
109 RSL_MT_MODE_MODIFY_REQ,
110 RSL_MT_MODE_MODIFY_ACK,
111 RSL_MT_MODE_MODIFY_NACK,
112 RSL_MT_PHY_CONTEXT_REQ,
113 RSL_MT_PHY_CONTEXT_CONF,
114 RSL_MT_RF_CHAN_REL,
115 RSL_MT_MS_POWER_CONTROL,
116 RSL_MT_BS_POWER_CONTROL, /* 0x30 */
117 RSL_MT_PREPROC_CONFIG,
118 RSL_MT_PREPROC_MEAS_RES,
119 RSL_MT_RF_CHAN_REL_ACK,
120 RSL_MT_SACCH_INFO_MODIFY,
121 RSL_MT_TALKER_DET,
122 RSL_MT_LISTENER_DET,
123 RSL_MT_REMOTE_CODEC_CONF_REP,
124 RSL_MT_RTD_REP,
125 RSL_MT_PRE_HANDO_NOTIF,
126 RSL_MT_MR_CODEC_MOD_REQ,
127 RSL_MT_MR_CODEC_MOD_ACK,
128 RSL_MT_MR_CODEC_MOD_NACK,
129 RSL_MT_MR_CODEC_MOD_PER,
130 RSL_MT_TFO_REP,
131 RSL_MT_TFO_MOD_REQ, /* 0x3f */
132 RSL_MT_LOCATION_INFO = 0x41,
133
134 /* ip.access specific RSL message types */
135 RSL_MT_IPAC_DIR_RETR_ENQ = 0x40,
136 RSL_MT_IPAC_PDCH_ACT = 0x48,
137 RSL_MT_IPAC_PDCH_ACT_ACK,
138 RSL_MT_IPAC_PDCH_ACT_NACK,
139 RSL_MT_IPAC_PDCH_DEACT = 0x4b,
140 RSL_MT_IPAC_PDCH_DEACT_ACK,
141 RSL_MT_IPAC_PDCH_DEACT_NACK,
142 RSL_MT_IPAC_CONNECT_MUX = 0x50,
143 RSL_MT_IPAC_CONNECT_MUX_ACK,
144 RSL_MT_IPAC_CONNECT_MUX_NACK,
145 RSL_MT_IPAC_BIND_MUX = 0x53,
146 RSL_MT_IPAC_BIND_MUX_ACK,
147 RSL_MT_IPAC_BIND_MUX_NACK,
148 RSL_MT_IPAC_DISC_MUX = 0x56,
149 RSL_MT_IPAC_DISC_MUX_ACK,
150 RSL_MT_IPAC_DISC_MUX_NACK,
151 RSL_MT_IPAC_CRCX = 0x70, /* Bind to local BTS RTP port */
152 RSL_MT_IPAC_CRCX_ACK,
153 RSL_MT_IPAC_CRCX_NACK,
154 RSL_MT_IPAC_MDCX = 0x73,
155 RSL_MT_IPAC_MDCX_ACK,
156 RSL_MT_IPAC_MDCX_NACK,
157 RSL_MT_IPAC_DLCX_IND = 0x76,
158 RSL_MT_IPAC_DLCX = 0x77,
159 RSL_MT_IPAC_DLCX_ACK,
160 RSL_MT_IPAC_DLCX_NACK,
161};
162
163/* Siemens vendor-specific */
164enum abis_rsl_msgtype_siemens {
165 RSL_MT_SIEMENS_MRPCI = 0x41,
166 RSL_MT_SIEMENS_INTRAC_HO_COND_IND = 0x42,
167 RSL_MT_SIEMENS_INTERC_HO_COND_IND = 0x43,
168 RSL_MT_SIEMENS_FORCED_HO_REQ = 0x44,
169 RSL_MT_SIEMENS_PREF_AREA_REQ = 0x45,
170 RSL_MT_SIEMENS_PREF_AREA = 0x46,
171 RSL_MT_SIEMENS_START_TRACE = 0x47,
172 RSL_MT_SIEMENS_START_TRACE_ACK = 0x48,
173 RSL_MT_SIEMENS_STOP_TRACE = 0x49,
174 RSL_MT_SIEMENS_TRMR = 0x4a,
175 RSL_MT_SIEMENS_HO_FAIL_IND = 0x4b,
176 RSL_MT_SIEMENS_STOP_TRACE_ACK = 0x4c,
177 RSL_MT_SIEMENS_UPLF = 0x4d,
178 RSL_MT_SIEMENS_UPLB = 0x4e,
179 RSL_MT_SIEMENS_SET_SYS_INFO_10 = 0x4f,
180 RSL_MT_SIEMENS_MODIF_COND_IND = 0x50,
181};
182
183/* Chapter 9.3 */
184enum abis_rsl_ie {
185 RSL_IE_CHAN_NR = 0x01,
186 RSL_IE_LINK_IDENT,
187 RSL_IE_ACT_TYPE,
188 RSL_IE_BS_POWER,
189 RSL_IE_CHAN_IDENT,
190 RSL_IE_CHAN_MODE,
191 RSL_IE_ENCR_INFO,
192 RSL_IE_FRAME_NUMBER,
193 RSL_IE_HANDO_REF,
194 RSL_IE_L1_INFO,
195 RSL_IE_L3_INFO,
196 RSL_IE_MS_IDENTITY,
197 RSL_IE_MS_POWER,
198 RSL_IE_PAGING_GROUP,
199 RSL_IE_PAGING_LOAD,
200 RSL_IE_PYHS_CONTEXT = 0x10,
201 RSL_IE_ACCESS_DELAY,
202 RSL_IE_RACH_LOAD,
203 RSL_IE_REQ_REFERENCE,
204 RSL_IE_RELEASE_MODE,
205 RSL_IE_RESOURCE_INFO,
206 RSL_IE_RLM_CAUSE,
207 RSL_IE_STARTNG_TIME,
208 RSL_IE_TIMING_ADVANCE,
209 RSL_IE_UPLINK_MEAS,
210 RSL_IE_CAUSE,
211 RSL_IE_MEAS_RES_NR,
212 RSL_IE_MSG_ID,
213 /* reserved */
214 RSL_IE_SYSINFO_TYPE = 0x1e,
215 RSL_IE_MS_POWER_PARAM,
216 RSL_IE_BS_POWER_PARAM,
217 RSL_IE_PREPROC_PARAM,
218 RSL_IE_PREPROC_MEAS,
219 RSL_IE_IMM_ASS_INFO, /* Phase 1 (3.6.0), later Full below */
220 RSL_IE_SMSCB_INFO = 0x24,
221 RSL_IE_MS_TIMING_OFFSET,
222 RSL_IE_ERR_MSG,
223 RSL_IE_FULL_BCCH_INFO,
224 RSL_IE_CHAN_NEEDED,
225 RSL_IE_CB_CMD_TYPE,
226 RSL_IE_SMSCB_MSG,
227 RSL_IE_FULL_IMM_ASS_INFO,
228 RSL_IE_SACCH_INFO,
229 RSL_IE_CBCH_LOAD_INFO,
230 RSL_IE_SMSCB_CHAN_INDICATOR,
231 RSL_IE_GROUP_CALL_REF,
232 RSL_IE_CHAN_DESC = 0x30,
233 RSL_IE_NCH_DRX_INFO,
234 RSL_IE_CMD_INDICATOR,
235 RSL_IE_EMLPP_PRIO,
236 RSL_IE_UIC,
237 RSL_IE_MAIN_CHAN_REF,
238 RSL_IE_MR_CONFIG,
239 RSL_IE_MR_CONTROL,
240 RSL_IE_SUP_CODEC_TYPES,
241 RSL_IE_CODEC_CONFIG,
242 RSL_IE_RTD,
243 RSL_IE_TFO_STATUS,
244 RSL_IE_LLP_APDU,
245 /* Siemens vendor-specific */
246 RSL_IE_SIEMENS_MRPCI = 0x40,
247 RSL_IE_SIEMENS_PREF_AREA_TYPE = 0x43,
248 RSL_IE_SIEMENS_ININ_CELL_HO_PAR = 0x45,
249 RSL_IE_SIEMENS_TRACE_REF_NR = 0x46,
250 RSL_IE_SIEMENS_INT_TRACE_IDX = 0x47,
251 RSL_IE_SIEMENS_L2_HDR_INFO = 0x48,
252 RSL_IE_SIEMENS_HIGHEST_RATE = 0x4e,
253 RSL_IE_SIEMENS_SUGGESTED_RATE = 0x4f,
254
255 /* ip.access */
256 RSL_IE_IPAC_SRTP_CONFIG = 0xe0,
257 RSL_IE_IPAC_PROXY_UDP = 0xe1,
258 RSL_IE_IPAC_BSCMPL_TOUT = 0xe2,
259 RSL_IE_IPAC_REMOTE_IP = 0xf0,
260 RSL_IE_IPAC_REMOTE_PORT = 0xf1,
261 RSL_IE_IPAC_RTP_PAYLOAD = 0xf2,
262 RSL_IE_IPAC_LOCAL_PORT = 0xf3,
263 RSL_IE_IPAC_SPEECH_MODE = 0xf4,
264 RSL_IE_IPAC_LOCAL_IP = 0xf5,
265 RSL_IE_IPAC_CONN_STAT = 0xf6,
266 RSL_IE_IPAC_HO_C_PARMS = 0xf7,
267 RSL_IE_IPAC_CONN_ID = 0xf8,
268 RSL_IE_IPAC_RTP_CSD_FMT = 0xf9,
269 RSL_IE_IPAC_RTP_JIT_BUF = 0xfa,
270 RSL_IE_IPAC_RTP_COMPR = 0xfb,
271 RSL_IE_IPAC_RTP_PAYLOAD2= 0xfc,
272 RSL_IE_IPAC_RTP_MPLEX = 0xfd,
273 RSL_IE_IPAC_RTP_MPLEX_ID= 0xfe,
274};
275
276/* Chapter 9.3.1 */
277#define RSL_CHAN_NR_MASK 0xf8
278#define RSL_CHAN_Bm_ACCHs 0x08
279#define RSL_CHAN_Lm_ACCHs 0x10 /* .. 0x18 */
280#define RSL_CHAN_SDCCH4_ACCH 0x20 /* .. 0x38 */
281#define RSL_CHAN_SDCCH8_ACCH 0x40 /* ...0x78 */
282#define RSL_CHAN_BCCH 0x80
283#define RSL_CHAN_RACH 0x88
284#define RSL_CHAN_PCH_AGCH 0x90
285
286/* Chapter 9.3.3 */
287#define RSL_ACT_TYPE_INITIAL 0x00
288#define RSL_ACT_TYPE_REACT 0x80
289#define RSL_ACT_INTRA_IMM_ASS 0x00
290#define RSL_ACT_INTRA_NORM_ASS 0x01
291#define RSL_ACT_INTER_ASYNC 0x02
292#define RSL_ACT_INTER_SYNC 0x03
293#define RSL_ACT_SECOND_ADD 0x04
294#define RSL_ACT_SECOND_MULTI 0x05
295
296/* Chapter 9.3.6 */
297struct rsl_ie_chan_mode {
298 uint8_t dtx_dtu;
299 uint8_t spd_ind;
300 uint8_t chan_rt;
301 uint8_t chan_rate;
302} __attribute__ ((packed));
303#define RSL_CMOD_DTXu 0x01 /* uplink */
304#define RSL_CMOD_DTXd 0x02 /* downlink */
305enum rsl_cmod_spd {
306 RSL_CMOD_SPD_SPEECH = 0x01,
307 RSL_CMOD_SPD_DATA = 0x02,
308 RSL_CMOD_SPD_SIGN = 0x03,
309};
310#define RSL_CMOD_CRT_SDCCH 0x01
311#define RSL_CMOD_CRT_TCH_Bm 0x08 /* full-rate */
312#define RSL_CMOD_CRT_TCH_Lm 0x09 /* half-rate */
313/* FIXME: More CRT types */
314/* Speech */
315#define RSL_CMOD_SP_GSM1 0x01
316#define RSL_CMOD_SP_GSM2 0x11
317#define RSL_CMOD_SP_GSM3 0x21
318/* Data */
319#define RSL_CMOD_SP_NT_14k5 0x58
320#define RSL_CMOD_SP_NT_12k0 0x50
321#define RSL_CMOD_SP_NT_6k0 0x51
322
323/* Chapter 9.3.5 */
324struct rsl_ie_chan_ident {
325 /* GSM 04.08 10.5.2.5 */
326 struct {
327 uint8_t iei;
328 uint8_t chan_nr; /* enc_chan_nr */
329 uint8_t oct3;
330 uint8_t oct4;
331 } chan_desc;
332#if 0 /* spec says we need this but Abissim doesn't use it */
333 struct {
334 uint8_t tag;
335 uint8_t len;
336 } mobile_alloc;
337#endif
338} __attribute__ ((packed));
339
340/* Chapter 9.3.22 */
341#define RLL_CAUSE_T200_EXPIRED 0x01
342#define RLL_CAUSE_REEST_REQ 0x02
343#define RLL_CAUSE_UNSOL_UA_RESP 0x03
344#define RLL_CAUSE_UNSOL_DM_RESP 0x04
345#define RLL_CAUSE_UNSOL_DM_RESP_MF 0x05
346#define RLL_CAUSE_UNSOL_SPRV_RESP 0x06
347#define RLL_CAUSE_SEQ_ERR 0x07
348#define RLL_CAUSE_UFRM_INC_PARAM 0x08
349#define RLL_CAUSE_SFRM_INC_PARAM 0x09
350#define RLL_CAUSE_IFRM_INC_MBITS 0x0a
351#define RLL_CAUSE_IFRM_INC_LEN 0x0b
352#define RLL_CAUSE_FRM_UNIMPL 0x0c
353#define RLL_CAUSE_SABM_MF 0x0d
354#define RLL_CAUSE_SABM_INFO_NOTALL 0x0e
355
356/* Chapter 9.3.26 */
357#define RSL_ERRCLS_NORMAL 0x00
358#define RSL_ERRCLS_RESOURCE_UNAVAIL 0x20
359#define RSL_ERRCLS_SERVICE_UNAVAIL 0x30
360#define RSL_ERRCLS_SERVICE_UNIMPL 0x40
361#define RSL_ERRCLS_INVAL_MSG 0x50
362#define RSL_ERRCLS_PROTO_ERROR 0x60
363#define RSL_ERRCLS_INTERWORKING 0x70
364
365/* normal event */
366#define RSL_ERR_RADIO_IF_FAIL 0x00
367#define RSL_ERR_RADIO_LINK_FAIL 0x01
368#define RSL_ERR_HANDOVER_ACC_FAIL 0x02
369#define RSL_ERR_TALKER_ACC_FAIL 0x03
370#define RSL_ERR_OM_INTERVENTION 0x07
371#define RSL_ERR_NORMAL_UNSPEC 0x0f
372#define RSL_ERR_T_MSRFPCI_EXP 0x18
373/* resource unavailable */
374#define RSL_ERR_EQUIPMENT_FAIL 0x20
375#define RSL_ERR_RR_UNAVAIL 0x21
376#define RSL_ERR_TERR_CH_FAIL 0x22
377#define RSL_ERR_CCCH_OVERLOAD 0x23
378#define RSL_ERR_ACCH_OVERLOAD 0x24
379#define RSL_ERR_PROCESSOR_OVERLOAD 0x25
380#define RSL_ERR_RES_UNAVAIL 0x2f
381/* service or option not available */
382#define RSL_ERR_TRANSC_UNAVAIL 0x30
383#define RSL_ERR_SERV_OPT_UNAVAIL 0x3f
384/* service or option not implemented */
385#define RSL_ERR_ENCR_UNIMPL 0x40
386#define RSL_ERR_SERV_OPT_UNIMPL 0x4f
387/* invalid message */
388#define RSL_ERR_RCH_ALR_ACTV_ALLOC 0x50
389#define RSL_ERR_INVALID_MESSAGE 0x5f
390/* protocol error */
391#define RSL_ERR_MSG_DISCR 0x60
392#define RSL_ERR_MSG_TYPE 0x61
393#define RSL_ERR_MSG_SEQ 0x62
394#define RSL_ERR_IE_ERROR 0x63
395#define RSL_ERR_MAND_IE_ERROR 0x64
396#define RSL_ERR_OPT_IE_ERROR 0x65
397#define RSL_ERR_IE_NONEXIST 0x66
398#define RSL_ERR_IE_LENGTH 0x67
399#define RSL_ERR_IE_CONTENT 0x68
400#define RSL_ERR_PROTO 0x6f
401/* interworking */
402#define RSL_ERR_INTERWORKING 0x7f
403
404/* Chapter 9.3.30 */
405#define RSL_SYSTEM_INFO_8 0x00
406#define RSL_SYSTEM_INFO_1 0x01
407#define RSL_SYSTEM_INFO_2 0x02
408#define RSL_SYSTEM_INFO_3 0x03
409#define RSL_SYSTEM_INFO_4 0x04
410#define RSL_SYSTEM_INFO_5 0x05
411#define RSL_SYSTEM_INFO_6 0x06
412#define RSL_SYSTEM_INFO_7 0x07
413#define RSL_SYSTEM_INFO_16 0x08
414#define RSL_SYSTEM_INFO_17 0x09
415#define RSL_SYSTEM_INFO_2bis 0x0a
416#define RSL_SYSTEM_INFO_2ter 0x0b
417#define RSL_SYSTEM_INFO_5bis 0x0d
418#define RSL_SYSTEM_INFO_5ter 0x0e
419#define RSL_SYSTEM_INFO_10 0x0f
420#define REL_EXT_MEAS_ORDER 0x47
421#define RSL_MEAS_INFO 0x48
422#define RSL_SYSTEM_INFO_13 0x28
423#define RSL_SYSTEM_INFO_2quater 0x29
424#define RSL_SYSTEM_INFO_9 0x2a
425#define RSL_SYSTEM_INFO_18 0x2b
426#define RSL_SYSTEM_INFO_19 0x2c
427#define RSL_SYSTEM_INFO_20 0x2d
428
429/* Chapter 9.3.40 */
430#define RSL_CHANNEED_ANY 0x00
431#define RSL_CHANNEED_SDCCH 0x01
432#define RSL_CHANNEED_TCH_F 0x02
433#define RSL_CHANNEED_TCH_ForH 0x03
434
435/* Chapter 3.3.2.3 Brocast control channel */
436/* CCCH-CONF, NC is not combined */
437#define RSL_BCCH_CCCH_CONF_1_NC 0x00
438#define RSL_BCCH_CCCH_CONF_1_C 0x01
439#define RSL_BCCH_CCCH_CONF_2_NC 0x02
440#define RSL_BCCH_CCCH_CONF_3_NC 0x04
441#define RSL_BCCH_CCCH_CONF_4_NC 0x06
442
443/* BS-PA-MFRMS */
444#define RSL_BS_PA_MFRMS_2 0x00
445#define RSL_BS_PA_MFRMS_3 0x01
446#define RSL_BS_PA_MFRMS_4 0x02
447#define RSL_BS_PA_MFRMS_5 0x03
448#define RSL_BS_PA_MFRMS_6 0x04
449#define RSL_BS_PA_MFRMS_7 0x05
450#define RSL_BS_PA_MFRMS_8 0x06
451#define RSL_BS_PA_MFRMS_9 0x07
452
453/* RSL_IE_IPAC_RTP_PAYLOAD[2] */
454enum rsl_ipac_rtp_payload {
455 RSL_IPAC_RTP_GSM = 1,
456 RSL_IPAC_RTP_EFR,
457 RSL_IPAC_RTP_AMR,
458 RSL_IPAC_RTP_CSD,
459 RSL_IPAC_RTP_MUX,
460};
461
462/* RSL_IE_IPAC_SPEECH_MODE, lower four bits */
463enum rsl_ipac_speech_mode_s {
464 RSL_IPAC_SPEECH_GSM_FR = 0, /* GSM FR (Type 1, FS) */
465 RSL_IPAC_SPEECH_GSM_EFR = 1, /* GSM EFR (Type 2, FS) */
466 RSL_IPAC_SPEECH_GSM_AMR_FR = 2, /* GSM AMR/FR (Type 3, FS) */
467 RSL_IPAC_SPEECH_GSM_HR = 3, /* GSM HR (Type 1, HS) */
468 RSL_IPAC_SPEECH_GSM_AMR_HR = 5, /* GSM AMR/hr (Type 3, HS) */
469 RSL_IPAC_SPEECH_AS_RTP = 0xf, /* As specified by RTP Payload IE */
470};
471/* RSL_IE_IPAC_SPEECH_MODE, upper four bits */
472enum rsl_ipac_speech_mode_m {
473 RSL_IPAC_SPEECH_M_RXTX = 0, /* Send and Receive */
474 RSL_IPAC_SPEECH_M_RX = 1, /* Receive only */
475 RSL_IPAC_SPEECH_M_TX = 2, /* Send only */
476};
477
478/* RSL_IE_IPAC_RTP_CSD_FMT, lower four bits */
479enum rsl_ipac_rtp_csd_format_d {
480 RSL_IPAC_RTP_CSD_EXT_TRAU = 0,
481 RSL_IPAC_RTP_CSD_NON_TRAU = 1,
482 RSL_IPAC_RTP_CSD_TRAU_BTS = 2,
483 RSL_IPAC_RTP_CSD_IWF_FREE = 3,
484};
485/* RSL_IE_IPAC_RTP_CSD_FMT, upper four bits */
486enum rsl_ipac_rtp_csd_format_ir {
487 RSL_IPAC_RTP_CSD_IR_8k = 0,
488 RSL_IPAC_RTP_CSD_IR_16k = 1,
489 RSL_IPAC_RTP_CSD_IR_32k = 2,
490 RSL_IPAC_RTP_CSD_IR_64k = 3,
491};
492
493/* Siemens vendor-specific RSL extensions */
494struct rsl_mrpci {
495 uint8_t power_class:3,
496 vgcs_capable:1,
497 vbs_capable:1,
498 gsm_phase:2;
499} __attribute__ ((packed));
500
501enum rsl_mrpci_pwrclass {
502 RSL_MRPCI_PWRC_1 = 0,
503 RSL_MRPCI_PWRC_2 = 1,
504 RSL_MRPCI_PWRC_3 = 2,
505 RSL_MRPCI_PWRC_4 = 3,
506 RSL_MRPCI_PWRC_5 = 4,
507};
508enum rsl_mrpci_phase {
509 RSL_MRPCI_PHASE_1 = 0,
510 /* reserved */
511 RSL_MRPCI_PHASE_2 = 2,
512 RSL_MRPCI_PHASE_2PLUS = 3,
513};
514
515
516#endif /* PROTO_GSM_08_58_H */