Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1 | module RSL_Types { |
| 2 | |
Vadim Yanitskiy | c06688e | 2020-05-06 15:22:45 +0700 | [diff] [blame] | 3 | /* RSL types defining abstract TTCN-3 data types for the A-bis RSL protocol. |
Harald Welte | 35bb716 | 2018-01-03 21:07:52 +0100 | [diff] [blame] | 4 | * |
| 5 | * RSL is a 3GPP standard protocol used between BTS and BSC in a GSM network. |
| 6 | * |
| 7 | * (C) 2017 by Harald Welte <laforge@gnumonks.org> |
| 8 | * All rights reserved. |
| 9 | * |
| 10 | * Released under the terms of GNU General Public License, Version 2 or |
| 11 | * (at your option) any later version. |
Harald Welte | 34b5a95 | 2019-05-27 11:54:11 +0200 | [diff] [blame] | 12 | * |
| 13 | * SPDX-License-Identifier: GPL-2.0-or-later |
Harald Welte | 35bb716 | 2018-01-03 21:07:52 +0100 | [diff] [blame] | 14 | */ |
| 15 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 16 | import from General_Types all; |
| 17 | import from Osmocom_Types all; |
Vadim Yanitskiy | e02dbcc | 2020-08-25 04:20:51 +0700 | [diff] [blame] | 18 | import from GSM_RR_Types all; |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 19 | import from GSM_Types all; |
Vadim Yanitskiy | cc4623d | 2020-03-28 06:14:06 +0700 | [diff] [blame] | 20 | import from MobileL3_CommonIE_Types all; |
| 21 | import from L3_Templates all; |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 22 | |
| 23 | /* Section 9.1 */ |
| 24 | type enumerated RSL_MessageGroup { |
| 25 | RSL_MDISC_RESERVED ('0000000'B), |
| 26 | RSL_MDISC_RLL ('0000001'B), |
| 27 | RSL_MDISC_DCHAN ('0000100'B), |
| 28 | RSL_MDISC_CCHAN ('0000110'B), |
| 29 | RSL_MDISC_TRX_MGMT ('0001000'B), |
| 30 | RSL_MDISC_LCS ('0010000'B), |
| 31 | RSL_MDISC_IPACCESS ('0111111'B) |
| 32 | } with { variant "FIELDLENGTH(7)" }; |
| 33 | |
| 34 | /* Section 9.1 */ |
| 35 | type record RSL_MessageDiscriminator { |
| 36 | RSL_MessageGroup msg_group, |
| 37 | boolean transparent |
| 38 | } with { variant "FIELDORDER(msb)" }; |
| 39 | |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 40 | template (value) RSL_MessageDiscriminator ts_RSL_MsgDisc(RSL_MessageGroup mg, boolean t := true) := { |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 41 | msg_group := mg, |
| 42 | transparent := t |
| 43 | } |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 44 | template RSL_MessageDiscriminator tr_RSL_MsgDisc(template RSL_MessageGroup mg, boolean t := true) := { |
| 45 | msg_group := mg, |
| 46 | transparent := t |
| 47 | } |
| 48 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 49 | |
| 50 | /* Section 9.2 */ |
| 51 | type enumerated RSL_MessageType { |
| 52 | /* Radio Link Layer Management */ |
| 53 | RSL_MT_DATA_REQ ('00000001'B), |
| 54 | RSL_MT_DATA_IND ('00000010'B), |
| 55 | RSL_MT_ERROR_IND ('00000011'B), |
| 56 | RSL_MT_EST_REQ ('00000100'B), |
| 57 | RSL_MT_EST_CONF ('00000101'B), |
| 58 | RSL_MT_EST_IND ('00000110'B), |
| 59 | RSL_MT_REL_REQ ('00000111'B), |
| 60 | RSL_MT_REL_CONF ('00001000'B), |
| 61 | RSL_MT_REL_IND ('00001001'B), |
| 62 | RSL_MT_UNIT_DATA_REQ ('00001010'B), |
| 63 | RSL_MT_UNIT_DATA_IND ('00001011'B), |
| 64 | |
| 65 | /* non-standard below */ |
| 66 | RSL_MT_SUSP_REQ ('00001100'B), |
| 67 | RSL_MT_SUSP_CONF ('00001101'B), |
| 68 | RSL_MT_RES_REQ ('00001110'B), |
| 69 | RSL_MT_RECON_REQ ('00001111'B), |
| 70 | |
| 71 | /* Common Channel Management / TRX Management */ |
| 72 | RSL_MT_BCCH_INFO ('00010001'B), |
Harald Welte | 319be82 | 2017-12-07 17:50:26 +0100 | [diff] [blame] | 73 | RSL_MT_CCCH_LOAD_IND ('00010010'B), |
| 74 | RSL_MT_CHAN_RQD ('00010011'B), |
| 75 | RSL_MT_DELETE_IND ('00010100'B), |
| 76 | RSL_MT_PAGING_CMD ('00010101'B), |
| 77 | RSL_MT_IMMEDIATE_ASSIGN_CMD ('00010110'B), |
| 78 | RSL_MT_SMS_BC_REQ ('00010111'B), |
| 79 | RSL_MT_CHAN_CONF ('00011000'B), /* non-standard element */ |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 80 | /* empty */ |
| 81 | RSL_MT_RF_RES_IND ('00011001'B), |
Harald Welte | 319be82 | 2017-12-07 17:50:26 +0100 | [diff] [blame] | 82 | RSL_MT_SACCH_FILL ('00011010'B), |
| 83 | RSL_MT_OVERLOAD ('00011011'B), |
| 84 | RSL_MT_ERROR_REPORT ('00011100'B), |
| 85 | RSL_MT_SMS_BC_CMD ('00011101'B), |
| 86 | RSL_MT_CBCH_LOAD_IND ('00011110'B), |
| 87 | RSL_MT_NOT_CMD ('00011111'B), |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 88 | |
| 89 | /* Dedicate Channel Management */ |
| 90 | RSL_MT_CHAN_ACTIV ('00100001'B), |
Harald Welte | 319be82 | 2017-12-07 17:50:26 +0100 | [diff] [blame] | 91 | RSL_MT_CHAN_ACTIV_ACK ('00100010'B), |
| 92 | RSL_MT_CHAN_ACTIV_NACK ('00100011'B), |
| 93 | RSL_MT_CONN_FAIL ('00100100'B), |
| 94 | RSL_MT_DEACTIVATE_SACCH ('00100101'B), |
| 95 | RSL_MT_ENCR_CMD ('00100110'B), |
| 96 | RSL_MT_HANDO_DET ('00100111'B), |
| 97 | RSL_MT_MEAS_RES ('00101000'B), |
| 98 | RSL_MT_MODE_MODIFY_REQ ('00101001'B), |
| 99 | RSL_MT_MODE_MODIFY_ACK ('00101010'B), |
| 100 | RSL_MT_MODE_MODIFY_NACK ('00101011'B), |
| 101 | RSL_MT_PHY_CONTEXT_REQ ('00101100'B), |
| 102 | RSL_MT_PHY_CONTEXT_CONF ('00101101'B), |
| 103 | RSL_MT_RF_CHAN_REL ('00101110'B), |
| 104 | RSL_MT_MS_POWER_CONTROL ('00101111'B), |
| 105 | RSL_MT_BS_POWER_CONTROL ('00110000'B), /* 0x30 */ |
| 106 | RSL_MT_PREPROC_CONFIG ('00110001'B), |
| 107 | RSL_MT_PREPROC_MEAS_RES ('00110010'B), |
| 108 | RSL_MT_RF_CHAN_REL_ACK ('00110011'B), |
| 109 | RSL_MT_SACCH_INFO_MODIFY('00110100'B), |
| 110 | RSL_MT_TALKER_DET ('00110101'B), |
| 111 | RSL_MT_LISTENER_DET ('00110110'B), |
| 112 | RSL_MT_REMOTE_CODEC_CONF_REP ('00110111'B), |
| 113 | RSL_MT_RTD_REP ('00111000'B), |
| 114 | RSL_MT_PRE_HANDO_NOTIF ('00111001'B), |
| 115 | RSL_MT_MR_CODEC_MOD_REQ ('00111010'B), |
| 116 | RSL_MT_MR_CODEC_MOD_ACK ('00111011'B), |
| 117 | RSL_MT_MR_CODEC_MOD_NACK ('00111100'B), |
| 118 | RSL_MT_MR_CODEC_MOD_PER ('00111101'B), |
| 119 | RSL_MT_TFO_REP ('00111110'B), |
| 120 | RSL_MT_TFO_MOD_REQ ('00111111'B), /* 0x3f */ |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 121 | |
| 122 | RSL_MT_LOCATION_INFO ('01000001'B), |
| 123 | |
| 124 | /* ip.access specific RSL message types */ |
| 125 | RSL_MT_IPAC_DIR_RETR_ENQ ('01000000'B), |
| 126 | |
| 127 | RSL_MT_IPAC_PDCH_ACT ('01001000'B), |
Harald Welte | 319be82 | 2017-12-07 17:50:26 +0100 | [diff] [blame] | 128 | RSL_MT_IPAC_PDCH_ACT_ACK ('01001001'B), |
| 129 | RSL_MT_IPAC_PDCH_ACT_NACK ('01001010'B), |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 130 | RSL_MT_IPAC_PDCH_DEACT ('01001011'B), |
Harald Welte | 319be82 | 2017-12-07 17:50:26 +0100 | [diff] [blame] | 131 | RSL_MT_IPAC_PDCH_DEACT_ACK ('01001100'B), |
| 132 | RSL_MT_IPAC_PDCH_DEACT_NACK ('01001101'B), |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 133 | |
| 134 | RSL_MT_IPAC_CONNECT_MUX ('01010000'B), |
Harald Welte | f307500 | 2017-12-16 22:31:41 +0100 | [diff] [blame] | 135 | RSL_MT_IPAC_CONNECT_MUX_ACK ('01010001'B), |
| 136 | RSL_MT_IPAC_CONNECT_MUX_NACK ('01010010'B), |
| 137 | RSL_MT_IPAC_BIND_MUX ('01010011'B), |
| 138 | RSL_MT_IPAC_BIND_MUX_ACK ('01010100'B), |
| 139 | RSL_MT_IPAC_BIND_MUX_NACK ('01010101'B), |
| 140 | RSL_MT_IPAC_DISC_MUX ('01010110'B), |
| 141 | RSL_MT_IPAC_DISC_MUX_ACK ('01010111'B), |
| 142 | RSL_MT_IPAC_DISC_MUX_NACK ('01011000'B), |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 143 | RSL_MT_IPAC_MEAS_PREPROC_DFT ('01100000'B), |
Harald Welte | f307500 | 2017-12-16 22:31:41 +0100 | [diff] [blame] | 144 | RSL_MT_IPAC_HO_CAN_ENQ ('01100001'B), |
| 145 | RSL_MT_IPAC_HO_CAN_RES ('01100010'B), |
| 146 | RSL_MT_IPAC_CRCX ('01110000'B), |
| 147 | RSL_MT_IPAC_CRCX_ACK ('01110001'B), |
| 148 | RSL_MT_IPAC_CRCX_NACK ('01110010'B), |
| 149 | RSL_MT_IPAC_MDCX ('01110011'B), |
| 150 | RSL_MT_IPAC_MDCX_ACK ('01110100'B), |
| 151 | RSL_MT_IPAC_MDCX_NACK ('01110101'B), |
| 152 | RSL_MT_IPAC_DLCX_IND ('01110110'B), |
| 153 | RSL_MT_IPAC_DLCX ('01110111'B), |
| 154 | RSL_MT_IPAC_DLCX_ACK ('01111000'B), |
Harald Welte | 908ce54 | 2019-09-04 23:05:40 +0200 | [diff] [blame] | 155 | RSL_MT_IPAC_DLCX_NACK ('01111001'B), |
| 156 | |
| 157 | RSL_MT_OSMO_ETWS_CMD ('01111111'B) |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 158 | } with { variant "FIELDLENGTH(8)" }; |
| 159 | |
| 160 | /*! RSL Information Element Identifiers (Chapter 9.3) */ |
| 161 | type enumerated RSL_IE_Type { |
| 162 | RSL_IE_CHAN_NR ('00000001'B), |
Harald Welte | 319be82 | 2017-12-07 17:50:26 +0100 | [diff] [blame] | 163 | RSL_IE_LINK_IDENT ('00000010'B), |
| 164 | RSL_IE_ACT_TYPE ('00000011'B), |
| 165 | RSL_IE_BS_POWER ('00000100'B), |
| 166 | RSL_IE_CHAN_IDENT ('00000101'B), |
| 167 | RSL_IE_CHAN_MODE ('00000110'B), |
| 168 | RSL_IE_ENCR_INFO ('00000111'B), |
| 169 | RSL_IE_FRAME_NUMBER ('00001000'B), |
| 170 | RSL_IE_HANDO_REF ('00001001'B), |
| 171 | RSL_IE_L1_INFO ('00001010'B), |
| 172 | RSL_IE_L3_INFO ('00001011'B), |
| 173 | RSL_IE_MS_IDENTITY ('00001100'B), |
| 174 | RSL_IE_MS_POWER ('00001101'B), |
| 175 | RSL_IE_PAGING_GROUP ('00001110'B), |
| 176 | RSL_IE_PAGING_LOAD ('00001111'B), |
| 177 | RSL_IE_PYHS_CONTEXT ('00010000'B), |
| 178 | RSL_IE_ACCESS_DELAY ('00010001'B), |
| 179 | RSL_IE_RACH_LOAD ('00010010'B), |
| 180 | RSL_IE_REQ_REFERENCE ('00010011'B), |
| 181 | RSL_IE_RELEASE_MODE ('00010100'B), |
| 182 | RSL_IE_RESOURCE_INFO ('00010101'B), |
| 183 | RSL_IE_RLM_CAUSE ('00010110'B), |
| 184 | RSL_IE_STARTNG_TIME ('00010111'B), |
| 185 | RSL_IE_TIMING_ADVANCE ('00011000'B), |
| 186 | RSL_IE_UPLINK_MEAS ('00011001'B), |
| 187 | RSL_IE_CAUSE ('00011010'B), |
| 188 | RSL_IE_MEAS_RES_NR ('00011011'B), |
| 189 | RSL_IE_MSG_ID ('00011100'B), |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 190 | /* reserved */ |
| 191 | RSL_IE_SYSINFO_TYPE ('00011110'B), |
Harald Welte | 319be82 | 2017-12-07 17:50:26 +0100 | [diff] [blame] | 192 | RSL_IE_MS_POWER_PARAM ('00011111'B), |
| 193 | RSL_IE_BS_POWER_PARAM ('00100000'B), |
| 194 | RSL_IE_PREPROC_PARAM ('00100001'B), |
| 195 | RSL_IE_PREPROC_MEAS ('00100010'B), |
| 196 | RSL_IE_IMM_ASS_INFO ('00100011'B),/* Phase 1 (3.6.0), later Full below */ |
| 197 | RSL_IE_SMSCB_INFO ('00100100'B), |
| 198 | RSL_IE_MS_TIMING_OFFSET ('00100101'B), |
| 199 | RSL_IE_ERR_MSG ('00100110'B), |
| 200 | RSL_IE_FULL_BCCH_INFO ('00100111'B), |
| 201 | RSL_IE_CHAN_NEEDED ('00101000'B), |
| 202 | RSL_IE_CB_CMD_TYPE ('00101001'B), |
| 203 | RSL_IE_SMSCB_MSG ('00101010'B), |
| 204 | RSL_IE_FULL_IMM_ASS_INFO ('00101011'B), |
| 205 | RSL_IE_SACCH_INFO ('00101100'B), |
| 206 | RSL_IE_CBCH_LOAD_INFO ('00101101'B), |
| 207 | RSL_IE_SMSCB_CHAN_INDICATOR ('00101110'B), |
| 208 | RSL_IE_GROUP_CALL_REF ('00101111'B), |
| 209 | RSL_IE_CHAN_DESC ('00110000'B), |
| 210 | RSL_IE_NCH_DRX_INFO ('00110001'B), |
| 211 | RSL_IE_CMD_INDICATOR ('00110010'B), |
| 212 | RSL_IE_EMLPP_PRIO ('00110011'B), |
| 213 | RSL_IE_UIC ('00110100'B), |
| 214 | RSL_IE_MAIN_CHAN_REF ('00110101'B), |
| 215 | RSL_IE_MR_CONFIG ('00110110'B), |
| 216 | RSL_IE_MR_CONTROL ('00110111'B), |
| 217 | RSL_IE_SUP_CODEC_TYPES ('00111000'B), |
| 218 | RSL_IE_CODEC_CONFIG ('00111001'B), |
| 219 | RSL_IE_RTD ('00111010'B), |
| 220 | RSL_IE_TFO_STATUS ('00111011'B), |
| 221 | RSL_IE_LLP_APDU ('00111100'B), |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 222 | |
Vadim Yanitskiy | 1f53215 | 2021-11-01 20:37:56 +0300 | [diff] [blame] | 223 | RSL_IE_OSMO_REP_ACCH_CAP ('01100000'B), |
Neels Hofmeyr | 2bef0dd | 2021-04-22 21:46:00 +0000 | [diff] [blame] | 224 | RSL_IE_OSMO_TRAINING_SEQUENCE ('01100001'B), |
Vadim Yanitskiy | a203d3b | 2021-11-01 21:32:31 +0300 | [diff] [blame] | 225 | RSL_IE_OSMO_TOP_ACCH_CAP ('01100010'B), |
Neels Hofmeyr | 2bef0dd | 2021-04-22 21:46:00 +0000 | [diff] [blame] | 226 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 227 | /* ip.access */ |
| 228 | RSL_IE_IPAC_SRTP_CONFIG ('11100000'B), |
Harald Welte | 319be82 | 2017-12-07 17:50:26 +0100 | [diff] [blame] | 229 | RSL_IE_IPAC_PROXY_UDP ('11100001'B), |
| 230 | RSL_IE_IPAC_BSCMPL_TOUT ('11100010'B), |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 231 | |
| 232 | RSL_IE_IPAC_REMOTE_IP ('11110000'B), |
Harald Welte | 319be82 | 2017-12-07 17:50:26 +0100 | [diff] [blame] | 233 | RSL_IE_IPAC_REMOTE_PORT ('11110001'B), |
| 234 | RSL_IE_IPAC_RTP_PAYLOAD ('11110010'B), |
| 235 | RSL_IE_IPAC_LOCAL_PORT ('11110011'B), |
| 236 | RSL_IE_IPAC_SPEECH_MODE ('11110100'B), |
| 237 | RSL_IE_IPAC_LOCAL_IP ('11110101'B), |
| 238 | RSL_IE_IPAC_CONN_STAT ('11110110'B), |
| 239 | RSL_IE_IPAC_HO_C_PARMS ('11110111'B), |
| 240 | RSL_IE_IPAC_CONN_ID ('11111000'B), |
| 241 | RSL_IE_IPAC_RTP_CSD_FMT ('11111001'B), |
| 242 | RSL_IE_IPAC_RTP_JIT_BUF ('11111010'B), |
| 243 | RSL_IE_IPAC_RTP_COMPR ('11111011'B), |
| 244 | RSL_IE_IPAC_RTP_PAYLOAD2 ('11111100'B), |
| 245 | RSL_IE_IPAC_RTP_MPLEX ('11111101'B), |
| 246 | RSL_IE_IPAC_RTP_MPLEX_ID ('11111110'B) |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 247 | } with { variant "FIELDLENGTH(8)" }; |
| 248 | |
| 249 | type record RSL_LV { |
| 250 | uint8_t len, |
| 251 | octetstring payload |
| 252 | } with { variant (len) "LENGTHTO(payload)" } |
| 253 | |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 254 | template (value) RSL_LV ts_RSL_LV(template (value) octetstring pl) := { |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 255 | len := 0, |
| 256 | payload := pl |
| 257 | } |
| 258 | |
Harald Welte | 51d7410 | 2017-12-10 23:05:02 +0100 | [diff] [blame] | 259 | template RSL_LV tr_RSL_LV(template octetstring pl) := { |
| 260 | len := ?, |
| 261 | payload := pl |
| 262 | } |
| 263 | |
Harald Welte | 15bb5b5 | 2017-12-07 17:52:04 +0100 | [diff] [blame] | 264 | type record RSL_L16V { |
| 265 | uint16_t len, |
| 266 | octetstring payload |
| 267 | } with { variant (len) "LENGTHTO(payload)" } |
| 268 | |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 269 | template (value) RSL_L16V ts_RSL_L16V(template (value) octetstring pl) := { |
Harald Welte | 15bb5b5 | 2017-12-07 17:52:04 +0100 | [diff] [blame] | 270 | len := 0, |
| 271 | payload := pl |
| 272 | } |
| 273 | |
Harald Welte | 7794d5b | 2017-12-16 23:00:20 +0100 | [diff] [blame] | 274 | template RSL_L16V tr_RSL_L16V(template octetstring pl) := { |
| 275 | len := ?, |
| 276 | payload := pl |
| 277 | } |
| 278 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 279 | type record RSL_IE_V { |
| 280 | uint8_t val |
| 281 | } |
| 282 | |
| 283 | /* 9.3.3 */ |
| 284 | type record RSL_IE_ActivationType { |
| 285 | boolean reactivation, |
| 286 | uint4_t reserved, |
Harald Welte | 921f9e0 | 2019-05-19 22:27:11 +0200 | [diff] [blame] | 287 | RSL_ActivationAbits a_bits |
| 288 | }; |
| 289 | type enumerated RSL_ActivationAbits { |
| 290 | ACT_REL_TO_IMM_ASSIGN ('000'B), |
| 291 | ACT_REL_TO_NORM_ASSIGN ('001'B), |
| 292 | ACT_REL_TO_ASYNC_HANDOVER ('010'B), |
| 293 | ACT_REL_TO_SYNC_HANDOVER ('011'B), |
| 294 | ACT_REL_TO_ADDL_ASSIGN ('100'B), |
| 295 | ACT_REL_TO_MSLOT_CONFIG ('101'B), |
| 296 | ACT_REL_TO_OSMO_PDCH ('111'B) |
| 297 | } with { variant "FIELDLENGTH(3)" }; |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 298 | |
Harald Welte | 921f9e0 | 2019-05-19 22:27:11 +0200 | [diff] [blame] | 299 | const RSL_IE_ActivationType t_RSL_IE_ActType_IA := { |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 300 | reactivation := false, |
| 301 | reserved := 0, |
Harald Welte | 921f9e0 | 2019-05-19 22:27:11 +0200 | [diff] [blame] | 302 | a_bits := ACT_REL_TO_IMM_ASSIGN |
| 303 | } |
| 304 | const RSL_IE_ActivationType t_RSL_IE_ActType_ASS := { |
| 305 | reactivation := false, |
| 306 | reserved := 0, |
| 307 | a_bits := ACT_REL_TO_NORM_ASSIGN |
| 308 | } |
| 309 | const RSL_IE_ActivationType t_RSL_IE_ActType_HO_ASYNC := { |
| 310 | reactivation := false, |
| 311 | reserved := 0, |
| 312 | a_bits := ACT_REL_TO_ASYNC_HANDOVER |
| 313 | } |
| 314 | const RSL_IE_ActivationType t_RSL_IE_ActType_HO_SYNC := { |
| 315 | reactivation := false, |
| 316 | reserved := 0, |
| 317 | a_bits := ACT_REL_TO_SYNC_HANDOVER |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 318 | } |
| 319 | |
Harald Welte | 94e0c34 | 2018-04-07 11:33:23 +0200 | [diff] [blame] | 320 | /* osmocom-style dynamic PDCH */ |
Harald Welte | 921f9e0 | 2019-05-19 22:27:11 +0200 | [diff] [blame] | 321 | const RSL_IE_ActivationType t_RSL_IE_ActType_PDCH := { |
Harald Welte | 94e0c34 | 2018-04-07 11:33:23 +0200 | [diff] [blame] | 322 | reactivation := false, |
| 323 | reserved := 1, |
Harald Welte | 921f9e0 | 2019-05-19 22:27:11 +0200 | [diff] [blame] | 324 | a_bits := ACT_REL_TO_OSMO_PDCH |
Harald Welte | 94e0c34 | 2018-04-07 11:33:23 +0200 | [diff] [blame] | 325 | } |
| 326 | |
Vadim Yanitskiy | e02dbcc | 2020-08-25 04:20:51 +0700 | [diff] [blame] | 327 | /* 9.3.5 */ |
| 328 | type record RSL_IE_ChannelIdent { |
| 329 | uint8_t len, |
| 330 | /* 3GPP TS 44.018 Channel Description IE (TV) */ |
| 331 | ChannelDescriptionTV ch_desc, |
| 332 | /* 3GPP TS 44.018 Mobile Allocation IE (shall be empty) */ |
| 333 | MobileAllocationTLV ma |
| 334 | } with { variant (len) "LENGTHTO(ch_desc,ma)" }; |
| 335 | |
| 336 | template (value) RSL_IE_ChannelIdent |
| 337 | ts_RSL_ChannelIdent(template (value) ChannelDescription ch_desc) := { |
| 338 | len := 0, /* overwritten */ |
| 339 | ch_desc := { |
| 340 | iei := '64'O, |
| 341 | v := ch_desc |
| 342 | }, |
| 343 | /* Shall be included but empty */ |
| 344 | ma := { |
| 345 | iei := '72'O, |
| 346 | v := { |
| 347 | len := 0, |
| 348 | ma := ''B |
| 349 | } |
| 350 | } |
| 351 | }; |
| 352 | |
| 353 | template RSL_IE_ChannelIdent |
| 354 | tr_RSL_ChannelIdent(template (present) ChannelDescription ch_desc := ?, |
| 355 | template (present) MobileAllocationLV ma := ?) := { |
| 356 | len := ?, |
| 357 | ch_desc := { |
| 358 | iei := '64'O, |
| 359 | v := ch_desc |
| 360 | }, |
| 361 | /* Shall be included but empty */ |
| 362 | ma := { |
| 363 | iei := '72'O, |
| 364 | v := ma |
| 365 | } |
| 366 | }; |
| 367 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 368 | /* 9.3.6 */ |
| 369 | type enumerated RSL_SpeechDataInd { |
| 370 | RSL_SPDI_SPEECH ('00000001'B), |
| 371 | RSL_SPDI_DATA ('00000010'B), |
| 372 | RSL_SPDI_SIGN ('00000011'B) |
| 373 | } with { variant "FIELDLENGTH(8)" }; |
| 374 | type enumerated RSL_ChanRateType { |
| 375 | RSL_CHRT_SDCCH ('00000001'B), |
| 376 | RSL_CHRT_TCH_F ('00001000'B), |
| 377 | RSL_CHRT_TCH_H ('00001001'B), |
| 378 | RSL_CHRT_TCH_F_BD_MSLOT ('00001010'B), |
| 379 | RSL_CHRT_TCH_F_DL_MSLOT ('00011010'B), |
| 380 | RSL_CHRT_TCH_F_GROUP ('00011000'B), |
| 381 | RSL_CHRT_TCH_H_GROUP ('00011001'B), |
| 382 | RSL_CHRT_TCH_F_BCAST ('00101000'B), |
Neels Hofmeyr | 2bef0dd | 2021-04-22 21:46:00 +0000 | [diff] [blame] | 383 | RSL_CHRT_TCH_H_BCAST ('00101001'B), |
| 384 | RSL_CHRT_OSMO_TCH_F_VAMOS ('10001000'B), |
| 385 | RSL_CHRT_OSMO_TCH_H_VAMOS ('10001001'B) |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 386 | } with { variant "FIELDLENGTH(8)" }; |
| 387 | type enumerated RSL_SpeechAlgo { |
| 388 | RSL_CMOD_NO_RESOURCE ('00000000'B), |
| 389 | RSL_CMOD_SP_GSM1 ('00000001'B), |
| 390 | RSL_CMOD_SP_GSM2 ('00010001'B), |
| 391 | RSL_CMOD_SP_GSM3 ('00100001'B), |
| 392 | RSL_CMOD_SP_GSM4 ('00110001'B), |
| 393 | RSL_CMOD_SP_GSM5 ('00001001'B), |
| 394 | RSL_CMOD_SP_GSM6 ('00001101'B) |
| 395 | } with { variant "FIELDLENGTH(8)" }; |
| 396 | type record RSL_IE_ChannelMode { |
Harald Welte | 8f2c21d | 2017-12-07 17:52:40 +0100 | [diff] [blame] | 397 | uint8_t len, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 398 | BIT6 reserved, |
| 399 | boolean dtx_d, |
| 400 | boolean dtx_u, |
| 401 | RSL_SpeechDataInd spd_ind, |
| 402 | RSL_ChanRateType ch_rate_type, |
| 403 | RSL_SpeechAlgo coding_alg_rate |
Harald Welte | 8f2c21d | 2017-12-07 17:52:40 +0100 | [diff] [blame] | 404 | } with { variant (len) "LENGTHTO(reserved,dtx_d,dtx_u,spd_ind,ch_rate_type,coding_alg_rate)" } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 405 | |
Vadim Yanitskiy | 8fc43df | 2020-10-20 02:11:05 +0700 | [diff] [blame] | 406 | template (value) RSL_IE_ChannelMode ts_RSL_ChanMode_SIGN(RSL_ChanRateType t := RSL_CHRT_SDCCH, |
| 407 | boolean dtx_downlink := false) := { |
Harald Welte | 8f2c21d | 2017-12-07 17:52:40 +0100 | [diff] [blame] | 408 | len := 0, /* overwritten */ |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 409 | reserved := '000000'B, |
Stefan Sperling | 4880be4 | 2018-08-07 18:12:59 +0200 | [diff] [blame] | 410 | dtx_d := dtx_downlink, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 411 | dtx_u := false, |
| 412 | spd_ind := RSL_SPDI_SIGN, |
Philipp Maier | ac69346 | 2020-10-14 20:21:44 +0200 | [diff] [blame] | 413 | ch_rate_type := t, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 414 | coding_alg_rate := RSL_CMOD_NO_RESOURCE |
| 415 | } |
| 416 | |
Stefan Sperling | 4880be4 | 2018-08-07 18:12:59 +0200 | [diff] [blame] | 417 | template (value) RSL_IE_ChannelMode ts_RSL_ChanMode(RSL_ChanRateType t, RSL_SpeechAlgo alg, |
| 418 | boolean dtx_downlink := false) := { |
Harald Welte | 8f2c21d | 2017-12-07 17:52:40 +0100 | [diff] [blame] | 419 | len := 0, /* overwritten */ |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 420 | reserved := '000000'B, |
Stefan Sperling | 4880be4 | 2018-08-07 18:12:59 +0200 | [diff] [blame] | 421 | dtx_d := dtx_downlink, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 422 | dtx_u := false, |
| 423 | spd_ind := RSL_SPDI_SPEECH, |
| 424 | ch_rate_type := t, |
| 425 | coding_alg_rate := alg |
| 426 | } |
Harald Welte | 3618d9d | 2018-03-21 18:45:27 +0100 | [diff] [blame] | 427 | template RSL_IE_ChannelMode tr_RSL_ChanMode(template RSL_ChanRateType t, |
| 428 | template RSL_SpeechAlgo alg) := { |
| 429 | len := ?, |
| 430 | reserved := '000000'B, |
| 431 | dtx_d := ?, |
| 432 | dtx_u := ?, |
| 433 | spd_ind := RSL_SPDI_SPEECH, |
| 434 | ch_rate_type := t, |
| 435 | coding_alg_rate := alg |
| 436 | } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 437 | |
Vadim Yanitskiy | 117c176 | 2020-06-16 01:40:10 +0700 | [diff] [blame] | 438 | /* 9.3.4 BS Power IE */ |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 439 | type record RSL_IE_BS_Power { |
Vadim Yanitskiy | 117c176 | 2020-06-16 01:40:10 +0700 | [diff] [blame] | 440 | uint2_t reserved, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 441 | boolean epc, |
| 442 | boolean fpc, |
Vadim Yanitskiy | 117c176 | 2020-06-16 01:40:10 +0700 | [diff] [blame] | 443 | uint4_t power_level |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 444 | } |
| 445 | |
Vadim Yanitskiy | 117c176 | 2020-06-16 01:40:10 +0700 | [diff] [blame] | 446 | template (value) RSL_IE_BS_Power ts_RSL_IE_BS_Power(uint4_t power_level, |
Eric Wild | ae8f262 | 2019-06-18 17:05:11 +0200 | [diff] [blame] | 447 | boolean epc := false, boolean fpc := false) := { |
| 448 | reserved := 0, |
| 449 | epc := epc, |
| 450 | fpc := fpc, |
| 451 | power_level := power_level |
| 452 | } |
Vadim Yanitskiy | 2a5a1ef | 2021-06-30 00:51:48 +0200 | [diff] [blame] | 453 | template RSL_IE_BS_Power |
| 454 | tr_RSL_IE_BS_Power(template (present) uint4_t power_level, |
| 455 | template (present) boolean epc := ?, |
| 456 | template (present) boolean fpc := ?) := { |
| 457 | reserved := ?, |
| 458 | epc := epc, |
| 459 | fpc := fpc, |
| 460 | power_level := power_level |
| 461 | } |
Eric Wild | ae8f262 | 2019-06-18 17:05:11 +0200 | [diff] [blame] | 462 | |
Harald Welte | 73cd271 | 2017-12-17 00:44:52 +0100 | [diff] [blame] | 463 | /* 9.3.7 */ |
Harald Welte | e613f96 | 2018-04-18 22:38:16 +0200 | [diff] [blame] | 464 | type enumerated RSL_AlgId { |
| 465 | RSL_ALG_ID_A5_0 ('00000001'B), |
| 466 | RSL_ALG_ID_A5_1 ('00000010'B), |
| 467 | RSL_ALG_ID_A5_2 ('00000011'B), |
| 468 | RSL_ALG_ID_A5_3 ('00000100'B), |
| 469 | RSL_ALG_ID_A5_4 ('00000101'B), |
| 470 | RSL_ALG_ID_A5_5 ('00000110'B), |
| 471 | RSL_ALG_ID_A5_6 ('00000111'B), |
| 472 | RSL_ALG_ID_A5_7 ('00001000'B) |
| 473 | } with { variant "FIELDLENGTH(8)" }; |
Harald Welte | 73cd271 | 2017-12-17 00:44:52 +0100 | [diff] [blame] | 474 | type record RSL_IE_EncryptionInfo { |
| 475 | uint8_t len, |
Harald Welte | e613f96 | 2018-04-18 22:38:16 +0200 | [diff] [blame] | 476 | RSL_AlgId alg_id, |
Harald Welte | 73cd271 | 2017-12-17 00:44:52 +0100 | [diff] [blame] | 477 | octetstring key |
| 478 | } with { variant (len) "LENGTHTO(alg_id,key)" }; |
| 479 | |
Harald Welte | e613f96 | 2018-04-18 22:38:16 +0200 | [diff] [blame] | 480 | template RSL_IE_EncryptionInfo tr_RSL_IE_EncrInfo(template RSL_AlgId alg, |
| 481 | template octetstring key) := { |
Harald Welte | 73cd271 | 2017-12-17 00:44:52 +0100 | [diff] [blame] | 482 | len := ?, |
| 483 | alg_id := alg, |
| 484 | key := key |
| 485 | } |
Harald Welte | e613f96 | 2018-04-18 22:38:16 +0200 | [diff] [blame] | 486 | template (value) RSL_IE_EncryptionInfo ts_RSL_IE_EncrInfo(template (value) RSL_AlgId alg, |
| 487 | octetstring key) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 488 | len := 0, /* overwritten */ |
| 489 | alg_id := alg, |
| 490 | key := key |
| 491 | } |
| 492 | |
| 493 | |
Harald Welte | 73cd271 | 2017-12-17 00:44:52 +0100 | [diff] [blame] | 494 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 495 | /* 9.3.8 */ |
| 496 | type record RSL_IE_FrameNumber { |
| 497 | uint5_t t1_p, |
| 498 | uint6_t t3, |
| 499 | uint5_t t2 |
| 500 | } |
| 501 | type RSL_IE_FrameNumber RSL_IE_StartingTime; |
| 502 | |
| 503 | /* 9.3.10 */ |
| 504 | type record RSL_IE_L1Info { |
| 505 | uint5_t ms_power_lvl, |
| 506 | boolean fpc, |
| 507 | uint2_t reserved, |
| 508 | uint8_t actual_ta |
| 509 | } |
| 510 | |
| 511 | /* 9.3.13 */ |
| 512 | type record RSL_IE_MS_Power { |
| 513 | uint2_t reserved, |
| 514 | boolean fpc_epc, |
| 515 | uint5_t power_level |
| 516 | } |
Pau Espin Pedrol | f7630a6 | 2019-10-28 15:07:08 +0100 | [diff] [blame] | 517 | template RSL_IE_MS_Power tr_RSL_IE_MS_Power(template uint5_t power_level := ?, |
| 518 | template boolean fpc_epc := false) := { |
| 519 | reserved := 0, |
| 520 | fpc_epc := fpc_epc, |
| 521 | power_level := power_level |
| 522 | } |
Harald Welte | 1028017 | 2019-05-19 22:28:04 +0200 | [diff] [blame] | 523 | template (value) RSL_IE_MS_Power ts_RSL_IE_MS_Power(uint5_t power_level, |
| 524 | boolean fpc_epc := false) := { |
| 525 | reserved := 0, |
| 526 | fpc_epc := fpc_epc, |
| 527 | power_level := power_level |
| 528 | } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 529 | |
Harald Welte | d5f521e | 2017-12-07 17:53:06 +0100 | [diff] [blame] | 530 | /* 9.3.18 */ |
| 531 | type record RSL_IE_RachLoad { |
| 532 | uint8_t len, |
| 533 | uint16_t slot_count, |
| 534 | uint16_t busy_count, |
| 535 | uint16_t access_count |
| 536 | } with { variant (len) "LENGTHTO(slot_count,busy_count,access_count)" } |
| 537 | |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 538 | template (value) RSL_IE_RachLoad ts_RSL_IE_RachLoad(uint16_t slot, uint16_t busy, uint16_t acc) := { |
Harald Welte | d5f521e | 2017-12-07 17:53:06 +0100 | [diff] [blame] | 539 | len := 0, /* overwritten */ |
| 540 | slot_count := slot, |
| 541 | busy_count := busy, |
| 542 | access_count := acc |
| 543 | } |
| 544 | |
Harald Welte | 68e495b | 2018-02-25 00:05:57 +0100 | [diff] [blame] | 545 | template RSL_IE_RachLoad tr_RSL_IE_RachLoad(template uint16_t slot, |
| 546 | template uint16_t busy, |
| 547 | template uint16_t acc) := { |
| 548 | len := ?, /* overwritten */ |
| 549 | slot_count := slot, |
| 550 | busy_count := busy, |
| 551 | access_count := acc |
| 552 | } |
| 553 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 554 | /* 9.3.19 */ |
| 555 | type record RSL_IE_RequestRef { |
| 556 | OCT1 ra, |
| 557 | RSL_IE_FrameNumber frame_nr |
| 558 | } |
| 559 | |
| 560 | /* 3GPP TS 44.018 / 10.5.2.38 Starting Time */ |
Harald Welte | 94e0c34 | 2018-04-07 11:33:23 +0200 | [diff] [blame] | 561 | template (value) RSL_IE_FrameNumber ts_RSL_IE_FrameNumber(GsmFrameNumber fn) := { |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 562 | t1_p := (fn / 1326) mod 32, |
| 563 | t3 := fn mod 51, |
| 564 | t2 := fn mod 26 |
| 565 | } |
| 566 | |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 567 | function tr_RSL_IE_FrameNumber(template GsmFrameNumber fn) return template RSL_IE_FrameNumber { |
| 568 | if (istemplatekind(fn, "?")) { |
| 569 | return ?; |
| 570 | } else { |
| 571 | return ts_RSL_IE_FrameNumber(valueof(fn)); |
| 572 | } |
| 573 | } |
| 574 | |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 575 | template (value) RSL_IE_RequestRef ts_RSL_IE_ReqRef(OCT1 ra, GsmFrameNumber frame_nr) := { |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 576 | ra := ra, |
| 577 | frame_nr := ts_RSL_IE_FrameNumber(frame_nr) |
| 578 | } |
| 579 | |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 580 | template RSL_IE_RequestRef tr_RSL_IE_ReqRef(template OCT1 ra, template GsmFrameNumber frame_nr) := { |
| 581 | ra := ra, |
| 582 | frame_nr := tr_RSL_IE_FrameNumber(frame_nr) |
| 583 | } |
| 584 | |
Vadim Yanitskiy | 9f69953 | 2021-06-03 17:29:22 +0200 | [diff] [blame] | 585 | /* 9.3.21 Resource Information */ |
| 586 | type record RSL_IE_ResourceInfo { |
| 587 | uint8_t len, |
| 588 | RSL_ResourceInfo info |
| 589 | } with { variant (len) "LENGTHTO(info)" }; |
| 590 | |
| 591 | type record of RSL_ResourceInfoItem RSL_ResourceInfo; |
| 592 | type record RSL_ResourceInfoItem { |
| 593 | RslChannelNr chan_nr, |
| 594 | uint3_t interf_band, |
| 595 | BIT5 rfu ('00000'B) |
| 596 | }; |
| 597 | |
| 598 | template (value) RSL_ResourceInfoItem |
| 599 | ts_RSL_ResourceInfoItem(template (value) RslChannelNr chan_nr, |
| 600 | template (value) uint3_t interf_band := 0) := { |
| 601 | chan_nr := chan_nr, |
| 602 | interf_band := interf_band, |
| 603 | rfu := '00000'B |
| 604 | } |
| 605 | template RSL_ResourceInfoItem |
| 606 | tr_RSL_ResourceInfoItem(template (present) RslChannelNr chan_nr := ?, |
| 607 | template (present) uint3_t interf_band := ?) := { |
| 608 | chan_nr := chan_nr, |
| 609 | interf_band := interf_band, |
| 610 | rfu := ? /* Tolerate unknown values */ |
| 611 | } |
| 612 | |
Harald Welte | 15de8ba | 2018-06-29 08:51:42 +0200 | [diff] [blame] | 613 | /* Osmocom Extension */ |
| 614 | type record RSL_IE_UplinkMeasSuppMeasInfo { |
| 615 | int16_t toa256_mean, |
| 616 | int16_t toa256_min, |
| 617 | int16_t toa256_max, |
| 618 | uint16_t toa256_std_dev |
| 619 | }; |
| 620 | |
Harald Welte | 2691adf | 2018-02-22 17:32:39 +0100 | [diff] [blame] | 621 | /* 9.3.25 */ |
| 622 | type record RSL_IE_UplinkMeas { |
| 623 | uint8_t len, |
| 624 | BIT1 rfu, |
| 625 | boolean dtx_d, |
| 626 | uint6_t rxlev_f_u, |
| 627 | BIT2 reserved1, |
| 628 | uint6_t rxlev_s_u, |
| 629 | BIT2 reserved2, |
| 630 | uint3_t rxq_f_u, |
| 631 | uint3_t rxq_s_u, |
Harald Welte | 15de8ba | 2018-06-29 08:51:42 +0200 | [diff] [blame] | 632 | RSL_IE_UplinkMeasSuppMeasInfo supp_meas_info optional |
Harald Welte | 2691adf | 2018-02-22 17:32:39 +0100 | [diff] [blame] | 633 | } with { variant (len) "LENGTHTO(rfu,dtx_d,rxlev_f_u,reserved1,rxlev_s_u,reserved2,rxq_f_u,rxq_s_u,supp_meas_info)" }; |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 634 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 635 | /* 9.3.26 */ |
Harald Welte | a8ed906 | 2017-12-14 09:46:01 +0100 | [diff] [blame] | 636 | type enumerated RSL_Cause { |
| 637 | /* normal event */ |
| 638 | RSL_ERR_RADIO_IF_FAIL ('00'O), |
| 639 | RSL_ERR_RADIO_LINK_FAIL ('01'O), |
| 640 | RSL_ERR_HANDOVER_ACC_FAIL ('02'O), |
| 641 | RSL_ERR_TALKER_ACC_FAIL ('03'O), |
| 642 | RSL_ERR_OM_INTERVENTION ('07'O), |
| 643 | RSL_ERR_NORMAL_UNSPEC ('0f'O), |
| 644 | RSL_ERR_T_MSRFPCI_EXP ('18'O), |
| 645 | /* resource unavailable */ |
| 646 | RSL_ERR_EQUIPMENT_FAIL ('20'O), |
| 647 | RSL_ERR_RR_UNAVAIL ('21'O), |
| 648 | RSL_ERR_TERR_CH_FAIL ('22'O), |
| 649 | RSL_ERR_CCCH_OVERLOAD ('23'O), |
| 650 | RSL_ERR_ACCH_OVERLOAD ('24'O), |
| 651 | RSL_ERR_PROCESSOR_OVERLOAD ('25'O), |
| 652 | RSL_ERR_BTS_NOT_EQUIPPED ('27'O), |
| 653 | RSL_ERR_REMOTE_TRAU_FAILURE ('28'O), |
| 654 | RSL_ERR_NOTIF_OVERFLOW ('29'O), |
| 655 | RSL_ERR_RES_UNAVAIL ('2f'O), |
| 656 | /* service or option not available */ |
| 657 | RSL_ERR_TRANSC_UNAVAIL ('30'O), |
| 658 | RSL_ERR_SERV_OPT_UNAVAIL ('3f'O), |
| 659 | /* service or option not implemented */ |
| 660 | RSL_ERR_ENCR_UNIMPL ('40'O), |
| 661 | RSL_ERR_SERV_OPT_UNIMPL ('4f'O), |
| 662 | /* invalid message */ |
| 663 | RSL_ERR_RCH_ALR_ACTV_ALLOC ('50'O), |
Harald Welte | 9912eb5 | 2018-02-25 13:30:15 +0100 | [diff] [blame] | 664 | RSL_ERR_IPA_RCH_NOT_ACTV_ALLOC ('51'O), |
| 665 | RSL_ERR_IPA_CONN_INVALID ('52'O), |
| 666 | RSL_ERR_IPA_CONN_IN_USE ('53'O), |
| 667 | RSL_ERR_IPA_CONN_ALREADY_EXISTS ('54'O), |
Harald Welte | a8ed906 | 2017-12-14 09:46:01 +0100 | [diff] [blame] | 668 | RSL_ERR_INVALID_MESSAGE ('5f'O), |
| 669 | /* protocol error */ |
| 670 | RSL_ERR_MSG_DISCR ('60'O), |
| 671 | RSL_ERR_MSG_TYPE ('61'O), |
| 672 | RSL_ERR_MSG_SEQ ('62'O), |
| 673 | RSL_ERR_IE_ERROR ('63'O), |
| 674 | RSL_ERR_MAND_IE_ERROR ('64'O), |
| 675 | RSL_ERR_OPT_IE_ERROR ('65'O), |
| 676 | RSL_ERR_IE_NONEXIST ('66'O), |
| 677 | RSL_ERR_IE_LENGTH ('67'O), |
| 678 | RSL_ERR_IE_CONTENT ('68'O), |
| 679 | RSL_ERR_PROTO ('6f'O), |
| 680 | /* interworking */ |
| 681 | RSL_ERR_INTERWORKING ('7f'O) |
| 682 | }; |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 683 | type record RSL_IE_Cause { |
Harald Welte | 6efa8e3 | 2017-12-09 22:34:06 +0100 | [diff] [blame] | 684 | uint8_t len, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 685 | uint1_t e, |
| 686 | RSL_Cause cause, |
| 687 | octetstring cause_ext optional |
Harald Welte | 6efa8e3 | 2017-12-09 22:34:06 +0100 | [diff] [blame] | 688 | } with { variant (len) "LENGTHTO(e,cause,cause_ext)" } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 689 | |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 690 | template (value) RSL_IE_Cause ts_RSL_IE_Cause(RSL_Cause cause) := { |
Harald Welte | 6efa8e3 | 2017-12-09 22:34:06 +0100 | [diff] [blame] | 691 | len := 0, /* overwritten */ |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 692 | e := 0, |
| 693 | cause := cause, |
| 694 | cause_ext := omit |
| 695 | } |
| 696 | |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 697 | template RSL_IE_Cause tr_RSL_IE_Cause(template RSL_Cause cause) := { |
| 698 | len := ?, |
| 699 | e := 0, |
| 700 | cause := cause, |
| 701 | cause_ext := omit |
| 702 | } |
| 703 | |
Harald Welte | c8d363c | 2019-05-19 20:36:48 +0200 | [diff] [blame] | 704 | /* 9.3.29 */ |
| 705 | type record RSL_SacchInfo { |
| 706 | uint8_t len, |
| 707 | uint8_t num_msgs, |
| 708 | RSL_SacchInfoElements elems |
| 709 | } with { |
| 710 | variant (len) "LENGTHTO(num_msgs,elems)"; |
| 711 | variant (num_msgs) "LENGTHTO(elems)"; |
| 712 | variant (num_msgs) "UNIT(elements)" |
| 713 | }; |
| 714 | type record RSL_SacchInfoElement { |
| 715 | RSL_IE_SysinfoType si_type, |
| 716 | uint8_t len, |
| 717 | octetstring msg |
| 718 | } with { |
| 719 | variant (len) "LENGTHTO(msg)"; |
| 720 | }; |
| 721 | type record of RSL_SacchInfoElement RSL_SacchInfoElements; |
| 722 | template (value) RSL_SacchInfo ts_RSL_SacchInfo(template (value) RSL_SacchInfoElements elems) := { |
| 723 | len := 0, /* overwritten */ |
| 724 | num_msgs := 0, /* overwritten */ |
| 725 | elems := elems |
| 726 | } |
| 727 | template (value) RSL_SacchInfoElement ts_RSL_SacchInfoElem(RSL_IE_SysinfoType tp, octetstring msg) := { |
| 728 | si_type := tp, |
| 729 | len := lengthof(msg), |
| 730 | msg := msg |
| 731 | } |
| 732 | |
Eric Wild | 61edb7e | 2019-06-03 12:38:31 +0200 | [diff] [blame] | 733 | /* 9.3.31 */ |
| 734 | type record RSL_IE_MS_Power_Parameters { |
| 735 | uint8_t len, |
| 736 | octetstring params |
| 737 | } with { |
| 738 | variant (len) "LENGTHTO(params)"; |
| 739 | }; |
| 740 | template (value) RSL_IE_MS_Power_Parameters ts_RSL_IE_MS_Power_Parameters(octetstring params) := { |
| 741 | len := 0, /* overwritten */ |
| 742 | params := params |
| 743 | } |
| 744 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 745 | /* 9.3.40 */ |
| 746 | type enumerated RSL_ChanNeeded { |
| 747 | RSL_CHANNEED_ANY ('00'B), |
| 748 | RSL_CHANNEED_SDCCH ('01'B), |
| 749 | RSL_CHANNEED_TCH_F ('10'B), |
| 750 | RSL_CHANNEED_TCH_ForH ('11'B) |
Harald Welte | 51d7410 | 2017-12-10 23:05:02 +0100 | [diff] [blame] | 751 | } with { variant "FIELDLENGTH(2)" }; |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 752 | type record RSL_IE_ChanNeeded { |
| 753 | uint6_t reserved, |
| 754 | RSL_ChanNeeded chan_needed |
| 755 | } |
| 756 | |
Harald Welte | cc37320 | 2018-09-10 10:28:21 +0200 | [diff] [blame] | 757 | /* 9.3.41 CB Command Type */ |
| 758 | type enumerated RSL_CbCommand { |
| 759 | RSL_CB_CMD_NORMAL ('0000'B), |
| 760 | RSL_CB_CMD_SCHEDULE ('1000'B), |
| 761 | RSL_CB_CMD_DEFAULT ('1110'B), |
| 762 | RSL_CB_CMD_NULL ('1111'B) |
| 763 | } with { variant "FIELDLENGTH(4)" }; |
| 764 | type record RSL_IE_CbCommandType { |
| 765 | RSL_CbCommand command, |
| 766 | boolean default_bcast_null, |
| 767 | BIT1 spare, |
| 768 | uint2_t last_block |
| 769 | }; |
| 770 | template (value) RSL_IE_CbCommandType ts_RSL_IE_CbCmdType(RSL_CbCommand cmd := RSL_CB_CMD_NORMAL, |
| 771 | uint2_t last_block := 1, |
| 772 | boolean def_bcast_null := true) := { |
| 773 | command := cmd, |
| 774 | default_bcast_null := def_bcast_null, |
| 775 | spare := '0'B, |
| 776 | last_block := last_block |
| 777 | } |
| 778 | |
Harald Welte | 4a129f8 | 2019-05-21 16:35:22 +0200 | [diff] [blame] | 779 | /* 9.4.43 CBCH Load Information */ |
| 780 | type record RSL_IE_CbchLoadInfo { |
| 781 | boolean overflow, |
| 782 | BIT3 spare, |
| 783 | uint4_t slot_count |
| 784 | }; |
| 785 | template RSL_IE_CbchLoadInfo tr_CbchLoadInfo(template boolean overflow, |
| 786 | template uint4_t slot_count) := { |
| 787 | overflow := overflow, |
| 788 | spare := ?, |
| 789 | slot_count := slot_count |
| 790 | } |
| 791 | template (value) RSL_IE_CbchLoadInfo ts_CbchLoadInfo(boolean overflow, uint4_t slot_count) := { |
| 792 | overflow := overflow, |
| 793 | spare := '000'B, |
| 794 | slot_count := slot_count |
| 795 | } |
| 796 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 797 | /* 9.3.53 */ |
| 798 | type record RSL_IE_MultirateCtrl { |
| 799 | uint3_t spare, |
| 800 | boolean od, |
| 801 | boolean pre, |
| 802 | uint2_t rae, |
| 803 | boolean tfo |
| 804 | } |
| 805 | |
| 806 | type enumerated RSL_IE_SysinfoType { |
| 807 | RSL_SYSTEM_INFO_8 ('00000000'B), |
| 808 | RSL_SYSTEM_INFO_1 ('00000001'B), |
| 809 | RSL_SYSTEM_INFO_2 ('00000010'B), |
| 810 | RSL_SYSTEM_INFO_3 ('00000011'B), |
| 811 | RSL_SYSTEM_INFO_4 ('00000100'B), |
| 812 | RSL_SYSTEM_INFO_5 ('00000101'B), |
| 813 | RSL_SYSTEM_INFO_6 ('00000110'B), |
| 814 | RSL_SYSTEM_INFO_7 ('00000111'B), |
| 815 | RSL_SYSTEM_INFO_16 ('00001000'B), |
| 816 | RSL_SYSTEM_INFO_17 ('00001001'B), |
| 817 | RSL_SYSTEM_INFO_2bis ('00001010'B), |
| 818 | RSL_SYSTEM_INFO_2ter ('00001011'B), |
| 819 | RSL_SYSTEM_INFO_5bis ('00001101'B), |
| 820 | RSL_SYSTEM_INFO_5ter ('00001110'B), |
| 821 | RSL_SYSTEM_INFO_10 ('00001111'B), |
| 822 | RSL_EXT_MEAS_ORDER ('01000111'B), |
| 823 | RSL_MEAS_INFO ('01001000'B), |
| 824 | RSL_SYSTEM_INFO_13 ('00101000'B), |
| 825 | RSL_ERIC_SYSTEM_INFO_13 ('00001100'B), |
| 826 | RSL_SYSTEM_INFO_2quater ('00101001'B), |
| 827 | RSL_SYSTEM_INFO_9 ('00101010'B), |
| 828 | RSL_SYSTEM_INFO_18 ('00101011'B), |
| 829 | RSL_SYSTEM_INFO_19 ('00101100'B), |
| 830 | RSL_SYSTEM_INFO_20 ('00101101'B) |
| 831 | } with { variant "FIELDLENGTH(8)" } |
| 832 | |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 833 | type record RSL_IE_IPA_ConnectionStats { |
| 834 | uint8_t len, |
| 835 | uint32_t tx_packets, |
| 836 | uint32_t tx_octets, |
| 837 | uint32_t rx_packets, |
| 838 | uint32_t rx_octets, |
| 839 | uint32_t lost_packets, |
| 840 | uint32_t jitter, |
| 841 | uint32_t avg_delay |
| 842 | } with { variant (len) "LENGTHTO(tx_packets,tx_octets,rx_packets,rx_octets,lost_packets,jitter,avg_delay)" } |
| 843 | |
| 844 | type enumerated RSL_IPA_SpeechMode { |
| 845 | RSL_IPA_SPM_SENDRECV ('00'B), |
| 846 | RSL_IPA_SPM_RECVONLY ('01'B), |
| 847 | RSL_IPA_SPM_SENDONLY ('10'B), |
| 848 | RSL_IPA_SPM_RESERVED ('11'B) |
| 849 | } with { variant "FIELDLENGTH(2)" } |
| 850 | |
| 851 | type enumerated RSL_IPA_Codec { |
| 852 | RSL_IPA_CODEC_FR ('0000'B), |
| 853 | RSL_IPA_CODEC_EFR ('0001'B), |
| 854 | RSL_IPA_CODEC_AMR_F ('0010'B), |
| 855 | RSL_IPA_CODEC_HR ('0011'B), |
| 856 | RSL_IPA_CODEC_AMR_H ('0101'B), |
| 857 | RSL_IPA_CODEC_RTP_PT ('1111'B) |
| 858 | } with { variant "FIELDLENGTH(4)" } |
| 859 | |
| 860 | type record RSL_IE_IPA_SpeechMode { |
| 861 | BIT2 reserved, |
| 862 | RSL_IPA_SpeechMode mode, |
| 863 | RSL_IPA_Codec codec |
| 864 | } |
| 865 | |
Harald Welte | 0472ab4 | 2018-03-12 15:02:26 +0100 | [diff] [blame] | 866 | /* 9.3.20 */ |
| 867 | type enumerated RSL_IE_ReleaseMode { |
| 868 | RSL_REL_MODE_NORMAL ('00'B), |
| 869 | REL_REL_MODE_LOCAL ('01'B) |
| 870 | } |
| 871 | |
Neels Hofmeyr | 2bef0dd | 2021-04-22 21:46:00 +0000 | [diff] [blame] | 872 | type record RSL_IE_OSMO_TrainingSequence { |
| 873 | uint8_t len, |
| 874 | uint8_t tsc_set, |
| 875 | uint8_t tsc |
| 876 | } with { variant (len) "LENGTHTO(tsc_set,tsc)" } |
| 877 | |
Vadim Yanitskiy | 1f53215 | 2021-11-01 20:37:56 +0300 | [diff] [blame] | 878 | type record RSL_IE_OSMO_RepAcchCap { |
| 879 | uint8_t len, |
| 880 | BIT1 rfu ('0'B), |
| 881 | uint3_t rxqual, |
| 882 | boolean ul_sacch, |
| 883 | boolean dl_sacch, |
| 884 | boolean dl_facch_all, |
| 885 | boolean dl_facch_cmd |
| 886 | } with { variant (len) "LENGTHTO(rfu,rxqual,ul_sacch,dl_sacch,dl_facch_all,dl_facch_cmd)" } |
| 887 | |
Vadim Yanitskiy | a203d3b | 2021-11-01 21:32:31 +0300 | [diff] [blame] | 888 | type record RSL_IE_OSMO_TopAcchCap { |
| 889 | uint8_t len, |
| 890 | boolean sacch_enable, |
| 891 | boolean facch_enable, |
| 892 | uint3_t rxqual, |
| 893 | uint3_t overpower_db |
| 894 | } with { variant (len) "LENGTHTO(sacch_enable,facch_enable,rxqual,overpower_db)" } |
| 895 | |
Vadim Yanitskiy | 66d3c33 | 2021-11-06 18:18:13 +0300 | [diff] [blame] | 896 | template (value) RSL_IE_OSMO_TopAcchCap |
| 897 | ts_RSL_IE_OSMO_TopAcchCap(template (value) uint3_t overpower := 2, |
| 898 | template (value) uint3_t rxqual := 4, |
| 899 | boolean facch_enable := true, |
| 900 | boolean sacch_enable := true) := { |
| 901 | len := 0, /* overwritten */ |
| 902 | sacch_enable := sacch_enable, |
| 903 | facch_enable := facch_enable, |
| 904 | rxqual := rxqual, |
| 905 | overpower_db := overpower |
| 906 | }; |
| 907 | template RSL_IE_OSMO_TopAcchCap |
| 908 | tr_RSL_IE_OSMO_TopAcchCap(template (present) uint3_t overpower := ?, |
| 909 | template (present) uint3_t rxqual := ?, |
| 910 | template (present) boolean facch_enable := ?, |
| 911 | template (present) boolean sacch_enable := ?) := { |
| 912 | len := ?, /* overwritten */ |
| 913 | sacch_enable := sacch_enable, |
| 914 | facch_enable := facch_enable, |
| 915 | rxqual := rxqual, |
| 916 | overpower_db := overpower |
| 917 | }; |
| 918 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 919 | /* union of all IE bodies */ |
| 920 | type union RSL_IE_Body { |
| 921 | RslChannelNr chan_nr, |
| 922 | RslLinkId link_id, |
Harald Welte | 15bb5b5 | 2017-12-07 17:52:04 +0100 | [diff] [blame] | 923 | RSL_L16V l3_info, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 924 | RSL_LV rlm_cause, |
Harald Welte | 0472ab4 | 2018-03-12 15:02:26 +0100 | [diff] [blame] | 925 | RSL_IE_ReleaseMode release_mode, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 926 | RSL_IE_ActivationType act_type, |
Vadim Yanitskiy | e02dbcc | 2020-08-25 04:20:51 +0700 | [diff] [blame] | 927 | RSL_IE_ChannelIdent chan_ident, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 928 | RSL_IE_ChannelMode chan_mode, |
| 929 | uint8_t handover_ref, |
| 930 | RSL_IE_BS_Power bs_power, |
Vadim Yanitskiy | 802508e | 2020-11-11 07:25:47 +0700 | [diff] [blame] | 931 | RSL_LV bs_power_params, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 932 | RSL_IE_MS_Power ms_power, |
Eric Wild | 61edb7e | 2019-06-03 12:38:31 +0200 | [diff] [blame] | 933 | RSL_IE_MS_Power_Parameters ms_power_params, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 934 | uint8_t timing_adv, |
| 935 | RSL_IE_MultirateCtrl multirate_ctrl, |
Harald Welte | a670615 | 2019-05-19 20:38:18 +0200 | [diff] [blame] | 936 | uint8_t msg_id, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 937 | RSL_IE_FrameNumber frame_nr, |
| 938 | RSL_IE_Cause cause, |
| 939 | uint8_t access_delay, |
Harald Welte | d5f521e | 2017-12-07 17:53:06 +0100 | [diff] [blame] | 940 | RSL_IE_RachLoad rach_load, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 941 | uint8_t meas_res_nr, |
Harald Welte | 2691adf | 2018-02-22 17:32:39 +0100 | [diff] [blame] | 942 | uint8_t ms_timing_offset, |
| 943 | RSL_IE_UplinkMeas uplink_meas, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 944 | RSL_IE_L1Info l1_info, |
| 945 | RSL_IE_SysinfoType sysinfo_type, |
| 946 | uint16_t paging_load, |
| 947 | uint8_t paging_group, |
| 948 | RSL_IE_ChanNeeded chan_needed, |
Harald Welte | cc37320 | 2018-09-10 10:28:21 +0200 | [diff] [blame] | 949 | RSL_IE_CbCommandType cb_cmd_type, |
| 950 | RSL_LV smscb_message, |
Harald Welte | 4a129f8 | 2019-05-21 16:35:22 +0200 | [diff] [blame] | 951 | RSL_IE_CbchLoadInfo cbch_load_info, |
Vadim Yanitskiy | 9f69953 | 2021-06-03 17:29:22 +0200 | [diff] [blame] | 952 | RSL_IE_ResourceInfo resource_info, |
Harald Welte | c8d363c | 2019-05-19 20:36:48 +0200 | [diff] [blame] | 953 | RSL_SacchInfo sacch_info, |
Harald Welte | cc37320 | 2018-09-10 10:28:21 +0200 | [diff] [blame] | 954 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 955 | RSL_IE_StartingTime starting_time, |
Harald Welte | 73cd271 | 2017-12-17 00:44:52 +0100 | [diff] [blame] | 956 | RSL_IE_EncryptionInfo encr_info, |
Harald Welte | a3ff670 | 2019-05-20 20:03:50 +0200 | [diff] [blame] | 957 | uint8_t smscb_chan_ind, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 958 | RSL_IE_RequestRef req_ref, |
| 959 | RSL_LV full_imm_ass_info, |
Vadim Yanitskiy | cc4623d | 2020-03-28 06:14:06 +0700 | [diff] [blame] | 960 | MobileIdentityLV ms_identity, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 961 | |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 962 | uint16_t ipa_conn_id, |
| 963 | uint16_t ipa_local_port, |
| 964 | uint16_t ipa_remote_port, |
Vadim Yanitskiy | fc63164 | 2021-07-03 02:42:45 +0200 | [diff] [blame] | 965 | OCT4 ipa_local_ip, |
| 966 | OCT4 ipa_remote_ip, |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 967 | uint8_t ipa_rtp_pt, |
| 968 | uint8_t ipa_rtp_pt2, |
| 969 | RSL_IE_IPA_ConnectionStats ipa_stats, |
| 970 | RSL_IE_IPA_SpeechMode ipa_speech_mode, |
| 971 | |
Neels Hofmeyr | 2bef0dd | 2021-04-22 21:46:00 +0000 | [diff] [blame] | 972 | RSL_IE_OSMO_TrainingSequence osmo_training_sequence, |
Vadim Yanitskiy | 1f53215 | 2021-11-01 20:37:56 +0300 | [diff] [blame] | 973 | RSL_IE_OSMO_RepAcchCap rep_acch_cap, |
Vadim Yanitskiy | a203d3b | 2021-11-01 21:32:31 +0300 | [diff] [blame] | 974 | RSL_IE_OSMO_TopAcchCap top_acch_cap, |
Neels Hofmeyr | 2bef0dd | 2021-04-22 21:46:00 +0000 | [diff] [blame] | 975 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 976 | RSL_LV other |
| 977 | } |
| 978 | |
| 979 | type record RSL_IE { |
| 980 | RSL_IE_Type iei, |
| 981 | RSL_IE_Body body |
| 982 | } with { variant (body) "CROSSTAG( |
| 983 | chan_nr, iei = RSL_IE_CHAN_NR; |
| 984 | link_id, iei = RSL_IE_LINK_IDENT; |
| 985 | l3_info, iei = RSL_IE_L3_INFO; |
| 986 | rlm_cause, iei = RSL_IE_RLM_CAUSE; |
| 987 | release_mode, iei = RSL_IE_RELEASE_MODE; |
| 988 | act_type, iei = RSL_IE_ACT_TYPE; |
Vadim Yanitskiy | e02dbcc | 2020-08-25 04:20:51 +0700 | [diff] [blame] | 989 | chan_ident, iei = RSL_IE_CHAN_IDENT; |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 990 | chan_mode, iei = RSL_IE_CHAN_MODE; |
| 991 | handover_ref, iei = RSL_IE_HANDO_REF; |
| 992 | bs_power, iei = RSL_IE_BS_POWER; |
Vadim Yanitskiy | 802508e | 2020-11-11 07:25:47 +0700 | [diff] [blame] | 993 | bs_power_params, iei = RSL_IE_BS_POWER_PARAM; |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 994 | ms_power, iei = RSL_IE_MS_POWER; |
Eric Wild | 61edb7e | 2019-06-03 12:38:31 +0200 | [diff] [blame] | 995 | ms_power_params, iei = RSL_IE_MS_POWER_PARAM; |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 996 | timing_adv, iei = RSL_IE_TIMING_ADVANCE; |
| 997 | multirate_ctrl, iei = RSL_IE_MR_CONTROL; |
Harald Welte | a670615 | 2019-05-19 20:38:18 +0200 | [diff] [blame] | 998 | msg_id, iei = RSL_IE_MSG_ID; |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 999 | |
| 1000 | frame_nr, iei = RSL_IE_FRAME_NUMBER; |
| 1001 | cause, iei = RSL_IE_CAUSE; |
| 1002 | access_delay, iei = RSL_IE_ACCESS_DELAY; |
Harald Welte | d5f521e | 2017-12-07 17:53:06 +0100 | [diff] [blame] | 1003 | rach_load, iei = RSL_IE_RACH_LOAD; |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1004 | meas_res_nr, iei = RSL_IE_MEAS_RES_NR; |
Harald Welte | 2691adf | 2018-02-22 17:32:39 +0100 | [diff] [blame] | 1005 | ms_timing_offset, iei = RSL_IE_MS_TIMING_OFFSET; |
| 1006 | uplink_meas, iei = RSL_IE_UPLINK_MEAS; |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1007 | l1_info, iei = RSL_IE_L1_INFO; |
| 1008 | sysinfo_type, iei = RSL_IE_SYSINFO_TYPE; |
| 1009 | paging_load, iei = RSL_IE_PAGING_LOAD; |
| 1010 | paging_group, iei = RSL_IE_PAGING_GROUP; |
| 1011 | chan_needed, iei = RSL_IE_CHAN_NEEDED; |
Harald Welte | cc37320 | 2018-09-10 10:28:21 +0200 | [diff] [blame] | 1012 | cb_cmd_type, iei = RSL_IE_CB_CMD_TYPE; |
| 1013 | smscb_message, iei = RSL_IE_SMSCB_MSG; |
Harald Welte | 4a129f8 | 2019-05-21 16:35:22 +0200 | [diff] [blame] | 1014 | cbch_load_info, iei = RSL_IE_CBCH_LOAD_INFO; |
Vadim Yanitskiy | 9f69953 | 2021-06-03 17:29:22 +0200 | [diff] [blame] | 1015 | resource_info, iei = RSL_IE_RESOURCE_INFO; |
Harald Welte | c8d363c | 2019-05-19 20:36:48 +0200 | [diff] [blame] | 1016 | sacch_info, iei = RSL_IE_SACCH_INFO; |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1017 | starting_time, iei = RSL_IE_STARTNG_TIME; |
Harald Welte | 73cd271 | 2017-12-17 00:44:52 +0100 | [diff] [blame] | 1018 | encr_info, iei = RSL_IE_ENCR_INFO; |
Harald Welte | a3ff670 | 2019-05-20 20:03:50 +0200 | [diff] [blame] | 1019 | smscb_chan_ind, iei = RSL_IE_SMSCB_CHAN_INDICATOR; |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1020 | |
| 1021 | req_ref, iei = RSL_IE_REQ_REFERENCE; |
Harald Welte | fff6930 | 2017-12-07 17:53:42 +0100 | [diff] [blame] | 1022 | full_imm_ass_info, iei = RSL_IE_FULL_IMM_ASS_INFO; |
| 1023 | ms_identity, iei = RSL_IE_MS_IDENTITY; |
| 1024 | other, iei = RSL_IE_FULL_BCCH_INFO; |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1025 | |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1026 | ipa_conn_id, iei = RSL_IE_IPAC_CONN_ID; |
| 1027 | ipa_remote_ip, iei = RSL_IE_IPAC_REMOTE_IP; |
| 1028 | ipa_remote_port, iei = RSL_IE_IPAC_REMOTE_PORT; |
| 1029 | ipa_local_ip, iei = RSL_IE_IPAC_LOCAL_IP; |
| 1030 | ipa_local_port, iei = RSL_IE_IPAC_LOCAL_PORT; |
| 1031 | ipa_rtp_pt, iei = RSL_IE_IPAC_RTP_PAYLOAD; |
| 1032 | ipa_rtp_pt2, iei = RSL_IE_IPAC_RTP_PAYLOAD2; |
| 1033 | ipa_stats, iei = RSL_IE_IPAC_CONN_STAT; |
| 1034 | ipa_speech_mode, iei = RSL_IE_IPAC_SPEECH_MODE; |
| 1035 | |
Neels Hofmeyr | 2bef0dd | 2021-04-22 21:46:00 +0000 | [diff] [blame] | 1036 | osmo_training_sequence, iei = RSL_IE_OSMO_TRAINING_SEQUENCE; |
Vadim Yanitskiy | 1f53215 | 2021-11-01 20:37:56 +0300 | [diff] [blame] | 1037 | rep_acch_cap, iei = RSL_IE_OSMO_REP_ACCH_CAP; |
Vadim Yanitskiy | a203d3b | 2021-11-01 21:32:31 +0300 | [diff] [blame] | 1038 | top_acch_cap, iei = RSL_IE_OSMO_TOP_ACCH_CAP; |
Neels Hofmeyr | 2bef0dd | 2021-04-22 21:46:00 +0000 | [diff] [blame] | 1039 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1040 | other, OTHERWISE; |
| 1041 | )" }; |
| 1042 | |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 1043 | /* For some reason the TTCN-3 RAW codec cannot automatically figure out the IEI |
| 1044 | * that it needs to set for a given union-choice (body). So we have to explicitly |
| 1045 | * specify the IEI by the caller :( */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1046 | template (value) RSL_IE t_RSL_IE(RSL_IE_Type iei, template (value) RSL_IE_Body body) := { |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 1047 | iei := iei, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1048 | body := body |
| 1049 | } |
| 1050 | |
Harald Welte | c287775 | 2017-12-07 17:54:35 +0100 | [diff] [blame] | 1051 | template RSL_IE tr_RSL_IE(template RSL_IE_Body body) := { |
| 1052 | iei := ?, /* overwritten? */ |
| 1053 | body := body |
| 1054 | } |
| 1055 | |
| 1056 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1057 | type record of RSL_IE RSL_IE_List; |
| 1058 | |
| 1059 | type record RSL_Message { |
| 1060 | RSL_MessageDiscriminator msg_disc, |
| 1061 | RSL_MessageType msg_type, |
| 1062 | RSL_IE_List ies optional |
| 1063 | } |
| 1064 | |
| 1065 | external function enc_RSL_Message(in RSL_Message msg) return octetstring |
| 1066 | with { extension "prototype(convert) encode(RAW)" }; |
| 1067 | external function dec_RSL_Message(in octetstring stream) return RSL_Message |
| 1068 | with { extension "prototype(convert) decode(RAW)" }; |
| 1069 | |
Harald Welte | bc330be | 2017-12-09 00:56:36 +0100 | [diff] [blame] | 1070 | template RSL_Message tr_RSL_MsgDiscType(template RSL_MessageDiscriminator m_disc, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1071 | RSL_MessageType m_type) := { |
| 1072 | msg_disc := m_disc, |
| 1073 | msg_type := m_type, |
| 1074 | ies := * |
| 1075 | } |
| 1076 | |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1077 | template (value) RSL_Message ts_RSL_MsgDiscType(template (value) RSL_MessageDiscriminator m_disc, |
| 1078 | template (value) RSL_MessageType msg_type, |
| 1079 | template (omit) RSL_IE_List ies := omit) := { |
Harald Welte | 4a26736 | 2017-12-09 17:49:32 +0100 | [diff] [blame] | 1080 | msg_disc := m_disc, |
| 1081 | msg_type := msg_type, |
| 1082 | ies := ies |
| 1083 | } |
| 1084 | |
Harald Welte | bc330be | 2017-12-09 00:56:36 +0100 | [diff] [blame] | 1085 | template RSL_Message tr_RSL_MsgType(template RSL_MessageType msg_type) := { |
| 1086 | msg_disc := ?, |
| 1087 | msg_type := msg_type, |
| 1088 | ies := * |
| 1089 | } |
| 1090 | |
| 1091 | /* Common Channel Management */ |
| 1092 | template RSL_Message tr_RSL_MsgTypeC(template RSL_MessageType msg_type) modifies tr_RSL_MsgType := { |
| 1093 | msg_disc := { RSL_MDISC_CCHAN, ? } |
| 1094 | } |
| 1095 | |
| 1096 | /* RLL */ |
| 1097 | template RSL_Message tr_RSL_MsgTypeR(template RSL_MessageType msg_type) modifies tr_RSL_MsgType := { |
| 1098 | msg_disc := { RSL_MDISC_RLL, true } |
| 1099 | } |
| 1100 | |
| 1101 | /* Dedicated Channel Management */ |
| 1102 | template RSL_Message tr_RSL_MsgTypeD(template RSL_MessageType msg_type) modifies tr_RSL_MsgType := { |
| 1103 | msg_disc := { RSL_MDISC_DCHAN, ? } |
| 1104 | } |
| 1105 | |
| 1106 | /* Dedicated Channel Management */ |
| 1107 | template RSL_Message tr_RSL_MsgTypeT(template RSL_MessageType msg_type) modifies tr_RSL_MsgType := { |
| 1108 | msg_disc := { RSL_MDISC_TRX_MGMT, ? } |
| 1109 | } |
| 1110 | |
| 1111 | |
| 1112 | /* dedicated channel or RLL */ |
| 1113 | template RSL_Message tr_RSL_MsgTypeDR(template RSL_MessageType msg_type) modifies tr_RSL_MsgType := { |
Harald Welte | e540822 | 2018-01-29 21:57:58 +0100 | [diff] [blame] | 1114 | msg_disc := ({RSL_MDISC_DCHAN,?}, {RSL_MDISC_RLL,?}, {RSL_MDISC_IPACCESS,false}) |
Harald Welte | bc330be | 2017-12-09 00:56:36 +0100 | [diff] [blame] | 1115 | } |
| 1116 | |
| 1117 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1118 | /* 8.3.1 BSC -> BTS */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1119 | template (value) RSL_Message ts_RSL_DATA_REQ(template (value) RslChannelNr chan_nr, |
| 1120 | template (value) RslLinkId link_id, |
| 1121 | octetstring l3_info) := { |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1122 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, true), |
| 1123 | msg_type := RSL_MT_DATA_REQ, |
| 1124 | ies :={ |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 1125 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1126 | t_RSL_IE(RSL_IE_LINK_IDENT, RSL_IE_Body:{link_id := link_id}), |
| 1127 | t_RSL_IE(RSL_IE_L3_INFO, RSL_IE_Body:{l3_info := ts_RSL_L16V(l3_info)}) |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1128 | } |
| 1129 | } |
| 1130 | |
Harald Welte | 7794d5b | 2017-12-16 23:00:20 +0100 | [diff] [blame] | 1131 | template RSL_Message tr_RSL_DATA_REQ(template RslChannelNr chan_nr :=?, |
| 1132 | template RslLinkId link_id := ?, |
| 1133 | template octetstring l3_info := ?) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1134 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_RLL, true), |
Harald Welte | 7794d5b | 2017-12-16 23:00:20 +0100 | [diff] [blame] | 1135 | msg_type := RSL_MT_DATA_REQ, |
| 1136 | ies :={ |
| 1137 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1138 | tr_RSL_IE(RSL_IE_Body:{link_id := link_id}), |
| 1139 | tr_RSL_IE(RSL_IE_Body:{l3_info := tr_RSL_L16V(l3_info)}) |
| 1140 | } |
| 1141 | } |
| 1142 | |
| 1143 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1144 | /* 8.3.2 BTS -> BSC */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1145 | template (value) RSL_Message ts_RSL_DATA_IND(template (value) RslChannelNr chan_nr, |
| 1146 | template (value) RslLinkId link_id, |
| 1147 | octetstring l3_info) := { |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1148 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, true), |
| 1149 | msg_type := RSL_MT_DATA_IND, |
| 1150 | ies :={ |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 1151 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1152 | t_RSL_IE(RSL_IE_LINK_IDENT, RSL_IE_Body:{link_id := link_id}), |
| 1153 | t_RSL_IE(RSL_IE_L3_INFO, RSL_IE_Body:{l3_info := ts_RSL_L16V(l3_info)}) |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1154 | } |
| 1155 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1156 | template RSL_Message tr_RSL_DATA_IND(template RslChannelNr chan_nr, template RslLinkId link_id, |
| 1157 | template octetstring l3_info := ?) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1158 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_RLL, true), |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1159 | msg_type := RSL_MT_DATA_IND, |
| 1160 | ies :={ |
| 1161 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1162 | tr_RSL_IE(RSL_IE_Body:{link_id := link_id}), |
| 1163 | tr_RSL_IE(RSL_IE_Body:{l3_info := tr_RSL_L16V(l3_info)}) |
| 1164 | } |
| 1165 | } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1166 | |
| 1167 | /* 8.3.3 BTS -> BSC */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1168 | template (value) RSL_Message ts_RSL_ERROR_IND(template (value) RslChannelNr chan_nr, |
Harald Welte | a7d81f1 | 2019-06-02 22:33:19 +0200 | [diff] [blame] | 1169 | template (value) RslLinkId link_id, |
| 1170 | template (value) octetstring rlm_cause) := { |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1171 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| 1172 | msg_type := RSL_MT_ERROR_IND, |
| 1173 | ies :={ |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 1174 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1175 | t_RSL_IE(RSL_IE_LINK_IDENT, RSL_IE_Body:{link_id := link_id}), |
Harald Welte | a7d81f1 | 2019-06-02 22:33:19 +0200 | [diff] [blame] | 1176 | t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{rlm_cause := ts_RSL_LV(rlm_cause)}) |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1177 | } |
| 1178 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1179 | template RSL_Message tr_RSL_ERROR_IND(template RslChannelNr chan_nr, template RslLinkId link_id, |
Harald Welte | a7d81f1 | 2019-06-02 22:33:19 +0200 | [diff] [blame] | 1180 | template octetstring rlm_cause := ?) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1181 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_RLL, false), |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1182 | msg_type := RSL_MT_ERROR_IND, |
| 1183 | ies :={ |
| 1184 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1185 | tr_RSL_IE(RSL_IE_Body:{link_id := link_id}), |
Harald Welte | a7d81f1 | 2019-06-02 22:33:19 +0200 | [diff] [blame] | 1186 | tr_RSL_IE(RSL_IE_Body:{rlm_cause := tr_RSL_LV(rlm_cause)}) |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1187 | } |
| 1188 | } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1189 | |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1190 | /* 8.3.4 BTS <- BSC */ |
| 1191 | template (value) RSL_Message ts_RSL_EST_REQ(template (value) RslChannelNr chan_nr, |
| 1192 | template (value) RslLinkId link_id) := { |
| 1193 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| 1194 | msg_type := RSL_MT_EST_REQ, |
| 1195 | ies := { |
| 1196 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1197 | t_RSL_IE(RSL_IE_LINK_IDENT, RSL_IE_Body:{link_id := link_id}) |
| 1198 | } |
| 1199 | } |
| 1200 | template RSL_Message tr_RSL_EST_REQ(template RslChannelNr chan_nr, template RslLinkId link_id) := { |
| 1201 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| 1202 | msg_type := RSL_MT_EST_REQ, |
| 1203 | ies := { |
| 1204 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1205 | tr_RSL_IE(RSL_IE_Body:{link_id := link_id}) |
| 1206 | } |
| 1207 | } |
| 1208 | |
| 1209 | /* 8.3.5 BTS -> BSC */ |
| 1210 | template (value) RSL_Message ts_RSL_EST_CONF(template (value) RslChannelNr chan_nr, |
| 1211 | template (value) RslLinkId link_id) := { |
| 1212 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| 1213 | msg_type := RSL_MT_EST_CONF, |
| 1214 | ies := { |
| 1215 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1216 | t_RSL_IE(RSL_IE_LINK_IDENT, RSL_IE_Body:{link_id := link_id}) |
| 1217 | } |
| 1218 | } |
| 1219 | template RSL_Message tr_RSL_EST_CONF(template RslChannelNr chan_nr, template RslLinkId link_id) := { |
| 1220 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| 1221 | msg_type := RSL_MT_EST_CONF, |
| 1222 | ies := { |
| 1223 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1224 | tr_RSL_IE(RSL_IE_Body:{link_id := link_id}) |
| 1225 | } |
| 1226 | } |
| 1227 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1228 | /* 8.3.6 BTS -> BSC */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1229 | template (value) RSL_Message ts_RSL_EST_IND(template (value) RslChannelNr chan_nr, |
| 1230 | template (value) RslLinkId link_id, |
| 1231 | octetstring l3_info) := { |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1232 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| 1233 | msg_type := RSL_MT_EST_IND, |
| 1234 | ies := { |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 1235 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1236 | t_RSL_IE(RSL_IE_LINK_IDENT, RSL_IE_Body:{link_id := link_id}), |
| 1237 | t_RSL_IE(RSL_IE_L3_INFO, RSL_IE_Body:{l3_info := ts_RSL_L16V(l3_info)}) |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1238 | } |
| 1239 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1240 | template RSL_Message tr_RSL_EST_IND(template RslChannelNr chan_nr, template RslLinkId link_id, |
| 1241 | template octetstring l3_info := ?) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1242 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_RLL, false), |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1243 | msg_type := RSL_MT_EST_IND, |
| 1244 | ies := { |
| 1245 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1246 | tr_RSL_IE(RSL_IE_Body:{link_id := link_id}), |
| 1247 | tr_RSL_IE(RSL_IE_Body:{l3_info := tr_RSL_L16V(l3_info)}) |
| 1248 | } |
| 1249 | } |
Harald Welte | 0472ab4 | 2018-03-12 15:02:26 +0100 | [diff] [blame] | 1250 | template RSL_Message tr_RSL_EST_IND_NOL3(template RslChannelNr chan_nr, template RslLinkId link_id) := |
| 1251 | { |
| 1252 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| 1253 | msg_type := RSL_MT_EST_IND, |
| 1254 | ies := { |
| 1255 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1256 | tr_RSL_IE(RSL_IE_Body:{link_id := link_id}) |
| 1257 | } |
| 1258 | } |
| 1259 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1260 | |
| 1261 | /* 8.3.7 BSC -> BTS */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1262 | template (value) RSL_Message ts_RSL_REL_REQ(template (value) RslChannelNr chan_nr, |
Harald Welte | 0472ab4 | 2018-03-12 15:02:26 +0100 | [diff] [blame] | 1263 | template (value) RslLinkId link_id, |
| 1264 | template (value) RSL_IE_ReleaseMode rel_mode := RSL_REL_MODE_NORMAL) := { |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1265 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| 1266 | msg_type := RSL_MT_REL_REQ, |
| 1267 | ies :={ |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 1268 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
Harald Welte | 0472ab4 | 2018-03-12 15:02:26 +0100 | [diff] [blame] | 1269 | t_RSL_IE(RSL_IE_LINK_IDENT, RSL_IE_Body:{link_id := link_id}), |
| 1270 | t_RSL_IE(RSL_IE_RELEASE_MODE, RSL_IE_Body:{release_mode := rel_mode}) |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1271 | } |
| 1272 | } |
Harald Welte | e8a5ab1 | 2017-12-09 22:34:57 +0100 | [diff] [blame] | 1273 | template RSL_Message tr_RSL_REL_REQ(template RslChannelNr chan_nr, |
Harald Welte | 0472ab4 | 2018-03-12 15:02:26 +0100 | [diff] [blame] | 1274 | template RslLinkId link_id, |
| 1275 | template RSL_IE_ReleaseMode rel_mode := ?) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1276 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_RLL, false), |
Harald Welte | e8a5ab1 | 2017-12-09 22:34:57 +0100 | [diff] [blame] | 1277 | msg_type := RSL_MT_REL_REQ, |
| 1278 | ies :={ |
| 1279 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1280 | tr_RSL_IE(RSL_IE_Body:{link_id := link_id}), |
Harald Welte | 0472ab4 | 2018-03-12 15:02:26 +0100 | [diff] [blame] | 1281 | tr_RSL_IE(RSL_IE_Body:{release_mode := rel_mode}) |
Harald Welte | e8a5ab1 | 2017-12-09 22:34:57 +0100 | [diff] [blame] | 1282 | } |
| 1283 | } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1284 | |
| 1285 | /* 8.3.8 BTS -> BSC */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1286 | template (value) RSL_Message ts_RSL_REL_CONF(template (value) RslChannelNr chan_nr, |
| 1287 | template (value) RslLinkId link_id) := { |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1288 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| 1289 | msg_type := RSL_MT_REL_CONF, |
| 1290 | ies :={ |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 1291 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1292 | t_RSL_IE(RSL_IE_LINK_IDENT, RSL_IE_Body:{link_id := link_id}) |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1293 | } |
| 1294 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1295 | template RSL_Message tr_RSL_REL_CONF(template RslChannelNr chan_nr, template RslLinkId link_id) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1296 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_RLL, false), |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1297 | msg_type := RSL_MT_REL_CONF, |
| 1298 | ies :={ |
| 1299 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1300 | tr_RSL_IE(RSL_IE_Body:{link_id := link_id}) |
| 1301 | } |
| 1302 | } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1303 | |
| 1304 | /* 8.3.9 BTS -> BSC */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1305 | template (value) RSL_Message ts_RSL_REL_IND(template (value) RslChannelNr chan_nr, |
| 1306 | template (value) RslLinkId link_id) := { |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1307 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| 1308 | msg_type := RSL_MT_REL_IND, |
| 1309 | ies :={ |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 1310 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1311 | t_RSL_IE(RSL_IE_LINK_IDENT, RSL_IE_Body:{link_id := link_id}) |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1312 | } |
| 1313 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1314 | template RSL_Message tr_RSL_REL_IND(template RslChannelNr chan_nr, template RslLinkId link_id) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1315 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_RLL, false), |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1316 | msg_type := RSL_MT_REL_IND, |
| 1317 | ies :={ |
| 1318 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1319 | tr_RSL_IE(RSL_IE_Body:{link_id := link_id}) |
| 1320 | } |
| 1321 | } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1322 | |
| 1323 | /* 8.3.10 BSC -> BTS */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1324 | template (value) RSL_Message ts_RSL_UNITDATA_REQ(template (value) RslChannelNr chan_nr, |
| 1325 | template (value) RslLinkId link_id, |
| 1326 | octetstring l3_info) |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1327 | modifies ts_RSL_DATA_REQ := { |
| 1328 | msg_type := RSL_MT_UNIT_DATA_REQ |
| 1329 | } |
Harald Welte | 0472ab4 | 2018-03-12 15:02:26 +0100 | [diff] [blame] | 1330 | template RSL_Message tr_RSL_UNITDATA_REQ(template RslChannelNr chan_nr, |
| 1331 | template RslLinkId link_id, |
Vadim Yanitskiy | 8f98d3f | 2018-10-03 17:58:10 +0700 | [diff] [blame] | 1332 | template octetstring l3_info := ?) |
Harald Welte | 0472ab4 | 2018-03-12 15:02:26 +0100 | [diff] [blame] | 1333 | modifies tr_RSL_DATA_REQ := { |
| 1334 | msg_type := RSL_MT_UNIT_DATA_REQ |
| 1335 | } |
| 1336 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1337 | |
| 1338 | /* 8.3.11 BTS -> BSC */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1339 | template (value) RSL_Message ts_RSL_UNITDATA_IND(template (value) RslChannelNr chan_nr, |
| 1340 | template (value) RslLinkId link_id, |
| 1341 | octetstring l3_info) |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1342 | modifies ts_RSL_DATA_IND := { |
| 1343 | msg_type := RSL_MT_UNIT_DATA_IND |
| 1344 | } |
Harald Welte | 0472ab4 | 2018-03-12 15:02:26 +0100 | [diff] [blame] | 1345 | template RSL_Message tr_RSL_UNITDATA_IND(template RslChannelNr chan_nr, |
Vadim Yanitskiy | fabe0f2 | 2018-10-03 17:51:47 +0700 | [diff] [blame] | 1346 | template RslLinkId link_id, |
Vadim Yanitskiy | 8f98d3f | 2018-10-03 17:58:10 +0700 | [diff] [blame] | 1347 | template octetstring l3_info := ?) |
Harald Welte | 0472ab4 | 2018-03-12 15:02:26 +0100 | [diff] [blame] | 1348 | modifies tr_RSL_DATA_IND := { |
| 1349 | msg_type := RSL_MT_UNIT_DATA_IND |
| 1350 | } |
| 1351 | |
| 1352 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1353 | |
| 1354 | |
| 1355 | /* DEDICATED CANNEL MANAGEMENT MESSAGES */ |
| 1356 | |
| 1357 | /* 8.4.1 BSC -> BTS */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1358 | template (value) RSL_Message ts_RSL_CHAN_ACT(template (value) RslChannelNr chan_nr, |
Harald Welte | 921f9e0 | 2019-05-19 22:27:11 +0200 | [diff] [blame] | 1359 | template (value) RSL_IE_ChannelMode mode, |
| 1360 | template (value) RSL_IE_ActivationType at := t_RSL_IE_ActType_IA) := { |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1361 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1362 | msg_type := RSL_MT_CHAN_ACTIV, |
| 1363 | ies :={ |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 1364 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
Harald Welte | 921f9e0 | 2019-05-19 22:27:11 +0200 | [diff] [blame] | 1365 | t_RSL_IE(RSL_IE_ACT_TYPE, RSL_IE_Body:{act_type := at}), |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 1366 | t_RSL_IE(RSL_IE_CHAN_MODE, RSL_IE_Body:{chan_mode := mode}) |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1367 | /* lots of optional IEs */ |
| 1368 | } |
| 1369 | } |
Harald Welte | 94e0c34 | 2018-04-07 11:33:23 +0200 | [diff] [blame] | 1370 | template RSL_Message tr_RSL_CHAN_ACT(template RslChannelNr chan_nr, |
Harald Welte | 921f9e0 | 2019-05-19 22:27:11 +0200 | [diff] [blame] | 1371 | template RSL_IE_ChannelMode mode, |
| 1372 | template (value) RSL_IE_ActivationType at := t_RSL_IE_ActType_IA) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1373 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
Harald Welte | 94e0c34 | 2018-04-07 11:33:23 +0200 | [diff] [blame] | 1374 | msg_type := RSL_MT_CHAN_ACTIV, |
| 1375 | ies :={ |
| 1376 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
Harald Welte | 921f9e0 | 2019-05-19 22:27:11 +0200 | [diff] [blame] | 1377 | tr_RSL_IE(RSL_IE_Body:{act_type := at}), |
Harald Welte | 94e0c34 | 2018-04-07 11:33:23 +0200 | [diff] [blame] | 1378 | tr_RSL_IE(RSL_IE_Body:{chan_mode := mode}), |
| 1379 | /* lots of optional IEs */ |
| 1380 | * |
| 1381 | } |
| 1382 | } |
| 1383 | template RSL_Message tr_RSL_CHAN_ACT_PDCH(template RslChannelNr chan_nr, |
| 1384 | template RSL_IE_ChannelMode mode) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1385 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
Harald Welte | 94e0c34 | 2018-04-07 11:33:23 +0200 | [diff] [blame] | 1386 | msg_type := RSL_MT_CHAN_ACTIV, |
| 1387 | ies :={ |
| 1388 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1389 | tr_RSL_IE(RSL_IE_Body:{act_type := t_RSL_IE_ActType_PDCH}), |
| 1390 | /* lots of optional IEs */ |
| 1391 | * |
| 1392 | } |
| 1393 | } |
| 1394 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1395 | |
| 1396 | /* 8.4.2 BTS -> BSC */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1397 | template (value) RSL_Message ts_RSL_CHAN_ACT_ACK(template (value) RslChannelNr chan_nr, |
| 1398 | GsmFrameNumber fn) := { |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1399 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1400 | msg_type := RSL_MT_CHAN_ACTIV_ACK, |
| 1401 | ies :={ |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 1402 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1403 | t_RSL_IE(RSL_IE_FRAME_NUMBER, RSL_IE_Body:{frame_nr := ts_RSL_IE_FrameNumber(fn)}) |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1404 | } |
| 1405 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1406 | template RSL_Message tr_RSL_CHAN_ACT_ACK(template RslChannelNr chan_nr) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1407 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1408 | msg_type := RSL_MT_CHAN_ACTIV_ACK, |
| 1409 | ies := { |
| 1410 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1411 | tr_RSL_IE(RSL_IE_Body:{frame_nr := ?}) |
| 1412 | } |
| 1413 | } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1414 | |
| 1415 | /* 8.4.3 BTS -> BSC */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1416 | template (value) RSL_Message ts_RSL_CHAN_ACT_NACK(template (value) RslChannelNr chan_nr, |
| 1417 | RSL_Cause cause) := { |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1418 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1419 | msg_type := RSL_MT_CHAN_ACTIV_NACK, |
| 1420 | ies :={ |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 1421 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1422 | t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1423 | } |
| 1424 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1425 | template RSL_Message tr_RSL_CHAN_ACT_NACK(template RslChannelNr chan_nr, |
| 1426 | template RSL_Cause cause := ?) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1427 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1428 | msg_type := RSL_MT_CHAN_ACTIV_NACK, |
| 1429 | ies := { |
| 1430 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1431 | tr_RSL_IE(RSL_IE_Body:{cause := ?}) |
| 1432 | } |
| 1433 | } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1434 | |
| 1435 | /* 8.4.4 BTS -> BSC */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1436 | template (value) RSL_Message ts_RSL_CONN_FAIL_IND(RslChannelNr chan_nr, RSL_Cause cause) := { |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1437 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1438 | msg_type := RSL_MT_CONN_FAIL, |
| 1439 | ies :={ |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 1440 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1441 | t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1442 | } |
| 1443 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1444 | template RSL_Message tr_RSL_CONN_FAIL_IND(template RslChannelNr chan_nr, |
| 1445 | template RSL_Cause cause := ?) := { |
| 1446 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1447 | msg_type := RSL_MT_CONN_FAIL, |
| 1448 | ies :={ |
| 1449 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1450 | tr_RSL_IE(RSL_IE_Body:{cause := tr_RSL_IE_Cause(cause)}) |
| 1451 | } |
| 1452 | } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1453 | |
Harald Welte | e8a5ab1 | 2017-12-09 22:34:57 +0100 | [diff] [blame] | 1454 | /* 8.4.5 BSC -> BTS */ |
| 1455 | template RSL_Message tr_RSL_DEACT_SACCH(template RslChannelNr chan_nr) := { |
| 1456 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1457 | msg_type := RSL_MT_DEACTIVATE_SACCH, |
| 1458 | ies := { |
| 1459 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}) |
| 1460 | } |
| 1461 | } |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1462 | template (value) RSL_Message ts_RSL_DEACT_SACCH(template (value) RslChannelNr chan_nr) := { |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1463 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1464 | msg_type := RSL_MT_DEACTIVATE_SACCH, |
| 1465 | ies := { |
| 1466 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}) |
| 1467 | } |
| 1468 | } |
| 1469 | |
Harald Welte | e8a5ab1 | 2017-12-09 22:34:57 +0100 | [diff] [blame] | 1470 | |
Harald Welte | 73cd271 | 2017-12-17 00:44:52 +0100 | [diff] [blame] | 1471 | /* 8.4.6 BSC ->BTS */ |
| 1472 | template RSL_Message tr_RSL_ENCR_CMD(template RslChannelNr chan_nr, |
| 1473 | template RslLinkId link_id := ?, |
Harald Welte | e613f96 | 2018-04-18 22:38:16 +0200 | [diff] [blame] | 1474 | template RSL_AlgId alg := ?, |
Harald Welte | 73cd271 | 2017-12-17 00:44:52 +0100 | [diff] [blame] | 1475 | template octetstring key := ?, |
| 1476 | template octetstring l3_info := ?) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1477 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
Harald Welte | 73cd271 | 2017-12-17 00:44:52 +0100 | [diff] [blame] | 1478 | msg_type := RSL_MT_ENCR_CMD, |
| 1479 | ies := { |
| 1480 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1481 | tr_RSL_IE(RSL_IE_Body:{encr_info := tr_RSL_IE_EncrInfo(alg, key)}), |
| 1482 | tr_RSL_IE(RSL_IE_Body:{link_id := link_id}), |
| 1483 | tr_RSL_IE(RSL_IE_Body:{l3_info := tr_RSL_L16V(l3_info)}) |
| 1484 | } |
| 1485 | } |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1486 | template (value) RSL_Message ts_RSL_ENCR_CMD(template (value) RslChannelNr chan_nr, |
| 1487 | template (value) RslLinkId link_id, |
Harald Welte | e613f96 | 2018-04-18 22:38:16 +0200 | [diff] [blame] | 1488 | template (value) RSL_AlgId alg, octetstring key, |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1489 | octetstring l3_info) := { |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1490 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1491 | msg_type := RSL_MT_ENCR_CMD, |
| 1492 | ies := { |
| 1493 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1494 | t_RSL_IE(RSL_IE_ENCR_INFO, RSL_IE_Body:{encr_info := ts_RSL_IE_EncrInfo(alg, key)}), |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1495 | t_RSL_IE(RSL_IE_LINK_IDENT, RSL_IE_Body:{link_id := link_id}), |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1496 | t_RSL_IE(RSL_IE_L3_INFO, RSL_IE_Body:{l3_info := ts_RSL_L16V(l3_info)}) |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1497 | } |
| 1498 | } |
Harald Welte | 73cd271 | 2017-12-17 00:44:52 +0100 | [diff] [blame] | 1499 | |
Harald Welte | 2691adf | 2018-02-22 17:32:39 +0100 | [diff] [blame] | 1500 | template RSL_Message tr_RSL_MEAS_RES(template RslChannelNr chan_nr, |
| 1501 | template uint8_t meas_res_nr := ?, |
| 1502 | template RSL_IE_UplinkMeas ul_meas := ?, |
| 1503 | template RSL_IE_BS_Power bs_power := ?) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1504 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
Harald Welte | 2691adf | 2018-02-22 17:32:39 +0100 | [diff] [blame] | 1505 | msg_type := RSL_MT_MEAS_RES, |
| 1506 | ies := { |
| 1507 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1508 | tr_RSL_IE(RSL_IE_Body:{meas_res_nr := meas_res_nr}), |
| 1509 | tr_RSL_IE(RSL_IE_Body:{uplink_meas := ul_meas}), |
| 1510 | tr_RSL_IE(RSL_IE_Body:{bs_power := bs_power}), |
| 1511 | * |
| 1512 | } |
| 1513 | } |
| 1514 | |
Philipp Maier | dd841d3 | 2019-12-17 14:44:54 +0100 | [diff] [blame] | 1515 | /* Receive template for a measurement report that lacks the measurement report |
| 1516 | * from the MS (l1_info, l3_info and ms timing offset */ |
| 1517 | template RSL_Message tr_RSL_MEAS_RES_EMPTY(template RslChannelNr chan_nr, |
| 1518 | template uint8_t meas_res_nr := ?, |
| 1519 | template RSL_IE_UplinkMeas ul_meas := ?, |
| 1520 | template RSL_IE_BS_Power bs_power := ?) := { |
| 1521 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1522 | msg_type := RSL_MT_MEAS_RES, |
| 1523 | ies := { |
| 1524 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1525 | tr_RSL_IE(RSL_IE_Body:{meas_res_nr := meas_res_nr}), |
| 1526 | tr_RSL_IE(RSL_IE_Body:{uplink_meas := ul_meas}), |
| 1527 | tr_RSL_IE(RSL_IE_Body:{bs_power := bs_power}) |
| 1528 | } |
| 1529 | } |
| 1530 | |
Harald Welte | 39b47be | 2018-02-23 18:58:48 +0100 | [diff] [blame] | 1531 | /* Osmocom specific template, require lots of optional fields to be present */ |
| 1532 | template RSL_Message tr_RSL_MEAS_RES_OSMO(template RslChannelNr chan_nr, |
| 1533 | template uint8_t meas_res_nr := ?, |
| 1534 | template RSL_IE_UplinkMeas ul_meas := ?, |
| 1535 | template RSL_IE_BS_Power bs_power := ?, |
| 1536 | template RSL_IE_L1Info l1_info := ?, |
| 1537 | template octetstring l3_info := ?, |
| 1538 | template uint8_t ms_to := ?) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1539 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
Harald Welte | 39b47be | 2018-02-23 18:58:48 +0100 | [diff] [blame] | 1540 | msg_type := RSL_MT_MEAS_RES, |
| 1541 | ies := { |
| 1542 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1543 | tr_RSL_IE(RSL_IE_Body:{meas_res_nr := meas_res_nr}), |
| 1544 | tr_RSL_IE(RSL_IE_Body:{uplink_meas := ul_meas}), |
| 1545 | tr_RSL_IE(RSL_IE_Body:{bs_power := bs_power}), |
| 1546 | tr_RSL_IE(RSL_IE_Body:{l1_info := l1_info}), |
| 1547 | tr_RSL_IE(RSL_IE_Body:{l3_info := tr_RSL_L16V(l3_info)}), |
| 1548 | tr_RSL_IE(RSL_IE_Body:{ms_timing_offset := ms_to}) |
| 1549 | } |
| 1550 | } |
| 1551 | |
Eric Wild | f1827a7 | 2019-05-28 17:37:35 +0200 | [diff] [blame] | 1552 | /* 8.4.9 BSC -> BTS */ |
| 1553 | template (value) RSL_Message ts_RSL_MODE_MODIFY_REQ(template (value) RslChannelNr chan_nr, |
| 1554 | template (value) RSL_IE_ChannelMode mode) := { |
| 1555 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1556 | msg_type := RSL_MT_MODE_MODIFY_REQ, |
| 1557 | ies :={ |
| 1558 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1559 | t_RSL_IE(RSL_IE_CHAN_MODE, RSL_IE_Body:{chan_mode := mode}) |
| 1560 | /* lots of optional IEs */ |
| 1561 | } |
| 1562 | } |
| 1563 | template RSL_Message tr_RSL_MODE_MODIFY_REQ(template RslChannelNr chan_nr, |
| 1564 | template RSL_IE_ChannelMode mode) := { |
| 1565 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1566 | msg_type := RSL_MT_MODE_MODIFY_REQ, |
| 1567 | ies :={ |
| 1568 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1569 | tr_RSL_IE(RSL_IE_Body:{chan_mode := mode}), |
| 1570 | /* lots of optional IEs */ |
| 1571 | * |
| 1572 | } |
| 1573 | } |
Neels Hofmeyr | 9f3e6ac | 2021-04-08 23:09:24 +0200 | [diff] [blame] | 1574 | |
| 1575 | template RSL_Message tr_RSL_MODE_MODIFY_REQ_with_OSMO_TSC(template RslChannelNr chan_nr, |
| 1576 | template RSL_IE_ChannelMode mode, |
| 1577 | template uint8_t tsc_set := ?, |
| 1578 | template uint8_t tsc := ?) := { |
| 1579 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1580 | msg_type := RSL_MT_MODE_MODIFY_REQ, |
| 1581 | ies := { |
| 1582 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1583 | tr_RSL_IE(RSL_IE_Body:{chan_mode := mode}), |
| 1584 | tr_RSL_IE(RSL_IE_Body:{osmo_training_sequence := { |
| 1585 | len := ?, |
| 1586 | tsc_set := tsc_set, |
| 1587 | tsc := tsc |
| 1588 | } |
| 1589 | }) |
| 1590 | } |
| 1591 | }; |
Eric Wild | f1827a7 | 2019-05-28 17:37:35 +0200 | [diff] [blame] | 1592 | |
Harald Welte | 7794d5b | 2017-12-16 23:00:20 +0100 | [diff] [blame] | 1593 | /* 8.4.10 BTS -> BSC */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1594 | template (value) RSL_Message ts_RSL_MODE_MODIFY_ACK(template (value) RslChannelNr chan_nr) := { |
Harald Welte | 7794d5b | 2017-12-16 23:00:20 +0100 | [diff] [blame] | 1595 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1596 | msg_type := RSL_MT_MODE_MODIFY_ACK, |
| 1597 | ies := { |
| 1598 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}) |
| 1599 | } |
| 1600 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1601 | template RSL_Message tr_RSL_MODE_MODIFY_ACK(template RslChannelNr chan_nr) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1602 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1603 | msg_type := RSL_MT_MODE_MODIFY_ACK, |
| 1604 | ies := { |
| 1605 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}) |
| 1606 | } |
| 1607 | } |
Harald Welte | 7794d5b | 2017-12-16 23:00:20 +0100 | [diff] [blame] | 1608 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1609 | /* 8.4.11 BTS -> BSC */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1610 | template (value) RSL_Message ts_RSL_MODE_MODIFY_NACK(template (value) RslChannelNr chan_nr, |
| 1611 | RSL_Cause cause) := { |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1612 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1613 | msg_type := RSL_MT_MODE_MODIFY_NACK, |
| 1614 | ies := { |
| 1615 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1616 | t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) |
| 1617 | } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1618 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1619 | template RSL_Message tr_RSL_MODE_MODIFY_NACK(template RslChannelNr chan_nr, |
| 1620 | template RSL_Cause cause) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1621 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1622 | msg_type := RSL_MT_MODE_MODIFY_NACK, |
| 1623 | ies := { |
| 1624 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1625 | tr_RSL_IE(RSL_IE_Body:{cause := tr_RSL_IE_Cause(cause)}) |
| 1626 | } |
| 1627 | } |
| 1628 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1629 | |
Harald Welte | 6a8199d | 2018-01-29 21:58:53 +0100 | [diff] [blame] | 1630 | /* 8.4.14: BTS <- BSC */ |
| 1631 | template RSL_Message tr_RSL_RF_CHAN_REL(template RslChannelNr chan_nr) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1632 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
Harald Welte | 6a8199d | 2018-01-29 21:58:53 +0100 | [diff] [blame] | 1633 | msg_type := RSL_MT_RF_CHAN_REL, |
| 1634 | ies := { |
| 1635 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}) |
| 1636 | } |
| 1637 | } |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1638 | template (value) RSL_Message ts_RSL_RF_CHAN_REL(template (value) RslChannelNr chan_nr) := { |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1639 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1640 | msg_type := RSL_MT_RF_CHAN_REL, |
| 1641 | ies := { |
| 1642 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}) |
| 1643 | } |
| 1644 | } |
Harald Welte | 6a8199d | 2018-01-29 21:58:53 +0100 | [diff] [blame] | 1645 | |
Philipp Maier | 4d1e9c9 | 2018-12-20 11:11:56 +0100 | [diff] [blame] | 1646 | /* 8.4.15: BTS <- BSC */ |
| 1647 | template (value) RSL_Message ts_RSL_MS_PWR_CTRL(template (value) RslChannelNr chan_nr, |
| 1648 | template (value) RSL_IE_MS_Power ms_power) := { |
| 1649 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1650 | msg_type := RSL_MT_MS_POWER_CONTROL, |
| 1651 | ies := { |
| 1652 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1653 | t_RSL_IE(RSL_IE_MS_POWER, RSL_IE_Body:{ms_power := ms_power}) |
| 1654 | /* One optional IE: MS POWER PARAMETERS */ |
| 1655 | } |
| 1656 | } |
| 1657 | |
Eric Wild | 61edb7e | 2019-06-03 12:38:31 +0200 | [diff] [blame] | 1658 | template (value) RSL_Message ts_RSL_MS_PWR_CTRL_with_pp(template (value) RslChannelNr chan_nr, |
| 1659 | integer pwr_level) := { |
| 1660 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1661 | msg_type := RSL_MT_MS_POWER_CONTROL, |
| 1662 | ies := { |
| 1663 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1664 | t_RSL_IE(RSL_IE_MS_POWER, RSL_IE_Body:{ms_power := ts_RSL_IE_MS_Power(pwr_level)}), |
| 1665 | t_RSL_IE(RSL_IE_MS_POWER_PARAM, RSL_IE_Body:{ms_power_params := |
| 1666 | ts_RSL_IE_MS_Power_Parameters(''O)}) |
| 1667 | } |
| 1668 | } |
| 1669 | |
Eric Wild | ae8f262 | 2019-06-18 17:05:11 +0200 | [diff] [blame] | 1670 | /* 8.4.16: BTS <- BSC */ |
| 1671 | template (value) RSL_Message ts_RSL_BS_PWR_CTRL(template (value) RslChannelNr chan_nr, |
| 1672 | template (value) RSL_IE_BS_Power bs_power) := { |
| 1673 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1674 | msg_type := RSL_MT_BS_POWER_CONTROL, |
| 1675 | ies := { |
| 1676 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1677 | t_RSL_IE(RSL_IE_BS_POWER, RSL_IE_Body:{bs_power := bs_power}) |
| 1678 | /* One optional IE: BS POWER PARAMETERS */ |
| 1679 | } |
| 1680 | } |
Vadim Yanitskiy | 2a5a1ef | 2021-06-30 00:51:48 +0200 | [diff] [blame] | 1681 | template RSL_Message tr_RSL_BS_PWR_CTRL(template (present) RslChannelNr chan_nr, |
| 1682 | template (present) RSL_IE_BS_Power bs_power) := { |
| 1683 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1684 | msg_type := RSL_MT_BS_POWER_CONTROL, |
| 1685 | ies := { |
| 1686 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1687 | tr_RSL_IE(RSL_IE_Body:{bs_power := bs_power}) |
| 1688 | /* One optional IE: BS POWER PARAMETERS */ |
| 1689 | } |
| 1690 | } |
Eric Wild | ae8f262 | 2019-06-18 17:05:11 +0200 | [diff] [blame] | 1691 | |
Harald Welte | 4a26736 | 2017-12-09 17:49:32 +0100 | [diff] [blame] | 1692 | /* 8.4.19 BTS -> BSC */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1693 | template (value) RSL_Message ts_RSL_RF_CHAN_REL_ACK(template (value) RslChannelNr chan_nr) := |
Harald Welte | 4a26736 | 2017-12-09 17:49:32 +0100 | [diff] [blame] | 1694 | ts_RSL_MsgDiscType(ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1695 | RSL_MT_RF_CHAN_REL_ACK, |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 1696 | { t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}) }); |
Harald Welte | 4a26736 | 2017-12-09 17:49:32 +0100 | [diff] [blame] | 1697 | |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1698 | template RSL_Message tr_RSL_RF_CHAN_REL_ACK(template RslChannelNr chan_nr) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1699 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1700 | msg_type := RSL_MT_RF_CHAN_REL_ACK, |
| 1701 | ies := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1702 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}) |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1703 | } |
| 1704 | } |
| 1705 | |
Harald Welte | ea17b91 | 2018-03-11 22:29:31 +0100 | [diff] [blame] | 1706 | /* 8.6.20 BTS <- BSC */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1707 | template (value) RSL_Message ts_RSL_SACCH_INF_MOD(template (value) RslChannelNr chan_nr, |
| 1708 | RSL_IE_SysinfoType si_type, |
| 1709 | octetstring l3_info) := { |
Harald Welte | ea17b91 | 2018-03-11 22:29:31 +0100 | [diff] [blame] | 1710 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1711 | msg_type := RSL_MT_SACCH_INFO_MODIFY, |
| 1712 | ies := { |
| 1713 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1714 | t_RSL_IE(RSL_IE_SYSINFO_TYPE, RSL_IE_Body:{sysinfo_type := si_type}), |
| 1715 | t_RSL_IE(RSL_IE_L3_INFO, RSL_IE_Body:{l3_info := ts_RSL_L16V(l3_info)}) |
| 1716 | } |
| 1717 | } |
| 1718 | |
Neels Hofmeyr | 378a49c | 2018-06-15 22:18:43 +0200 | [diff] [blame] | 1719 | /* 8.4.7 BTS -> BSC */ |
| 1720 | template (value) RSL_Message ts_RSL_HANDO_DET(template (value) RslChannelNr chan_nr) := { |
| 1721 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1722 | msg_type := RSL_MT_HANDO_DET, |
| 1723 | ies := { |
| 1724 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}) |
| 1725 | } |
| 1726 | } |
Vadim Yanitskiy | 7c2c10c | 2019-05-31 20:42:01 +0700 | [diff] [blame] | 1727 | template RSL_Message tr_RSL_HANDO_DET(template RslChannelNr chan_nr, |
| 1728 | template uint8_t acc_delay := ?) := { |
| 1729 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1730 | msg_type := RSL_MT_HANDO_DET, |
| 1731 | ies := { |
| 1732 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1733 | tr_RSL_IE(RSL_IE_Body:{access_delay := acc_delay}) |
| 1734 | } |
| 1735 | } |
Neels Hofmeyr | 378a49c | 2018-06-15 22:18:43 +0200 | [diff] [blame] | 1736 | |
Harald Welte | ea17b91 | 2018-03-11 22:29:31 +0100 | [diff] [blame] | 1737 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1738 | /* COMMON CHANNEL MANAGEMENT MESSAGES */ |
| 1739 | |
Harald Welte | 874c223 | 2018-02-24 04:52:43 +0100 | [diff] [blame] | 1740 | /* 8.5.1 BTS <- BSC */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1741 | template (value) RSL_Message ts_RSL_BCCH_INFO(RSL_IE_SysinfoType si_type, |
| 1742 | octetstring full_bcch_info) := { |
Harald Welte | 874c223 | 2018-02-24 04:52:43 +0100 | [diff] [blame] | 1743 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 1744 | msg_type := RSL_MT_BCCH_INFO, |
| 1745 | ies := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1746 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := ts_RslChanNr_BCCH(0)}), |
Harald Welte | 874c223 | 2018-02-24 04:52:43 +0100 | [diff] [blame] | 1747 | t_RSL_IE(RSL_IE_SYSINFO_TYPE, RSL_IE_Body:{sysinfo_type := si_type}), |
| 1748 | t_RSL_IE(RSL_IE_FULL_BCCH_INFO, RSL_IE_Body:{other := ts_RSL_LV(full_bcch_info)}) |
| 1749 | } |
| 1750 | } |
Harald Welte | 09538f8 | 2019-08-01 09:50:25 +0200 | [diff] [blame] | 1751 | template RSL_Message tr_RSL_NO_BCCH_INFO(template RSL_IE_SysinfoType si_type := ?) := { |
| 1752 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 1753 | msg_type := RSL_MT_BCCH_INFO, |
| 1754 | ies := { |
| 1755 | tr_RSL_IE(RSL_IE_Body:{chan_nr := ts_RslChanNr_BCCH(0)}), |
| 1756 | tr_RSL_IE(RSL_IE_Body:{sysinfo_type := si_type}) |
| 1757 | } |
| 1758 | } |
| 1759 | template RSL_Message tr_RSL_BCCH_INFO(template RSL_IE_SysinfoType si_type := ?, |
| 1760 | template octetstring full_bcch_info := ?) := { |
| 1761 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 1762 | msg_type := RSL_MT_BCCH_INFO, |
| 1763 | ies := { |
| 1764 | tr_RSL_IE(RSL_IE_Body:{chan_nr := ts_RslChanNr_BCCH(0)}), |
| 1765 | tr_RSL_IE(RSL_IE_Body:{sysinfo_type := si_type}), |
| 1766 | tr_RSL_IE(RSL_IE_Body:{other := tr_RSL_LV(full_bcch_info)}), |
| 1767 | * |
| 1768 | } |
| 1769 | } |
Harald Welte | 874c223 | 2018-02-24 04:52:43 +0100 | [diff] [blame] | 1770 | |
Harald Welte | 7ae9314 | 2017-12-07 17:56:15 +0100 | [diff] [blame] | 1771 | /* 8.5.2 BTS -> BSC */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1772 | template (value) RSL_Message ts_RSL_RACH_LOAD_IND(uint16_t slot_ct, uint16_t busy_ct, |
| 1773 | uint16_t acc_ct) := { |
Harald Welte | 7ae9314 | 2017-12-07 17:56:15 +0100 | [diff] [blame] | 1774 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 1775 | msg_type := RSL_MT_CCCH_LOAD_IND, |
| 1776 | ies := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1777 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := ts_RslChanNr_RACH(0)}), |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 1778 | t_RSL_IE(RSL_IE_RACH_LOAD, RSL_IE_Body:{rach_load := ts_RSL_IE_RachLoad(slot_ct, busy_ct, acc_ct)}) |
Harald Welte | 7ae9314 | 2017-12-07 17:56:15 +0100 | [diff] [blame] | 1779 | } |
| 1780 | } |
Harald Welte | 68e495b | 2018-02-25 00:05:57 +0100 | [diff] [blame] | 1781 | template RSL_Message tr_RSL_RACH_LOAD_IND(template uint16_t slot_ct := ?, |
| 1782 | template uint16_t busy_ct := ?, |
Harald Welte | 09538f8 | 2019-08-01 09:50:25 +0200 | [diff] [blame] | 1783 | template uint16_t acc_ct := ?) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1784 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
Harald Welte | 68e495b | 2018-02-25 00:05:57 +0100 | [diff] [blame] | 1785 | msg_type := RSL_MT_CCCH_LOAD_IND, |
| 1786 | ies := { |
| 1787 | tr_RSL_IE(RSL_IE_Body:{chan_nr := t_RslChanNr_RACH(0)}), |
| 1788 | tr_RSL_IE(RSL_IE_Body:{rach_load := tr_RSL_IE_RachLoad(slot_ct, busy_ct, acc_ct)}) |
| 1789 | } |
| 1790 | } |
| 1791 | |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1792 | template (value) RSL_Message ts_RSL_PAGING_LOAD_IND(uint16_t buffer_space) := { |
Harald Welte | 7ae9314 | 2017-12-07 17:56:15 +0100 | [diff] [blame] | 1793 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 1794 | msg_type := RSL_MT_CCCH_LOAD_IND, |
| 1795 | ies := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1796 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := ts_RslChanNr_PCH_AGCH(0)}), |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 1797 | t_RSL_IE(RSL_IE_PAGING_LOAD, RSL_IE_Body:{paging_load := buffer_space}) |
Harald Welte | 7ae9314 | 2017-12-07 17:56:15 +0100 | [diff] [blame] | 1798 | } |
| 1799 | } |
Harald Welte | 68e495b | 2018-02-25 00:05:57 +0100 | [diff] [blame] | 1800 | template RSL_Message tr_RSL_PAGING_LOAD_IND(template uint16_t buffer_space := ?) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1801 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
Harald Welte | 68e495b | 2018-02-25 00:05:57 +0100 | [diff] [blame] | 1802 | msg_type := RSL_MT_CCCH_LOAD_IND, |
| 1803 | ies := { |
| 1804 | tr_RSL_IE(RSL_IE_Body:{chan_nr := t_RslChanNr_PCH_AGCH(0)}), |
| 1805 | tr_RSL_IE(RSL_IE_Body:{paging_load := buffer_space}) |
| 1806 | } |
| 1807 | } |
| 1808 | |
Harald Welte | 7ae9314 | 2017-12-07 17:56:15 +0100 | [diff] [blame] | 1809 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1810 | /* 8.5.3 BTS -> BSC */ |
Vadim Yanitskiy | ab448a5 | 2019-05-31 20:24:03 +0700 | [diff] [blame] | 1811 | template (value) RSL_Message ts_RSL_CHAN_RQD(OCT1 ra, GsmFrameNumber fn, |
| 1812 | template (value) RslChannelNr chan_nr := ts_RslChanNr_RACH(0), |
| 1813 | uint8_t acc_del := 0) := { |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1814 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 1815 | msg_type := RSL_MT_CHAN_RQD, |
| 1816 | ies := { |
Vadim Yanitskiy | ab448a5 | 2019-05-31 20:24:03 +0700 | [diff] [blame] | 1817 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1818 | /* TODO: we may need to have optional RSL_IE_LINK_IDENT IE here */ |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 1819 | t_RSL_IE(RSL_IE_REQ_REFERENCE, RSL_IE_Body:{req_ref := ts_RSL_IE_ReqRef(ra, fn)}), |
| 1820 | t_RSL_IE(RSL_IE_ACCESS_DELAY, RSL_IE_Body:{access_delay := acc_del}) |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1821 | } |
| 1822 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1823 | template RSL_Message tr_RSL_CHAN_RQD(template OCT1 ra, template GsmFrameNumber fn := ?, |
Vadim Yanitskiy | ab448a5 | 2019-05-31 20:24:03 +0700 | [diff] [blame] | 1824 | template RslChannelNr chan_nr := ts_RslChanNr_RACH(0), |
| 1825 | template uint8_t acc_del := ?) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1826 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1827 | msg_type := RSL_MT_CHAN_RQD, |
| 1828 | ies := { |
Vadim Yanitskiy | ab448a5 | 2019-05-31 20:24:03 +0700 | [diff] [blame] | 1829 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1830 | /* TODO: we may need to have optional RSL_IE_LINK_IDENT IE here */ |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1831 | tr_RSL_IE(RSL_IE_Body:{req_ref := tr_RSL_IE_ReqRef(ra, fn)}), |
| 1832 | tr_RSL_IE(RSL_IE_Body:{access_delay := acc_del}) |
| 1833 | } |
| 1834 | } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1835 | |
| 1836 | /* 8.5.4 BTS -> BSC */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1837 | template (value) RSL_Message ts_DELETE_IND(template (value) RslChannelNr chan_nr, |
| 1838 | octetstring imm_ass) := { |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1839 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 1840 | msg_type := RSL_MT_DELETE_IND, |
| 1841 | ies := { |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 1842 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1843 | t_RSL_IE(RSL_IE_FULL_IMM_ASS_INFO, RSL_IE_Body:{full_imm_ass_info := ts_RSL_LV(imm_ass)}) |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1844 | } |
| 1845 | } |
Harald Welte | e8d750e | 2018-06-10 21:41:35 +0200 | [diff] [blame] | 1846 | template RSL_Message tr_RSL_DELETE_IND(template octetstring imm_ass := ?, template uint3_t tn) := { |
| 1847 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 1848 | msg_type := RSL_MT_DELETE_IND, |
| 1849 | ies := { |
| 1850 | tr_RSL_IE(RSL_IE_Body:{chan_nr := t_RslChanNr_PCH_AGCH(tn)}), |
| 1851 | tr_RSL_IE(RSL_IE_Body:{full_imm_ass_info := tr_RSL_LV(imm_ass)}), |
| 1852 | * |
| 1853 | } |
| 1854 | } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1855 | |
Harald Welte | c287775 | 2017-12-07 17:54:35 +0100 | [diff] [blame] | 1856 | /* 8.5.5 BSC -> BTS */ |
Vadim Yanitskiy | cc4623d | 2020-03-28 06:14:06 +0700 | [diff] [blame] | 1857 | template RSL_Message tr_RSL_PAGING_CMD(template MobileIdentityV mi, template uint3_t tn := ?) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1858 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
Harald Welte | c287775 | 2017-12-07 17:54:35 +0100 | [diff] [blame] | 1859 | msg_type := RSL_MT_PAGING_CMD, |
| 1860 | ies := { |
| 1861 | tr_RSL_IE(RSL_IE_Body:{chan_nr := t_RslChanNr_PCH_AGCH(tn)}), |
| 1862 | tr_RSL_IE(RSL_IE_Body:{paging_group := ?}), |
Vadim Yanitskiy | cc4623d | 2020-03-28 06:14:06 +0700 | [diff] [blame] | 1863 | tr_RSL_IE(RSL_IE_Body:{ms_identity := tr_MI_LV(mi)}), |
Harald Welte | c287775 | 2017-12-07 17:54:35 +0100 | [diff] [blame] | 1864 | * /* opt: channel needed, eMLPP prio */ |
| 1865 | } |
| 1866 | } |
Vadim Yanitskiy | cc4623d | 2020-03-28 06:14:06 +0700 | [diff] [blame] | 1867 | template (value) RSL_Message ts_RSL_PAGING_CMD(MobileIdentityV mi, uint8_t pg, uint3_t tn := 0) := { |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1868 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 1869 | msg_type := RSL_MT_PAGING_CMD, |
| 1870 | ies := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1871 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := ts_RslChanNr_PCH_AGCH(tn)}), |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1872 | t_RSL_IE(RSL_IE_PAGING_GROUP, RSL_IE_Body:{paging_group := pg}), |
Vadim Yanitskiy | cc4623d | 2020-03-28 06:14:06 +0700 | [diff] [blame] | 1873 | t_RSL_IE(RSL_IE_MS_IDENTITY, RSL_IE_Body:{ms_identity := ts_MI_LV(mi)}) |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1874 | } |
| 1875 | } |
Harald Welte | c287775 | 2017-12-07 17:54:35 +0100 | [diff] [blame] | 1876 | |
| 1877 | /* 8.5.6 BSC -> BTS */ |
| 1878 | template RSL_Message tr_RSL_IMM_ASSIGN(template uint3_t tn := ?) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1879 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
Harald Welte | c287775 | 2017-12-07 17:54:35 +0100 | [diff] [blame] | 1880 | msg_type := RSL_MT_IMMEDIATE_ASSIGN_CMD, |
| 1881 | ies := { |
| 1882 | tr_RSL_IE(RSL_IE_Body:{chan_nr := t_RslChanNr_PCH_AGCH(tn)}), |
| 1883 | tr_RSL_IE(RSL_IE_Body:{full_imm_ass_info := ?}) |
| 1884 | } |
| 1885 | } |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1886 | template (value) RSL_Message ts_RSL_IMM_ASSIGN(octetstring f_ass_inf, uint3_t tn := 0) := { |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1887 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 1888 | msg_type := RSL_MT_IMMEDIATE_ASSIGN_CMD, |
| 1889 | ies := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1890 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := ts_RslChanNr_PCH_AGCH(tn)}), |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1891 | t_RSL_IE(RSL_IE_FULL_IMM_ASS_INFO, RSL_IE_Body:{full_imm_ass_info := ts_RSL_LV(f_ass_inf)}) |
| 1892 | } |
| 1893 | } |
Harald Welte | c287775 | 2017-12-07 17:54:35 +0100 | [diff] [blame] | 1894 | |
Harald Welte | cc37320 | 2018-09-10 10:28:21 +0200 | [diff] [blame] | 1895 | /* 8.5.8 BTS <- BSC SMS BROADCAST COMMAND */ |
| 1896 | template RSL_Message tr_RSL_SMSCB_CMD(template RSL_IE_CbCommandType cb_cmd := ?, |
| 1897 | template octetstring msg := ?, |
| 1898 | template RslChannelNr chan_nr := ?) := { |
| 1899 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 1900 | msg_type := RSL_MT_SMS_BC_CMD, |
| 1901 | ies := { |
| 1902 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1903 | tr_RSL_IE(RSL_IE_Body:{cb_cmd_type := cb_cmd}), |
| 1904 | tr_RSL_IE(RSL_IE_Body:{smscb_message := tr_RSL_LV(msg)}), |
| 1905 | * |
| 1906 | } |
| 1907 | } |
| 1908 | template (value) RSL_Message ts_RSL_SMSCB_CMD(template (value) RSL_IE_CbCommandType cb_cmd, |
| 1909 | template (value) octetstring msg, |
| 1910 | template (value) RslChannelNr chan_nr := |
| 1911 | ts_RslChanNr_SDCCH4(0, 2)) := { |
| 1912 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 1913 | msg_type := RSL_MT_SMS_BC_CMD, |
| 1914 | ies := { |
| 1915 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1916 | t_RSL_IE(RSL_IE_CB_CMD_TYPE, RSL_IE_Body:{cb_cmd_type := cb_cmd}), |
| 1917 | t_RSL_IE(RSL_IE_SMSCB_MSG, RSL_IE_Body:{smscb_message := ts_RSL_LV(msg)}) |
| 1918 | /* optional channel type for extended CBCH */ |
| 1919 | } |
| 1920 | } |
| 1921 | |
Harald Welte | 4a129f8 | 2019-05-21 16:35:22 +0200 | [diff] [blame] | 1922 | /* 8.5.9 BTS -> BSC CBCH LOAD INDICATION */ |
| 1923 | template RSL_Message tr_RSL_CBCH_LOAD_IND_BASIC(template boolean overflow := ?, |
| 1924 | template uint4_t slot_count := ?, |
| 1925 | template RslChannelNr chan_nr := ?) := { |
| 1926 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 1927 | msg_type := RSL_MT_CBCH_LOAD_IND, |
| 1928 | ies := { |
| 1929 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1930 | tr_RSL_IE(RSL_IE_Body:{cbch_load_info := tr_CbchLoadInfo(overflow, slot_count)}) |
| 1931 | } |
| 1932 | } |
| 1933 | template (value) RSL_Message ts_RSL_CBCH_LOAD_IND_BASIC(boolean overflow, uint4_t slot_count, |
| 1934 | template (value) RslChannelNr chan_nr := |
| 1935 | ts_RslChanNr_SDCCH4(0, 2)) := { |
| 1936 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 1937 | msg_type := RSL_MT_CBCH_LOAD_IND, |
| 1938 | ies := { |
| 1939 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1940 | t_RSL_IE(RSL_IE_CBCH_LOAD_INFO, RSL_IE_Body:{cbch_load_info := ts_CbchLoadInfo(overflow, slot_count)}) |
| 1941 | } |
| 1942 | } |
| 1943 | template RSL_Message tr_RSL_CBCH_LOAD_IND_EXTD(template boolean overflow := ?, |
| 1944 | template uint4_t slot_count := ?, |
| 1945 | template RslChannelNr chan_nr := ?) := { |
| 1946 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 1947 | msg_type := RSL_MT_CBCH_LOAD_IND, |
| 1948 | ies := { |
| 1949 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1950 | tr_RSL_IE(RSL_IE_Body:{cbch_load_info := tr_CbchLoadInfo(overflow, slot_count)}), |
| 1951 | tr_RSL_IE(RSL_IE_Body:{smscb_chan_ind := 1}) |
| 1952 | } |
| 1953 | } |
| 1954 | template (value) RSL_Message ts_RSL_CBCH_LOAD_IND_EXTD(boolean overflow, uint4_t slot_count, |
| 1955 | template (value) RslChannelNr chan_nr := |
| 1956 | ts_RslChanNr_SDCCH4(0, 2)) := { |
| 1957 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 1958 | msg_type := RSL_MT_CBCH_LOAD_IND, |
| 1959 | ies := { |
| 1960 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1961 | t_RSL_IE(RSL_IE_CBCH_LOAD_INFO, RSL_IE_Body:{cbch_load_info := ts_CbchLoadInfo(overflow, slot_count)}), |
| 1962 | t_RSL_IE(RSL_IE_SMSCB_CHAN_INDICATOR, RSL_IE_Body:{smscb_chan_ind := 1}) |
| 1963 | } |
| 1964 | } |
| 1965 | |
| 1966 | |
Vadim Yanitskiy | 9f69953 | 2021-06-03 17:29:22 +0200 | [diff] [blame] | 1967 | /* 8.6.1 BTS -> BSC */ |
| 1968 | template (value) RSL_Message |
| 1969 | ts_RSL_RF_RES_IND(template (value) RSL_ResourceInfo info) := { |
| 1970 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_TRX_MGMT, false), |
| 1971 | msg_type := RSL_MT_RF_RES_IND, |
| 1972 | ies := { |
| 1973 | t_RSL_IE(RSL_IE_RESOURCE_INFO, RSL_IE_Body:{ |
| 1974 | resource_info := { |
| 1975 | len := 0, /* overwritten */ |
| 1976 | info := info |
| 1977 | } |
| 1978 | }) |
| 1979 | } |
| 1980 | } |
| 1981 | template RSL_Message |
| 1982 | tr_RSL_RF_RES_IND(template (present) RSL_ResourceInfo info := ?) := { |
| 1983 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_TRX_MGMT, false), |
| 1984 | msg_type := RSL_MT_RF_RES_IND, |
| 1985 | ies := { |
| 1986 | tr_RSL_IE(RSL_IE_Body:{ |
| 1987 | resource_info := { |
| 1988 | len := ?, |
| 1989 | info := info |
| 1990 | } |
| 1991 | }) |
| 1992 | } |
| 1993 | } |
| 1994 | |
| 1995 | |
Harald Welte | 68e495b | 2018-02-25 00:05:57 +0100 | [diff] [blame] | 1996 | /* 8.6.2 BTS <- BSC */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 1997 | template (value) RSL_Message ts_RSL_SACCH_FILL(RSL_IE_SysinfoType si_type, octetstring l3_info) := { |
Harald Welte | 68e495b | 2018-02-25 00:05:57 +0100 | [diff] [blame] | 1998 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_TRX_MGMT, false), |
| 1999 | msg_type := RSL_MT_SACCH_FILL, |
| 2000 | ies := { |
| 2001 | t_RSL_IE(RSL_IE_SYSINFO_TYPE, RSL_IE_Body:{sysinfo_type := si_type}), |
| 2002 | t_RSL_IE(RSL_IE_L3_INFO, RSL_IE_Body:{l3_info := ts_RSL_L16V(l3_info)}) |
| 2003 | } |
| 2004 | } |
Harald Welte | 09538f8 | 2019-08-01 09:50:25 +0200 | [diff] [blame] | 2005 | template RSL_Message tr_RSL_NO_SACCH_FILL(template RSL_IE_SysinfoType si_type := ?) := { |
| 2006 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_TRX_MGMT, false), |
| 2007 | msg_type := RSL_MT_SACCH_FILL, |
| 2008 | ies := { |
| 2009 | tr_RSL_IE(RSL_IE_Body:{sysinfo_type := si_type}) |
| 2010 | } |
| 2011 | } |
| 2012 | template RSL_Message tr_RSL_SACCH_FILL(template RSL_IE_SysinfoType si_type := ?, |
| 2013 | template octetstring l3_info := ?) := { |
| 2014 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_TRX_MGMT, false), |
| 2015 | msg_type := RSL_MT_SACCH_FILL, |
| 2016 | ies := { |
| 2017 | tr_RSL_IE(RSL_IE_Body:{sysinfo_type := si_type}), |
| 2018 | tr_RSL_IE(RSL_IE_Body:{l3_info := tr_RSL_L16V(l3_info)}), |
| 2019 | * |
| 2020 | } |
| 2021 | } |
| 2022 | |
Harald Welte | 68e495b | 2018-02-25 00:05:57 +0100 | [diff] [blame] | 2023 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 2024 | /* 8.6.4 BTS -> BSC */ |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 2025 | template (value) RSL_Message ts_RSL_ERROR_REPORT(RSL_Cause cause) := { |
Harald Welte | 01d982c | 2018-02-25 01:31:40 +0100 | [diff] [blame] | 2026 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_TRX_MGMT, false), |
| 2027 | msg_type := RSL_MT_ERROR_REPORT, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 2028 | ies := { |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 2029 | t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 2030 | } |
| 2031 | } |
Harald Welte | 01d982c | 2018-02-25 01:31:40 +0100 | [diff] [blame] | 2032 | template RSL_Message tr_RSL_ERROR_REPORT(template RSL_Cause cause := ?) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 2033 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_TRX_MGMT, false), |
Harald Welte | 01d982c | 2018-02-25 01:31:40 +0100 | [diff] [blame] | 2034 | msg_type := RSL_MT_ERROR_REPORT, |
| 2035 | ies := { |
| 2036 | tr_RSL_IE(RSL_IE_Body:{cause := tr_RSL_IE_Cause(cause)}), |
| 2037 | * |
| 2038 | } |
| 2039 | } |
| 2040 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 2041 | |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2042 | |
| 2043 | /* Abis/IP specific messages */ |
| 2044 | |
| 2045 | template RSL_Message tr_RSL_IPA_CRCX(template RslChannelNr chan_nr) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 2046 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2047 | msg_type := RSL_MT_IPAC_CRCX, |
| 2048 | ies := { |
| 2049 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 2050 | * |
| 2051 | } |
| 2052 | } |
Vadim Yanitskiy | e9141c2 | 2021-07-03 01:45:40 +0200 | [diff] [blame] | 2053 | template (value) RSL_Message |
| 2054 | ts_RSL_IPA_CRCX(template (value) RslChannelNr chan_nr, |
Vadim Yanitskiy | fc63164 | 2021-07-03 02:42:45 +0200 | [diff] [blame] | 2055 | template (value) OCT4 remote_ip := '7F000001'O, |
Vadim Yanitskiy | e9141c2 | 2021-07-03 01:45:40 +0200 | [diff] [blame] | 2056 | template (value) uint16_t remote_port := 6766) := { |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 2057 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 2058 | msg_type := RSL_MT_IPAC_CRCX, |
| 2059 | ies := { |
Vadim Yanitskiy | e9141c2 | 2021-07-03 01:45:40 +0200 | [diff] [blame] | 2060 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 2061 | t_RSL_IE(RSL_IE_IPAC_REMOTE_IP, RSL_IE_Body:{ipa_remote_ip := remote_ip}), |
| 2062 | t_RSL_IE(RSL_IE_IPAC_REMOTE_PORT, RSL_IE_Body:{ipa_remote_port := remote_port}) |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 2063 | } |
| 2064 | } |
| 2065 | |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2066 | |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 2067 | template (value) RSL_Message ts_RSL_IPA_CRCX_ACK(template (value) RslChannelNr chan_nr, |
Vadim Yanitskiy | fc63164 | 2021-07-03 02:42:45 +0200 | [diff] [blame] | 2068 | uint16_t ipa_conn_id, OCT4 local_ip, |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 2069 | uint16_t local_port, uint7_t rtp_pt2) := { |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2070 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 2071 | msg_type := RSL_MT_IPAC_CRCX_ACK, |
| 2072 | ies := { |
| 2073 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 2074 | t_RSL_IE(RSL_IE_IPAC_CONN_ID, RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| 2075 | t_RSL_IE(RSL_IE_IPAC_LOCAL_IP, RSL_IE_Body:{ipa_local_ip := local_ip}), |
| 2076 | t_RSL_IE(RSL_IE_IPAC_LOCAL_PORT, RSL_IE_Body:{ipa_local_port := local_port}), |
| 2077 | t_RSL_IE(RSL_IE_IPAC_RTP_PAYLOAD2, RSL_IE_Body:{ipa_rtp_pt2 := rtp_pt2}) |
| 2078 | } |
| 2079 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 2080 | template RSL_Message tr_RSL_IPA_CRCX_ACK(template RslChannelNr chan_nr, |
| 2081 | template uint16_t ipa_conn_id, |
Vadim Yanitskiy | fc63164 | 2021-07-03 02:42:45 +0200 | [diff] [blame] | 2082 | template OCT4 local_ip, |
Harald Welte | 8bd0f82 | 2018-02-25 12:43:28 +0100 | [diff] [blame] | 2083 | template uint16_t local_port) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 2084 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 2085 | msg_type := RSL_MT_IPAC_CRCX_ACK, |
| 2086 | ies := { |
| 2087 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 2088 | tr_RSL_IE(RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| 2089 | tr_RSL_IE(RSL_IE_Body:{ipa_local_ip := local_ip}), |
Harald Welte | 8bd0f82 | 2018-02-25 12:43:28 +0100 | [diff] [blame] | 2090 | tr_RSL_IE(RSL_IE_Body:{ipa_local_port := local_port}) |
| 2091 | /* Optional: RTP Payload Type 2 IE */ |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 2092 | } |
| 2093 | } |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2094 | |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 2095 | template (value) RSL_Message ts_RSL_IPA_CRCX_NACK(template (value) RslChannelNr chan_nr, |
| 2096 | RSL_Cause cause) := { |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2097 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 2098 | msg_type := RSL_MT_IPAC_CRCX_NACK, |
| 2099 | ies := { |
| 2100 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 2101 | t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) |
| 2102 | } |
| 2103 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 2104 | template RSL_Message tr_RSL_IPA_CRCX_NACK(template RslChannelNr chan_nr, |
| 2105 | template RSL_Cause cause := ?) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 2106 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 2107 | msg_type := RSL_MT_IPAC_CRCX_NACK, |
| 2108 | ies := { |
| 2109 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 2110 | tr_RSL_IE(RSL_IE_Body:{cause := tr_RSL_IE_Cause(cause)}) |
| 2111 | } |
| 2112 | } |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2113 | |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 2114 | template (value) RSL_Message ts_RSL_IPA_MDCX(template (value) RslChannelNr chan_nr, |
| 2115 | uint16_t ipa_conn_id, |
Vadim Yanitskiy | fc63164 | 2021-07-03 02:42:45 +0200 | [diff] [blame] | 2116 | OCT4 remote_ip, uint16_t remote_port, |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 2117 | uint7_t rtp_pt2) := { |
Harald Welte | 3052745 | 2018-02-25 12:46:25 +0100 | [diff] [blame] | 2118 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 2119 | msg_type := RSL_MT_IPAC_MDCX, |
| 2120 | ies := { |
| 2121 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 2122 | t_RSL_IE(RSL_IE_IPAC_CONN_ID, RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| 2123 | t_RSL_IE(RSL_IE_IPAC_REMOTE_IP, RSL_IE_Body:{ipa_remote_ip := remote_ip}), |
| 2124 | t_RSL_IE(RSL_IE_IPAC_REMOTE_PORT, RSL_IE_Body:{ipa_remote_port := remote_port}), |
| 2125 | /* optional: RTP Payload Type */ |
| 2126 | t_RSL_IE(RSL_IE_IPAC_RTP_PAYLOAD2, RSL_IE_Body:{ipa_rtp_pt2 := rtp_pt2}) |
| 2127 | } |
| 2128 | } |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2129 | template RSL_Message tr_RSL_IPA_MDCX(template RslChannelNr chan_nr, |
| 2130 | template uint16_t ipa_conn_id) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 2131 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2132 | msg_type := RSL_MT_IPAC_MDCX, |
| 2133 | ies := { |
| 2134 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 2135 | tr_RSL_IE(RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| 2136 | * |
| 2137 | } |
| 2138 | } |
| 2139 | |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 2140 | template (value) RSL_Message ts_RSL_IPA_MDCX_ACK(template (value) RslChannelNr chan_nr, |
| 2141 | uint16_t ipa_conn_id, |
Vadim Yanitskiy | fc63164 | 2021-07-03 02:42:45 +0200 | [diff] [blame] | 2142 | OCT4 local_ip, uint16_t local_port, |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 2143 | uint7_t rtp_pt2) := { |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2144 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
Harald Welte | 71b5ec8 | 2017-12-16 23:01:10 +0100 | [diff] [blame] | 2145 | msg_type := RSL_MT_IPAC_MDCX_ACK, |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2146 | ies := { |
| 2147 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 2148 | /* optional */ |
| 2149 | t_RSL_IE(RSL_IE_IPAC_CONN_ID, RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
Harald Welte | 6cb400a | 2018-02-25 12:45:25 +0100 | [diff] [blame] | 2150 | t_RSL_IE(RSL_IE_IPAC_LOCAL_IP, RSL_IE_Body:{ipa_local_ip := local_ip}), |
| 2151 | t_RSL_IE(RSL_IE_IPAC_LOCAL_PORT, RSL_IE_Body:{ipa_local_port := local_port}), |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2152 | /* optional: RTP Payload Type */ |
| 2153 | t_RSL_IE(RSL_IE_IPAC_RTP_PAYLOAD2, RSL_IE_Body:{ipa_rtp_pt2 := rtp_pt2}) |
| 2154 | } |
| 2155 | } |
Harald Welte | 3052745 | 2018-02-25 12:46:25 +0100 | [diff] [blame] | 2156 | template RSL_Message tr_RSL_IPA_MDCX_ACK(template RslChannelNr chan_nr, |
| 2157 | template uint16_t ipa_conn_id, |
Vadim Yanitskiy | fc63164 | 2021-07-03 02:42:45 +0200 | [diff] [blame] | 2158 | template OCT4 local_ip, |
Harald Welte | 3052745 | 2018-02-25 12:46:25 +0100 | [diff] [blame] | 2159 | template uint16_t local_port, |
| 2160 | template uint7_t rtp_pt2) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 2161 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
Harald Welte | 3052745 | 2018-02-25 12:46:25 +0100 | [diff] [blame] | 2162 | msg_type := RSL_MT_IPAC_MDCX_ACK, |
| 2163 | ies := { |
| 2164 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 2165 | /* optional */ |
| 2166 | tr_RSL_IE(RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| 2167 | tr_RSL_IE(RSL_IE_Body:{ipa_local_ip := local_ip}), |
| 2168 | tr_RSL_IE(RSL_IE_Body:{ipa_local_port := local_port}), |
| 2169 | /* optional: RTP Payload Type */ |
| 2170 | tr_RSL_IE(RSL_IE_Body:{ipa_rtp_pt2 := rtp_pt2}) |
| 2171 | } |
| 2172 | } |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2173 | |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 2174 | template (value) RSL_Message ts_RSL_IPA_MDCX_NACK(template (value) RslChannelNr chan_nr, |
| 2175 | RSL_Cause cause, |
| 2176 | template (value) uint16_t ipa_conn_id) := { |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2177 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 2178 | msg_type := RSL_MT_IPAC_MDCX_NACK, |
| 2179 | ies := { |
| 2180 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 2181 | /* optional connection ID */ |
| 2182 | t_RSL_IE(RSL_IE_IPAC_CONN_ID, RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| 2183 | t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) |
| 2184 | } |
| 2185 | } |
Harald Welte | 3052745 | 2018-02-25 12:46:25 +0100 | [diff] [blame] | 2186 | template RSL_Message tr_RSL_IPA_MDCX_NACK(template RslChannelNr chan_nr, |
| 2187 | template RSL_Cause cause, |
| 2188 | template uint16_t ipa_conn_id) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 2189 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
Harald Welte | 3052745 | 2018-02-25 12:46:25 +0100 | [diff] [blame] | 2190 | msg_type := RSL_MT_IPAC_MDCX_NACK, |
| 2191 | ies := { |
| 2192 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 2193 | /* optional connection ID */ |
| 2194 | tr_RSL_IE(RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| 2195 | tr_RSL_IE(RSL_IE_Body:{cause := tr_RSL_IE_Cause(cause)}) |
| 2196 | } |
| 2197 | } |
| 2198 | |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2199 | |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 2200 | template (value) RSL_Message ts_RSL_IPA_DLCX_IND(template (value) RslChannelNr chan_nr, |
| 2201 | uint16_t ipa_conn_id, |
| 2202 | template (value) RSL_IE_IPA_ConnectionStats stats, |
| 2203 | RSL_Cause cause) := { |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2204 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 2205 | msg_type := RSL_MT_IPAC_DLCX_IND, |
| 2206 | ies := { |
| 2207 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 2208 | t_RSL_IE(RSL_IE_IPAC_CONN_ID, RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| 2209 | t_RSL_IE(RSL_IE_IPAC_CONN_STAT, RSL_IE_Body:{ipa_stats := stats}), |
| 2210 | t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) |
| 2211 | } |
| 2212 | } |
| 2213 | |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 2214 | template (value) RSL_Message ts_RSL_IPA_DLCX(template (value) RslChannelNr chan_nr, |
| 2215 | uint16_t ipa_conn_id) := { |
Harald Welte | a871a38 | 2018-02-25 02:03:14 +0100 | [diff] [blame] | 2216 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 2217 | msg_type := RSL_MT_IPAC_DLCX, |
| 2218 | ies := { |
Harald Welte | 2a7e716 | 2018-02-25 12:46:48 +0100 | [diff] [blame] | 2219 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 2220 | t_RSL_IE(RSL_IE_IPAC_CONN_ID, RSL_IE_Body:{ipa_conn_id := ipa_conn_id}) |
Harald Welte | a871a38 | 2018-02-25 02:03:14 +0100 | [diff] [blame] | 2221 | } |
| 2222 | } |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2223 | template RSL_Message tr_RSL_IPA_DLCX(template RslChannelNr chan_nr, |
| 2224 | template uint16_t ipa_conn_id := omit) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 2225 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2226 | msg_type := RSL_MT_IPAC_DLCX, |
| 2227 | ies := { |
| 2228 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 2229 | /* FIXME: optional conn_id */ |
| 2230 | * |
| 2231 | } |
| 2232 | } |
| 2233 | |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 2234 | template (value) RSL_Message ts_RSL_IPA_DLCX_ACK(template (value) RslChannelNr chan_nr, |
| 2235 | uint16_t ipa_conn_id, |
| 2236 | RSL_IE_IPA_ConnectionStats stats) := { |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2237 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 2238 | msg_type := RSL_MT_IPAC_DLCX_ACK, |
| 2239 | ies := { |
| 2240 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 2241 | t_RSL_IE(RSL_IE_IPAC_CONN_ID, RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| 2242 | t_RSL_IE(RSL_IE_IPAC_CONN_STAT, RSL_IE_Body:{ipa_stats := stats}) |
| 2243 | } |
| 2244 | } |
Harald Welte | a871a38 | 2018-02-25 02:03:14 +0100 | [diff] [blame] | 2245 | template RSL_Message tr_RSL_IPA_DLCX_ACK(template RslChannelNr chan_nr, |
| 2246 | template uint16_t ipa_conn_id, |
| 2247 | template RSL_IE_IPA_ConnectionStats stats) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 2248 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
Harald Welte | a871a38 | 2018-02-25 02:03:14 +0100 | [diff] [blame] | 2249 | msg_type := RSL_MT_IPAC_DLCX_ACK, |
| 2250 | ies := { |
| 2251 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 2252 | tr_RSL_IE(RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| 2253 | tr_RSL_IE(RSL_IE_Body:{ipa_stats := stats}) |
| 2254 | } |
| 2255 | } |
| 2256 | |
| 2257 | |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2258 | |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 2259 | template (value) RSL_Message ts_RSL_IPA_DLCX_NACK(template (value) RslChannelNr chan_nr, |
| 2260 | RSL_Cause cause, uint16_t ipa_conn_id) := { |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2261 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 2262 | msg_type := RSL_MT_IPAC_DLCX_NACK, |
| 2263 | ies := { |
| 2264 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 2265 | /* optional connection ID */ |
| 2266 | t_RSL_IE(RSL_IE_IPAC_CONN_ID, RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| 2267 | t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) |
| 2268 | } |
| 2269 | } |
Harald Welte | a871a38 | 2018-02-25 02:03:14 +0100 | [diff] [blame] | 2270 | template RSL_Message tr_RSL_IPA_DLCX_NACK(template RslChannelNr chan_nr, |
| 2271 | template RSL_Cause cause) := { |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 2272 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
Harald Welte | a871a38 | 2018-02-25 02:03:14 +0100 | [diff] [blame] | 2273 | msg_type := RSL_MT_IPAC_DLCX_NACK, |
| 2274 | ies := { |
| 2275 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 2276 | /* optional connection ID */ |
| 2277 | *, |
| 2278 | tr_RSL_IE(RSL_IE_Body:{cause := tr_RSL_IE_Cause(cause)}) |
| 2279 | } |
| 2280 | } |
| 2281 | |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2282 | |
Harald Welte | efa7d91 | 2018-04-18 23:22:15 +0200 | [diff] [blame] | 2283 | template (value) RSL_Message ts_RSL_IPA_PDCH_ACT(RslChannelNr chan_nr) := { |
Harald Welte | ee19c73 | 2018-04-05 09:08:26 +0200 | [diff] [blame] | 2284 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 2285 | msg_type := RSL_MT_IPAC_PDCH_ACT, |
| 2286 | ies := { |
| 2287 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}) |
| 2288 | } |
| 2289 | } |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2290 | template RSL_Message tr_RSL_IPA_PDCH_ACT(template RslChannelNr chan_nr) := { |
Harald Welte | ee19c73 | 2018-04-05 09:08:26 +0200 | [diff] [blame] | 2291 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2292 | msg_type := RSL_MT_IPAC_PDCH_ACT, |
| 2293 | ies := { |
| 2294 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}) |
| 2295 | } |
| 2296 | } |
| 2297 | |
Harald Welte | ee19c73 | 2018-04-05 09:08:26 +0200 | [diff] [blame] | 2298 | |
Harald Welte | 94e0c34 | 2018-04-07 11:33:23 +0200 | [diff] [blame] | 2299 | template RSL_Message ts_RSL_IPA_PDCH_ACT_ACK(RslChannelNr chan_nr, |
| 2300 | template (value) RSL_IE_FrameNumber fn) := { |
Harald Welte | ee19c73 | 2018-04-05 09:08:26 +0200 | [diff] [blame] | 2301 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2302 | msg_type := RSL_MT_IPAC_PDCH_ACT_ACK, |
| 2303 | ies := { |
| 2304 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 2305 | t_RSL_IE(RSL_IE_FRAME_NUMBER, RSL_IE_Body:{frame_nr := fn}) |
| 2306 | } |
| 2307 | } |
Harald Welte | ee19c73 | 2018-04-05 09:08:26 +0200 | [diff] [blame] | 2308 | template RSL_Message tr_RSL_IPA_PDCH_ACT_ACK(template RslChannelNr chan_nr, |
| 2309 | template RSL_IE_FrameNumber fn) := { |
| 2310 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 2311 | msg_type := RSL_MT_IPAC_PDCH_ACT_ACK, |
| 2312 | ies := { |
| 2313 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 2314 | tr_RSL_IE(RSL_IE_Body:{frame_nr := fn}) |
| 2315 | } |
| 2316 | } |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2317 | |
| 2318 | template RSL_Message ts_RSL_IPA_PDCH_ACT_NACK(RslChannelNr chan_nr, RSL_Cause cause) := { |
Harald Welte | ee19c73 | 2018-04-05 09:08:26 +0200 | [diff] [blame] | 2319 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2320 | msg_type := RSL_MT_IPAC_PDCH_ACT_NACK, |
| 2321 | ies := { |
| 2322 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 2323 | t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) |
| 2324 | } |
| 2325 | } |
Harald Welte | ee19c73 | 2018-04-05 09:08:26 +0200 | [diff] [blame] | 2326 | template RSL_Message tr_RSL_IPA_PDCH_ACT_NACK(template RslChannelNr chan_nr, |
| 2327 | template RSL_Cause cause) := { |
| 2328 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 2329 | msg_type := RSL_MT_IPAC_PDCH_ACT_NACK, |
| 2330 | ies := { |
| 2331 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 2332 | tr_RSL_IE(RSL_IE_Body:{cause := tr_RSL_IE_Cause(cause)}) |
| 2333 | } |
| 2334 | } |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2335 | |
Harald Welte | ee19c73 | 2018-04-05 09:08:26 +0200 | [diff] [blame] | 2336 | template RSL_Message ts_RSL_IPA_PDCH_DEACT(RslChannelNr chan_nr) := { |
| 2337 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 2338 | msg_type := RSL_MT_IPAC_PDCH_DEACT, |
| 2339 | ies := { |
| 2340 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}) |
| 2341 | } |
| 2342 | } |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2343 | template RSL_Message tr_RSL_IPA_PDCH_DEACT(template RslChannelNr chan_nr) := { |
Harald Welte | ee19c73 | 2018-04-05 09:08:26 +0200 | [diff] [blame] | 2344 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2345 | msg_type := RSL_MT_IPAC_PDCH_DEACT, |
| 2346 | ies := { |
| 2347 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}) |
| 2348 | } |
| 2349 | } |
| 2350 | |
| 2351 | template RSL_Message ts_RSL_IPA_PDCH_DEACT_ACK(RslChannelNr chan_nr) := { |
Harald Welte | ee19c73 | 2018-04-05 09:08:26 +0200 | [diff] [blame] | 2352 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2353 | msg_type := RSL_MT_IPAC_PDCH_DEACT_ACK, |
| 2354 | ies := { |
| 2355 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}) |
| 2356 | } |
| 2357 | } |
Harald Welte | ee19c73 | 2018-04-05 09:08:26 +0200 | [diff] [blame] | 2358 | template RSL_Message tr_RSL_IPA_PDCH_DEACT_ACK(template RslChannelNr chan_nr) := { |
| 2359 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 2360 | msg_type := RSL_MT_IPAC_PDCH_DEACT_ACK, |
| 2361 | ies := { |
| 2362 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}) |
| 2363 | } |
| 2364 | } |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2365 | |
| 2366 | template RSL_Message ts_RSL_IPA_PDCH_DEACT_NACK(RslChannelNr chan_nr, RSL_Cause cause) := { |
Harald Welte | ee19c73 | 2018-04-05 09:08:26 +0200 | [diff] [blame] | 2367 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2368 | msg_type := RSL_MT_IPAC_PDCH_DEACT_NACK, |
| 2369 | ies := { |
| 2370 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 2371 | t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) |
| 2372 | } |
| 2373 | } |
Harald Welte | ee19c73 | 2018-04-05 09:08:26 +0200 | [diff] [blame] | 2374 | template RSL_Message tr_RSL_IPA_PDCH_DEACT_NACK(template RslChannelNr chan_nr, |
| 2375 | template RSL_Cause cause) := { |
| 2376 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 2377 | msg_type := RSL_MT_IPAC_PDCH_DEACT_NACK, |
| 2378 | ies := { |
| 2379 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 2380 | tr_RSL_IE(RSL_IE_Body:{cause := tr_RSL_IE_Cause(cause)}) |
| 2381 | } |
| 2382 | } |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2383 | |
Harald Welte | 908ce54 | 2019-09-04 23:05:40 +0200 | [diff] [blame] | 2384 | template (value) RSL_Message ts_RSL_OSMO_ETWS_CMD(template (value) octetstring msg, |
| 2385 | template (value) RslChannelNr chan_nr := ts_RslChanNr_PCH_AGCH(0)) := { |
| 2386 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 2387 | msg_type := RSL_MT_OSMO_ETWS_CMD, |
| 2388 | ies := { |
| 2389 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 2390 | t_RSL_IE(RSL_IE_SMSCB_MSG, RSL_IE_Body:{smscb_message := ts_RSL_LV(msg)}) |
| 2391 | } |
| 2392 | } |
| 2393 | template RSL_Message tr_RSL_OSMO_ETWS_CMD(template RslChannelNr chan_nr := ?, |
| 2394 | template octetstring msg := ?) := { |
| 2395 | msg_disc := tr_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 2396 | msg_type := RSL_MT_OSMO_ETWS_CMD, |
| 2397 | ies := { |
| 2398 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 2399 | tr_RSL_IE(RSL_IE_Body:{smscb_message := tr_RSL_LV(msg)}) |
| 2400 | } |
| 2401 | } |
| 2402 | |
| 2403 | |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2404 | |
Harald Welte | 6a8199d | 2018-01-29 21:58:53 +0100 | [diff] [blame] | 2405 | function f_rsl_find_ie(RSL_Message msg, RSL_IE_Type iei, out RSL_IE_Body ret) return boolean { |
| 2406 | for (var integer i := 0; i < sizeof(msg.ies); i := i+1) { |
| 2407 | if (msg.ies[i].iei == iei) { |
| 2408 | ret := msg.ies[i].body; |
| 2409 | return true; |
| 2410 | } |
| 2411 | } |
| 2412 | return false; |
| 2413 | } |
| 2414 | |
| 2415 | |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 2416 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 2417 | } with { encode "RAW" ; variant "FIELDORDER(msb)" } |