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