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