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), |
Harald Welte | 9912eb5 | 2018-02-25 13:30:15 +0100 | [diff] [blame] | 478 | RSL_ERR_IPA_RCH_NOT_ACTV_ALLOC ('51'O), |
| 479 | RSL_ERR_IPA_CONN_INVALID ('52'O), |
| 480 | RSL_ERR_IPA_CONN_IN_USE ('53'O), |
| 481 | RSL_ERR_IPA_CONN_ALREADY_EXISTS ('54'O), |
Harald Welte | a8ed906 | 2017-12-14 09:46:01 +0100 | [diff] [blame] | 482 | RSL_ERR_INVALID_MESSAGE ('5f'O), |
| 483 | /* protocol error */ |
| 484 | RSL_ERR_MSG_DISCR ('60'O), |
| 485 | RSL_ERR_MSG_TYPE ('61'O), |
| 486 | RSL_ERR_MSG_SEQ ('62'O), |
| 487 | RSL_ERR_IE_ERROR ('63'O), |
| 488 | RSL_ERR_MAND_IE_ERROR ('64'O), |
| 489 | RSL_ERR_OPT_IE_ERROR ('65'O), |
| 490 | RSL_ERR_IE_NONEXIST ('66'O), |
| 491 | RSL_ERR_IE_LENGTH ('67'O), |
| 492 | RSL_ERR_IE_CONTENT ('68'O), |
| 493 | RSL_ERR_PROTO ('6f'O), |
| 494 | /* interworking */ |
| 495 | RSL_ERR_INTERWORKING ('7f'O) |
| 496 | }; |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 497 | type record RSL_IE_Cause { |
Harald Welte | 6efa8e3 | 2017-12-09 22:34:06 +0100 | [diff] [blame] | 498 | uint8_t len, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 499 | uint1_t e, |
| 500 | RSL_Cause cause, |
| 501 | octetstring cause_ext optional |
Harald Welte | 6efa8e3 | 2017-12-09 22:34:06 +0100 | [diff] [blame] | 502 | } with { variant (len) "LENGTHTO(e,cause,cause_ext)" } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 503 | |
| 504 | template RSL_IE_Cause ts_RSL_IE_Cause(RSL_Cause cause) := { |
Harald Welte | 6efa8e3 | 2017-12-09 22:34:06 +0100 | [diff] [blame] | 505 | len := 0, /* overwritten */ |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 506 | e := 0, |
| 507 | cause := cause, |
| 508 | cause_ext := omit |
| 509 | } |
| 510 | |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 511 | template RSL_IE_Cause tr_RSL_IE_Cause(template RSL_Cause cause) := { |
| 512 | len := ?, |
| 513 | e := 0, |
| 514 | cause := cause, |
| 515 | cause_ext := omit |
| 516 | } |
| 517 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 518 | /* 9.3.40 */ |
| 519 | type enumerated RSL_ChanNeeded { |
| 520 | RSL_CHANNEED_ANY ('00'B), |
| 521 | RSL_CHANNEED_SDCCH ('01'B), |
| 522 | RSL_CHANNEED_TCH_F ('10'B), |
| 523 | RSL_CHANNEED_TCH_ForH ('11'B) |
Harald Welte | 51d7410 | 2017-12-10 23:05:02 +0100 | [diff] [blame] | 524 | } with { variant "FIELDLENGTH(2)" }; |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 525 | type record RSL_IE_ChanNeeded { |
| 526 | uint6_t reserved, |
| 527 | RSL_ChanNeeded chan_needed |
| 528 | } |
| 529 | |
| 530 | /* 9.3.53 */ |
| 531 | type record RSL_IE_MultirateCtrl { |
| 532 | uint3_t spare, |
| 533 | boolean od, |
| 534 | boolean pre, |
| 535 | uint2_t rae, |
| 536 | boolean tfo |
| 537 | } |
| 538 | |
| 539 | type enumerated RSL_IE_SysinfoType { |
| 540 | RSL_SYSTEM_INFO_8 ('00000000'B), |
| 541 | RSL_SYSTEM_INFO_1 ('00000001'B), |
| 542 | RSL_SYSTEM_INFO_2 ('00000010'B), |
| 543 | RSL_SYSTEM_INFO_3 ('00000011'B), |
| 544 | RSL_SYSTEM_INFO_4 ('00000100'B), |
| 545 | RSL_SYSTEM_INFO_5 ('00000101'B), |
| 546 | RSL_SYSTEM_INFO_6 ('00000110'B), |
| 547 | RSL_SYSTEM_INFO_7 ('00000111'B), |
| 548 | RSL_SYSTEM_INFO_16 ('00001000'B), |
| 549 | RSL_SYSTEM_INFO_17 ('00001001'B), |
| 550 | RSL_SYSTEM_INFO_2bis ('00001010'B), |
| 551 | RSL_SYSTEM_INFO_2ter ('00001011'B), |
| 552 | RSL_SYSTEM_INFO_5bis ('00001101'B), |
| 553 | RSL_SYSTEM_INFO_5ter ('00001110'B), |
| 554 | RSL_SYSTEM_INFO_10 ('00001111'B), |
| 555 | RSL_EXT_MEAS_ORDER ('01000111'B), |
| 556 | RSL_MEAS_INFO ('01001000'B), |
| 557 | RSL_SYSTEM_INFO_13 ('00101000'B), |
| 558 | RSL_ERIC_SYSTEM_INFO_13 ('00001100'B), |
| 559 | RSL_SYSTEM_INFO_2quater ('00101001'B), |
| 560 | RSL_SYSTEM_INFO_9 ('00101010'B), |
| 561 | RSL_SYSTEM_INFO_18 ('00101011'B), |
| 562 | RSL_SYSTEM_INFO_19 ('00101100'B), |
| 563 | RSL_SYSTEM_INFO_20 ('00101101'B) |
| 564 | } with { variant "FIELDLENGTH(8)" } |
| 565 | |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 566 | type record RSL_IE_IPA_ConnectionStats { |
| 567 | uint8_t len, |
| 568 | uint32_t tx_packets, |
| 569 | uint32_t tx_octets, |
| 570 | uint32_t rx_packets, |
| 571 | uint32_t rx_octets, |
| 572 | uint32_t lost_packets, |
| 573 | uint32_t jitter, |
| 574 | uint32_t avg_delay |
| 575 | } with { variant (len) "LENGTHTO(tx_packets,tx_octets,rx_packets,rx_octets,lost_packets,jitter,avg_delay)" } |
| 576 | |
| 577 | type enumerated RSL_IPA_SpeechMode { |
| 578 | RSL_IPA_SPM_SENDRECV ('00'B), |
| 579 | RSL_IPA_SPM_RECVONLY ('01'B), |
| 580 | RSL_IPA_SPM_SENDONLY ('10'B), |
| 581 | RSL_IPA_SPM_RESERVED ('11'B) |
| 582 | } with { variant "FIELDLENGTH(2)" } |
| 583 | |
| 584 | type enumerated RSL_IPA_Codec { |
| 585 | RSL_IPA_CODEC_FR ('0000'B), |
| 586 | RSL_IPA_CODEC_EFR ('0001'B), |
| 587 | RSL_IPA_CODEC_AMR_F ('0010'B), |
| 588 | RSL_IPA_CODEC_HR ('0011'B), |
| 589 | RSL_IPA_CODEC_AMR_H ('0101'B), |
| 590 | RSL_IPA_CODEC_RTP_PT ('1111'B) |
| 591 | } with { variant "FIELDLENGTH(4)" } |
| 592 | |
| 593 | type record RSL_IE_IPA_SpeechMode { |
| 594 | BIT2 reserved, |
| 595 | RSL_IPA_SpeechMode mode, |
| 596 | RSL_IPA_Codec codec |
| 597 | } |
| 598 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 599 | /* union of all IE bodies */ |
| 600 | type union RSL_IE_Body { |
| 601 | RslChannelNr chan_nr, |
| 602 | RslLinkId link_id, |
Harald Welte | 15bb5b5 | 2017-12-07 17:52:04 +0100 | [diff] [blame] | 603 | RSL_L16V l3_info, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 604 | RSL_LV rlm_cause, |
| 605 | uint8_t release_mode, |
| 606 | RSL_IE_ActivationType act_type, |
| 607 | RSL_IE_ChannelMode chan_mode, |
| 608 | uint8_t handover_ref, |
| 609 | RSL_IE_BS_Power bs_power, |
| 610 | RSL_IE_MS_Power ms_power, |
| 611 | uint8_t timing_adv, |
| 612 | RSL_IE_MultirateCtrl multirate_ctrl, |
| 613 | RSL_IE_FrameNumber frame_nr, |
| 614 | RSL_IE_Cause cause, |
| 615 | uint8_t access_delay, |
Harald Welte | d5f521e | 2017-12-07 17:53:06 +0100 | [diff] [blame] | 616 | RSL_IE_RachLoad rach_load, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 617 | uint8_t meas_res_nr, |
Harald Welte | 2691adf | 2018-02-22 17:32:39 +0100 | [diff] [blame] | 618 | uint8_t ms_timing_offset, |
| 619 | RSL_IE_UplinkMeas uplink_meas, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 620 | RSL_IE_L1Info l1_info, |
| 621 | RSL_IE_SysinfoType sysinfo_type, |
| 622 | uint16_t paging_load, |
| 623 | uint8_t paging_group, |
| 624 | RSL_IE_ChanNeeded chan_needed, |
| 625 | RSL_IE_StartingTime starting_time, |
Harald Welte | 73cd271 | 2017-12-17 00:44:52 +0100 | [diff] [blame] | 626 | RSL_IE_EncryptionInfo encr_info, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 627 | RSL_IE_RequestRef req_ref, |
| 628 | RSL_LV full_imm_ass_info, |
Harald Welte | fff6930 | 2017-12-07 17:53:42 +0100 | [diff] [blame] | 629 | RSL_LV ms_identity, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 630 | |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 631 | uint16_t ipa_conn_id, |
| 632 | uint16_t ipa_local_port, |
| 633 | uint16_t ipa_remote_port, |
| 634 | uint32_t ipa_local_ip, |
| 635 | uint32_t ipa_remote_ip, |
| 636 | uint8_t ipa_rtp_pt, |
| 637 | uint8_t ipa_rtp_pt2, |
| 638 | RSL_IE_IPA_ConnectionStats ipa_stats, |
| 639 | RSL_IE_IPA_SpeechMode ipa_speech_mode, |
| 640 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 641 | RSL_LV other |
| 642 | } |
| 643 | |
| 644 | type record RSL_IE { |
| 645 | RSL_IE_Type iei, |
| 646 | RSL_IE_Body body |
| 647 | } with { variant (body) "CROSSTAG( |
| 648 | chan_nr, iei = RSL_IE_CHAN_NR; |
| 649 | link_id, iei = RSL_IE_LINK_IDENT; |
| 650 | l3_info, iei = RSL_IE_L3_INFO; |
| 651 | rlm_cause, iei = RSL_IE_RLM_CAUSE; |
| 652 | release_mode, iei = RSL_IE_RELEASE_MODE; |
| 653 | act_type, iei = RSL_IE_ACT_TYPE; |
| 654 | chan_mode, iei = RSL_IE_CHAN_MODE; |
| 655 | handover_ref, iei = RSL_IE_HANDO_REF; |
| 656 | bs_power, iei = RSL_IE_BS_POWER; |
| 657 | ms_power, iei = RSL_IE_MS_POWER; |
| 658 | timing_adv, iei = RSL_IE_TIMING_ADVANCE; |
| 659 | multirate_ctrl, iei = RSL_IE_MR_CONTROL; |
| 660 | |
| 661 | frame_nr, iei = RSL_IE_FRAME_NUMBER; |
| 662 | cause, iei = RSL_IE_CAUSE; |
| 663 | access_delay, iei = RSL_IE_ACCESS_DELAY; |
Harald Welte | d5f521e | 2017-12-07 17:53:06 +0100 | [diff] [blame] | 664 | rach_load, iei = RSL_IE_RACH_LOAD; |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 665 | meas_res_nr, iei = RSL_IE_MEAS_RES_NR; |
Harald Welte | 2691adf | 2018-02-22 17:32:39 +0100 | [diff] [blame] | 666 | ms_timing_offset, iei = RSL_IE_MS_TIMING_OFFSET; |
| 667 | uplink_meas, iei = RSL_IE_UPLINK_MEAS; |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 668 | l1_info, iei = RSL_IE_L1_INFO; |
| 669 | sysinfo_type, iei = RSL_IE_SYSINFO_TYPE; |
| 670 | paging_load, iei = RSL_IE_PAGING_LOAD; |
| 671 | paging_group, iei = RSL_IE_PAGING_GROUP; |
| 672 | chan_needed, iei = RSL_IE_CHAN_NEEDED; |
| 673 | starting_time, iei = RSL_IE_STARTNG_TIME; |
Harald Welte | 73cd271 | 2017-12-17 00:44:52 +0100 | [diff] [blame] | 674 | encr_info, iei = RSL_IE_ENCR_INFO; |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 675 | |
| 676 | req_ref, iei = RSL_IE_REQ_REFERENCE; |
Harald Welte | fff6930 | 2017-12-07 17:53:42 +0100 | [diff] [blame] | 677 | full_imm_ass_info, iei = RSL_IE_FULL_IMM_ASS_INFO; |
| 678 | ms_identity, iei = RSL_IE_MS_IDENTITY; |
| 679 | other, iei = RSL_IE_FULL_BCCH_INFO; |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 680 | |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 681 | ipa_conn_id, iei = RSL_IE_IPAC_CONN_ID; |
| 682 | ipa_remote_ip, iei = RSL_IE_IPAC_REMOTE_IP; |
| 683 | ipa_remote_port, iei = RSL_IE_IPAC_REMOTE_PORT; |
| 684 | ipa_local_ip, iei = RSL_IE_IPAC_LOCAL_IP; |
| 685 | ipa_local_port, iei = RSL_IE_IPAC_LOCAL_PORT; |
| 686 | ipa_rtp_pt, iei = RSL_IE_IPAC_RTP_PAYLOAD; |
| 687 | ipa_rtp_pt2, iei = RSL_IE_IPAC_RTP_PAYLOAD2; |
| 688 | ipa_stats, iei = RSL_IE_IPAC_CONN_STAT; |
| 689 | ipa_speech_mode, iei = RSL_IE_IPAC_SPEECH_MODE; |
| 690 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 691 | other, OTHERWISE; |
| 692 | )" }; |
| 693 | |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 694 | /* For some reason the TTCN-3 RAW codec cannot automatically figure out the IEI |
| 695 | * that it needs to set for a given union-choice (body). So we have to explicitly |
| 696 | * specify the IEI by the caller :( */ |
| 697 | template RSL_IE t_RSL_IE(RSL_IE_Type iei, template RSL_IE_Body body) := { |
| 698 | iei := iei, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 699 | body := body |
| 700 | } |
| 701 | |
Harald Welte | c287775 | 2017-12-07 17:54:35 +0100 | [diff] [blame] | 702 | template RSL_IE tr_RSL_IE(template RSL_IE_Body body) := { |
| 703 | iei := ?, /* overwritten? */ |
| 704 | body := body |
| 705 | } |
| 706 | |
| 707 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 708 | type record of RSL_IE RSL_IE_List; |
| 709 | |
| 710 | type record RSL_Message { |
| 711 | RSL_MessageDiscriminator msg_disc, |
| 712 | RSL_MessageType msg_type, |
| 713 | RSL_IE_List ies optional |
| 714 | } |
| 715 | |
| 716 | external function enc_RSL_Message(in RSL_Message msg) return octetstring |
| 717 | with { extension "prototype(convert) encode(RAW)" }; |
| 718 | external function dec_RSL_Message(in octetstring stream) return RSL_Message |
| 719 | with { extension "prototype(convert) decode(RAW)" }; |
| 720 | |
Harald Welte | bc330be | 2017-12-09 00:56:36 +0100 | [diff] [blame] | 721 | template RSL_Message tr_RSL_MsgDiscType(template RSL_MessageDiscriminator m_disc, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 722 | RSL_MessageType m_type) := { |
| 723 | msg_disc := m_disc, |
| 724 | msg_type := m_type, |
| 725 | ies := * |
| 726 | } |
| 727 | |
Harald Welte | 4a26736 | 2017-12-09 17:49:32 +0100 | [diff] [blame] | 728 | template RSL_Message ts_RSL_MsgDiscType(template RSL_MessageDiscriminator m_disc, |
| 729 | template RSL_MessageType msg_type, |
| 730 | template RSL_IE_List ies := omit) := { |
| 731 | msg_disc := m_disc, |
| 732 | msg_type := msg_type, |
| 733 | ies := ies |
| 734 | } |
| 735 | |
Harald Welte | bc330be | 2017-12-09 00:56:36 +0100 | [diff] [blame] | 736 | template RSL_Message tr_RSL_MsgType(template RSL_MessageType msg_type) := { |
| 737 | msg_disc := ?, |
| 738 | msg_type := msg_type, |
| 739 | ies := * |
| 740 | } |
| 741 | |
| 742 | /* Common Channel Management */ |
| 743 | template RSL_Message tr_RSL_MsgTypeC(template RSL_MessageType msg_type) modifies tr_RSL_MsgType := { |
| 744 | msg_disc := { RSL_MDISC_CCHAN, ? } |
| 745 | } |
| 746 | |
| 747 | /* RLL */ |
| 748 | template RSL_Message tr_RSL_MsgTypeR(template RSL_MessageType msg_type) modifies tr_RSL_MsgType := { |
| 749 | msg_disc := { RSL_MDISC_RLL, true } |
| 750 | } |
| 751 | |
| 752 | /* Dedicated Channel Management */ |
| 753 | template RSL_Message tr_RSL_MsgTypeD(template RSL_MessageType msg_type) modifies tr_RSL_MsgType := { |
| 754 | msg_disc := { RSL_MDISC_DCHAN, ? } |
| 755 | } |
| 756 | |
| 757 | /* Dedicated Channel Management */ |
| 758 | template RSL_Message tr_RSL_MsgTypeT(template RSL_MessageType msg_type) modifies tr_RSL_MsgType := { |
| 759 | msg_disc := { RSL_MDISC_TRX_MGMT, ? } |
| 760 | } |
| 761 | |
| 762 | |
| 763 | /* dedicated channel or RLL */ |
| 764 | 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] | 765 | msg_disc := ({RSL_MDISC_DCHAN,?}, {RSL_MDISC_RLL,?}, {RSL_MDISC_IPACCESS,false}) |
Harald Welte | bc330be | 2017-12-09 00:56:36 +0100 | [diff] [blame] | 766 | } |
| 767 | |
| 768 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 769 | /* 8.3.1 BSC -> BTS */ |
| 770 | template RSL_Message ts_RSL_DATA_REQ(RslChannelNr chan_nr, RslLinkId link_id, octetstring l3_info) := { |
| 771 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, true), |
| 772 | msg_type := RSL_MT_DATA_REQ, |
| 773 | ies :={ |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 774 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 775 | t_RSL_IE(RSL_IE_LINK_IDENT, RSL_IE_Body:{link_id := link_id}), |
| 776 | 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] | 777 | } |
| 778 | } |
| 779 | |
Harald Welte | 7794d5b | 2017-12-16 23:00:20 +0100 | [diff] [blame] | 780 | template RSL_Message tr_RSL_DATA_REQ(template RslChannelNr chan_nr :=?, |
| 781 | template RslLinkId link_id := ?, |
| 782 | template octetstring l3_info := ?) := { |
| 783 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, true), |
| 784 | msg_type := RSL_MT_DATA_REQ, |
| 785 | ies :={ |
| 786 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 787 | tr_RSL_IE(RSL_IE_Body:{link_id := link_id}), |
| 788 | tr_RSL_IE(RSL_IE_Body:{l3_info := tr_RSL_L16V(l3_info)}) |
| 789 | } |
| 790 | } |
| 791 | |
| 792 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 793 | /* 8.3.2 BTS -> BSC */ |
| 794 | template RSL_Message ts_RSL_DATA_IND(RslChannelNr chan_nr, RslLinkId link_id, octetstring l3_info) := { |
| 795 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, true), |
| 796 | msg_type := RSL_MT_DATA_IND, |
| 797 | ies :={ |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 798 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 799 | t_RSL_IE(RSL_IE_LINK_IDENT, RSL_IE_Body:{link_id := link_id}), |
| 800 | 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] | 801 | } |
| 802 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 803 | template RSL_Message tr_RSL_DATA_IND(template RslChannelNr chan_nr, template RslLinkId link_id, |
| 804 | template octetstring l3_info := ?) := { |
| 805 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, true), |
| 806 | msg_type := RSL_MT_DATA_IND, |
| 807 | ies :={ |
| 808 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 809 | tr_RSL_IE(RSL_IE_Body:{link_id := link_id}), |
| 810 | tr_RSL_IE(RSL_IE_Body:{l3_info := tr_RSL_L16V(l3_info)}) |
| 811 | } |
| 812 | } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 813 | |
| 814 | /* 8.3.3 BTS -> BSC */ |
| 815 | template RSL_Message ts_RSL_ERROR_IND(RslChannelNr chan_nr, RslLinkId link_id, RSL_Cause cause) := { |
| 816 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| 817 | msg_type := RSL_MT_ERROR_IND, |
| 818 | ies :={ |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 819 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 820 | t_RSL_IE(RSL_IE_LINK_IDENT, RSL_IE_Body:{link_id := link_id}), |
| 821 | 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] | 822 | } |
| 823 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 824 | template RSL_Message tr_RSL_ERROR_IND(template RslChannelNr chan_nr, template RslLinkId link_id, |
| 825 | template RSL_Cause cause := ?) := { |
| 826 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| 827 | msg_type := RSL_MT_ERROR_IND, |
| 828 | ies :={ |
| 829 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 830 | tr_RSL_IE(RSL_IE_Body:{link_id := link_id}), |
| 831 | tr_RSL_IE(RSL_IE_Body:{cause := tr_RSL_IE_Cause(cause)}) |
| 832 | } |
| 833 | } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 834 | |
| 835 | /* 8.3.6 BTS -> BSC */ |
| 836 | template RSL_Message ts_RSL_EST_IND(RslChannelNr chan_nr, RslLinkId link_id, octetstring l3_info) := { |
| 837 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| 838 | msg_type := RSL_MT_EST_IND, |
| 839 | ies := { |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 840 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 841 | t_RSL_IE(RSL_IE_LINK_IDENT, RSL_IE_Body:{link_id := link_id}), |
| 842 | 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] | 843 | } |
| 844 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 845 | template RSL_Message tr_RSL_EST_IND(template RslChannelNr chan_nr, template RslLinkId link_id, |
| 846 | template octetstring l3_info := ?) := { |
| 847 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| 848 | msg_type := RSL_MT_EST_IND, |
| 849 | ies := { |
| 850 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 851 | tr_RSL_IE(RSL_IE_Body:{link_id := link_id}), |
| 852 | tr_RSL_IE(RSL_IE_Body:{l3_info := tr_RSL_L16V(l3_info)}) |
| 853 | } |
| 854 | } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 855 | |
| 856 | /* 8.3.7 BSC -> BTS */ |
| 857 | template RSL_Message ts_RSL_REL_REQ(RslChannelNr chan_nr, RslLinkId link_id) := { |
| 858 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| 859 | msg_type := RSL_MT_REL_REQ, |
| 860 | ies :={ |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 861 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 862 | 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] | 863 | } |
| 864 | } |
Harald Welte | e8a5ab1 | 2017-12-09 22:34:57 +0100 | [diff] [blame] | 865 | template RSL_Message tr_RSL_REL_REQ(template RslChannelNr chan_nr, |
| 866 | template RslLinkId link_id) := { |
| 867 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| 868 | msg_type := RSL_MT_REL_REQ, |
| 869 | ies :={ |
| 870 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 871 | tr_RSL_IE(RSL_IE_Body:{link_id := link_id}), |
| 872 | * |
| 873 | } |
| 874 | } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 875 | |
| 876 | /* 8.3.8 BTS -> BSC */ |
| 877 | template RSL_Message ts_RSL_REL_CONF(RslChannelNr chan_nr, RslLinkId link_id) := { |
| 878 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| 879 | msg_type := RSL_MT_REL_CONF, |
| 880 | ies :={ |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 881 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 882 | 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] | 883 | } |
| 884 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 885 | template RSL_Message tr_RSL_REL_CONF(template RslChannelNr chan_nr, template RslLinkId link_id) := { |
| 886 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| 887 | msg_type := RSL_MT_REL_CONF, |
| 888 | ies :={ |
| 889 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 890 | tr_RSL_IE(RSL_IE_Body:{link_id := link_id}) |
| 891 | } |
| 892 | } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 893 | |
| 894 | /* 8.3.9 BTS -> BSC */ |
| 895 | template RSL_Message ts_RSL_REL_IND(RslChannelNr chan_nr, RslLinkId link_id) := { |
| 896 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| 897 | msg_type := RSL_MT_REL_IND, |
| 898 | ies :={ |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 899 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 900 | 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] | 901 | } |
| 902 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 903 | template RSL_Message tr_RSL_REL_IND(template RslChannelNr chan_nr, template RslLinkId link_id) := { |
| 904 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_RLL, false), |
| 905 | msg_type := RSL_MT_REL_IND, |
| 906 | ies :={ |
| 907 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 908 | tr_RSL_IE(RSL_IE_Body:{link_id := link_id}) |
| 909 | } |
| 910 | } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 911 | |
| 912 | /* 8.3.10 BSC -> BTS */ |
| 913 | template RSL_Message ts_RSL_UNITDATA_REQ(RslChannelNr chan_nr, RslLinkId link_id, octetstring l3_info) |
| 914 | modifies ts_RSL_DATA_REQ := { |
| 915 | msg_type := RSL_MT_UNIT_DATA_REQ |
| 916 | } |
| 917 | |
| 918 | /* 8.3.11 BTS -> BSC */ |
| 919 | template RSL_Message ts_RSL_UNITDATA_IND(RslChannelNr chan_nr, RslLinkId link_id, octetstring l3_info) |
| 920 | modifies ts_RSL_DATA_IND := { |
| 921 | msg_type := RSL_MT_UNIT_DATA_IND |
| 922 | } |
| 923 | |
| 924 | |
| 925 | /* DEDICATED CANNEL MANAGEMENT MESSAGES */ |
| 926 | |
| 927 | /* 8.4.1 BSC -> BTS */ |
| 928 | template RSL_Message ts_RSL_CHAN_ACT(RslChannelNr chan_nr, RSL_IE_ChannelMode mode) := { |
| 929 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 930 | msg_type := RSL_MT_CHAN_ACTIV, |
| 931 | ies :={ |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 932 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 933 | t_RSL_IE(RSL_IE_ACT_TYPE, RSL_IE_Body:{act_type := t_RSL_IE_ActType}), |
| 934 | 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] | 935 | /* lots of optional IEs */ |
| 936 | } |
| 937 | } |
| 938 | |
| 939 | /* 8.4.2 BTS -> BSC */ |
| 940 | template RSL_Message ts_RSL_CHAN_ACT_ACK(RslChannelNr chan_nr, GsmFrameNumber fn) := { |
| 941 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 942 | msg_type := RSL_MT_CHAN_ACTIV_ACK, |
| 943 | ies :={ |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 944 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 945 | 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] | 946 | } |
| 947 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 948 | template RSL_Message tr_RSL_CHAN_ACT_ACK(template RslChannelNr chan_nr) := { |
| 949 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 950 | msg_type := RSL_MT_CHAN_ACTIV_ACK, |
| 951 | ies := { |
| 952 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 953 | tr_RSL_IE(RSL_IE_Body:{frame_nr := ?}) |
| 954 | } |
| 955 | } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 956 | |
| 957 | /* 8.4.3 BTS -> BSC */ |
| 958 | template RSL_Message ts_RSL_CHAN_ACT_NACK(RslChannelNr chan_nr, RSL_Cause cause) := { |
| 959 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 960 | msg_type := RSL_MT_CHAN_ACTIV_NACK, |
| 961 | ies :={ |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 962 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 963 | 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] | 964 | } |
| 965 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 966 | template RSL_Message tr_RSL_CHAN_ACT_NACK(template RslChannelNr chan_nr, |
| 967 | template RSL_Cause cause := ?) := { |
| 968 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 969 | msg_type := RSL_MT_CHAN_ACTIV_NACK, |
| 970 | ies := { |
| 971 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 972 | tr_RSL_IE(RSL_IE_Body:{cause := ?}) |
| 973 | } |
| 974 | } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 975 | |
| 976 | /* 8.4.4 BTS -> BSC */ |
| 977 | template RSL_Message ts_RSL_CONN_FAIL_IND(RslChannelNr chan_nr, RSL_Cause cause) := { |
| 978 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 979 | msg_type := RSL_MT_CONN_FAIL, |
| 980 | ies :={ |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 981 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 982 | 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] | 983 | } |
| 984 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 985 | template RSL_Message tr_RSL_CONN_FAIL_IND(template RslChannelNr chan_nr, |
| 986 | template RSL_Cause cause := ?) := { |
| 987 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 988 | msg_type := RSL_MT_CONN_FAIL, |
| 989 | ies :={ |
| 990 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 991 | tr_RSL_IE(RSL_IE_Body:{cause := tr_RSL_IE_Cause(cause)}) |
| 992 | } |
| 993 | } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 994 | |
Harald Welte | e8a5ab1 | 2017-12-09 22:34:57 +0100 | [diff] [blame] | 995 | /* 8.4.5 BSC -> BTS */ |
| 996 | template RSL_Message tr_RSL_DEACT_SACCH(template RslChannelNr chan_nr) := { |
| 997 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 998 | msg_type := RSL_MT_DEACTIVATE_SACCH, |
| 999 | ies := { |
| 1000 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}) |
| 1001 | } |
| 1002 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1003 | template RSL_Message ts_RSL_DEACT_SACCH(RslChannelNr chan_nr) := { |
| 1004 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1005 | msg_type := RSL_MT_DEACTIVATE_SACCH, |
| 1006 | ies := { |
| 1007 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}) |
| 1008 | } |
| 1009 | } |
| 1010 | |
Harald Welte | e8a5ab1 | 2017-12-09 22:34:57 +0100 | [diff] [blame] | 1011 | |
Harald Welte | 73cd271 | 2017-12-17 00:44:52 +0100 | [diff] [blame] | 1012 | /* 8.4.6 BSC ->BTS */ |
| 1013 | template RSL_Message tr_RSL_ENCR_CMD(template RslChannelNr chan_nr, |
| 1014 | template RslLinkId link_id := ?, |
| 1015 | template OCT1 alg := ?, |
| 1016 | template octetstring key := ?, |
| 1017 | template octetstring l3_info := ?) := { |
| 1018 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1019 | msg_type := RSL_MT_ENCR_CMD, |
| 1020 | ies := { |
| 1021 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1022 | tr_RSL_IE(RSL_IE_Body:{encr_info := tr_RSL_IE_EncrInfo(alg, key)}), |
| 1023 | tr_RSL_IE(RSL_IE_Body:{link_id := link_id}), |
| 1024 | tr_RSL_IE(RSL_IE_Body:{l3_info := tr_RSL_L16V(l3_info)}) |
| 1025 | } |
| 1026 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1027 | template RSL_Message ts_RSL_ENCR_CMD(RslChannelNr chan_nr, RslLinkId link_id, |
| 1028 | OCT1 alg, octetstring key, |
| 1029 | octetstring l3_info) := { |
| 1030 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1031 | msg_type := RSL_MT_ENCR_CMD, |
| 1032 | ies := { |
| 1033 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1034 | t_RSL_IE(RSL_IE_ENCR_INFO, RSL_IE_Body:{encr_info := tr_RSL_IE_EncrInfo(alg, key)}), |
| 1035 | t_RSL_IE(RSL_IE_LINK_IDENT, RSL_IE_Body:{link_id := link_id}), |
| 1036 | t_RSL_IE(RSL_IE_L3_INFO, RSL_IE_Body:{l3_info := tr_RSL_L16V(l3_info)}) |
| 1037 | } |
| 1038 | } |
Harald Welte | 73cd271 | 2017-12-17 00:44:52 +0100 | [diff] [blame] | 1039 | |
Harald Welte | 2691adf | 2018-02-22 17:32:39 +0100 | [diff] [blame] | 1040 | template RSL_Message tr_RSL_MEAS_RES(template RslChannelNr chan_nr, |
| 1041 | template uint8_t meas_res_nr := ?, |
| 1042 | template RSL_IE_UplinkMeas ul_meas := ?, |
| 1043 | template RSL_IE_BS_Power bs_power := ?) := { |
| 1044 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1045 | msg_type := RSL_MT_MEAS_RES, |
| 1046 | ies := { |
| 1047 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1048 | tr_RSL_IE(RSL_IE_Body:{meas_res_nr := meas_res_nr}), |
| 1049 | tr_RSL_IE(RSL_IE_Body:{uplink_meas := ul_meas}), |
| 1050 | tr_RSL_IE(RSL_IE_Body:{bs_power := bs_power}), |
| 1051 | * |
| 1052 | } |
| 1053 | } |
| 1054 | |
Harald Welte | 39b47be | 2018-02-23 18:58:48 +0100 | [diff] [blame] | 1055 | /* Osmocom specific template, require lots of optional fields to be present */ |
| 1056 | template RSL_Message tr_RSL_MEAS_RES_OSMO(template RslChannelNr chan_nr, |
| 1057 | template uint8_t meas_res_nr := ?, |
| 1058 | template RSL_IE_UplinkMeas ul_meas := ?, |
| 1059 | template RSL_IE_BS_Power bs_power := ?, |
| 1060 | template RSL_IE_L1Info l1_info := ?, |
| 1061 | template octetstring l3_info := ?, |
| 1062 | template uint8_t ms_to := ?) := { |
| 1063 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1064 | msg_type := RSL_MT_MEAS_RES, |
| 1065 | ies := { |
| 1066 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1067 | tr_RSL_IE(RSL_IE_Body:{meas_res_nr := meas_res_nr}), |
| 1068 | tr_RSL_IE(RSL_IE_Body:{uplink_meas := ul_meas}), |
| 1069 | tr_RSL_IE(RSL_IE_Body:{bs_power := bs_power}), |
| 1070 | tr_RSL_IE(RSL_IE_Body:{l1_info := l1_info}), |
| 1071 | tr_RSL_IE(RSL_IE_Body:{l3_info := tr_RSL_L16V(l3_info)}), |
| 1072 | tr_RSL_IE(RSL_IE_Body:{ms_timing_offset := ms_to}) |
| 1073 | } |
| 1074 | } |
| 1075 | |
| 1076 | |
Harald Welte | 7794d5b | 2017-12-16 23:00:20 +0100 | [diff] [blame] | 1077 | /* 8.4.10 BTS -> BSC */ |
| 1078 | template RSL_Message ts_RSL_MODE_MODIFY_ACK(RslChannelNr chan_nr) := { |
| 1079 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1080 | msg_type := RSL_MT_MODE_MODIFY_ACK, |
| 1081 | ies := { |
| 1082 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}) |
| 1083 | } |
| 1084 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1085 | template RSL_Message tr_RSL_MODE_MODIFY_ACK(template RslChannelNr chan_nr) := { |
| 1086 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1087 | msg_type := RSL_MT_MODE_MODIFY_ACK, |
| 1088 | ies := { |
| 1089 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}) |
| 1090 | } |
| 1091 | } |
Harald Welte | 7794d5b | 2017-12-16 23:00:20 +0100 | [diff] [blame] | 1092 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1093 | /* 8.4.11 BTS -> BSC */ |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1094 | template RSL_Message ts_RSL_MODE_MODIFY_NACK(RslChannelNr chan_nr, RSL_Cause cause) := { |
| 1095 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1096 | msg_type := RSL_MT_MODE_MODIFY_NACK, |
| 1097 | ies := { |
| 1098 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1099 | t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) |
| 1100 | } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1101 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1102 | template RSL_Message tr_RSL_MODE_MODIFY_NACK(template RslChannelNr chan_nr, |
| 1103 | template RSL_Cause cause) := { |
| 1104 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1105 | msg_type := RSL_MT_MODE_MODIFY_NACK, |
| 1106 | ies := { |
| 1107 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1108 | tr_RSL_IE(RSL_IE_Body:{cause := tr_RSL_IE_Cause(cause)}) |
| 1109 | } |
| 1110 | } |
| 1111 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1112 | |
Harald Welte | 6a8199d | 2018-01-29 21:58:53 +0100 | [diff] [blame] | 1113 | /* 8.4.14: BTS <- BSC */ |
| 1114 | template RSL_Message tr_RSL_RF_CHAN_REL(template RslChannelNr chan_nr) := { |
| 1115 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1116 | msg_type := RSL_MT_RF_CHAN_REL, |
| 1117 | ies := { |
| 1118 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}) |
| 1119 | } |
| 1120 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1121 | template RSL_Message ts_RSL_RF_CHAN_REL(RslChannelNr chan_nr) := { |
| 1122 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1123 | msg_type := RSL_MT_RF_CHAN_REL, |
| 1124 | ies := { |
| 1125 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}) |
| 1126 | } |
| 1127 | } |
Harald Welte | 6a8199d | 2018-01-29 21:58:53 +0100 | [diff] [blame] | 1128 | |
Harald Welte | 4a26736 | 2017-12-09 17:49:32 +0100 | [diff] [blame] | 1129 | /* 8.4.19 BTS -> BSC */ |
| 1130 | template RSL_Message ts_RSL_RF_CHAN_REL_ACK(RslChannelNr chan_nr) := |
| 1131 | ts_RSL_MsgDiscType(ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1132 | RSL_MT_RF_CHAN_REL_ACK, |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 1133 | { 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] | 1134 | |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1135 | template RSL_Message tr_RSL_RF_CHAN_REL_ACK(template RslChannelNr chan_nr) := { |
| 1136 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_DCHAN, false), |
| 1137 | msg_type := RSL_MT_RF_CHAN_REL_ACK, |
| 1138 | ies := { |
| 1139 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}) |
| 1140 | } |
| 1141 | } |
| 1142 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1143 | /* COMMON CHANNEL MANAGEMENT MESSAGES */ |
| 1144 | |
Harald Welte | 874c223 | 2018-02-24 04:52:43 +0100 | [diff] [blame] | 1145 | /* 8.5.1 BTS <- BSC */ |
| 1146 | template RSL_Message ts_RSL_BCCH_INFO(RSL_IE_SysinfoType si_type, octetstring full_bcch_info) := { |
| 1147 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 1148 | msg_type := RSL_MT_BCCH_INFO, |
| 1149 | ies := { |
| 1150 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := t_RslChanNr_BCCH(0)}), |
| 1151 | t_RSL_IE(RSL_IE_SYSINFO_TYPE, RSL_IE_Body:{sysinfo_type := si_type}), |
| 1152 | t_RSL_IE(RSL_IE_FULL_BCCH_INFO, RSL_IE_Body:{other := ts_RSL_LV(full_bcch_info)}) |
| 1153 | } |
| 1154 | } |
| 1155 | |
Harald Welte | 7ae9314 | 2017-12-07 17:56:15 +0100 | [diff] [blame] | 1156 | /* 8.5.2 BTS -> BSC */ |
| 1157 | template RSL_Message ts_RSL_RACH_LOAD_IND(uint16_t slot_ct, uint16_t busy_ct, uint16_t acc_ct) := { |
| 1158 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 1159 | msg_type := RSL_MT_CCCH_LOAD_IND, |
| 1160 | ies := { |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 1161 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := t_RslChanNr_RACH(0)}), |
| 1162 | 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] | 1163 | } |
| 1164 | } |
Harald Welte | 68e495b | 2018-02-25 00:05:57 +0100 | [diff] [blame] | 1165 | template RSL_Message tr_RSL_RACH_LOAD_IND(template uint16_t slot_ct := ?, |
| 1166 | template uint16_t busy_ct := ?, |
| 1167 | template uint16_t acc_ct) := { |
| 1168 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 1169 | msg_type := RSL_MT_CCCH_LOAD_IND, |
| 1170 | ies := { |
| 1171 | tr_RSL_IE(RSL_IE_Body:{chan_nr := t_RslChanNr_RACH(0)}), |
| 1172 | tr_RSL_IE(RSL_IE_Body:{rach_load := tr_RSL_IE_RachLoad(slot_ct, busy_ct, acc_ct)}) |
| 1173 | } |
| 1174 | } |
| 1175 | |
Harald Welte | 7ae9314 | 2017-12-07 17:56:15 +0100 | [diff] [blame] | 1176 | template RSL_Message ts_RSL_PAGING_LOAD_IND(uint16_t buffer_space) := { |
| 1177 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 1178 | msg_type := RSL_MT_CCCH_LOAD_IND, |
| 1179 | ies := { |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 1180 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := t_RslChanNr_PCH_AGCH(0)}), |
| 1181 | 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] | 1182 | } |
| 1183 | } |
Harald Welte | 68e495b | 2018-02-25 00:05:57 +0100 | [diff] [blame] | 1184 | template RSL_Message tr_RSL_PAGING_LOAD_IND(template uint16_t buffer_space := ?) := { |
| 1185 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 1186 | msg_type := RSL_MT_CCCH_LOAD_IND, |
| 1187 | ies := { |
| 1188 | tr_RSL_IE(RSL_IE_Body:{chan_nr := t_RslChanNr_PCH_AGCH(0)}), |
| 1189 | tr_RSL_IE(RSL_IE_Body:{paging_load := buffer_space}) |
| 1190 | } |
| 1191 | } |
| 1192 | |
Harald Welte | 7ae9314 | 2017-12-07 17:56:15 +0100 | [diff] [blame] | 1193 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1194 | /* 8.5.3 BTS -> BSC */ |
Harald Welte | 101fbed | 2017-12-07 17:56:38 +0100 | [diff] [blame] | 1195 | 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] | 1196 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 1197 | msg_type := RSL_MT_CHAN_RQD, |
| 1198 | ies := { |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 1199 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := t_RslChanNr_RACH(0)}), |
| 1200 | t_RSL_IE(RSL_IE_REQ_REFERENCE, RSL_IE_Body:{req_ref := ts_RSL_IE_ReqRef(ra, fn)}), |
| 1201 | 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] | 1202 | } |
| 1203 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1204 | template RSL_Message tr_RSL_CHAN_RQD(template OCT1 ra, template GsmFrameNumber fn := ?, |
| 1205 | template uint8_t acc_del := ?) := { |
| 1206 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 1207 | msg_type := RSL_MT_CHAN_RQD, |
| 1208 | ies := { |
| 1209 | tr_RSL_IE(RSL_IE_Body:{chan_nr := t_RslChanNr_RACH(0)}), |
| 1210 | tr_RSL_IE(RSL_IE_Body:{req_ref := tr_RSL_IE_ReqRef(ra, fn)}), |
| 1211 | tr_RSL_IE(RSL_IE_Body:{access_delay := acc_del}) |
| 1212 | } |
| 1213 | } |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1214 | |
| 1215 | /* 8.5.4 BTS -> BSC */ |
| 1216 | template RSL_Message ts_DELETE_IND(RslChannelNr chan_nr, octetstring imm_ass) := { |
| 1217 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 1218 | msg_type := RSL_MT_DELETE_IND, |
| 1219 | ies := { |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 1220 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1221 | 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] | 1222 | } |
| 1223 | } |
| 1224 | |
Harald Welte | c287775 | 2017-12-07 17:54:35 +0100 | [diff] [blame] | 1225 | /* 8.5.5 BSC -> BTS */ |
| 1226 | template RSL_Message tr_RSL_PAGING_CMD(template octetstring identity, template uint3_t tn := ?) := { |
| 1227 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 1228 | msg_type := RSL_MT_PAGING_CMD, |
| 1229 | ies := { |
| 1230 | tr_RSL_IE(RSL_IE_Body:{chan_nr := t_RslChanNr_PCH_AGCH(tn)}), |
| 1231 | tr_RSL_IE(RSL_IE_Body:{paging_group := ?}), |
Harald Welte | 51d7410 | 2017-12-10 23:05:02 +0100 | [diff] [blame] | 1232 | tr_RSL_IE(RSL_IE_Body:{ms_identity := tr_RSL_LV(identity)}), |
Harald Welte | c287775 | 2017-12-07 17:54:35 +0100 | [diff] [blame] | 1233 | * /* opt: channel needed, eMLPP prio */ |
| 1234 | } |
| 1235 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1236 | template RSL_Message ts_RSL_PAGING_CMD(octetstring identity, uint8_t pg, uint3_t tn := 0) := { |
| 1237 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 1238 | msg_type := RSL_MT_PAGING_CMD, |
| 1239 | ies := { |
| 1240 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := t_RslChanNr_PCH_AGCH(tn)}), |
| 1241 | t_RSL_IE(RSL_IE_PAGING_GROUP, RSL_IE_Body:{paging_group := pg}), |
| 1242 | t_RSL_IE(RSL_IE_MS_IDENTITY, RSL_IE_Body:{ms_identity := ts_RSL_LV(identity)}) |
| 1243 | } |
| 1244 | } |
Harald Welte | c287775 | 2017-12-07 17:54:35 +0100 | [diff] [blame] | 1245 | |
| 1246 | /* 8.5.6 BSC -> BTS */ |
| 1247 | template RSL_Message tr_RSL_IMM_ASSIGN(template uint3_t tn := ?) := { |
| 1248 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 1249 | msg_type := RSL_MT_IMMEDIATE_ASSIGN_CMD, |
| 1250 | ies := { |
| 1251 | tr_RSL_IE(RSL_IE_Body:{chan_nr := t_RslChanNr_PCH_AGCH(tn)}), |
| 1252 | tr_RSL_IE(RSL_IE_Body:{full_imm_ass_info := ?}) |
| 1253 | } |
| 1254 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1255 | template RSL_Message ts_RSL_IMM_ASSIGN(octetstring f_ass_inf, uint3_t tn := 0) := { |
| 1256 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_CCHAN, false), |
| 1257 | msg_type := RSL_MT_IMMEDIATE_ASSIGN_CMD, |
| 1258 | ies := { |
| 1259 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := t_RslChanNr_PCH_AGCH(tn)}), |
| 1260 | t_RSL_IE(RSL_IE_FULL_IMM_ASS_INFO, RSL_IE_Body:{full_imm_ass_info := ts_RSL_LV(f_ass_inf)}) |
| 1261 | } |
| 1262 | } |
Harald Welte | c287775 | 2017-12-07 17:54:35 +0100 | [diff] [blame] | 1263 | |
Harald Welte | 68e495b | 2018-02-25 00:05:57 +0100 | [diff] [blame] | 1264 | template RSL_Message tr_RSL_RF_RES_IND := { |
| 1265 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_TRX_MGMT, false), |
| 1266 | msg_type := RSL_MT_RF_RES_IND, |
| 1267 | ies := * |
| 1268 | } |
| 1269 | |
| 1270 | /* 8.6.2 BTS <- BSC */ |
| 1271 | template RSL_Message ts_RSL_SACCH_FILL(RSL_IE_SysinfoType si_type, octetstring l3_info) := { |
| 1272 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_TRX_MGMT, false), |
| 1273 | msg_type := RSL_MT_SACCH_FILL, |
| 1274 | ies := { |
| 1275 | t_RSL_IE(RSL_IE_SYSINFO_TYPE, RSL_IE_Body:{sysinfo_type := si_type}), |
| 1276 | t_RSL_IE(RSL_IE_L3_INFO, RSL_IE_Body:{l3_info := ts_RSL_L16V(l3_info)}) |
| 1277 | } |
| 1278 | } |
| 1279 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1280 | /* 8.6.4 BTS -> BSC */ |
| 1281 | template RSL_Message ts_RSL_ERROR_REPORT(RSL_Cause cause) := { |
Harald Welte | 01d982c | 2018-02-25 01:31:40 +0100 | [diff] [blame] | 1282 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_TRX_MGMT, false), |
| 1283 | msg_type := RSL_MT_ERROR_REPORT, |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1284 | ies := { |
Harald Welte | 735dd07 | 2017-12-12 14:55:17 +0100 | [diff] [blame] | 1285 | 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] | 1286 | } |
| 1287 | } |
Harald Welte | 01d982c | 2018-02-25 01:31:40 +0100 | [diff] [blame] | 1288 | template RSL_Message tr_RSL_ERROR_REPORT(template RSL_Cause cause := ?) := { |
| 1289 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_TRX_MGMT, false), |
| 1290 | msg_type := RSL_MT_ERROR_REPORT, |
| 1291 | ies := { |
| 1292 | tr_RSL_IE(RSL_IE_Body:{cause := tr_RSL_IE_Cause(cause)}), |
| 1293 | * |
| 1294 | } |
| 1295 | } |
| 1296 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1297 | |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1298 | |
| 1299 | /* Abis/IP specific messages */ |
| 1300 | |
| 1301 | template RSL_Message tr_RSL_IPA_CRCX(template RslChannelNr chan_nr) := { |
| 1302 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1303 | msg_type := RSL_MT_IPAC_CRCX, |
| 1304 | ies := { |
| 1305 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1306 | * |
| 1307 | } |
| 1308 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1309 | template RSL_Message ts_RSL_IPA_CRCX(RslChannelNr chan_nr) := { |
| 1310 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1311 | msg_type := RSL_MT_IPAC_CRCX, |
| 1312 | ies := { |
| 1313 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}) |
| 1314 | } |
| 1315 | } |
| 1316 | |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1317 | |
| 1318 | template RSL_Message ts_RSL_IPA_CRCX_ACK(RslChannelNr chan_nr, |
| 1319 | uint16_t ipa_conn_id, uint32_t local_ip, |
| 1320 | uint16_t local_port, uint7_t rtp_pt2) := { |
| 1321 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1322 | msg_type := RSL_MT_IPAC_CRCX_ACK, |
| 1323 | ies := { |
| 1324 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1325 | t_RSL_IE(RSL_IE_IPAC_CONN_ID, RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| 1326 | t_RSL_IE(RSL_IE_IPAC_LOCAL_IP, RSL_IE_Body:{ipa_local_ip := local_ip}), |
| 1327 | t_RSL_IE(RSL_IE_IPAC_LOCAL_PORT, RSL_IE_Body:{ipa_local_port := local_port}), |
| 1328 | t_RSL_IE(RSL_IE_IPAC_RTP_PAYLOAD2, RSL_IE_Body:{ipa_rtp_pt2 := rtp_pt2}) |
| 1329 | } |
| 1330 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1331 | template RSL_Message tr_RSL_IPA_CRCX_ACK(template RslChannelNr chan_nr, |
| 1332 | template uint16_t ipa_conn_id, |
| 1333 | template uint32_t local_ip, |
Harald Welte | 8bd0f82 | 2018-02-25 12:43:28 +0100 | [diff] [blame] | 1334 | template uint16_t local_port) := { |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1335 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1336 | msg_type := RSL_MT_IPAC_CRCX_ACK, |
| 1337 | ies := { |
| 1338 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1339 | tr_RSL_IE(RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| 1340 | tr_RSL_IE(RSL_IE_Body:{ipa_local_ip := local_ip}), |
Harald Welte | 8bd0f82 | 2018-02-25 12:43:28 +0100 | [diff] [blame] | 1341 | tr_RSL_IE(RSL_IE_Body:{ipa_local_port := local_port}) |
| 1342 | /* Optional: RTP Payload Type 2 IE */ |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1343 | } |
| 1344 | } |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1345 | |
| 1346 | template RSL_Message ts_RSL_IPA_CRCX_NACK(RslChannelNr chan_nr, RSL_Cause cause) := { |
| 1347 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1348 | msg_type := RSL_MT_IPAC_CRCX_NACK, |
| 1349 | ies := { |
| 1350 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1351 | t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) |
| 1352 | } |
| 1353 | } |
Harald Welte | 9abd128 | 2018-02-19 19:18:17 +0100 | [diff] [blame] | 1354 | template RSL_Message tr_RSL_IPA_CRCX_NACK(template RslChannelNr chan_nr, |
| 1355 | template RSL_Cause cause := ?) := { |
| 1356 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1357 | msg_type := RSL_MT_IPAC_CRCX_NACK, |
| 1358 | ies := { |
| 1359 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1360 | tr_RSL_IE(RSL_IE_Body:{cause := tr_RSL_IE_Cause(cause)}) |
| 1361 | } |
| 1362 | } |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1363 | |
Harald Welte | 3052745 | 2018-02-25 12:46:25 +0100 | [diff] [blame] | 1364 | template RSL_Message ts_RSL_IPA_MDCX(RslChannelNr chan_nr, |
| 1365 | uint16_t ipa_conn_id, |
| 1366 | uint32_t remote_ip, uint16_t remote_port, |
| 1367 | uint7_t rtp_pt2) := { |
| 1368 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1369 | msg_type := RSL_MT_IPAC_MDCX, |
| 1370 | ies := { |
| 1371 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1372 | t_RSL_IE(RSL_IE_IPAC_CONN_ID, RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| 1373 | t_RSL_IE(RSL_IE_IPAC_REMOTE_IP, RSL_IE_Body:{ipa_remote_ip := remote_ip}), |
| 1374 | t_RSL_IE(RSL_IE_IPAC_REMOTE_PORT, RSL_IE_Body:{ipa_remote_port := remote_port}), |
| 1375 | /* optional: RTP Payload Type */ |
| 1376 | t_RSL_IE(RSL_IE_IPAC_RTP_PAYLOAD2, RSL_IE_Body:{ipa_rtp_pt2 := rtp_pt2}) |
| 1377 | } |
| 1378 | } |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1379 | template RSL_Message tr_RSL_IPA_MDCX(template RslChannelNr chan_nr, |
| 1380 | template uint16_t ipa_conn_id) := { |
| 1381 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1382 | msg_type := RSL_MT_IPAC_MDCX, |
| 1383 | ies := { |
| 1384 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1385 | tr_RSL_IE(RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| 1386 | * |
| 1387 | } |
| 1388 | } |
| 1389 | |
| 1390 | 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] | 1391 | uint32_t local_ip, uint16_t local_port, |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1392 | uint7_t rtp_pt2) := { |
| 1393 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
Harald Welte | 71b5ec8 | 2017-12-16 23:01:10 +0100 | [diff] [blame] | 1394 | msg_type := RSL_MT_IPAC_MDCX_ACK, |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1395 | ies := { |
| 1396 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1397 | /* optional */ |
| 1398 | 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] | 1399 | t_RSL_IE(RSL_IE_IPAC_LOCAL_IP, RSL_IE_Body:{ipa_local_ip := local_ip}), |
| 1400 | 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] | 1401 | /* optional: RTP Payload Type */ |
| 1402 | t_RSL_IE(RSL_IE_IPAC_RTP_PAYLOAD2, RSL_IE_Body:{ipa_rtp_pt2 := rtp_pt2}) |
| 1403 | } |
| 1404 | } |
Harald Welte | 3052745 | 2018-02-25 12:46:25 +0100 | [diff] [blame] | 1405 | template RSL_Message tr_RSL_IPA_MDCX_ACK(template RslChannelNr chan_nr, |
| 1406 | template uint16_t ipa_conn_id, |
| 1407 | template uint32_t local_ip, |
| 1408 | template uint16_t local_port, |
| 1409 | template uint7_t rtp_pt2) := { |
| 1410 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1411 | msg_type := RSL_MT_IPAC_MDCX_ACK, |
| 1412 | ies := { |
| 1413 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1414 | /* optional */ |
| 1415 | tr_RSL_IE(RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| 1416 | tr_RSL_IE(RSL_IE_Body:{ipa_local_ip := local_ip}), |
| 1417 | tr_RSL_IE(RSL_IE_Body:{ipa_local_port := local_port}), |
| 1418 | /* optional: RTP Payload Type */ |
| 1419 | tr_RSL_IE(RSL_IE_Body:{ipa_rtp_pt2 := rtp_pt2}) |
| 1420 | } |
| 1421 | } |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1422 | |
| 1423 | template RSL_Message ts_RSL_IPA_MDCX_NACK(RslChannelNr chan_nr, RSL_Cause cause, |
| 1424 | template uint16_t ipa_conn_id) := { |
| 1425 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1426 | msg_type := RSL_MT_IPAC_MDCX_NACK, |
| 1427 | ies := { |
| 1428 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1429 | /* optional connection ID */ |
| 1430 | t_RSL_IE(RSL_IE_IPAC_CONN_ID, RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| 1431 | t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) |
| 1432 | } |
| 1433 | } |
Harald Welte | 3052745 | 2018-02-25 12:46:25 +0100 | [diff] [blame] | 1434 | template RSL_Message tr_RSL_IPA_MDCX_NACK(template RslChannelNr chan_nr, |
| 1435 | template RSL_Cause cause, |
| 1436 | template uint16_t ipa_conn_id) := { |
| 1437 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1438 | msg_type := RSL_MT_IPAC_MDCX_NACK, |
| 1439 | ies := { |
| 1440 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1441 | /* optional connection ID */ |
| 1442 | tr_RSL_IE(RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| 1443 | tr_RSL_IE(RSL_IE_Body:{cause := tr_RSL_IE_Cause(cause)}) |
| 1444 | } |
| 1445 | } |
| 1446 | |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1447 | |
| 1448 | template RSL_Message ts_RSL_IPA_DLCX_IND(RslChannelNr chan_nr, uint16_t ipa_conn_id, |
| 1449 | RSL_IE_IPA_ConnectionStats stats, RSL_Cause cause) := { |
| 1450 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1451 | msg_type := RSL_MT_IPAC_DLCX_IND, |
| 1452 | ies := { |
| 1453 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1454 | t_RSL_IE(RSL_IE_IPAC_CONN_ID, RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| 1455 | t_RSL_IE(RSL_IE_IPAC_CONN_STAT, RSL_IE_Body:{ipa_stats := stats}), |
| 1456 | t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) |
| 1457 | } |
| 1458 | } |
| 1459 | |
Harald Welte | 2a7e716 | 2018-02-25 12:46:48 +0100 | [diff] [blame] | 1460 | 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] | 1461 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1462 | msg_type := RSL_MT_IPAC_DLCX, |
| 1463 | ies := { |
Harald Welte | 2a7e716 | 2018-02-25 12:46:48 +0100 | [diff] [blame] | 1464 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1465 | 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] | 1466 | } |
| 1467 | } |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1468 | template RSL_Message tr_RSL_IPA_DLCX(template RslChannelNr chan_nr, |
| 1469 | template uint16_t ipa_conn_id := omit) := { |
| 1470 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1471 | msg_type := RSL_MT_IPAC_DLCX, |
| 1472 | ies := { |
| 1473 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1474 | /* FIXME: optional conn_id */ |
| 1475 | * |
| 1476 | } |
| 1477 | } |
| 1478 | |
| 1479 | template RSL_Message ts_RSL_IPA_DLCX_ACK(RslChannelNr chan_nr, template uint16_t ipa_conn_id, |
| 1480 | template RSL_IE_IPA_ConnectionStats stats) := { |
| 1481 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1482 | msg_type := RSL_MT_IPAC_DLCX_ACK, |
| 1483 | ies := { |
| 1484 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1485 | t_RSL_IE(RSL_IE_IPAC_CONN_ID, RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| 1486 | t_RSL_IE(RSL_IE_IPAC_CONN_STAT, RSL_IE_Body:{ipa_stats := stats}) |
| 1487 | } |
| 1488 | } |
Harald Welte | a871a38 | 2018-02-25 02:03:14 +0100 | [diff] [blame] | 1489 | template RSL_Message tr_RSL_IPA_DLCX_ACK(template RslChannelNr chan_nr, |
| 1490 | template uint16_t ipa_conn_id, |
| 1491 | template RSL_IE_IPA_ConnectionStats stats) := { |
| 1492 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1493 | msg_type := RSL_MT_IPAC_DLCX_ACK, |
| 1494 | ies := { |
| 1495 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1496 | tr_RSL_IE(RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| 1497 | tr_RSL_IE(RSL_IE_Body:{ipa_stats := stats}) |
| 1498 | } |
| 1499 | } |
| 1500 | |
| 1501 | |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1502 | |
| 1503 | template RSL_Message ts_RSL_IPA_DLCX_NACK(RslChannelNr chan_nr, RSL_Cause cause, |
| 1504 | template uint16_t ipa_conn_id) := { |
| 1505 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1506 | msg_type := RSL_MT_IPAC_DLCX_NACK, |
| 1507 | ies := { |
| 1508 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1509 | /* optional connection ID */ |
| 1510 | t_RSL_IE(RSL_IE_IPAC_CONN_ID, RSL_IE_Body:{ipa_conn_id := ipa_conn_id}), |
| 1511 | t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) |
| 1512 | } |
| 1513 | } |
Harald Welte | a871a38 | 2018-02-25 02:03:14 +0100 | [diff] [blame] | 1514 | template RSL_Message tr_RSL_IPA_DLCX_NACK(template RslChannelNr chan_nr, |
| 1515 | template RSL_Cause cause) := { |
| 1516 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1517 | msg_type := RSL_MT_IPAC_DLCX_NACK, |
| 1518 | ies := { |
| 1519 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}), |
| 1520 | /* optional connection ID */ |
| 1521 | *, |
| 1522 | tr_RSL_IE(RSL_IE_Body:{cause := tr_RSL_IE_Cause(cause)}) |
| 1523 | } |
| 1524 | } |
| 1525 | |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1526 | |
| 1527 | template RSL_Message tr_RSL_IPA_PDCH_ACT(template RslChannelNr chan_nr) := { |
| 1528 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1529 | msg_type := RSL_MT_IPAC_PDCH_ACT, |
| 1530 | ies := { |
| 1531 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}) |
| 1532 | } |
| 1533 | } |
| 1534 | |
| 1535 | template RSL_Message ts_RSL_IPA_PDCH_ACT_ACK(RslChannelNr chan_nr, RSL_IE_FrameNumber fn) := { |
| 1536 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1537 | msg_type := RSL_MT_IPAC_PDCH_ACT_ACK, |
| 1538 | ies := { |
| 1539 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1540 | t_RSL_IE(RSL_IE_FRAME_NUMBER, RSL_IE_Body:{frame_nr := fn}) |
| 1541 | } |
| 1542 | } |
| 1543 | |
| 1544 | template RSL_Message ts_RSL_IPA_PDCH_ACT_NACK(RslChannelNr chan_nr, RSL_Cause cause) := { |
| 1545 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1546 | msg_type := RSL_MT_IPAC_PDCH_ACT_NACK, |
| 1547 | ies := { |
| 1548 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1549 | t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) |
| 1550 | } |
| 1551 | } |
| 1552 | |
| 1553 | template RSL_Message tr_RSL_IPA_PDCH_DEACT(template RslChannelNr chan_nr) := { |
| 1554 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1555 | msg_type := RSL_MT_IPAC_PDCH_DEACT, |
| 1556 | ies := { |
| 1557 | tr_RSL_IE(RSL_IE_Body:{chan_nr := chan_nr}) |
| 1558 | } |
| 1559 | } |
| 1560 | |
| 1561 | template RSL_Message ts_RSL_IPA_PDCH_DEACT_ACK(RslChannelNr chan_nr) := { |
| 1562 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1563 | msg_type := RSL_MT_IPAC_PDCH_DEACT_ACK, |
| 1564 | ies := { |
| 1565 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}) |
| 1566 | } |
| 1567 | } |
| 1568 | |
| 1569 | template RSL_Message ts_RSL_IPA_PDCH_DEACT_NACK(RslChannelNr chan_nr, RSL_Cause cause) := { |
| 1570 | msg_disc := ts_RSL_MsgDisc(RSL_MDISC_IPACCESS, false), |
| 1571 | msg_type := RSL_MT_IPAC_PDCH_DEACT_NACK, |
| 1572 | ies := { |
| 1573 | t_RSL_IE(RSL_IE_CHAN_NR, RSL_IE_Body:{chan_nr := chan_nr}), |
| 1574 | t_RSL_IE(RSL_IE_CAUSE, RSL_IE_Body:{cause := ts_RSL_IE_Cause(cause)}) |
| 1575 | } |
| 1576 | } |
| 1577 | |
| 1578 | |
Harald Welte | 6a8199d | 2018-01-29 21:58:53 +0100 | [diff] [blame] | 1579 | function f_rsl_find_ie(RSL_Message msg, RSL_IE_Type iei, out RSL_IE_Body ret) return boolean { |
| 1580 | for (var integer i := 0; i < sizeof(msg.ies); i := i+1) { |
| 1581 | if (msg.ies[i].iei == iei) { |
| 1582 | ret := msg.ies[i].body; |
| 1583 | return true; |
| 1584 | } |
| 1585 | } |
| 1586 | return false; |
| 1587 | } |
| 1588 | |
| 1589 | |
Harald Welte | 9958a4d | 2017-12-14 21:21:33 +0100 | [diff] [blame] | 1590 | |
Harald Welte | 643e2a6 | 2017-11-27 15:03:18 +0100 | [diff] [blame] | 1591 | } with { encode "RAW" ; variant "FIELDORDER(msb)" } |