Harald Welte | 52b1f98 | 2008-12-23 20:25:15 +0000 | [diff] [blame] | 1 | /* GSM Radio Signalling Link messages on the A-bis interface |
| 2 | * 3GPP TS 08.58 version 8.6.0 Release 1999 / ETSI TS 100 596 V8.6.0 */ |
| 3 | |
| 4 | /* (C) 2008 by Harald Welte <laforge@gnumonks.org> |
| 5 | * All Rights Reserved |
| 6 | * |
| 7 | * This program is free software; you can redistribute it and/or modify |
| 8 | * it under the terms of the GNU General Public License as published by |
| 9 | * the Free Software Foundation; either version 2 of the License, or |
| 10 | * (at your option) any later version. |
| 11 | * |
| 12 | * This program is distributed in the hope that it will be useful, |
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | * GNU General Public License for more details. |
| 16 | * |
| 17 | * You should have received a copy of the GNU General Public License along |
| 18 | * with this program; if not, write to the Free Software Foundation, Inc., |
| 19 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 20 | * |
| 21 | */ |
| 22 | |
| 23 | #ifndef _RSL_H |
| 24 | #define _RSL_H |
| 25 | |
| 26 | struct abis_rsl_common_hdr { |
| 27 | u_int8_t msg_discr; |
| 28 | u_int8_t msg_type; |
| 29 | u_int8_t data[0]; |
| 30 | } __attribute__ ((packed)); |
| 31 | |
| 32 | /* Chapter 8.3 */ |
| 33 | struct abis_rsl_rll_hdr { |
| 34 | struct abis_rsl_common_hdr c; |
| 35 | u_int8_t ie_chan; |
| 36 | u_int8_t chan_nr; |
| 37 | u_int8_t ie_link_id; |
| 38 | u_int8_t link_id; |
| 39 | u_int8_t data[0]; |
| 40 | } __attribute__ ((packed)); |
| 41 | |
| 42 | /* Chapter 8.3 and 8.4 */ |
| 43 | struct abis_rsl_dchan_hdr { |
| 44 | struct abis_rsl_common_hdr c; |
| 45 | u_int8_t ie_chan; |
| 46 | u_int8_t chan_nr; |
| 47 | u_int8_t data[0]; |
| 48 | } __attribute__ ((packed)); |
| 49 | |
| 50 | |
| 51 | /* Chapter 9.1 */ |
| 52 | #define ABIS_RSL_MDISC_RLL 0x02 |
| 53 | #define ABIS_RSL_MDISC_DED_CHAN 0x08 |
| 54 | #define ABIS_RSL_MDISC_COM_CHAN 0x0c |
| 55 | #define ABIS_RSL_MDISC_TRX 0x10 |
| 56 | #define ABIS_RSL_MDISC_LOC 0x20 |
Harald Welte | 7509926 | 2009-02-16 21:12:08 +0000 | [diff] [blame] | 57 | #define ABIS_RSL_MDISC_IPACCESS 0x7e |
Harald Welte | 4a543e8 | 2009-02-28 13:17:55 +0000 | [diff] [blame] | 58 | #define ABIS_RSL_MDISC_TRANSP 0x01 |
Harald Welte | 52b1f98 | 2008-12-23 20:25:15 +0000 | [diff] [blame] | 59 | |
| 60 | #define ABIS_RSL_MDISC_IS_TRANSP(x) (x & 0x01) |
| 61 | |
Holger Freyther | 590d66a | 2008-12-30 19:13:13 +0000 | [diff] [blame] | 62 | /* Chapter 9.1 */ |
Harald Welte | 52b1f98 | 2008-12-23 20:25:15 +0000 | [diff] [blame] | 63 | enum abis_rsl_msgtype { |
| 64 | /* Radio Link Layer Management */ |
| 65 | RSL_MT_DATA_REQ = 0x01, |
| 66 | RSL_MT_DATA_IND, |
| 67 | RSL_MT_ERROR_IND, |
| 68 | RSL_MT_EST_REQ, |
| 69 | RSL_MT_EST_CONF, |
| 70 | RSL_MT_EST_IND, |
| 71 | RSL_MT_REL_REQ, |
| 72 | RSL_MT_REL_CONF, |
| 73 | RSL_MT_REL_IND, |
| 74 | RSL_MT_UNIT_DATA_REQ, |
| 75 | RSL_MT_UNIT_DATA_IND, /* 0x0b */ |
| 76 | |
| 77 | /* Common Channel Management / TRX Management */ |
| 78 | RSL_MT_BCCH_INFO = 0x11, |
| 79 | RSL_MT_CCCH_LOAD_IND, |
| 80 | RSL_MT_CHAN_RQD, |
| 81 | RSL_MT_DELETE_IND, |
| 82 | RSL_MT_PAGING_CMD, |
| 83 | RSL_MT_IMMEDIATE_ASSIGN_CMD, |
| 84 | RSL_MT_SMS_BC_REQ, |
| 85 | /* empty */ |
| 86 | RSL_MT_RF_RES_IND = 0x19, |
| 87 | RSL_MT_SACCH_FILL, |
| 88 | RSL_MT_OVERLOAD, |
| 89 | RSL_MT_ERROR_REPORT, |
| 90 | RSL_MT_SMS_BC_CMD, |
| 91 | RSL_MT_CBCH_LOAD_IND, |
| 92 | RSL_MT_NOT_CMD, /* 0x1f */ |
| 93 | |
| 94 | /* Dedicate Channel Management */ |
| 95 | RSL_MT_CHAN_ACTIV = 0x21, |
| 96 | RSL_MT_CHAN_ACTIV_ACK, |
| 97 | RSL_MT_CHAN_ACTIV_NACK, |
| 98 | RSL_MT_CONN_FAIL, |
| 99 | RSL_MT_DEACTIVATE_SACCH, |
| 100 | RSL_MT_ENCR_CMD, |
| 101 | RSL_MT_HANDO_DET, |
| 102 | RSL_MT_MEAS_RES, |
| 103 | RSL_MT_MODE_MODIFY_REQ, |
| 104 | RSL_MT_MODE_MODIFY_ACK, |
| 105 | RSL_MT_MODE_MODIFY_NACK, |
| 106 | RSL_MT_PHY_CONTEXT_REQ, |
| 107 | RSL_MT_PHY_CONTEXT_CONF, |
| 108 | RSL_MT_RF_CHAN_REL, |
| 109 | RSL_MT_MS_POWER_CONTROL, |
Harald Welte | 8470bf2 | 2008-12-25 23:28:35 +0000 | [diff] [blame] | 110 | RSL_MT_BS_POWER_CONTROL, /* 0x30 */ |
Harald Welte | 52b1f98 | 2008-12-23 20:25:15 +0000 | [diff] [blame] | 111 | RSL_MT_PREPROC_CONFIG, |
| 112 | RSL_MT_PREPROC_MEAS_RES, |
| 113 | RSL_MT_RF_CHAN_REL_ACK, |
| 114 | RSL_MT_SACCH_INFO_MODIFY, |
| 115 | RSL_MT_TALKER_DET, |
| 116 | RSL_MT_LISTENER_DET, |
| 117 | RSL_MT_REMOTE_CODEC_CONF_REP, |
| 118 | RSL_MT_RTD_REP, |
| 119 | RSL_MT_PRE_HANDO_NOTIF, |
| 120 | RSL_MT_MR_CODEC_MOD_REQ, |
| 121 | RSL_MT_MR_CODEC_MOD_ACK, |
| 122 | RSL_MT_MR_CODEC_MOD_NACK, |
| 123 | RSL_MT_MR_CODEC_MOD_PER, |
| 124 | RSL_MT_TFO_REP, |
| 125 | RSL_MT_TFO_MOD_REQ, /* 0x3f */ |
Harald Welte | 7509926 | 2009-02-16 21:12:08 +0000 | [diff] [blame] | 126 | |
| 127 | /* ip.access specific RSL message types */ |
| 128 | RSL_MT_IPAC_BIND = 0x70, /* Bind to local BTS RTP port */ |
| 129 | RSL_MT_IPAC_BIND_ACK, |
| 130 | RSL_MT_IPAC_BIND_NACK, |
| 131 | RSL_MT_IPAC_CONNECT = 0x73, |
| 132 | RSL_MT_IPAC_CONNECT_ACK, |
| 133 | RSL_MT_IPAC_CONNECT_NACK, |
| 134 | RSL_MT_IPAC_DISCONNECT_IND = 0x76, |
| 135 | |
Harald Welte | 52b1f98 | 2008-12-23 20:25:15 +0000 | [diff] [blame] | 136 | }; |
| 137 | |
| 138 | /* Chapter 9.3 */ |
| 139 | enum abis_rsl_ie { |
| 140 | RSL_IE_CHAN_NR = 0x01, |
| 141 | RSL_IE_LINK_IDENT, |
| 142 | RSL_IE_ACT_TYPE, |
| 143 | RSL_IE_BS_POWER, |
| 144 | RSL_IE_CHAN_IDENT, |
| 145 | RSL_IE_CHAN_MODE, |
| 146 | RSL_IE_ENCR_INFO, |
| 147 | RSL_IE_FRAME_NUMBER, |
| 148 | RSL_IE_HANDO_REF, |
| 149 | RSL_IE_L1_INFO, |
| 150 | RSL_IE_L3_INFO, |
| 151 | RSL_IE_MS_IDENTITY, |
| 152 | RSL_IE_MS_POWER, |
| 153 | RSL_IE_PAGING_GROUP, |
| 154 | RSL_IE_PAGING_LOAD, |
| 155 | RSL_IE_PYHS_CONTEXT = 0x10, |
| 156 | RSL_IE_ACCESS_DELAY, |
| 157 | RSL_IE_RACH_LOAD, |
| 158 | RSL_IE_REQ_REFERENCE, |
| 159 | RSL_IE_RELEASE_MODE, |
| 160 | RSL_IE_RESOURCE_INFO, |
| 161 | RSL_IE_RLM_CAUSE, |
| 162 | RSL_IE_STARTNG_TIME, |
| 163 | RSL_IE_TIMING_ADVANCE, |
| 164 | RSL_IE_UPLINK_MEAS, |
| 165 | RSL_IE_CAUSE, |
| 166 | RSL_IE_MEAS_RES_NR, |
| 167 | RSL_IE_MSG_ID, |
| 168 | /* reserved */ |
| 169 | RSL_IE_SYSINFO_TYPE = 0x1e, |
| 170 | RSL_IE_MS_POWER_PARAM, |
| 171 | RSL_IE_BS_POWER_PARAM, |
| 172 | RSL_IE_PREPROC_PARAM, |
| 173 | RSL_IE_PREPROC_MEAS, |
| 174 | RSL_IE_IMM_ASS_INFO, /* Phase 1 (3.6.0), later Full below */ |
| 175 | RSL_IE_SMSCB_INFO = 0x24, |
| 176 | RSL_IE_MS_TIMING_OFFSET, |
| 177 | RSL_IE_ERR_MSG, |
| 178 | RSL_IE_FULL_BCCH_INFO, |
| 179 | RSL_IE_CHAN_NEEDED, |
| 180 | RSL_IE_CB_CMD_TYPE, |
| 181 | RSL_IE_SMSCB_MSG, |
| 182 | RSL_IE_FULL_IMM_ASS_INFO, |
| 183 | RSL_IE_SACCH_INFO, |
| 184 | RSL_IE_CBCH_LOAD_INFO, |
| 185 | RSL_IE_SMSCB_CHAN_INDICATOR, |
| 186 | RSL_IE_GROUP_CALL_REF, |
| 187 | RSL_IE_CHAN_DESC, |
| 188 | RSL_IE_NCH_DRX_INFO, |
| 189 | RSL_IE_CMD_INDICATOR, |
| 190 | RSL_IE_EMLPP_PRIO, |
| 191 | RSL_IE_UIC, |
| 192 | RSL_IE_MAIN_CHAN_REF, |
| 193 | RSL_IE_MR_CONFIG, |
| 194 | RSL_IE_MR_CONTROL, |
| 195 | RSL_IE_SUP_CODEC_TYPES, |
| 196 | RSL_IE_CODEC_CONFIG, |
| 197 | RSL_IE_RTD, |
| 198 | RSL_IE_TFO_STATUS, |
| 199 | RSL_IE_LLP_APDU, |
Harald Welte | 7509926 | 2009-02-16 21:12:08 +0000 | [diff] [blame] | 200 | |
| 201 | RSL_IE_IPAC_REMOTE_IP = 0xf0, |
| 202 | RSL_IE_IPAC_REMOTE_PORT = 0xf1, |
| 203 | RSL_IE_IPAC_LOCAL_PORT = 0xf3, |
| 204 | RSL_IE_IPAC_LOCAL_IP = 0xf5, |
Harald Welte | 52b1f98 | 2008-12-23 20:25:15 +0000 | [diff] [blame] | 205 | }; |
| 206 | |
| 207 | /* Chapter 9.3.1 */ |
| 208 | #define RSL_CHAN_NR_MASK 0xf8 |
| 209 | #define RSL_CHAN_Bm_ACCHs 0x08 |
| 210 | #define RSL_CHAN_Lm_ACCHs 0x10 /* .. 0x18 */ |
| 211 | #define RSL_CHAN_SDCCH4_ACCH 0x20 /* .. 0x38 */ |
| 212 | #define RSL_CHAN_SDCCH8_ACCH 0x40 /* ...0x78 */ |
| 213 | #define RSL_CHAN_BCCH 0x80 |
| 214 | #define RSL_CHAN_RACH 0x88 |
| 215 | #define RSL_CHAN_PCH_AGCH 0x90 |
| 216 | |
| 217 | /* Chapter 9.3.3 */ |
| 218 | #define RSL_ACT_TYPE_INITIAL 0x00 |
| 219 | #define RSL_ACT_TYPE_REACT 0x80 |
| 220 | #define RSL_ACT_INTRA_IMM_ASS 0x00 |
| 221 | #define RSL_ACT_INTRA_NORM_ASS 0x01 |
| 222 | #define RSL_ACT_INTER_ASYNC 0x02 |
| 223 | #define RSL_ACT_INTER_SYNC 0x03 |
| 224 | #define RSL_ACT_SECOND_ADD 0x04 |
| 225 | #define RSL_ACT_SECOND_MULTI 0x05 |
| 226 | |
| 227 | /* Chapter 9.3.6 */ |
| 228 | struct rsl_ie_chan_mode { |
| 229 | u_int8_t dtx_dtu; |
| 230 | u_int8_t spd_ind; |
| 231 | u_int8_t chan_rt; |
| 232 | u_int8_t chan_rate; |
| 233 | } __attribute__ ((packed)); |
| 234 | #define RSL_CMOD_DTXu 0x01 /* uplink */ |
| 235 | #define RSL_CMOD_DTXd 0x02 /* downlink */ |
| 236 | #define RSL_CMOD_SPD_SPEECH 0x01 |
| 237 | #define RSL_CMOD_SPD_DATA 0x02 |
| 238 | #define RSL_CMOD_SPD_SIGN 0x03 |
| 239 | #define RSL_CMOD_CRT_SDCCH 0x01 |
| 240 | #define RSL_CMOD_CRT_TCH_Bm 0x08 /* full-rate */ |
| 241 | #define RSL_CMOD_CRT_TCH_Lm 0x09 /* half-rate */ |
| 242 | /* FIXME: More CRT types */ |
| 243 | #define RSL_CMOD_SP_GSM1 0x01 |
| 244 | #define RSL_CMOD_SP_GSM2 0x11 |
| 245 | #define RSL_CMOD_SP_GSM3 0x21 |
| 246 | |
| 247 | /* Chapter 9.3.5 */ |
| 248 | struct rsl_ie_chan_ident { |
| 249 | /* GSM 04.08 10.5.2.5 */ |
| 250 | struct { |
| 251 | u_int8_t iei; |
| 252 | u_int8_t chan_nr; /* enc_chan_nr */ |
| 253 | u_int8_t oct3; |
| 254 | u_int8_t oct4; |
| 255 | } chan_desc; |
| 256 | #if 0 /* spec says we need this but Abissim doesn't use it */ |
| 257 | struct { |
| 258 | u_int8_t tag; |
| 259 | u_int8_t len; |
| 260 | } mobile_alloc; |
| 261 | #endif |
| 262 | } __attribute__ ((packed)); |
| 263 | |
Harald Welte | 4b63454 | 2008-12-27 01:55:51 +0000 | [diff] [blame] | 264 | /* Chapter 9.3.22 */ |
| 265 | #define RLL_CAUSE_T200_EXPIRED 0x01 |
| 266 | #define RLL_CAUSE_REEST_REQ 0x02 |
| 267 | #define RLL_CAUSE_UNSOL_UA_RESP 0x03 |
| 268 | #define RLL_CAUSE_UNSOL_DM_RESP 0x04 |
| 269 | #define RLL_CAUSE_UNSOL_DM_RESP_MF 0x05 |
| 270 | #define RLL_CAUSE_UNSOL_SPRV_RESP 0x06 |
| 271 | #define RLL_CAUSE_SEQ_ERR 0x07 |
| 272 | #define RLL_CAUSE_UFRM_INC_PARAM 0x08 |
| 273 | #define RLL_CAUSE_SFRM_INC_PARAM 0x09 |
| 274 | #define RLL_CAUSE_IFRM_INC_MBITS 0x0a |
| 275 | #define RLL_CAUSE_IFRM_INC_LEN 0x0b |
| 276 | #define RLL_CAUSE_FRM_UNIMPL 0x0c |
| 277 | #define RLL_CAUSE_SABM_MF 0x0d |
| 278 | #define RLL_CAUSE_SABM_INFO_NOTALL 0x0e |
| 279 | |
Harald Welte | 702d870 | 2008-12-26 20:25:35 +0000 | [diff] [blame] | 280 | /* Chapter 9.3.26 */ |
| 281 | #define RSL_ERRCLS_NORMAL 0x00 |
| 282 | #define RSL_ERRCLS_RESOURCE_UNAVAIL 0x20 |
| 283 | #define RSL_ERRCLS_SERVICE_UNAVAIL 0x30 |
| 284 | #define RSL_ERRCLS_SERVICE_UNIMPL 0x40 |
| 285 | #define RSL_ERRCLS_INVAL_MSG 0x50 |
| 286 | #define RSL_ERRCLS_PROTO_ERROR 0x60 |
| 287 | #define RSL_ERRCLS_INTERWORKING 0x70 |
| 288 | |
| 289 | #define RSL_ERR_RADIO_IF_FAIL 0x00 |
| 290 | #define RSL_ERR_RADIO_LINK_FAIL 0x01 |
| 291 | #define RSL_ERR_HANDOVER_ACC_FAIL 0x02 |
| 292 | #define RSL_ERR_TALKER_ACC_FAIL 0x03 |
| 293 | #define RSL_ERR_OM_INTERVENTION 0x07 |
| 294 | #define RSL_ERR_EQUIPMENT_FAIL 0x20 |
| 295 | #define RSL_ERR_RR_UNAVAIL 0x21 |
| 296 | #define RSL_ERR_TERR_CH_FAIL 0x22 |
| 297 | #define RSL_ERR_CCCH_OVERLOAD 0x23 |
| 298 | #define RSL_ERR_ACCH_OVERLOAD 0x24 |
| 299 | #define RSL_ERR_PROCESSOR_OVERLOAD 0x25 |
| 300 | #define RSL_ERR_RES_UNAVAIL 0x2f |
| 301 | #define RSL_ERR_TRANSC_UNAVAIL 0x30 |
| 302 | #define RSL_ERR_SERV_OPT_UNAVAIL 0x3f |
| 303 | #define RSL_ERR_ENCR_UNIMPL 0x40 |
| 304 | #define RSL_ERR_SEV_OPT_UNIMPL 0x4f |
| 305 | #define RSL_ERR_RCH_ALR_ACTV_ALLOC 0x50 |
| 306 | #define RSL_ERR_INVALID_MESSAGE 0x5f |
| 307 | #define RSL_ERR_MSG_DISCR 0x60 |
| 308 | #define RSL_ERR_MSG_TYPE 0x61 |
| 309 | #define RSL_ERR_MSG_SEQA 0x62 |
| 310 | #define RSL_ERR_IE_ERROR 0x63 |
| 311 | #define RSL_ERR_MAND_IE_ERROR 0x64 |
| 312 | #define RSL_ERR_OPT_IE_ERROR 0x65 |
| 313 | #define RSL_ERR_IE_NONEXIST 0x66 |
| 314 | #define RSL_ERR_IE_LENGTH 0x67 |
| 315 | #define RSL_ERR_IE_CONTENT 0x68 |
| 316 | #define RSL_ERR_PROTO 0x6f |
| 317 | #define RSL_ERR_INTERWORKING 0x7f |
| 318 | |
Harald Welte | 52b1f98 | 2008-12-23 20:25:15 +0000 | [diff] [blame] | 319 | /* Chapter 9.3.30 */ |
| 320 | #define RSL_SYSTEM_INFO_8 0x00 |
| 321 | #define RSL_SYSTEM_INFO_1 0x01 |
| 322 | #define RSL_SYSTEM_INFO_2 0x02 |
| 323 | #define RSL_SYSTEM_INFO_3 0x03 |
| 324 | #define RSL_SYSTEM_INFO_4 0x04 |
| 325 | #define RSL_SYSTEM_INFO_5 0x05 |
| 326 | #define RSL_SYSTEM_INFO_6 0x06 |
| 327 | #define RSL_SYSTEM_INFO_7 0x07 |
| 328 | #define RSL_SYSTEM_INFO_16 0x08 |
| 329 | #define RSL_SYSTEM_INFO_17 0x09 |
| 330 | #define RSL_SYSTEM_INFO_2bis 0x0a |
| 331 | #define RSL_SYSTEM_INFO_2ter 0x0b |
| 332 | #define RSL_SYSTEM_INFO_5bis 0x0d |
| 333 | #define RSL_SYSTEM_INFO_5ter 0x0e |
| 334 | #define RSL_SYSTEM_INFO_10 0x0f |
| 335 | #define REL_EXT_MEAS_ORDER 0x47 |
| 336 | #define RSL_MEAS_INFO 0x48 |
| 337 | #define RSL_SYSTEM_INFO_13 0x28 |
| 338 | #define RSL_SYSTEM_INFO_2quater 0x29 |
| 339 | #define RSL_SYSTEM_INFO_9 0x2a |
| 340 | #define RSL_SYSTEM_INFO_18 0x2b |
| 341 | #define RSL_SYSTEM_INFO_19 0x2c |
| 342 | #define RSL_SYSTEM_INFO_20 0x2d |
| 343 | |
| 344 | /* Chapter 9.3.40 */ |
| 345 | #define RSL_CHANNEED_ANY 0x00 |
| 346 | #define RSL_CHANNEED_SDCCH 0x01 |
| 347 | #define RSL_CHANNEED_TCH_F 0x02 |
| 348 | #define RSL_CHANNEED_TCH_ForH 0x03 |
| 349 | |
Holger Freyther | b015544 | 2009-02-03 23:24:04 +0000 | [diff] [blame] | 350 | /* Chapter 3.3.2.3 Brocast control channel */ |
| 351 | /* CCCH-CONF, NC is not combined */ |
| 352 | #define RSL_BCCH_CCCH_CONF_1_NC 0x00 |
| 353 | #define RSL_BCCH_CCCH_CONF_1_C 0x01 |
| 354 | #define RSL_BCCH_CCCH_CONF_2_NC 0x02 |
| 355 | #define RSL_BCCH_CCCH_CONF_3_NC 0x04 |
| 356 | #define RSL_BCCH_CCCH_CONF_4_NC 0x06 |
| 357 | |
| 358 | /* BS-PA-MFRMS */ |
| 359 | #define RSL_BS_PA_MFRMS_2 0x00 |
| 360 | #define RSL_BS_PA_MFRMS_3 0x01 |
| 361 | #define RSL_BS_PA_MFRMS_4 0x02 |
| 362 | #define RSL_BS_PA_MFRMS_5 0x03 |
| 363 | #define RSL_BS_PA_MFRMS_6 0x04 |
| 364 | #define RSL_BS_PA_MFRMS_7 0x05 |
| 365 | #define RSL_BS_PA_MFRMS_8 0x06 |
| 366 | #define RSL_BS_PA_MFRMS_9 0x07 |
| 367 | |
Harald Welte | 52b1f98 | 2008-12-23 20:25:15 +0000 | [diff] [blame] | 368 | |
| 369 | #include "msgb.h" |
| 370 | |
Harald Welte | e79769b | 2009-02-07 00:48:17 +0000 | [diff] [blame] | 371 | int rsl_bcch_info(struct gsm_bts_trx *trx, u_int8_t type, |
Harald Welte | 52b1f98 | 2008-12-23 20:25:15 +0000 | [diff] [blame] | 372 | const u_int8_t *data, int len); |
Harald Welte | e79769b | 2009-02-07 00:48:17 +0000 | [diff] [blame] | 373 | int rsl_sacch_filling(struct gsm_bts_trx *trx, u_int8_t type, |
Harald Welte | 52b1f98 | 2008-12-23 20:25:15 +0000 | [diff] [blame] | 374 | const u_int8_t *data, int len); |
Harald Welte | e79769b | 2009-02-07 00:48:17 +0000 | [diff] [blame] | 375 | int rsl_chan_activate(struct gsm_bts_trx *trx, u_int8_t chan_nr, |
Harald Welte | 52b1f98 | 2008-12-23 20:25:15 +0000 | [diff] [blame] | 376 | u_int8_t act_type, |
| 377 | struct rsl_ie_chan_mode *chan_mode, |
| 378 | struct rsl_ie_chan_ident *chan_ident, |
| 379 | u_int8_t bs_power, u_int8_t ms_power, |
| 380 | u_int8_t ta); |
Harald Welte | da78376 | 2009-02-18 03:29:53 +0000 | [diff] [blame] | 381 | int rsl_chan_activate_lchan(struct gsm_lchan *lchan, u_int8_t act_type, |
Harald Welte | ddab3c7 | 2009-02-28 13:19:15 +0000 | [diff] [blame] | 382 | u_int8_t ta, u_int8_t mode); |
Harald Welte | da78376 | 2009-02-18 03:29:53 +0000 | [diff] [blame] | 383 | int rsl_chan_mode_modify_req(struct gsm_lchan *ts); |
Harald Welte | 52b1f98 | 2008-12-23 20:25:15 +0000 | [diff] [blame] | 384 | int rsl_paging_cmd(struct gsm_bts *bts, u_int8_t paging_group, u_int8_t len, |
| 385 | u_int8_t *ms_ident, u_int8_t chan_needed); |
Holger Freyther | 7448a53 | 2009-01-04 20:18:23 +0000 | [diff] [blame] | 386 | int rsl_paging_cmd_subscr(struct gsm_bts *bts, u_int8_t chan_needed, |
| 387 | struct gsm_subscriber *subscr); |
Harald Welte | 52b1f98 | 2008-12-23 20:25:15 +0000 | [diff] [blame] | 388 | int rsl_imm_assign_cmd(struct gsm_bts *bts, u_int8_t len, u_int8_t *val); |
Harald Welte | 52b1f98 | 2008-12-23 20:25:15 +0000 | [diff] [blame] | 389 | |
Harald Welte | 8470bf2 | 2008-12-25 23:28:35 +0000 | [diff] [blame] | 390 | int rsl_data_request(struct msgb *msg, u_int8_t link_id); |
| 391 | |
Harald Welte | 7509926 | 2009-02-16 21:12:08 +0000 | [diff] [blame] | 392 | /* ip.access specfic RSL extensions */ |
| 393 | int rsl_ipacc_bind(struct gsm_lchan *lchan); |
| 394 | int rsl_ipacc_connect(struct gsm_lchan *lchan, u_int32_t ip, |
| 395 | u_int16_t port, u_int16_t f8, u_int8_t fc); |
| 396 | |
Harald Welte | 8470bf2 | 2008-12-25 23:28:35 +0000 | [diff] [blame] | 397 | int abis_rsl_rcvmsg(struct msgb *msg); |
| 398 | |
Holger Freyther | 2976c40 | 2009-02-04 01:09:20 +0000 | [diff] [blame] | 399 | unsigned int get_paging_group(u_int64_t imsi, unsigned int bs_cc_chans, |
| 400 | int n_pag_blocks); |
| 401 | unsigned int n_pag_blocks(int bs_ccch_sdcch_comb, unsigned int bs_ag_blks_res); |
Holger Freyther | 3aa8d6c | 2009-02-04 02:14:45 +0000 | [diff] [blame] | 402 | u_int64_t str_to_imsi(const char *imsi_str); |
Harald Welte | 45f83a1 | 2009-02-11 11:43:19 +0000 | [diff] [blame] | 403 | u_int8_t lchan2chan_nr(struct gsm_lchan *lchan); |
Holger Freyther | 2976c40 | 2009-02-04 01:09:20 +0000 | [diff] [blame] | 404 | |
Harald Welte | 8470bf2 | 2008-12-25 23:28:35 +0000 | [diff] [blame] | 405 | /* to be provided by external code */ |
| 406 | int abis_rsl_sendmsg(struct msgb *msg); |
Holger Freyther | 67b4b9a | 2009-01-01 03:46:11 +0000 | [diff] [blame] | 407 | int rsl_chan_release(struct gsm_lchan *lchan); |
Harald Welte | 52b1f98 | 2008-12-23 20:25:15 +0000 | [diff] [blame] | 408 | |
Holger Freyther | b015544 | 2009-02-03 23:24:04 +0000 | [diff] [blame] | 409 | /* BCCH related code */ |
| 410 | int rsl_ccch_conf_to_bs_cc_chans(int ccch_conf); |
| 411 | int rsl_ccch_conf_to_bs_ccch_sdcch_comb(int ccch_conf); |
| 412 | int rsl_number_of_paging_subchannels(struct gsm_bts *bts); |
| 413 | |
Harald Welte | 52b1f98 | 2008-12-23 20:25:15 +0000 | [diff] [blame] | 414 | #endif /* RSL_MT_H */ |
| 415 | |