Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1 | module RSL_Types { |
| 2 | |
Harald Welte | 35bb716 | 2018-01-03 21:07:52 +0100 | [diff] [blame] | 3 | /* GSUP_Types, defining abstract TTCN-3 data types for the A-bis RSL protocol. |
| 4 | * |
| 5 | * RSL is a 3GPP standard protocol used between BTS and BSC in a GSM network. |
| 6 | * |
| 7 | * (C) 2017 by Harald Welte <laforge@gnumonks.org> |
| 8 | * All rights reserved. |
| 9 | * |
| 10 | * Released under the terms of GNU General Public License, Version 2 or |
| 11 | * (at your option) any later version. |
| 12 | */ |
| 13 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 14 | import from General_Types all; |
| 15 | import from Osmocom_Types all; |
| 16 | import from GSM_Types all; |
| 17 | |
| 18 | /* Section 9.1 */ |
| 19 | type enumerated RSL_MessageGroup { |
| 20 | RSL_MDISC_RESERVED ('0000000'B), |
| 21 | RSL_MDISC_RLL ('0000001'B), |
| 22 | RSL_MDISC_DCHAN ('0000100'B), |
| 23 | RSL_MDISC_CCHAN ('0000110'B), |
| 24 | RSL_MDISC_TRX_MGMT ('0001000'B), |
| 25 | RSL_MDISC_LCS ('0010000'B), |
| 26 | RSL_MDISC_IPACCESS ('0111111'B) |
| 27 | } with { variant "FIELDLENGTH(7)" }; |
| 28 | |
| 29 | /* Section 9.1 */ |
| 30 | type record RSL_MessageDiscriminator { |
| 31 | RSL_MessageGroup msg_group, |
| 32 | boolean transparent |
| 33 | } with { variant "FIELDORDER(msb)" }; |
| 34 | |
| 35 | template RSL_MessageDiscriminator ts_RSL_MsgDisc(RSL_MessageGroup mg, boolean t := true) := { |
| 36 | msg_group := mg, |
| 37 | transparent := t |
| 38 | } |
| 39 | |
| 40 | /* Section 9.2 */ |
| 41 | type enumerated RSL_MessageType { |
| 42 | /* Radio Link Layer Management */ |
| 43 | RSL_MT_DATA_REQ ('00000001'B), |
| 44 | RSL_MT_DATA_IND ('00000010'B), |
| 45 | RSL_MT_ERROR_IND ('00000011'B), |
| 46 | RSL_MT_EST_REQ ('00000100'B), |
| 47 | RSL_MT_EST_CONF ('00000101'B), |
| 48 | RSL_MT_EST_IND ('00000110'B), |
| 49 | RSL_MT_REL_REQ ('00000111'B), |
| 50 | RSL_MT_REL_CONF ('00001000'B), |
| 51 | RSL_MT_REL_IND ('00001001'B), |
| 52 | RSL_MT_UNIT_DATA_REQ ('00001010'B), |
| 53 | RSL_MT_UNIT_DATA_IND ('00001011'B), |
| 54 | |
| 55 | /* non-standard below */ |
| 56 | RSL_MT_SUSP_REQ ('00001100'B), |
| 57 | RSL_MT_SUSP_CONF ('00001101'B), |
| 58 | RSL_MT_RES_REQ ('00001110'B), |
| 59 | RSL_MT_RECON_REQ ('00001111'B), |
| 60 | |
| 61 | /* Common Channel Management / TRX Management */ |
| 62 | RSL_MT_BCCH_INFO ('00010001'B), |
Harald Welte | 319be82 | 2017-12-07 17:50:26 +0100 | [diff] [blame] | 63 | RSL_MT_CCCH_LOAD_IND ('00010010'B), |
| 64 | RSL_MT_CHAN_RQD ('00010011'B), |
| 65 | RSL_MT_DELETE_IND ('00010100'B), |
| 66 | RSL_MT_PAGING_CMD ('00010101'B), |
| 67 | RSL_MT_IMMEDIATE_ASSIGN_CMD ('00010110'B), |
| 68 | RSL_MT_SMS_BC_REQ ('00010111'B), |
| 69 | RSL_MT_CHAN_CONF ('00011000'B), /* non-standard element */ |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 70 | /* empty */ |
| 71 | RSL_MT_RF_RES_IND ('00011001'B), |
Harald Welte | 319be82 | 2017-12-07 17:50:26 +0100 | [diff] [blame] | 72 | RSL_MT_SACCH_FILL ('00011010'B), |
| 73 | RSL_MT_OVERLOAD ('00011011'B), |
| 74 | RSL_MT_ERROR_REPORT ('00011100'B), |
| 75 | RSL_MT_SMS_BC_CMD ('00011101'B), |
| 76 | RSL_MT_CBCH_LOAD_IND ('00011110'B), |
| 77 | RSL_MT_NOT_CMD ('00011111'B), |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 78 | |
| 79 | /* Dedicate Channel Management */ |
| 80 | RSL_MT_CHAN_ACTIV ('00100001'B), |
Harald Welte | 319be82 | 2017-12-07 17:50:26 +0100 | [diff] [blame] | 81 | RSL_MT_CHAN_ACTIV_ACK ('00100010'B), |
| 82 | RSL_MT_CHAN_ACTIV_NACK ('00100011'B), |
| 83 | RSL_MT_CONN_FAIL ('00100100'B), |
| 84 | RSL_MT_DEACTIVATE_SACCH ('00100101'B), |
| 85 | RSL_MT_ENCR_CMD ('00100110'B), |
| 86 | RSL_MT_HANDO_DET ('00100111'B), |
| 87 | RSL_MT_MEAS_RES ('00101000'B), |
| 88 | RSL_MT_MODE_MODIFY_REQ ('00101001'B), |
| 89 | RSL_MT_MODE_MODIFY_ACK ('00101010'B), |
| 90 | RSL_MT_MODE_MODIFY_NACK ('00101011'B), |
| 91 | RSL_MT_PHY_CONTEXT_REQ ('00101100'B), |
| 92 | RSL_MT_PHY_CONTEXT_CONF ('00101101'B), |
| 93 | RSL_MT_RF_CHAN_REL ('00101110'B), |
| 94 | RSL_MT_MS_POWER_CONTROL ('00101111'B), |
| 95 | RSL_MT_BS_POWER_CONTROL ('00110000'B), /* 0x30 */ |
| 96 | RSL_MT_PREPROC_CONFIG ('00110001'B), |
| 97 | RSL_MT_PREPROC_MEAS_RES ('00110010'B), |
| 98 | RSL_MT_RF_CHAN_REL_ACK ('00110011'B), |
| 99 | RSL_MT_SACCH_INFO_MODIFY('00110100'B), |
| 100 | RSL_MT_TALKER_DET ('00110101'B), |
| 101 | RSL_MT_LISTENER_DET ('00110110'B), |
| 102 | RSL_MT_REMOTE_CODEC_CONF_REP ('00110111'B), |
| 103 | RSL_MT_RTD_REP ('00111000'B), |
| 104 | RSL_MT_PRE_HANDO_NOTIF ('00111001'B), |
| 105 | RSL_MT_MR_CODEC_MOD_REQ ('00111010'B), |
| 106 | RSL_MT_MR_CODEC_MOD_ACK ('00111011'B), |
| 107 | RSL_MT_MR_CODEC_MOD_NACK ('00111100'B), |
| 108 | RSL_MT_MR_CODEC_MOD_PER ('00111101'B), |
| 109 | RSL_MT_TFO_REP ('00111110'B), |
| 110 | RSL_MT_TFO_MOD_REQ ('00111111'B), /* 0x3f */ |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 111 | |
| 112 | RSL_MT_LOCATION_INFO ('01000001'B), |
| 113 | |
| 114 | /* ip.access specific RSL message types */ |
| 115 | RSL_MT_IPAC_DIR_RETR_ENQ ('01000000'B), |
| 116 | |
| 117 | RSL_MT_IPAC_PDCH_ACT ('01001000'B), |
Harald Welte | 319be82 | 2017-12-07 17:50:26 +0100 | [diff] [blame] | 118 | RSL_MT_IPAC_PDCH_ACT_ACK ('01001001'B), |
| 119 | RSL_MT_IPAC_PDCH_ACT_NACK ('01001010'B), |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 120 | RSL_MT_IPAC_PDCH_DEACT ('01001011'B), |
Harald Welte | 319be82 | 2017-12-07 17:50:26 +0100 | [diff] [blame] | 121 | RSL_MT_IPAC_PDCH_DEACT_ACK ('01001100'B), |
| 122 | RSL_MT_IPAC_PDCH_DEACT_NACK ('01001101'B), |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 123 | |
| 124 | RSL_MT_IPAC_CONNECT_MUX ('01010000'B), |
Harald Welte | f307500 | 2017-12-16 22:31:41 +0100 | [diff] [blame] | 125 | RSL_MT_IPAC_CONNECT_MUX_ACK ('01010001'B), |
| 126 | RSL_MT_IPAC_CONNECT_MUX_NACK ('01010010'B), |
| 127 | RSL_MT_IPAC_BIND_MUX ('01010011'B), |
| 128 | RSL_MT_IPAC_BIND_MUX_ACK ('01010100'B), |
| 129 | RSL_MT_IPAC_BIND_MUX_NACK ('01010101'B), |
| 130 | RSL_MT_IPAC_DISC_MUX ('01010110'B), |
| 131 | RSL_MT_IPAC_DISC_MUX_ACK ('01010111'B), |
| 132 | RSL_MT_IPAC_DISC_MUX_NACK ('01011000'B), |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 133 | RSL_MT_IPAC_MEAS_PREPROC_DFT ('01100000'B), |
Harald Welte | f307500 | 2017-12-16 22:31:41 +0100 | [diff] [blame] | 134 | RSL_MT_IPAC_HO_CAN_ENQ ('01100001'B), |
| 135 | RSL_MT_IPAC_HO_CAN_RES ('01100010'B), |
| 136 | RSL_MT_IPAC_CRCX ('01110000'B), |
| 137 | RSL_MT_IPAC_CRCX_ACK ('01110001'B), |
| 138 | RSL_MT_IPAC_CRCX_NACK ('01110010'B), |
| 139 | RSL_MT_IPAC_MDCX ('01110011'B), |
| 140 | RSL_MT_IPAC_MDCX_ACK ('01110100'B), |
| 141 | RSL_MT_IPAC_MDCX_NACK ('01110101'B), |
| 142 | RSL_MT_IPAC_DLCX_IND ('01110110'B), |
| 143 | RSL_MT_IPAC_DLCX ('01110111'B), |
| 144 | RSL_MT_IPAC_DLCX_ACK ('01111000'B), |
| 145 | RSL_MT_IPAC_DLCX_NACK ('01111001'B) |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 146 | } with { variant "FIELDLENGTH(8)" }; |
| 147 | |
| 148 | /*! RSL Information Element Identifiers (Chapter 9.3) */ |
| 149 | type enumerated RSL_IE_Type { |
| 150 | RSL_IE_CHAN_NR ('00000001'B), |
Harald Welte | 319be82 | 2017-12-07 17:50:26 +0100 | [diff] [blame] | 151 | RSL_IE_LINK_IDENT ('00000010'B), |
| 152 | RSL_IE_ACT_TYPE ('00000011'B), |
| 153 | RSL_IE_BS_POWER ('00000100'B), |
| 154 | RSL_IE_CHAN_IDENT ('00000101'B), |
| 155 | RSL_IE_CHAN_MODE ('00000110'B), |
| 156 | RSL_IE_ENCR_INFO ('00000111'B), |
| 157 | RSL_IE_FRAME_NUMBER ('00001000'B), |
| 158 | RSL_IE_HANDO_REF ('00001001'B), |
| 159 | RSL_IE_L1_INFO ('00001010'B), |
| 160 | RSL_IE_L3_INFO ('00001011'B), |
| 161 | RSL_IE_MS_IDENTITY ('00001100'B), |
| 162 | RSL_IE_MS_POWER ('00001101'B), |
| 163 | RSL_IE_PAGING_GROUP ('00001110'B), |
| 164 | RSL_IE_PAGING_LOAD ('00001111'B), |
| 165 | RSL_IE_PYHS_CONTEXT ('00010000'B), |
| 166 | RSL_IE_ACCESS_DELAY ('00010001'B), |
| 167 | RSL_IE_RACH_LOAD ('00010010'B), |
| 168 | RSL_IE_REQ_REFERENCE ('00010011'B), |
| 169 | RSL_IE_RELEASE_MODE ('00010100'B), |
| 170 | RSL_IE_RESOURCE_INFO ('00010101'B), |
| 171 | RSL_IE_RLM_CAUSE ('00010110'B), |
| 172 | RSL_IE_STARTNG_TIME ('00010111'B), |
| 173 | RSL_IE_TIMING_ADVANCE ('00011000'B), |
| 174 | RSL_IE_UPLINK_MEAS ('00011001'B), |
| 175 | RSL_IE_CAUSE ('00011010'B), |
| 176 | RSL_IE_MEAS_RES_NR ('00011011'B), |
| 177 | RSL_IE_MSG_ID ('00011100'B), |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 178 | /* reserved */ |
| 179 | RSL_IE_SYSINFO_TYPE ('00011110'B), |
Harald Welte | 319be82 | 2017-12-07 17:50:26 +0100 | [diff] [blame] | 180 | RSL_IE_MS_POWER_PARAM ('00011111'B), |
| 181 | RSL_IE_BS_POWER_PARAM ('00100000'B), |
| 182 | RSL_IE_PREPROC_PARAM ('00100001'B), |
| 183 | RSL_IE_PREPROC_MEAS ('00100010'B), |
| 184 | RSL_IE_IMM_ASS_INFO ('00100011'B),/* Phase 1 (3.6.0), later Full below */ |
| 185 | RSL_IE_SMSCB_INFO ('00100100'B), |
| 186 | RSL_IE_MS_TIMING_OFFSET ('00100101'B), |
| 187 | RSL_IE_ERR_MSG ('00100110'B), |
| 188 | RSL_IE_FULL_BCCH_INFO ('00100111'B), |
| 189 | RSL_IE_CHAN_NEEDED ('00101000'B), |
| 190 | RSL_IE_CB_CMD_TYPE ('00101001'B), |
| 191 | RSL_IE_SMSCB_MSG ('00101010'B), |
| 192 | RSL_IE_FULL_IMM_ASS_INFO ('00101011'B), |
| 193 | RSL_IE_SACCH_INFO ('00101100'B), |
| 194 | RSL_IE_CBCH_LOAD_INFO ('00101101'B), |
| 195 | RSL_IE_SMSCB_CHAN_INDICATOR ('00101110'B), |
| 196 | RSL_IE_GROUP_CALL_REF ('00101111'B), |
| 197 | RSL_IE_CHAN_DESC ('00110000'B), |
| 198 | RSL_IE_NCH_DRX_INFO ('00110001'B), |
| 199 | RSL_IE_CMD_INDICATOR ('00110010'B), |
| 200 | RSL_IE_EMLPP_PRIO ('00110011'B), |
| 201 | RSL_IE_UIC ('00110100'B), |
| 202 | RSL_IE_MAIN_CHAN_REF ('00110101'B), |
| 203 | RSL_IE_MR_CONFIG ('00110110'B), |
| 204 | RSL_IE_MR_CONTROL ('00110111'B), |
| 205 | RSL_IE_SUP_CODEC_TYPES ('00111000'B), |
| 206 | RSL_IE_CODEC_CONFIG ('00111001'B), |
| 207 | RSL_IE_RTD ('00111010'B), |
| 208 | RSL_IE_TFO_STATUS ('00111011'B), |
| 209 | RSL_IE_LLP_APDU ('00111100'B), |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 210 | |
| 211 | /* ip.access */ |
| 212 | RSL_IE_IPAC_SRTP_CONFIG ('11100000'B), |
Harald Welte | 319be82 | 2017-12-07 17:50:26 +0100 | [diff] [blame] | 213 | RSL_IE_IPAC_PROXY_UDP ('11100001'B), |
| 214 | RSL_IE_IPAC_BSCMPL_TOUT ('11100010'B), |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 215 | |
| 216 | RSL_IE_IPAC_REMOTE_IP ('11110000'B), |
Harald Welte | 319be82 | 2017-12-07 17:50:26 +0100 | [diff] [blame] | 217 | RSL_IE_IPAC_REMOTE_PORT ('11110001'B), |
| 218 | RSL_IE_IPAC_RTP_PAYLOAD ('11110010'B), |
| 219 | RSL_IE_IPAC_LOCAL_PORT ('11110011'B), |
| 220 | RSL_IE_IPAC_SPEECH_MODE ('11110100'B), |
| 221 | RSL_IE_IPAC_LOCAL_IP ('11110101'B), |
| 222 | RSL_IE_IPAC_CONN_STAT ('11110110'B), |
| 223 | RSL_IE_IPAC_HO_C_PARMS ('11110111'B), |
| 224 | RSL_IE_IPAC_CONN_ID ('11111000'B), |
| 225 | RSL_IE_IPAC_RTP_CSD_FMT ('11111001'B), |
| 226 | RSL_IE_IPAC_RTP_JIT_BUF ('11111010'B), |
| 227 | RSL_IE_IPAC_RTP_COMPR ('11111011'B), |
| 228 | RSL_IE_IPAC_RTP_PAYLOAD2 ('11111100'B), |
| 229 | RSL_IE_IPAC_RTP_MPLEX ('11111101'B), |
| 230 | RSL_IE_IPAC_RTP_MPLEX_ID ('11111110'B) |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 231 | } with { variant "FIELDLENGTH(8)" }; |
| 232 | |
| 233 | type record RSL_LV { |
| 234 | uint8_t len, |
| 235 | octetstring payload |
| 236 | } with { variant (len) "LENGTHTO(payload)" } |
| 237 | |
| 238 | template RSL_LV ts_RSL_LV(template octetstring pl) := { |
| 239 | len := 0, |
| 240 | payload := pl |
| 241 | } |
| 242 | |
Harald Welte | 51d7410 | 2017-12-10 23:05:02 +0100 | [diff] [blame] | 243 | template RSL_LV tr_RSL_LV(template octetstring pl) := { |
| 244 | len := ?, |
| 245 | payload := pl |
| 246 | } |
| 247 | |
Harald Welte | 15bb5b5 | 2017-12-07 17:52:04 +0100 | [diff] [blame] | 248 | type record RSL_L16V { |
| 249 | uint16_t len, |
| 250 | octetstring payload |
| 251 | } with { variant (len) "LENGTHTO(payload)" } |
| 252 | |
| 253 | template RSL_L16V ts_RSL_L16V(template octetstring pl) := { |
| 254 | len := 0, |
| 255 | payload := pl |
| 256 | } |
| 257 | |
Harald Welte | 7794d5b | 2017-12-16 23:00:20 +0100 | [diff] [blame] | 258 | template RSL_L16V tr_RSL_L16V(template octetstring pl) := { |
| 259 | len := ?, |
| 260 | payload := pl |
| 261 | } |
| 262 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 263 | type record RSL_IE_V { |
| 264 | uint8_t val |
| 265 | } |
| 266 | |
| 267 | /* 9.3.3 */ |
| 268 | type record RSL_IE_ActivationType { |
| 269 | boolean reactivation, |
| 270 | uint4_t reserved, |
| 271 | uint3_t a_bits |
| 272 | } |
| 273 | |
| 274 | template RSL_IE_ActivationType t_RSL_IE_ActType := { |
| 275 | reactivation := false, |
| 276 | reserved := 0, |
| 277 | a_bits := 0 /* related to immediate assignment */ |
| 278 | } |
| 279 | |
| 280 | /* 9.3.6 */ |
| 281 | type enumerated RSL_SpeechDataInd { |
| 282 | RSL_SPDI_SPEECH ('00000001'B), |
| 283 | RSL_SPDI_DATA ('00000010'B), |
| 284 | RSL_SPDI_SIGN ('00000011'B) |
| 285 | } with { variant "FIELDLENGTH(8)" }; |
| 286 | type enumerated RSL_ChanRateType { |
| 287 | RSL_CHRT_SDCCH ('00000001'B), |
| 288 | RSL_CHRT_TCH_F ('00001000'B), |
| 289 | RSL_CHRT_TCH_H ('00001001'B), |
| 290 | RSL_CHRT_TCH_F_BD_MSLOT ('00001010'B), |
| 291 | RSL_CHRT_TCH_F_DL_MSLOT ('00011010'B), |
| 292 | RSL_CHRT_TCH_F_GROUP ('00011000'B), |
| 293 | RSL_CHRT_TCH_H_GROUP ('00011001'B), |
| 294 | RSL_CHRT_TCH_F_BCAST ('00101000'B), |
| 295 | RSL_CHRT_TCH_H_BCAST ('00101001'B) |
| 296 | } with { variant "FIELDLENGTH(8)" }; |
| 297 | type enumerated RSL_SpeechAlgo { |
| 298 | RSL_CMOD_NO_RESOURCE ('00000000'B), |
| 299 | RSL_CMOD_SP_GSM1 ('00000001'B), |
| 300 | RSL_CMOD_SP_GSM2 ('00010001'B), |
| 301 | RSL_CMOD_SP_GSM3 ('00100001'B), |
| 302 | RSL_CMOD_SP_GSM4 ('00110001'B), |
| 303 | RSL_CMOD_SP_GSM5 ('00001001'B), |
| 304 | RSL_CMOD_SP_GSM6 ('00001101'B) |
| 305 | } with { variant "FIELDLENGTH(8)" }; |
| 306 | type record RSL_IE_ChannelMode { |
Harald Welte | 8f2c21d | 2017-12-07 17:52:40 +0100 | [diff] [blame] | 307 | uint8_t len, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 308 | BIT6 reserved, |
| 309 | boolean dtx_d, |
| 310 | boolean dtx_u, |
| 311 | RSL_SpeechDataInd spd_ind, |
| 312 | RSL_ChanRateType ch_rate_type, |
| 313 | RSL_SpeechAlgo coding_alg_rate |
Harald Welte | 8f2c21d | 2017-12-07 17:52:40 +0100 | [diff] [blame] | 314 | } 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] | 315 | |
| 316 | template RSL_IE_ChannelMode ts_RSL_ChanMode_SIGN := { |
Harald Welte | 8f2c21d | 2017-12-07 17:52:40 +0100 | [diff] [blame] | 317 | len := 0, /* overwritten */ |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 318 | reserved := '000000'B, |
| 319 | dtx_d := false, |
| 320 | dtx_u := false, |
| 321 | spd_ind := RSL_SPDI_SIGN, |
| 322 | ch_rate_type := RSL_CHRT_SDCCH, |
| 323 | coding_alg_rate := RSL_CMOD_NO_RESOURCE |
| 324 | } |
| 325 | |
| 326 | template RSL_IE_ChannelMode ts_RSL_ChanMode(RSL_ChanRateType t, RSL_SpeechAlgo alg) := { |
Harald Welte | 8f2c21d | 2017-12-07 17:52:40 +0100 | [diff] [blame] | 327 | len := 0, /* overwritten */ |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 328 | reserved := '000000'B, |
| 329 | dtx_d := false, |
| 330 | dtx_u := false, |
| 331 | spd_ind := RSL_SPDI_SPEECH, |
| 332 | ch_rate_type := t, |
| 333 | coding_alg_rate := alg |
| 334 | } |
| 335 | |
| 336 | /* 9.3.4 */ |
| 337 | type record RSL_IE_BS_Power { |
| 338 | uint1_t reserved, |
| 339 | boolean epc, |
| 340 | boolean fpc, |
| 341 | uint5_t power_level |
| 342 | } |
| 343 | |
Harald Welte | 73cd271 | 2017-12-17 00:44:52 +0100 | [diff] [blame] | 344 | /* 9.3.7 */ |
| 345 | type record RSL_IE_EncryptionInfo { |
| 346 | uint8_t len, |
| 347 | OCT1 alg_id, |
| 348 | octetstring key |
| 349 | } with { variant (len) "LENGTHTO(alg_id,key)" }; |
| 350 | |
| 351 | template RSL_IE_EncryptionInfo tr_RSL_IE_EncrInfo(template OCT1 alg, template octetstring key) := { |
| 352 | len := ?, |
| 353 | alg_id := alg, |
| 354 | key := key |
| 355 | } |
| 356 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 357 | /* 9.3.8 */ |
| 358 | type record RSL_IE_FrameNumber { |
| 359 | uint5_t t1_p, |
| 360 | uint6_t t3, |
| 361 | uint5_t t2 |
| 362 | } |
| 363 | type RSL_IE_FrameNumber RSL_IE_StartingTime; |
| 364 | |
| 365 | /* 9.3.10 */ |
| 366 | type record RSL_IE_L1Info { |
| 367 | uint5_t ms_power_lvl, |
| 368 | boolean fpc, |
| 369 | uint2_t reserved, |
| 370 | uint8_t actual_ta |
| 371 | } |
| 372 | |
| 373 | /* 9.3.13 */ |
| 374 | type record RSL_IE_MS_Power { |
| 375 | uint2_t reserved, |
| 376 | boolean fpc_epc, |
| 377 | uint5_t power_level |
| 378 | } |
| 379 | |
Harald Welte | d5f521e | 2017-12-07 17:53:06 +0100 | [diff] [blame] | 380 | /* 9.3.18 */ |
| 381 | type record RSL_IE_RachLoad { |
| 382 | uint8_t len, |
| 383 | uint16_t slot_count, |
| 384 | uint16_t busy_count, |
| 385 | uint16_t access_count |
| 386 | } with { variant (len) "LENGTHTO(slot_count,busy_count,access_count)" } |
| 387 | |
| 388 | template RSL_IE_RachLoad ts_RSL_IE_RachLoad(uint16_t slot, uint16_t busy, uint16_t acc) := { |
| 389 | len := 0, /* overwritten */ |
| 390 | slot_count := slot, |
| 391 | busy_count := busy, |
| 392 | access_count := acc |
| 393 | } |
| 394 | |
Harald Welte | 68e495b | 2018-02-25 00:05:57 +0100 | [diff] [blame] | 395 | template RSL_IE_RachLoad tr_RSL_IE_RachLoad(template uint16_t slot, |
| 396 | template uint16_t busy, |
| 397 | template uint16_t acc) := { |
| 398 | len := ?, /* overwritten */ |
| 399 | slot_count := slot, |
| 400 | busy_count := busy, |
| 401 | access_count := acc |
| 402 | } |
| 403 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 404 | /* 9.3.19 */ |
| 405 | type record RSL_IE_RequestRef { |
| 406 | OCT1 ra, |
| 407 | RSL_IE_FrameNumber frame_nr |
| 408 | } |
| 409 | |
| 410 | /* 3GPP TS 44.018 / 10.5.2.38 Starting Time */ |
| 411 | template RSL_IE_FrameNumber ts_RSL_IE_FrameNumber(GsmFrameNumber fn) := { |
| 412 | t1_p := (fn / 1326) mod 32, |
| 413 | t3 := fn mod 51, |
| 414 | t2 := fn mod 26 |
| 415 | } |
| 416 | |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 417 | function tr_RSL_IE_FrameNumber(template GsmFrameNumber fn) return template RSL_IE_FrameNumber { |
| 418 | if (istemplatekind(fn, "?")) { |
| 419 | return ?; |
| 420 | } else { |
| 421 | return ts_RSL_IE_FrameNumber(valueof(fn)); |
| 422 | } |
| 423 | } |
| 424 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 425 | template RSL_IE_RequestRef ts_RSL_IE_ReqRef(OCT1 ra, GsmFrameNumber frame_nr) := { |
| 426 | ra := ra, |
| 427 | frame_nr := ts_RSL_IE_FrameNumber(frame_nr) |
| 428 | } |
| 429 | |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 430 | template RSL_IE_RequestRef tr_RSL_IE_ReqRef(template OCT1 ra, template GsmFrameNumber frame_nr) := { |
| 431 | ra := ra, |
| 432 | frame_nr := tr_RSL_IE_FrameNumber(frame_nr) |
| 433 | } |
| 434 | |
Harald Welte | 2691adf | 2018-02-22 17:32:39 +0100 | [diff] [blame] | 435 | /* 9.3.25 */ |
| 436 | type record RSL_IE_UplinkMeas { |
| 437 | uint8_t len, |
| 438 | BIT1 rfu, |
| 439 | boolean dtx_d, |
| 440 | uint6_t rxlev_f_u, |
| 441 | BIT2 reserved1, |
| 442 | uint6_t rxlev_s_u, |
| 443 | BIT2 reserved2, |
| 444 | uint3_t rxq_f_u, |
| 445 | uint3_t rxq_s_u, |
| 446 | octetstring supp_meas_info optional |
| 447 | } 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] | 448 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 449 | /* 9.3.26 */ |
Harald Welte | a8ed906 | 2017-12-14 09:46:01 +0100 | [diff] [blame] | 450 | type enumerated RSL_Cause { |
| 451 | /* normal event */ |
| 452 | RSL_ERR_RADIO_IF_FAIL ('00'O), |
| 453 | RSL_ERR_RADIO_LINK_FAIL ('01'O), |
| 454 | RSL_ERR_HANDOVER_ACC_FAIL ('02'O), |
| 455 | RSL_ERR_TALKER_ACC_FAIL ('03'O), |
| 456 | RSL_ERR_OM_INTERVENTION ('07'O), |
| 457 | RSL_ERR_NORMAL_UNSPEC ('0f'O), |
| 458 | RSL_ERR_T_MSRFPCI_EXP ('18'O), |
| 459 | /* resource unavailable */ |
| 460 | RSL_ERR_EQUIPMENT_FAIL ('20'O), |
| 461 | RSL_ERR_RR_UNAVAIL ('21'O), |
| 462 | RSL_ERR_TERR_CH_FAIL ('22'O), |
| 463 | RSL_ERR_CCCH_OVERLOAD ('23'O), |
| 464 | RSL_ERR_ACCH_OVERLOAD ('24'O), |
| 465 | RSL_ERR_PROCESSOR_OVERLOAD ('25'O), |
| 466 | RSL_ERR_BTS_NOT_EQUIPPED ('27'O), |
| 467 | RSL_ERR_REMOTE_TRAU_FAILURE ('28'O), |
| 468 | RSL_ERR_NOTIF_OVERFLOW ('29'O), |
| 469 | RSL_ERR_RES_UNAVAIL ('2f'O), |
| 470 | /* service or option not available */ |
| 471 | RSL_ERR_TRANSC_UNAVAIL ('30'O), |
| 472 | RSL_ERR_SERV_OPT_UNAVAIL ('3f'O), |
| 473 | /* service or option not implemented */ |
| 474 | RSL_ERR_ENCR_UNIMPL ('40'O), |
| 475 | RSL_ERR_SERV_OPT_UNIMPL ('4f'O), |
| 476 | /* invalid message */ |
| 477 | RSL_ERR_RCH_ALR_ACTV_ALLOC ('50'O), |
| 478 | RSL_ERR_INVALID_MESSAGE ('5f'O), |
| 479 | /* protocol error */ |
| 480 | RSL_ERR_MSG_DISCR ('60'O), |
| 481 | RSL_ERR_MSG_TYPE ('61'O), |
| 482 | RSL_ERR_MSG_SEQ ('62'O), |
| 483 | RSL_ERR_IE_ERROR ('63'O), |
| 484 | RSL_ERR_MAND_IE_ERROR ('64'O), |
| 485 | RSL_ERR_OPT_IE_ERROR ('65'O), |
| 486 | RSL_ERR_IE_NONEXIST ('66'O), |
| 487 | RSL_ERR_IE_LENGTH ('67'O), |
| 488 | RSL_ERR_IE_CONTENT ('68'O), |
| 489 | RSL_ERR_PROTO ('6f'O), |
| 490 | /* interworking */ |
| 491 | RSL_ERR_INTERWORKING ('7f'O) |
| 492 | }; |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 493 | type record RSL_IE_Cause { |
Harald Welte | 6efa8e3 | 2017-12-09 22:34:06 +0100 | [diff] [blame] | 494 | uint8_t len, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 495 | uint1_t e, |
| 496 | RSL_Cause cause, |
| 497 | octetstring cause_ext optional |
Harald Welte | 6efa8e3 | 2017-12-09 22:34:06 +0100 | [diff] [blame] | 498 | } with { variant (len) "LENGTHTO(e,cause,cause_ext)" } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 499 | |
| 500 | template RSL_IE_Cause ts_RSL_IE_Cause(RSL_Cause cause) := { |
Harald Welte | 6efa8e3 | 2017-12-09 22:34:06 +0100 | [diff] [blame] | 501 | len := 0, /* overwritten */ |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 502 | e := 0, |
| 503 | cause := cause, |
| 504 | cause_ext := omit |
| 505 | } |
| 506 | |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 507 | template RSL_IE_Cause tr_RSL_IE_Cause(template RSL_Cause cause) := { |
| 508 | len := ?, |
| 509 | e := 0, |
| 510 | cause := cause, |
| 511 | cause_ext := omit |
| 512 | } |
| 513 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 514 | /* 9.3.40 */ |
| 515 | type enumerated RSL_ChanNeeded { |
| 516 | RSL_CHANNEED_ANY ('00'B), |
| 517 | RSL_CHANNEED_SDCCH ('01'B), |
| 518 | RSL_CHANNEED_TCH_F ('10'B), |
| 519 | RSL_CHANNEED_TCH_ForH ('11'B) |
Harald Welte | 51d7410 | 2017-12-10 23:05:02 +0100 | [diff] [blame] | 520 | } with { variant "FIELDLENGTH(2)" }; |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 521 | type record RSL_IE_ChanNeeded { |
| 522 | uint6_t reserved, |
| 523 | RSL_ChanNeeded chan_needed |
| 524 | } |
| 525 | |
| 526 | /* 9.3.53 */ |
| 527 | type record RSL_IE_MultirateCtrl { |
| 528 | uint3_t spare, |
| 529 | boolean od, |
| 530 | boolean pre, |
| 531 | uint2_t rae, |
| 532 | boolean tfo |
| 533 | } |
| 534 | |
| 535 | type enumerated RSL_IE_SysinfoType { |
| 536 | RSL_SYSTEM_INFO_8 ('00000000'B), |
| 537 | RSL_SYSTEM_INFO_1 ('00000001'B), |
| 538 | RSL_SYSTEM_INFO_2 ('00000010'B), |
| 539 | RSL_SYSTEM_INFO_3 ('00000011'B), |
| 540 | RSL_SYSTEM_INFO_4 ('00000100'B), |
| 541 | RSL_SYSTEM_INFO_5 ('00000101'B), |
| 542 | RSL_SYSTEM_INFO_6 ('00000110'B), |
| 543 | RSL_SYSTEM_INFO_7 ('00000111'B), |
| 544 | RSL_SYSTEM_INFO_16 ('00001000'B), |
| 545 | RSL_SYSTEM_INFO_17 ('00001001'B), |
| 546 | RSL_SYSTEM_INFO_2bis ('00001010'B), |
| 547 | RSL_SYSTEM_INFO_2ter ('00001011'B), |
| 548 | RSL_SYSTEM_INFO_5bis ('00001101'B), |
| 549 | RSL_SYSTEM_INFO_5ter ('00001110'B), |
| 550 | RSL_SYSTEM_INFO_10 ('00001111'B), |
| 551 | RSL_EXT_MEAS_ORDER ('01000111'B), |
| 552 | RSL_MEAS_INFO ('01001000'B), |
| 553 | RSL_SYSTEM_INFO_13 ('00101000'B), |
| 554 | RSL_ERIC_SYSTEM_INFO_13 ('00001100'B), |
| 555 | RSL_SYSTEM_INFO_2quater ('00101001'B), |
| 556 | RSL_SYSTEM_INFO_9 ('00101010'B), |
| 557 | RSL_SYSTEM_INFO_18 ('00101011'B), |
| 558 | RSL_SYSTEM_INFO_19 ('00101100'B), |
| 559 | RSL_SYSTEM_INFO_20 ('00101101'B) |
| 560 | } with { variant "FIELDLENGTH(8)" } |
| 561 | |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 562 | type record RSL_IE_IPA_ConnectionStats { |
| 563 | uint8_t len, |
| 564 | uint32_t tx_packets, |
| 565 | uint32_t tx_octets, |
| 566 | uint32_t rx_packets, |
| 567 | uint32_t rx_octets, |
| 568 | uint32_t lost_packets, |
| 569 | uint32_t jitter, |
| 570 | uint32_t avg_delay |
| 571 | } with { variant (len) "LENGTHTO(tx_packets,tx_octets,rx_packets,rx_octets,lost_packets,jitter,avg_delay)" } |
| 572 | |
| 573 | type enumerated RSL_IPA_SpeechMode { |
| 574 | RSL_IPA_SPM_SENDRECV ('00'B), |
| 575 | RSL_IPA_SPM_RECVONLY ('01'B), |
| 576 | RSL_IPA_SPM_SENDONLY ('10'B), |
| 577 | RSL_IPA_SPM_RESERVED ('11'B) |
| 578 | } with { variant "FIELDLENGTH(2)" } |
| 579 | |
| 580 | type enumerated RSL_IPA_Codec { |
| 581 | RSL_IPA_CODEC_FR ('0000'B), |
| 582 | RSL_IPA_CODEC_EFR ('0001'B), |
| 583 | RSL_IPA_CODEC_AMR_F ('0010'B), |
| 584 | RSL_IPA_CODEC_HR ('0011'B), |
| 585 | RSL_IPA_CODEC_AMR_H ('0101'B), |
| 586 | RSL_IPA_CODEC_RTP_PT ('1111'B) |
| 587 | } with { variant "FIELDLENGTH(4)" } |
| 588 | |
| 589 | type record RSL_IE_IPA_SpeechMode { |
| 590 | BIT2 reserved, |
| 591 | RSL_IPA_SpeechMode mode, |
| 592 | RSL_IPA_Codec codec |
| 593 | } |
| 594 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 595 | /* union of all IE bodies */ |
| 596 | type union RSL_IE_Body { |
| 597 | RslChannelNr chan_nr, |
| 598 | RslLinkId link_id, |
Harald Welte | 15bb5b5 | 2017-12-07 17:52:04 +0100 | [diff] [blame] | 599 | RSL_L16V l3_info, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 600 | RSL_LV rlm_cause, |
| 601 | uint8_t release_mode, |
| 602 | RSL_IE_ActivationType act_type, |
| 603 | RSL_IE_ChannelMode chan_mode, |
| 604 | uint8_t handover_ref, |
| 605 | RSL_IE_BS_Power bs_power, |
| 606 | RSL_IE_MS_Power ms_power, |
| 607 | uint8_t timing_adv, |
| 608 | RSL_IE_MultirateCtrl multirate_ctrl, |
| 609 | RSL_IE_FrameNumber frame_nr, |
| 610 | RSL_IE_Cause cause, |
| 611 | uint8_t access_delay, |
Harald Welte | d5f521e | 2017-12-07 17:53:06 +0100 | [diff] [blame] | 612 | RSL_IE_RachLoad rach_load, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 613 | uint8_t meas_res_nr, |
Harald Welte | 2691adf | 2018-02-22 17:32:39 +0100 | [diff] [blame] | 614 | uint8_t ms_timing_offset, |
| 615 | RSL_IE_UplinkMeas uplink_meas, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 616 | RSL_IE_L1Info l1_info, |
| 617 | RSL_IE_SysinfoType sysinfo_type, |
| 618 | uint16_t paging_load, |
| 619 | uint8_t paging_group, |
| 620 | RSL_IE_ChanNeeded chan_needed, |
| 621 | RSL_IE_StartingTime starting_time, |
Harald Welte | 73cd271 | 2017-12-17 00:44:52 +0100 | [diff] [blame] | 622 | RSL_IE_EncryptionInfo encr_info, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 623 | RSL_IE_RequestRef req_ref, |
| 624 | RSL_LV full_imm_ass_info, |
Harald Welte | fff6930 | 2017-12-07 17:53:42 +0100 | [diff] [blame] | 625 | RSL_LV ms_identity, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 626 | |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 627 | uint16_t ipa_conn_id, |
| 628 | uint16_t ipa_local_port, |
| 629 | uint16_t ipa_remote_port, |
| 630 | uint32_t ipa_local_ip, |
| 631 | uint32_t ipa_remote_ip, |
| 632 | uint8_t ipa_rtp_pt, |
| 633 | uint8_t ipa_rtp_pt2, |
| 634 | RSL_IE_IPA_ConnectionStats ipa_stats, |
| 635 | RSL_IE_IPA_SpeechMode ipa_speech_mode, |
| 636 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 637 | RSL_LV other |
| 638 | } |
| 639 | |
| 640 | type record RSL_IE { |
| 641 | RSL_IE_Type iei, |
| 642 | RSL_IE_Body body |
| 643 | } with { variant (body) "CROSSTAG( |
| 644 | chan_nr, iei = RSL_IE_CHAN_NR; |
| 645 | link_id, iei = RSL_IE_LINK_IDENT; |
| 646 | l3_info, iei = RSL_IE_L3_INFO; |
| 647 | rlm_cause, iei = RSL_IE_RLM_CAUSE; |
| 648 | release_mode, iei = RSL_IE_RELEASE_MODE; |
| 649 | act_type, iei = RSL_IE_ACT_TYPE; |
| 650 | chan_mode, iei = RSL_IE_CHAN_MODE; |
| 651 | handover_ref, iei = RSL_IE_HANDO_REF; |
| 652 | bs_power, iei = RSL_IE_BS_POWER; |
| 653 | ms_power, iei = RSL_IE_MS_POWER; |
| 654 | timing_adv, iei = RSL_IE_TIMING_ADVANCE; |
| 655 | multirate_ctrl, iei = RSL_IE_MR_CONTROL; |
| 656 | |
| 657 | frame_nr, iei = RSL_IE_FRAME_NUMBER; |
| 658 | cause, iei = RSL_IE_CAUSE; |
| 659 | access_delay, iei = RSL_IE_ACCESS_DELAY; |
Harald Welte | d5f521e | 2017-12-07 17:53:06 +0100 | [diff] [blame] | 660 | rach_load, iei = RSL_IE_RACH_LOAD; |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 661 | meas_res_nr, iei = RSL_IE_MEAS_RES_NR; |
Harald Welte | 2691adf | 2018-02-22 17:32:39 +0100 | [diff] [blame] | 662 | ms_timing_offset, iei = RSL_IE_MS_TIMING_OFFSET; |
| 663 | uplink_meas, iei = RSL_IE_UPLINK_MEAS; |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 664 | l1_info, iei = RSL_IE_L1_INFO; |
| 665 | sysinfo_type, iei = RSL_IE_SYSINFO_TYPE; |
| 666 | paging_load, iei = RSL_IE_PAGING_LOAD; |
| 667 | paging_group, iei = RSL_IE_PAGING_GROUP; |
| 668 | chan_needed, iei = RSL_IE_CHAN_NEEDED; |
| 669 | starting_time, iei = RSL_IE_STARTNG_TIME; |
Harald Welte | 73cd271 | 2017-12-17 00:44:52 +0100 | [diff] [blame] | 670 | encr_info, iei = RSL_IE_ENCR_INFO; |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 671 | |
| 672 | req_ref, iei = RSL_IE_REQ_REFERENCE; |
Harald Welte | fff6930 | 2017-12-07 17:53:42 +0100 | [diff] [blame] | 673 | full_imm_ass_info, iei = RSL_IE_FULL_IMM_ASS_INFO; |
| 674 | ms_identity, iei = RSL_IE_MS_IDENTITY; |
| 675 | other, iei = RSL_IE_FULL_BCCH_INFO; |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 676 | |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 677 | ipa_conn_id, iei = RSL_IE_IPAC_CONN_ID; |
| 678 | ipa_remote_ip, iei = RSL_IE_IPAC_REMOTE_IP; |
| 679 | ipa_remote_port, iei = RSL_IE_IPAC_REMOTE_PORT; |
| 680 | ipa_local_ip, iei = RSL_IE_IPAC_LOCAL_IP; |
| 681 | ipa_local_port, iei = RSL_IE_IPAC_LOCAL_PORT; |
| 682 | ipa_rtp_pt, iei = RSL_IE_IPAC_RTP_PAYLOAD; |
| 683 | ipa_rtp_pt2, iei = RSL_IE_IPAC_RTP_PAYLOAD2; |
| 684 | ipa_stats, iei = RSL_IE_IPAC_CONN_STAT; |
| 685 | ipa_speech_mode, iei = RSL_IE_IPAC_SPEECH_MODE; |
| 686 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 687 | other, OTHERWISE; |
| 688 | )" }; |
| 689 | |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 690 | /* For some reason the TTCN-3 RAW codec cannot automatically figure out the IEI |
| 691 | * that it needs to set for a given union-choice (body). So we have to explicitly |
| 692 | * specify the IEI by the caller :( */ |
| 693 | template RSL_IE t_RSL_IE(RSL_IE_Type iei, template RSL_IE_Body body) := { |
| 694 | iei := iei, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 695 | body := body |
| 696 | } |
| 697 | |
Harald Welte | c287775 | 2017-12-07 17:54:35 +0100 | [diff] [blame] | 698 | template RSL_IE tr_RSL_IE(template RSL_IE_Body body) := { |
| 699 | iei := ?, /* overwritten? */ |
| 700 | body := body |
| 701 | } |
| 702 | |
| 703 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 704 | type record of RSL_IE RSL_IE_List; |
| 705 | |
| 706 | type record RSL_Message { |
| 707 | RSL_MessageDiscriminator msg_disc, |
| 708 | RSL_MessageType msg_type, |
| 709 | RSL_IE_List ies optional |
| 710 | } |
| 711 | |
| 712 | external function enc_RSL_Message(in RSL_Message msg) return octetstring |
| 713 | with { extension "prototype(convert) encode(RAW)" }; |
| 714 | external function dec_RSL_Message(in octetstring stream) return RSL_Message |
| 715 | with { extension "prototype(convert) decode(RAW)" }; |
| 716 | |
Harald Welte | bc330be | 2017-12-09 00:56:36 +0100 | [diff] [blame] | 717 | template RSL_Message tr_RSL_MsgDiscType(template RSL_MessageDiscriminator m_disc, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 718 | RSL_MessageType m_type) := { |
| 719 | msg_disc := m_disc, |
| 720 | msg_type := m_type, |
| 721 | ies := * |
| 722 | } |
| 723 | |
Harald Welte | 4a26736 | 2017-12-09 17:49:32 +0100 | [diff] [blame] | 724 | template RSL_Message ts_RSL_MsgDiscType(template RSL_MessageDiscriminator m_disc, |
| 725 | template RSL_MessageType msg_type, |
| 726 | template RSL_IE_List ies := omit) := { |
| 727 | msg_disc := m_disc, |
| 728 | msg_type := msg_type, |
| 729 | ies := ies |
| 730 | } |
| 731 | |
Harald Welte | bc330be | 2017-12-09 00:56:36 +0100 | [diff] [blame] | 732 | template RSL_Message tr_RSL_MsgType(template RSL_MessageType msg_type) := { |
| 733 | msg_disc := ?, |
| 734 | msg_type := msg_type, |
| 735 | ies := * |
| 736 | } |
| 737 | |
| 738 | /* Common Channel Management */ |
| 739 | template RSL_Message tr_RSL_MsgTypeC(template RSL_MessageType msg_type) modifies tr_RSL_MsgType := { |
| 740 | msg_disc := { RSL_MDISC_CCHAN, ? } |
| 741 | } |
| 742 | |
| 743 | /* RLL */ |
| 744 | template RSL_Message tr_RSL_MsgTypeR(template RSL_MessageType msg_type) modifies tr_RSL_MsgType := { |
| 745 | msg_disc := { RSL_MDISC_RLL, true } |
| 746 | } |
| 747 | |
| 748 | /* Dedicated Channel Management */ |
| 749 | template RSL_Message tr_RSL_MsgTypeD(template RSL_MessageType msg_type) modifies tr_RSL_MsgType := { |
| 750 | msg_disc := { RSL_MDISC_DCHAN, ? } |
| 751 | } |
| 752 | |
| 753 | /* Dedicated Channel Management */ |
| 754 | template RSL_Message tr_RSL_MsgTypeT(template RSL_MessageType msg_type) modifies tr_RSL_MsgType := { |
| 755 | msg_disc := { RSL_MDISC_TRX_MGMT, ? } |
| 756 | } |
| 757 | |
| 758 | |
| 759 | /* dedicated channel or RLL */ |
| 760 | 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] | 761 | msg_disc := ({RSL_MDISC_DCHAN,?}, {RSL_MDISC_RLL,?}, {RSL_MDISC_IPACCESS,false}) |
Harald Welte | bc330be | 2017-12-09 00:56:36 +0100 | [diff] [blame] | 762 | } |
| 763 | |
| 764 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 765 | /* 8.3.1 BSC -> BTS */ |
| 766 | template RSL_Message ts_RSL_DATA_REQ(RslChannelNr chan_nr, RslLinkId link_id, octetstring l3_info) := { |
| 767 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, true), |
| 768 | msg_type := RSL_MT_DATA_REQ, |
| 769 | ies :={ |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 770 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 771 | t_RSL_IE(RSL_IE_LINK_IDENT, RSL_IE_Body:{link_id := link_id}), |
| 772 | 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] | 773 | } |
| 774 | } |
| 775 | |
Harald Welte | 7794d5b | 2017-12-16 23:00:20 +0100 | [diff] [blame] | 776 | template RSL_Message tr_RSL_DATA_REQ(template RslChannelNr chan_nr :=?, |
| 777 | template RslLinkId link_id := ?, |
| 778 | template octetstring l3_info := ?) := { |
| 779 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, true), |
| 780 | msg_type := RSL_MT_DATA_REQ, |
| 781 | ies :={ |
| 782 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 783 | tr_RSL_IE(RSL_IE_Body:{link_id := link_id}), |
| 784 | tr_RSL_IE(RSL_IE_Body:{l3_info := tr_RSL_L16V(l3_info)}) |
| 785 | } |
| 786 | } |
| 787 | |
| 788 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 789 | /* 8.3.2 BTS -> BSC */ |
| 790 | template RSL_Message ts_RSL_DATA_IND(RslChannelNr chan_nr, RslLinkId link_id, octetstring l3_info) := { |
| 791 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, true), |
| 792 | msg_type := RSL_MT_DATA_IND, |
| 793 | ies :={ |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 794 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 795 | t_RSL_IE(RSL_IE_LINK_IDENT, RSL_IE_Body:{link_id := link_id}), |
| 796 | 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] | 797 | } |
| 798 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 799 | template RSL_Message tr_RSL_DATA_IND(template RslChannelNr chan_nr, template RslLinkId link_id, |
| 800 | template octetstring l3_info := ?) := { |
| 801 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, true), |
| 802 | msg_type := RSL_MT_DATA_IND, |
| 803 | ies :={ |
| 804 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 805 | tr_RSL_IE(RSL_IE_Body:{link_id := link_id}), |
| 806 | tr_RSL_IE(RSL_IE_Body:{l3_info := tr_RSL_L16V(l3_info)}) |
| 807 | } |
| 808 | } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 809 | |
| 810 | /* 8.3.3 BTS -> BSC */ |
| 811 | template RSL_Message ts_RSL_ERROR_IND(RslChannelNr chan_nr, RslLinkId link_id, RSL_Cause cause) := { |
| 812 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| 813 | msg_type := RSL_MT_ERROR_IND, |
| 814 | ies :={ |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 815 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 816 | t_RSL_IE(RSL_IE_LINK_IDENT, RSL_IE_Body:{link_id := link_id}), |
| 817 | 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] | 818 | } |
| 819 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 820 | template RSL_Message tr_RSL_ERROR_IND(template RslChannelNr chan_nr, template RslLinkId link_id, |
| 821 | template RSL_Cause cause := ?) := { |
| 822 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| 823 | msg_type := RSL_MT_ERROR_IND, |
| 824 | ies :={ |
| 825 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 826 | tr_RSL_IE(RSL_IE_Body:{link_id := link_id}), |
| 827 | tr_RSL_IE(RSL_IE_Body:{cause := tr_RSL_IE_Cause(cause)}) |
| 828 | } |
| 829 | } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 830 | |
| 831 | /* 8.3.6 BTS -> BSC */ |
| 832 | template RSL_Message ts_RSL_EST_IND(RslChannelNr chan_nr, RslLinkId link_id, octetstring l3_info) := { |
| 833 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| 834 | msg_type := RSL_MT_EST_IND, |
| 835 | ies := { |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 836 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 837 | t_RSL_IE(RSL_IE_LINK_IDENT, RSL_IE_Body:{link_id := link_id}), |
| 838 | 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] | 839 | } |
| 840 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 841 | template RSL_Message tr_RSL_EST_IND(template RslChannelNr chan_nr, template RslLinkId link_id, |
| 842 | template octetstring l3_info := ?) := { |
| 843 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| 844 | msg_type := RSL_MT_EST_IND, |
| 845 | ies := { |
| 846 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 847 | tr_RSL_IE(RSL_IE_Body:{link_id := link_id}), |
| 848 | tr_RSL_IE(RSL_IE_Body:{l3_info := tr_RSL_L16V(l3_info)}) |
| 849 | } |
| 850 | } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 851 | |
| 852 | /* 8.3.7 BSC -> BTS */ |
| 853 | template RSL_Message ts_RSL_REL_REQ(RslChannelNr chan_nr, RslLinkId link_id) := { |
| 854 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| 855 | msg_type := RSL_MT_REL_REQ, |
| 856 | ies :={ |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 857 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 858 | 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] | 859 | } |
| 860 | } |
Harald Welte | e8a5ab1 | 2017-12-09 22:34:57 +0100 | [diff] [blame] | 861 | template RSL_Message tr_RSL_REL_REQ(template RslChannelNr chan_nr, |
| 862 | template RslLinkId link_id) := { |
| 863 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| 864 | msg_type := RSL_MT_REL_REQ, |
| 865 | ies :={ |
| 866 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 867 | tr_RSL_IE(RSL_IE_Body:{link_id := link_id}), |
| 868 | * |
| 869 | } |
| 870 | } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 871 | |
| 872 | /* 8.3.8 BTS -> BSC */ |
| 873 | template RSL_Message ts_RSL_REL_CONF(RslChannelNr chan_nr, RslLinkId link_id) := { |
| 874 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| 875 | msg_type := RSL_MT_REL_CONF, |
| 876 | ies :={ |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 877 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 878 | 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] | 879 | } |
| 880 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 881 | template RSL_Message tr_RSL_REL_CONF(template RslChannelNr chan_nr, template RslLinkId link_id) := { |
| 882 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| 883 | msg_type := RSL_MT_REL_CONF, |
| 884 | ies :={ |
| 885 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 886 | tr_RSL_IE(RSL_IE_Body:{link_id := link_id}) |
| 887 | } |
| 888 | } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 889 | |
| 890 | /* 8.3.9 BTS -> BSC */ |
| 891 | template RSL_Message ts_RSL_REL_IND(RslChannelNr chan_nr, RslLinkId link_id) := { |
| 892 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| 893 | msg_type := RSL_MT_REL_IND, |
| 894 | ies :={ |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 895 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 896 | 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] | 897 | } |
| 898 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 899 | template RSL_Message tr_RSL_REL_IND(template RslChannelNr chan_nr, template RslLinkId link_id) := { |
| 900 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| 901 | msg_type := RSL_MT_REL_IND, |
| 902 | ies :={ |
| 903 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 904 | tr_RSL_IE(RSL_IE_Body:{link_id := link_id}) |
| 905 | } |
| 906 | } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 907 | |
| 908 | /* 8.3.10 BSC -> BTS */ |
| 909 | template RSL_Message ts_RSL_UNITDATA_REQ(RslChannelNr chan_nr, RslLinkId link_id, octetstring l3_info) |
| 910 | modifies ts_RSL_DATA_REQ := { |
| 911 | msg_type := RSL_MT_UNIT_DATA_REQ |
| 912 | } |
| 913 | |
| 914 | /* 8.3.11 BTS -> BSC */ |
| 915 | template RSL_Message ts_RSL_UNITDATA_IND(RslChannelNr chan_nr, RslLinkId link_id, octetstring l3_info) |
| 916 | modifies ts_RSL_DATA_IND := { |
| 917 | msg_type := RSL_MT_UNIT_DATA_IND |
| 918 | } |
| 919 | |
| 920 | |
| 921 | /* DEDICATED CANNEL MANAGEMENT MESSAGES */ |
| 922 | |
| 923 | /* 8.4.1 BSC -> BTS */ |
| 924 | template RSL_Message ts_RSL_CHAN_ACT(RslChannelNr chan_nr, RSL_IE_ChannelMode mode) := { |
| 925 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 926 | msg_type := RSL_MT_CHAN_ACTIV, |
| 927 | ies :={ |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 928 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 929 | t_RSL_IE(RSL_IE_ACT_TYPE, RSL_IE_Body:{act_type := t_RSL_IE_ActType}), |
| 930 | 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] | 931 | /* lots of optional IEs */ |
| 932 | } |
| 933 | } |
| 934 | |
| 935 | /* 8.4.2 BTS -> BSC */ |
| 936 | template RSL_Message ts_RSL_CHAN_ACT_ACK(RslChannelNr chan_nr, GsmFrameNumber fn) := { |
| 937 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 938 | msg_type := RSL_MT_CHAN_ACTIV_ACK, |
| 939 | ies :={ |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 940 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 941 | 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] | 942 | } |
| 943 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 944 | template RSL_Message tr_RSL_CHAN_ACT_ACK(template RslChannelNr chan_nr) := { |
| 945 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 946 | msg_type := RSL_MT_CHAN_ACTIV_ACK, |
| 947 | ies := { |
| 948 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 949 | tr_RSL_IE(RSL_IE_Body:{frame_nr := ?}) |
| 950 | } |
| 951 | } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 952 | |
| 953 | /* 8.4.3 BTS -> BSC */ |
| 954 | template RSL_Message ts_RSL_CHAN_ACT_NACK(RslChannelNr chan_nr, RSL_Cause cause) := { |
| 955 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 956 | msg_type := RSL_MT_CHAN_ACTIV_NACK, |
| 957 | ies :={ |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 958 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 959 | 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] | 960 | } |
| 961 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 962 | template RSL_Message tr_RSL_CHAN_ACT_NACK(template RslChannelNr chan_nr, |
| 963 | template RSL_Cause cause := ?) := { |
| 964 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 965 | msg_type := RSL_MT_CHAN_ACTIV_NACK, |
| 966 | ies := { |
| 967 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 968 | tr_RSL_IE(RSL_IE_Body:{cause := ?}) |
| 969 | } |
| 970 | } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 971 | |
| 972 | /* 8.4.4 BTS -> BSC */ |
| 973 | template RSL_Message ts_RSL_CONN_FAIL_IND(RslChannelNr chan_nr, RSL_Cause cause) := { |
| 974 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 975 | msg_type := RSL_MT_CONN_FAIL, |
| 976 | ies :={ |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 977 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 978 | 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] | 979 | } |
| 980 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 981 | template RSL_Message tr_RSL_CONN_FAIL_IND(template RslChannelNr chan_nr, |
| 982 | template RSL_Cause cause := ?) := { |
| 983 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 984 | msg_type := RSL_MT_CONN_FAIL, |
| 985 | ies :={ |
| 986 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 987 | tr_RSL_IE(RSL_IE_Body:{cause := tr_RSL_IE_Cause(cause)}) |
| 988 | } |
| 989 | } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 990 | |
Harald Welte | e8a5ab1 | 2017-12-09 22:34:57 +0100 | [diff] [blame] | 991 | /* 8.4.5 BSC -> BTS */ |
| 992 | template RSL_Message tr_RSL_DEACT_SACCH(template RslChannelNr chan_nr) := { |
| 993 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 994 | msg_type := RSL_MT_DEACTIVATE_SACCH, |
| 995 | ies := { |
| 996 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}) |
| 997 | } |
| 998 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 999 | template RSL_Message ts_RSL_DEACT_SACCH(RslChannelNr chan_nr) := { |
| 1000 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1001 | msg_type := RSL_MT_DEACTIVATE_SACCH, |
| 1002 | ies := { |
| 1003 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}) |
| 1004 | } |
| 1005 | } |
| 1006 | |
Harald Welte | e8a5ab1 | 2017-12-09 22:34:57 +0100 | [diff] [blame] | 1007 | |
Harald Welte | 73cd271 | 2017-12-17 00:44:52 +0100 | [diff] [blame] | 1008 | /* 8.4.6 BSC ->BTS */ |
| 1009 | template RSL_Message tr_RSL_ENCR_CMD(template RslChannelNr chan_nr, |
| 1010 | template RslLinkId link_id := ?, |
| 1011 | template OCT1 alg := ?, |
| 1012 | template octetstring key := ?, |
| 1013 | template octetstring l3_info := ?) := { |
| 1014 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1015 | msg_type := RSL_MT_ENCR_CMD, |
| 1016 | ies := { |
| 1017 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1018 | tr_RSL_IE(RSL_IE_Body:{encr_info := tr_RSL_IE_EncrInfo(alg, key)}), |
| 1019 | tr_RSL_IE(RSL_IE_Body:{link_id := link_id}), |
| 1020 | tr_RSL_IE(RSL_IE_Body:{l3_info := tr_RSL_L16V(l3_info)}) |
| 1021 | } |
| 1022 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1023 | template RSL_Message ts_RSL_ENCR_CMD(RslChannelNr chan_nr, RslLinkId link_id, |
| 1024 | OCT1 alg, octetstring key, |
| 1025 | octetstring l3_info) := { |
| 1026 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1027 | msg_type := RSL_MT_ENCR_CMD, |
| 1028 | ies := { |
| 1029 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1030 | t_RSL_IE(RSL_IE_ENCR_INFO, RSL_IE_Body:{encr_info := tr_RSL_IE_EncrInfo(alg, key)}), |
| 1031 | t_RSL_IE(RSL_IE_LINK_IDENT, RSL_IE_Body:{link_id := link_id}), |
| 1032 | t_RSL_IE(RSL_IE_L3_INFO, RSL_IE_Body:{l3_info := tr_RSL_L16V(l3_info)}) |
| 1033 | } |
| 1034 | } |
Harald Welte | 73cd271 | 2017-12-17 00:44:52 +0100 | [diff] [blame] | 1035 | |
Harald Welte | 2691adf | 2018-02-22 17:32:39 +0100 | [diff] [blame] | 1036 | template RSL_Message tr_RSL_MEAS_RES(template RslChannelNr chan_nr, |
| 1037 | template uint8_t meas_res_nr := ?, |
| 1038 | template RSL_IE_UplinkMeas ul_meas := ?, |
| 1039 | template RSL_IE_BS_Power bs_power := ?) := { |
| 1040 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1041 | msg_type := RSL_MT_MEAS_RES, |
| 1042 | ies := { |
| 1043 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1044 | tr_RSL_IE(RSL_IE_Body:{meas_res_nr := meas_res_nr}), |
| 1045 | tr_RSL_IE(RSL_IE_Body:{uplink_meas := ul_meas}), |
| 1046 | tr_RSL_IE(RSL_IE_Body:{bs_power := bs_power}), |
| 1047 | * |
| 1048 | } |
| 1049 | } |
| 1050 | |
Harald Welte | 39b47be | 2018-02-23 18:58:48 +0100 | [diff] [blame] | 1051 | /* Osmocom specific template, require lots of optional fields to be present */ |
| 1052 | template RSL_Message tr_RSL_MEAS_RES_OSMO(template RslChannelNr chan_nr, |
| 1053 | template uint8_t meas_res_nr := ?, |
| 1054 | template RSL_IE_UplinkMeas ul_meas := ?, |
| 1055 | template RSL_IE_BS_Power bs_power := ?, |
| 1056 | template RSL_IE_L1Info l1_info := ?, |
| 1057 | template octetstring l3_info := ?, |
| 1058 | template uint8_t ms_to := ?) := { |
| 1059 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1060 | msg_type := RSL_MT_MEAS_RES, |
| 1061 | ies := { |
| 1062 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1063 | tr_RSL_IE(RSL_IE_Body:{meas_res_nr := meas_res_nr}), |
| 1064 | tr_RSL_IE(RSL_IE_Body:{uplink_meas := ul_meas}), |
| 1065 | tr_RSL_IE(RSL_IE_Body:{bs_power := bs_power}), |
| 1066 | tr_RSL_IE(RSL_IE_Body:{l1_info := l1_info}), |
| 1067 | tr_RSL_IE(RSL_IE_Body:{l3_info := tr_RSL_L16V(l3_info)}), |
| 1068 | tr_RSL_IE(RSL_IE_Body:{ms_timing_offset := ms_to}) |
| 1069 | } |
| 1070 | } |
| 1071 | |
| 1072 | |
Harald Welte | 7794d5b | 2017-12-16 23:00:20 +0100 | [diff] [blame] | 1073 | /* 8.4.10 BTS -> BSC */ |
| 1074 | template RSL_Message ts_RSL_MODE_MODIFY_ACK(RslChannelNr chan_nr) := { |
| 1075 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1076 | msg_type := RSL_MT_MODE_MODIFY_ACK, |
| 1077 | ies := { |
| 1078 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}) |
| 1079 | } |
| 1080 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1081 | template RSL_Message tr_RSL_MODE_MODIFY_ACK(template RslChannelNr chan_nr) := { |
| 1082 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1083 | msg_type := RSL_MT_MODE_MODIFY_ACK, |
| 1084 | ies := { |
| 1085 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}) |
| 1086 | } |
| 1087 | } |
Harald Welte | 7794d5b | 2017-12-16 23:00:20 +0100 | [diff] [blame] | 1088 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1089 | /* 8.4.11 BTS -> BSC */ |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1090 | template RSL_Message ts_RSL_MODE_MODIFY_NACK(RslChannelNr chan_nr, RSL_Cause cause) := { |
| 1091 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1092 | msg_type := RSL_MT_MODE_MODIFY_NACK, |
| 1093 | ies := { |
| 1094 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1095 | t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) |
| 1096 | } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1097 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1098 | template RSL_Message tr_RSL_MODE_MODIFY_NACK(template RslChannelNr chan_nr, |
| 1099 | template RSL_Cause cause) := { |
| 1100 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1101 | msg_type := RSL_MT_MODE_MODIFY_NACK, |
| 1102 | ies := { |
| 1103 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1104 | tr_RSL_IE(RSL_IE_Body:{cause := tr_RSL_IE_Cause(cause)}) |
| 1105 | } |
| 1106 | } |
| 1107 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1108 | |
Harald Welte | 6a8199d | 2018-01-29 21:58:53 +0100 | [diff] [blame] | 1109 | /* 8.4.14: BTS <- BSC */ |
| 1110 | template RSL_Message tr_RSL_RF_CHAN_REL(template RslChannelNr chan_nr) := { |
| 1111 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1112 | msg_type := RSL_MT_RF_CHAN_REL, |
| 1113 | ies := { |
| 1114 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}) |
| 1115 | } |
| 1116 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1117 | template RSL_Message ts_RSL_RF_CHAN_REL(RslChannelNr chan_nr) := { |
| 1118 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1119 | msg_type := RSL_MT_RF_CHAN_REL, |
| 1120 | ies := { |
| 1121 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}) |
| 1122 | } |
| 1123 | } |
Harald Welte | 6a8199d | 2018-01-29 21:58:53 +0100 | [diff] [blame] | 1124 | |
Harald Welte | 4a26736 | 2017-12-09 17:49:32 +0100 | [diff] [blame] | 1125 | /* 8.4.19 BTS -> BSC */ |
| 1126 | template RSL_Message ts_RSL_RF_CHAN_REL_ACK(RslChannelNr chan_nr) := |
| 1127 | ts_RSL_MsgDiscType(ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1128 | RSL_MT_RF_CHAN_REL_ACK, |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 1129 | { 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] | 1130 | |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1131 | template RSL_Message tr_RSL_RF_CHAN_REL_ACK(template RslChannelNr chan_nr) := { |
| 1132 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1133 | msg_type := RSL_MT_RF_CHAN_REL_ACK, |
| 1134 | ies := { |
| 1135 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}) |
| 1136 | } |
| 1137 | } |
| 1138 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1139 | /* COMMON CHANNEL MANAGEMENT MESSAGES */ |
| 1140 | |
Harald Welte | 874c223 | 2018-02-24 04:52:43 +0100 | [diff] [blame] | 1141 | /* 8.5.1 BTS <- BSC */ |
| 1142 | template RSL_Message ts_RSL_BCCH_INFO(RSL_IE_SysinfoType si_type, octetstring full_bcch_info) := { |
| 1143 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 1144 | msg_type := RSL_MT_BCCH_INFO, |
| 1145 | ies := { |
| 1146 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := t_RslChanNr_BCCH(0)}), |
| 1147 | t_RSL_IE(RSL_IE_SYSINFO_TYPE, RSL_IE_Body:{sysinfo_type := si_type}), |
| 1148 | t_RSL_IE(RSL_IE_FULL_BCCH_INFO, RSL_IE_Body:{other := ts_RSL_LV(full_bcch_info)}) |
| 1149 | } |
| 1150 | } |
| 1151 | |
Harald Welte | 7ae9314 | 2017-12-07 17:56:15 +0100 | [diff] [blame] | 1152 | /* 8.5.2 BTS -> BSC */ |
| 1153 | template RSL_Message ts_RSL_RACH_LOAD_IND(uint16_t slot_ct, uint16_t busy_ct, uint16_t acc_ct) := { |
| 1154 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 1155 | msg_type := RSL_MT_CCCH_LOAD_IND, |
| 1156 | ies := { |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 1157 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := t_RslChanNr_RACH(0)}), |
| 1158 | 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] | 1159 | } |
| 1160 | } |
Harald Welte | 68e495b | 2018-02-25 00:05:57 +0100 | [diff] [blame] | 1161 | template RSL_Message tr_RSL_RACH_LOAD_IND(template uint16_t slot_ct := ?, |
| 1162 | template uint16_t busy_ct := ?, |
| 1163 | template uint16_t acc_ct) := { |
| 1164 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 1165 | msg_type := RSL_MT_CCCH_LOAD_IND, |
| 1166 | ies := { |
| 1167 | tr_RSL_IE(RSL_IE_Body:{chan_nr := t_RslChanNr_RACH(0)}), |
| 1168 | tr_RSL_IE(RSL_IE_Body:{rach_load := tr_RSL_IE_RachLoad(slot_ct, busy_ct, acc_ct)}) |
| 1169 | } |
| 1170 | } |
| 1171 | |
Harald Welte | 7ae9314 | 2017-12-07 17:56:15 +0100 | [diff] [blame] | 1172 | template RSL_Message ts_RSL_PAGING_LOAD_IND(uint16_t buffer_space) := { |
| 1173 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 1174 | msg_type := RSL_MT_CCCH_LOAD_IND, |
| 1175 | ies := { |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 1176 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := t_RslChanNr_PCH_AGCH(0)}), |
| 1177 | 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] | 1178 | } |
| 1179 | } |
Harald Welte | 68e495b | 2018-02-25 00:05:57 +0100 | [diff] [blame] | 1180 | template RSL_Message tr_RSL_PAGING_LOAD_IND(template uint16_t buffer_space := ?) := { |
| 1181 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 1182 | msg_type := RSL_MT_CCCH_LOAD_IND, |
| 1183 | ies := { |
| 1184 | tr_RSL_IE(RSL_IE_Body:{chan_nr := t_RslChanNr_PCH_AGCH(0)}), |
| 1185 | tr_RSL_IE(RSL_IE_Body:{paging_load := buffer_space}) |
| 1186 | } |
| 1187 | } |
| 1188 | |
Harald Welte | 7ae9314 | 2017-12-07 17:56:15 +0100 | [diff] [blame] | 1189 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1190 | /* 8.5.3 BTS -> BSC */ |
Harald Welte | 101fbed | 2017-12-07 17:56:38 +0100 | [diff] [blame] | 1191 | template RSL_Message ts_RSL_CHAN_RQD(OCT1 ra, GsmFrameNumber fn, uint8_t acc_del := 0) := { |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1192 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 1193 | msg_type := RSL_MT_CHAN_RQD, |
| 1194 | ies := { |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 1195 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := t_RslChanNr_RACH(0)}), |
| 1196 | t_RSL_IE(RSL_IE_REQ_REFERENCE, RSL_IE_Body:{req_ref := ts_RSL_IE_ReqRef(ra, fn)}), |
| 1197 | 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] | 1198 | } |
| 1199 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1200 | template RSL_Message tr_RSL_CHAN_RQD(template OCT1 ra, template GsmFrameNumber fn := ?, |
| 1201 | template uint8_t acc_del := ?) := { |
| 1202 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 1203 | msg_type := RSL_MT_CHAN_RQD, |
| 1204 | ies := { |
| 1205 | tr_RSL_IE(RSL_IE_Body:{chan_nr := t_RslChanNr_RACH(0)}), |
| 1206 | tr_RSL_IE(RSL_IE_Body:{req_ref := tr_RSL_IE_ReqRef(ra, fn)}), |
| 1207 | tr_RSL_IE(RSL_IE_Body:{access_delay := acc_del}) |
| 1208 | } |
| 1209 | } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1210 | |
| 1211 | /* 8.5.4 BTS -> BSC */ |
| 1212 | template RSL_Message ts_DELETE_IND(RslChannelNr chan_nr, octetstring imm_ass) := { |
| 1213 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 1214 | msg_type := RSL_MT_DELETE_IND, |
| 1215 | ies := { |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 1216 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1217 | 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] | 1218 | } |
| 1219 | } |
| 1220 | |
Harald Welte | c287775 | 2017-12-07 17:54:35 +0100 | [diff] [blame] | 1221 | /* 8.5.5 BSC -> BTS */ |
| 1222 | template RSL_Message tr_RSL_PAGING_CMD(template octetstring identity, template uint3_t tn := ?) := { |
| 1223 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 1224 | msg_type := RSL_MT_PAGING_CMD, |
| 1225 | ies := { |
| 1226 | tr_RSL_IE(RSL_IE_Body:{chan_nr := t_RslChanNr_PCH_AGCH(tn)}), |
| 1227 | tr_RSL_IE(RSL_IE_Body:{paging_group := ?}), |
Harald Welte | 51d7410 | 2017-12-10 23:05:02 +0100 | [diff] [blame] | 1228 | tr_RSL_IE(RSL_IE_Body:{ms_identity := tr_RSL_LV(identity)}), |
Harald Welte | c287775 | 2017-12-07 17:54:35 +0100 | [diff] [blame] | 1229 | * /* opt: channel needed, eMLPP prio */ |
| 1230 | } |
| 1231 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1232 | template RSL_Message ts_RSL_PAGING_CMD(octetstring identity, uint8_t pg, uint3_t tn := 0) := { |
| 1233 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 1234 | msg_type := RSL_MT_PAGING_CMD, |
| 1235 | ies := { |
| 1236 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := t_RslChanNr_PCH_AGCH(tn)}), |
| 1237 | t_RSL_IE(RSL_IE_PAGING_GROUP, RSL_IE_Body:{paging_group := pg}), |
| 1238 | t_RSL_IE(RSL_IE_MS_IDENTITY, RSL_IE_Body:{ms_identity := ts_RSL_LV(identity)}) |
| 1239 | } |
| 1240 | } |
Harald Welte | c287775 | 2017-12-07 17:54:35 +0100 | [diff] [blame] | 1241 | |
| 1242 | /* 8.5.6 BSC -> BTS */ |
| 1243 | template RSL_Message tr_RSL_IMM_ASSIGN(template uint3_t tn := ?) := { |
| 1244 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 1245 | msg_type := RSL_MT_IMMEDIATE_ASSIGN_CMD, |
| 1246 | ies := { |
| 1247 | tr_RSL_IE(RSL_IE_Body:{chan_nr := t_RslChanNr_PCH_AGCH(tn)}), |
| 1248 | tr_RSL_IE(RSL_IE_Body:{full_imm_ass_info := ?}) |
| 1249 | } |
| 1250 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1251 | template RSL_Message ts_RSL_IMM_ASSIGN(octetstring f_ass_inf, uint3_t tn := 0) := { |
| 1252 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 1253 | msg_type := RSL_MT_IMMEDIATE_ASSIGN_CMD, |
| 1254 | ies := { |
| 1255 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := t_RslChanNr_PCH_AGCH(tn)}), |
| 1256 | t_RSL_IE(RSL_IE_FULL_IMM_ASS_INFO, RSL_IE_Body:{full_imm_ass_info := ts_RSL_LV(f_ass_inf)}) |
| 1257 | } |
| 1258 | } |
Harald Welte | c287775 | 2017-12-07 17:54:35 +0100 | [diff] [blame] | 1259 | |
Harald Welte | 68e495b | 2018-02-25 00:05:57 +0100 | [diff] [blame] | 1260 | template RSL_Message tr_RSL_RF_RES_IND := { |
| 1261 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_TRX_MGMT, false), |
| 1262 | msg_type := RSL_MT_RF_RES_IND, |
| 1263 | ies := * |
| 1264 | } |
| 1265 | |
| 1266 | /* 8.6.2 BTS <- BSC */ |
| 1267 | template RSL_Message ts_RSL_SACCH_FILL(RSL_IE_SysinfoType si_type, octetstring l3_info) := { |
| 1268 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_TRX_MGMT, false), |
| 1269 | msg_type := RSL_MT_SACCH_FILL, |
| 1270 | ies := { |
| 1271 | t_RSL_IE(RSL_IE_SYSINFO_TYPE, RSL_IE_Body:{sysinfo_type := si_type}), |
| 1272 | t_RSL_IE(RSL_IE_L3_INFO, RSL_IE_Body:{l3_info := ts_RSL_L16V(l3_info)}) |
| 1273 | } |
| 1274 | } |
| 1275 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1276 | /* 8.6.4 BTS -> BSC */ |
| 1277 | template RSL_Message ts_RSL_ERROR_REPORT(RSL_Cause cause) := { |
Harald Welte | 01d982c | 2018-02-25 01:31:40 +0100 | [diff] [blame] | 1278 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_TRX_MGMT, false), |
| 1279 | msg_type := RSL_MT_ERROR_REPORT, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1280 | ies := { |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 1281 | 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] | 1282 | } |
| 1283 | } |
Harald Welte | 01d982c | 2018-02-25 01:31:40 +0100 | [diff] [blame] | 1284 | template RSL_Message tr_RSL_ERROR_REPORT(template RSL_Cause cause := ?) := { |
| 1285 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_TRX_MGMT, false), |
| 1286 | msg_type := RSL_MT_ERROR_REPORT, |
| 1287 | ies := { |
| 1288 | tr_RSL_IE(RSL_IE_Body:{cause := tr_RSL_IE_Cause(cause)}), |
| 1289 | * |
| 1290 | } |
| 1291 | } |
| 1292 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1293 | |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1294 | |
| 1295 | /* Abis/IP specific messages */ |
| 1296 | |
| 1297 | template RSL_Message tr_RSL_IPA_CRCX(template RslChannelNr chan_nr) := { |
| 1298 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1299 | msg_type := RSL_MT_IPAC_CRCX, |
| 1300 | ies := { |
| 1301 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1302 | * |
| 1303 | } |
| 1304 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1305 | template RSL_Message ts_RSL_IPA_CRCX(RslChannelNr chan_nr) := { |
| 1306 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1307 | msg_type := RSL_MT_IPAC_CRCX, |
| 1308 | ies := { |
| 1309 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}) |
| 1310 | } |
| 1311 | } |
| 1312 | |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1313 | |
| 1314 | template RSL_Message ts_RSL_IPA_CRCX_ACK(RslChannelNr chan_nr, |
| 1315 | uint16_t ipa_conn_id, uint32_t local_ip, |
| 1316 | uint16_t local_port, uint7_t rtp_pt2) := { |
| 1317 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1318 | msg_type := RSL_MT_IPAC_CRCX_ACK, |
| 1319 | ies := { |
| 1320 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1321 | t_RSL_IE(RSL_IE_IPAC_CONN_ID, RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| 1322 | t_RSL_IE(RSL_IE_IPAC_LOCAL_IP, RSL_IE_Body:{ipa_local_ip := local_ip}), |
| 1323 | t_RSL_IE(RSL_IE_IPAC_LOCAL_PORT, RSL_IE_Body:{ipa_local_port := local_port}), |
| 1324 | t_RSL_IE(RSL_IE_IPAC_RTP_PAYLOAD2, RSL_IE_Body:{ipa_rtp_pt2 := rtp_pt2}) |
| 1325 | } |
| 1326 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1327 | template RSL_Message tr_RSL_IPA_CRCX_ACK(template RslChannelNr chan_nr, |
| 1328 | template uint16_t ipa_conn_id, |
| 1329 | template uint32_t local_ip, |
Harald Welte | 8bd0f82 | 2018-02-25 12:43:28 +0100 | [diff] [blame] | 1330 | template uint16_t local_port) := { |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1331 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1332 | msg_type := RSL_MT_IPAC_CRCX_ACK, |
| 1333 | ies := { |
| 1334 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1335 | tr_RSL_IE(RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| 1336 | tr_RSL_IE(RSL_IE_Body:{ipa_local_ip := local_ip}), |
Harald Welte | 8bd0f82 | 2018-02-25 12:43:28 +0100 | [diff] [blame] | 1337 | tr_RSL_IE(RSL_IE_Body:{ipa_local_port := local_port}) |
| 1338 | /* Optional: RTP Payload Type 2 IE */ |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1339 | } |
| 1340 | } |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1341 | |
| 1342 | template RSL_Message ts_RSL_IPA_CRCX_NACK(RslChannelNr chan_nr, RSL_Cause cause) := { |
| 1343 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1344 | msg_type := RSL_MT_IPAC_CRCX_NACK, |
| 1345 | ies := { |
| 1346 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1347 | t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) |
| 1348 | } |
| 1349 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1350 | template RSL_Message tr_RSL_IPA_CRCX_NACK(template RslChannelNr chan_nr, |
| 1351 | template RSL_Cause cause := ?) := { |
| 1352 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1353 | msg_type := RSL_MT_IPAC_CRCX_NACK, |
| 1354 | ies := { |
| 1355 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1356 | tr_RSL_IE(RSL_IE_Body:{cause := tr_RSL_IE_Cause(cause)}) |
| 1357 | } |
| 1358 | } |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1359 | |
Harald Welte | 3052745 | 2018-02-25 12:46:25 +0100 | [diff] [blame] | 1360 | template RSL_Message ts_RSL_IPA_MDCX(RslChannelNr chan_nr, |
| 1361 | uint16_t ipa_conn_id, |
| 1362 | uint32_t remote_ip, uint16_t remote_port, |
| 1363 | uint7_t rtp_pt2) := { |
| 1364 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1365 | msg_type := RSL_MT_IPAC_MDCX, |
| 1366 | ies := { |
| 1367 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1368 | t_RSL_IE(RSL_IE_IPAC_CONN_ID, RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| 1369 | t_RSL_IE(RSL_IE_IPAC_REMOTE_IP, RSL_IE_Body:{ipa_remote_ip := remote_ip}), |
| 1370 | t_RSL_IE(RSL_IE_IPAC_REMOTE_PORT, RSL_IE_Body:{ipa_remote_port := remote_port}), |
| 1371 | /* optional: RTP Payload Type */ |
| 1372 | t_RSL_IE(RSL_IE_IPAC_RTP_PAYLOAD2, RSL_IE_Body:{ipa_rtp_pt2 := rtp_pt2}) |
| 1373 | } |
| 1374 | } |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1375 | template RSL_Message tr_RSL_IPA_MDCX(template RslChannelNr chan_nr, |
| 1376 | template uint16_t ipa_conn_id) := { |
| 1377 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1378 | msg_type := RSL_MT_IPAC_MDCX, |
| 1379 | ies := { |
| 1380 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1381 | tr_RSL_IE(RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| 1382 | * |
| 1383 | } |
| 1384 | } |
| 1385 | |
| 1386 | template RSL_Message ts_RSL_IPA_MDCX_ACK(RslChannelNr chan_nr, template uint16_t ipa_conn_id, |
Harald Welte | 6cb400a | 2018-02-25 12:45:25 +0100 | [diff] [blame] | 1387 | uint32_t local_ip, uint16_t local_port, |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1388 | uint7_t rtp_pt2) := { |
| 1389 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
Harald Welte | 71b5ec8 | 2017-12-16 23:01:10 +0100 | [diff] [blame] | 1390 | msg_type := RSL_MT_IPAC_MDCX_ACK, |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1391 | ies := { |
| 1392 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1393 | /* optional */ |
| 1394 | 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] | 1395 | t_RSL_IE(RSL_IE_IPAC_LOCAL_IP, RSL_IE_Body:{ipa_local_ip := local_ip}), |
| 1396 | 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] | 1397 | /* optional: RTP Payload Type */ |
| 1398 | t_RSL_IE(RSL_IE_IPAC_RTP_PAYLOAD2, RSL_IE_Body:{ipa_rtp_pt2 := rtp_pt2}) |
| 1399 | } |
| 1400 | } |
Harald Welte | 3052745 | 2018-02-25 12:46:25 +0100 | [diff] [blame] | 1401 | template RSL_Message tr_RSL_IPA_MDCX_ACK(template RslChannelNr chan_nr, |
| 1402 | template uint16_t ipa_conn_id, |
| 1403 | template uint32_t local_ip, |
| 1404 | template uint16_t local_port, |
| 1405 | template uint7_t rtp_pt2) := { |
| 1406 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1407 | msg_type := RSL_MT_IPAC_MDCX_ACK, |
| 1408 | ies := { |
| 1409 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1410 | /* optional */ |
| 1411 | tr_RSL_IE(RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| 1412 | tr_RSL_IE(RSL_IE_Body:{ipa_local_ip := local_ip}), |
| 1413 | tr_RSL_IE(RSL_IE_Body:{ipa_local_port := local_port}), |
| 1414 | /* optional: RTP Payload Type */ |
| 1415 | tr_RSL_IE(RSL_IE_Body:{ipa_rtp_pt2 := rtp_pt2}) |
| 1416 | } |
| 1417 | } |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1418 | |
| 1419 | template RSL_Message ts_RSL_IPA_MDCX_NACK(RslChannelNr chan_nr, RSL_Cause cause, |
| 1420 | template uint16_t ipa_conn_id) := { |
| 1421 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1422 | msg_type := RSL_MT_IPAC_MDCX_NACK, |
| 1423 | ies := { |
| 1424 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1425 | /* optional connection ID */ |
| 1426 | t_RSL_IE(RSL_IE_IPAC_CONN_ID, RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| 1427 | t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) |
| 1428 | } |
| 1429 | } |
Harald Welte | 3052745 | 2018-02-25 12:46:25 +0100 | [diff] [blame] | 1430 | template RSL_Message tr_RSL_IPA_MDCX_NACK(template RslChannelNr chan_nr, |
| 1431 | template RSL_Cause cause, |
| 1432 | template uint16_t ipa_conn_id) := { |
| 1433 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1434 | msg_type := RSL_MT_IPAC_MDCX_NACK, |
| 1435 | ies := { |
| 1436 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1437 | /* optional connection ID */ |
| 1438 | tr_RSL_IE(RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| 1439 | tr_RSL_IE(RSL_IE_Body:{cause := tr_RSL_IE_Cause(cause)}) |
| 1440 | } |
| 1441 | } |
| 1442 | |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1443 | |
| 1444 | template RSL_Message ts_RSL_IPA_DLCX_IND(RslChannelNr chan_nr, uint16_t ipa_conn_id, |
| 1445 | RSL_IE_IPA_ConnectionStats stats, RSL_Cause cause) := { |
| 1446 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1447 | msg_type := RSL_MT_IPAC_DLCX_IND, |
| 1448 | ies := { |
| 1449 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1450 | t_RSL_IE(RSL_IE_IPAC_CONN_ID, RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| 1451 | t_RSL_IE(RSL_IE_IPAC_CONN_STAT, RSL_IE_Body:{ipa_stats := stats}), |
| 1452 | t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) |
| 1453 | } |
| 1454 | } |
| 1455 | |
Harald Welte | 2a7e716 | 2018-02-25 12:46:48 +0100 | [diff] [blame] | 1456 | template RSL_Message ts_RSL_IPA_DLCX(RslChannelNr chan_nr, uint16_t ipa_conn_id) := { |
Harald Welte | a871a38 | 2018-02-25 02:03:14 +0100 | [diff] [blame] | 1457 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1458 | msg_type := RSL_MT_IPAC_DLCX, |
| 1459 | ies := { |
Harald Welte | 2a7e716 | 2018-02-25 12:46:48 +0100 | [diff] [blame] | 1460 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1461 | 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] | 1462 | } |
| 1463 | } |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1464 | template RSL_Message tr_RSL_IPA_DLCX(template RslChannelNr chan_nr, |
| 1465 | template uint16_t ipa_conn_id := omit) := { |
| 1466 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1467 | msg_type := RSL_MT_IPAC_DLCX, |
| 1468 | ies := { |
| 1469 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1470 | /* FIXME: optional conn_id */ |
| 1471 | * |
| 1472 | } |
| 1473 | } |
| 1474 | |
| 1475 | template RSL_Message ts_RSL_IPA_DLCX_ACK(RslChannelNr chan_nr, template uint16_t ipa_conn_id, |
| 1476 | template RSL_IE_IPA_ConnectionStats stats) := { |
| 1477 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1478 | msg_type := RSL_MT_IPAC_DLCX_ACK, |
| 1479 | ies := { |
| 1480 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1481 | t_RSL_IE(RSL_IE_IPAC_CONN_ID, RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| 1482 | t_RSL_IE(RSL_IE_IPAC_CONN_STAT, RSL_IE_Body:{ipa_stats := stats}) |
| 1483 | } |
| 1484 | } |
Harald Welte | a871a38 | 2018-02-25 02:03:14 +0100 | [diff] [blame] | 1485 | template RSL_Message tr_RSL_IPA_DLCX_ACK(template RslChannelNr chan_nr, |
| 1486 | template uint16_t ipa_conn_id, |
| 1487 | template RSL_IE_IPA_ConnectionStats stats) := { |
| 1488 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1489 | msg_type := RSL_MT_IPAC_DLCX_ACK, |
| 1490 | ies := { |
| 1491 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1492 | tr_RSL_IE(RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| 1493 | tr_RSL_IE(RSL_IE_Body:{ipa_stats := stats}) |
| 1494 | } |
| 1495 | } |
| 1496 | |
| 1497 | |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1498 | |
| 1499 | template RSL_Message ts_RSL_IPA_DLCX_NACK(RslChannelNr chan_nr, RSL_Cause cause, |
| 1500 | template uint16_t ipa_conn_id) := { |
| 1501 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1502 | msg_type := RSL_MT_IPAC_DLCX_NACK, |
| 1503 | ies := { |
| 1504 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1505 | /* optional connection ID */ |
| 1506 | t_RSL_IE(RSL_IE_IPAC_CONN_ID, RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| 1507 | t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) |
| 1508 | } |
| 1509 | } |
Harald Welte | a871a38 | 2018-02-25 02:03:14 +0100 | [diff] [blame] | 1510 | template RSL_Message tr_RSL_IPA_DLCX_NACK(template RslChannelNr chan_nr, |
| 1511 | template RSL_Cause cause) := { |
| 1512 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1513 | msg_type := RSL_MT_IPAC_DLCX_NACK, |
| 1514 | ies := { |
| 1515 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1516 | /* optional connection ID */ |
| 1517 | *, |
| 1518 | tr_RSL_IE(RSL_IE_Body:{cause := tr_RSL_IE_Cause(cause)}) |
| 1519 | } |
| 1520 | } |
| 1521 | |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1522 | |
| 1523 | template RSL_Message tr_RSL_IPA_PDCH_ACT(template RslChannelNr chan_nr) := { |
| 1524 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1525 | msg_type := RSL_MT_IPAC_PDCH_ACT, |
| 1526 | ies := { |
| 1527 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}) |
| 1528 | } |
| 1529 | } |
| 1530 | |
| 1531 | template RSL_Message ts_RSL_IPA_PDCH_ACT_ACK(RslChannelNr chan_nr, RSL_IE_FrameNumber fn) := { |
| 1532 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1533 | msg_type := RSL_MT_IPAC_PDCH_ACT_ACK, |
| 1534 | ies := { |
| 1535 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1536 | t_RSL_IE(RSL_IE_FRAME_NUMBER, RSL_IE_Body:{frame_nr := fn}) |
| 1537 | } |
| 1538 | } |
| 1539 | |
| 1540 | template RSL_Message ts_RSL_IPA_PDCH_ACT_NACK(RslChannelNr chan_nr, RSL_Cause cause) := { |
| 1541 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1542 | msg_type := RSL_MT_IPAC_PDCH_ACT_NACK, |
| 1543 | ies := { |
| 1544 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1545 | t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) |
| 1546 | } |
| 1547 | } |
| 1548 | |
| 1549 | template RSL_Message tr_RSL_IPA_PDCH_DEACT(template RslChannelNr chan_nr) := { |
| 1550 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1551 | msg_type := RSL_MT_IPAC_PDCH_DEACT, |
| 1552 | ies := { |
| 1553 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}) |
| 1554 | } |
| 1555 | } |
| 1556 | |
| 1557 | template RSL_Message ts_RSL_IPA_PDCH_DEACT_ACK(RslChannelNr chan_nr) := { |
| 1558 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1559 | msg_type := RSL_MT_IPAC_PDCH_DEACT_ACK, |
| 1560 | ies := { |
| 1561 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}) |
| 1562 | } |
| 1563 | } |
| 1564 | |
| 1565 | template RSL_Message ts_RSL_IPA_PDCH_DEACT_NACK(RslChannelNr chan_nr, RSL_Cause cause) := { |
| 1566 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1567 | msg_type := RSL_MT_IPAC_PDCH_DEACT_NACK, |
| 1568 | ies := { |
| 1569 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1570 | t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) |
| 1571 | } |
| 1572 | } |
| 1573 | |
| 1574 | |
Harald Welte | 6a8199d | 2018-01-29 21:58:53 +0100 | [diff] [blame] | 1575 | function f_rsl_find_ie(RSL_Message msg, RSL_IE_Type iei, out RSL_IE_Body ret) return boolean { |
| 1576 | for (var integer i := 0; i < sizeof(msg.ies); i := i+1) { |
| 1577 | if (msg.ies[i].iei == iei) { |
| 1578 | ret := msg.ies[i].body; |
| 1579 | return true; |
| 1580 | } |
| 1581 | } |
| 1582 | return false; |
| 1583 | } |
| 1584 | |
| 1585 | |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1586 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1587 | } with { encode "RAW" ; variant "FIELDORDER(msb)" } |