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