blob: 901568062f85bb289052529a68ba9080895104e7 [file] [log] [blame]
Harald Weltec76f29f2017-11-22 12:46:46 +01001module BSSMAP_Templates {
2
Harald Welte35bb7162018-01-03 21:07:52 +01003/* BSSMAP Templates, building on top of BSSAP_Types from Ericsson.
4 *
Harald Welte34b5a952019-05-27 11:54:11 +02005 * (C) 2017-2019 by Harald Welte <laforge@gnumonks.org>
6 * contributions by sysmocom - s.f.m.c. GmbH
Harald Welte35bb7162018-01-03 21:07:52 +01007 * All rights reserved.
8 *
9 * Released under the terms of GNU General Public License, Version 2 or
10 * (at your option) any later version.
Harald Welte34b5a952019-05-27 11:54:11 +020011 *
12 * SPDX-License-Identifier: GPL-2.0-or-later
Harald Welte35bb7162018-01-03 21:07:52 +010013 */
14
Harald Weltec76f29f2017-11-22 12:46:46 +010015import from General_Types all;
16import from Osmocom_Types all;
Harald Welte72cecfa2017-12-11 19:50:14 +010017import from GSM_Types all;
Harald Weltec76f29f2017-11-22 12:46:46 +010018import from BSSAP_Types all;
19
20type integer BssmapCause;
Philipp Maier34bd80e2018-03-27 14:28:52 +020021type integer SpeechVersion;
22type integer Channel;
23type integer ChannelMode;
24type octetstring oldToNewBSSIEs;
Harald Weltec76f29f2017-11-22 12:46:46 +010025
Harald Welteb69533d2017-12-15 13:55:17 +010026/* 48.008 3.2.2.5 - this actually belongs to BSSAP_Types.ttcn */
27type enumerated myBSSMAP_Cause {
28 /* 000 / 001: Normal event */
29 GSM0808_CAUSE_RADIO_INTERFACE_MESSAGE_FAILURE ('0000000'B),
30 GSM0808_CAUSE_RADIO_INTERFACE_FAILURE ('0000001'B),
31 GSM0808_CAUSE_UPLINK_QUALITY ('0000010'B),
32 GSM0808_CAUSE_UPLINK_STRENGTH ('0000011'B),
33 GSM0808_CAUSE_DOWNLINK_QUALITY ('0000100'B),
34 GSM0808_CAUSE_DOWNLINK_STRENGTH ('0000101'B),
35 GSM0808_CAUSE_DISTANCE ('0000110'B),
36 GSM0808_CAUSE_O_AND_M_INTERVENTION ('0000111'B),
37 GSM0808_CAUSE_RESPONSE_TO_MSC_INVOCATION ('0001000'B),
38 GSM0808_CAUSE_CALL_CONTROL ('0001001'B),
39 GSM0808_CAUSE_RADIO_INTERFACE_FAILURE_REVERSION ('0001010'B),
40 GSM0808_CAUSE_HANDOVER_SUCCESSFUL ('0001011'B),
41 GSM0808_CAUSE_BETTER_CELL ('0001100'B),
42 GSM0808_CAUSE_DIRECTED_RETRY ('0001101'B),
43 GSM0808_CAUSE_JOINED_GROUP_CALL_CHANNEL ('0001110'B),
44 GSM0808_CAUSE_TRAFFIC ('0001111'B),
45 GSM0808_CAUSE_REDUCE_LOAD_IN_SERVING_CELL ('0010000'B),
46 GSM0808_CAUSE_TRAFFIC_LOAD_IN_TGT_HIGHER_THAN_IN_SRC_CELL ('0010001'B),
47 GSM0808_CAUSE_RELOCATION_TRIGGERED ('0010010'B),
48 GSM0808_CAUSE_REQUSTED_OPT_NOT_AUTHORISED ('0010100'B),
49 GSM0808_CAUSE_ALT_CHAN_CONFIG_REQUESTED ('0010101'B),
50 GSM0808_CAUSE_RESP_TO_INT_HO_ENQ_MSG ('0010110'B),
51 GSM0808_CAUSE_INT_HO_ENQUIRY_REJECT ('0010111'B),
52 GSM0808_CAUSE_REDUNDANCY_LEVEL_NOT_ADEQUATE ('0011000'B),
53 /* reserved */
54 /* 010: Resource unavailable */
55 GSM0808_CAUSE_EQUIPMENT_FAILURE ('0100000'B),
56 GSM0808_CAUSE_NO_RADIO_RESOURCE_AVAILABLE ('0100001'B),
57 GSM0808_CAUSE_RQSTED_TERRESTRIAL_RESOURCE_UNAVAILABLE ('0100010'B),
58 GSM0808_CAUSE_CCCH_OVERLOAD ('0100011'B),
59 GSM0808_CAUSE_PROCESSOR_OVERLOAD ('0100100'B),
60 GSM0808_CAUSE_BSS_NOT_EQUIPPED ('0100101'B),
61 GSM0808_CAUSE_MS_NOT_EQUIPPED ('0100110'B),
62 GSM0808_CAUSE_INVALID_CELL ('0100111'B),
63 GSM0808_CAUSE_TRAFFIC_LOAD ('0101000'B),
64 GSM0808_CAUSE_PREEMPTION ('0101001'B),
65 GSM0808_CAUSE_DTM_HO_SGSN_FAILURE ('0101010'B),
66 GSM0808_CAUSE_DTM_HO_PS_ALLOC_FAILURE ('0101011'B),
67 /* reserved */
68 /* 011: Service or option not available, but implemented */
69 GSM0808_CAUSE_RQSTED_TRANSCODING_RATE_ADAPTION_UNAVAILABLE ('0110000'B),
70 GSM0808_CAUSE_CIRCUIT_POOL_MISMATCH ('0110001'B),
71 GSM0808_CAUSE_SWITCH_CIRCUIT_POOL ('0110010'B),
72 GSM0808_CAUSE_RQSTED_SPEECH_VERSION_UNAVAILABLE ('0110011'B),
73 GSM0808_CAUSE_LSA_NOT_ALLOWED ('0110100'B),
74 GSM0808_CAUSE_REQ_CODEC_TYPE_OR_CONFIG_UNAVAIL ('0110101'B),
75 GSM0808_CAUSE_REQ_A_IF_TYPE_UNAVAIL ('0110110'B),
76 GSM0808_CAUSE_INVALID_CSG_CELL ('0110111'B),
77 /* reserved */
78 /* 100: Service or option not implemented or currently disabled */
79 GSM0808_CAUSE_REQ_REDUND_LEVEL_NOT_AVAIL ('0111111'B),
80 GSM0808_CAUSE_CIPHERING_ALGORITHM_NOT_SUPPORTED ('1000000'B),
81 GSM0808_CAUSE_GERAN_IU_MODE_FAILURE ('1000001'B),
82 GSM0808_CAUSE_INC_RELOC_NOT_SUPP_DT_PUESBINE_FEATURE ('1000010'B),
83 GSM0808_CAUSE_ACCESS_RESTRICTED_DUE_TO_SHARED_NETWORKS ('1000011'B),
84 GSM0808_CAUSE_REQ_CODEC_TYPE_OR_CONFIG_NOT_SUPP ('1000100'B),
85 GSM0808_CAUSE_REQ_A_IF_TYPE_NOT_SUPP ('1000101'B),
86 GSM0808_CAUSE_REQ_REDUND_LVL_NOT_SUPP ('1000110'B),
87 /* reserved */
88 /* 101: Invalid message */
89 GSM0808_CAUSE_TERRESTRIAL_CIRCUIT_ALREADY_ALLOCATED ('1010000'B),
90 GSM0808_CAUSE_INVALID_MESSAGE_CONTENTS ('1010001'B),
91 GSM0808_CAUSE_INFORMATION_ELEMENT_OR_FIELD_MISSING ('1010010'B),
92 GSM0808_CAUSE_INCORRECT_VALUE ('1010011'B),
93 GSM0808_CAUSE_UNKNOWN_MESSAGE_TYPE ('1010100'B),
94 GSM0808_CAUSE_UNKNOWN_INFORMATION_ELEMENT ('1010101'B),
95 GSM0808_CAUSE_DTM_HO_INVALID_PS_IND ('1010110'B),
96 GSM0808_CAUSE_CALL_ID_ALREADY_ALLOC ('1010111'B),
97 /* reserved */
98 /* 110: protocol error */
99 GSM0808_CAUSE_PROTOCOL_ERROR_BETWEEN_BSS_AND_MSC ('1100000'B),
100 GSM0808_CAUSE_VGCS_VBS_CALL_NON_EXISTANT ('1100001'B),
101 GSM0808_CAUSE_DTM_HO_TIMER_EXPIRY ('1100010'B)
102} with { variant "FIELDLENGTH(7)" };
103
Harald Weltec76f29f2017-11-22 12:46:46 +0100104template PDU_BSSAP ts_BSSAP_BSSMAP := {
105 discriminator := '0'B,
106 spare := '0000000'B,
107 dlci := omit,
108 lengthIndicator := 0, /* overwritten by codec */
Harald Welteb3414b22017-11-23 18:22:10 +0100109 pdu := {
110 bssmap := ?
111 }
Harald Weltec76f29f2017-11-22 12:46:46 +0100112}
113
114template PDU_BSSAP tr_BSSAP_BSSMAP := {
115 discriminator := '0'B,
116 spare := '0000000'B,
Harald Welte049ca642018-01-21 13:54:34 +0100117 dlci := *,
Harald Weltec76f29f2017-11-22 12:46:46 +0100118 lengthIndicator := ?,
119 pdu := {
120 bssmap := ?
121 }
122}
123
Harald Welte0a6835c2018-01-21 13:56:01 +0100124template PDU_BSSAP ts_BSSAP_DTAP(octetstring dtap, template OCT1 dlci := omit) := {
Harald Welteb3414b22017-11-23 18:22:10 +0100125 discriminator := '1'B,
126 spare := '0000000'B,
Harald Welte0a6835c2018-01-21 13:56:01 +0100127 dlci := dlci,
Harald Welteb3414b22017-11-23 18:22:10 +0100128 lengthIndicator := 0, /* overwritten by codec */
129 pdu := {
Harald Welte0a6835c2018-01-21 13:56:01 +0100130 dtap := dtap
Harald Welteb3414b22017-11-23 18:22:10 +0100131 }
132}
133
134template PDU_BSSAP tr_BSSAP_DTAP := {
135 discriminator := '1'B,
136 spare := '0000000'B,
Harald Welte049ca642018-01-21 13:54:34 +0100137 dlci := *,
Harald Welteb3414b22017-11-23 18:22:10 +0100138 lengthIndicator := ?,
139 pdu := {
140 dtap := ?
141 }
142}
143
Harald Weltec76f29f2017-11-22 12:46:46 +0100144template (value) BSSMAP_IE_Cause ts_BSSMAP_IE_Cause(BssmapCause val) := {
145 elementIdentifier := '04'O,
146 lengthIndicator := 0,
147 causeValue := int2bit(val, 7),
148 extensionCauseValue := '0'B,
149 spare1 := omit
150}
151
Philipp Maier34bd80e2018-03-27 14:28:52 +0200152template (value) BSSMAP_IE_SpeechVersion ts_BSSMAP_IE_SpeechVersion(SpeechVersion val) := {
153 elementIdentifier := '40'O,
154 speechVersionIdentifier := int2bit(val, 7),
155 spare1_1 := '0'B
156}
157
158template (value) BSSMAP_IE_CurrentChannelType1 ts_BSSMAP_IE_CurrentChannelType1(Channel c, ChannelMode cm) := {
159 elementIdentifier := '31'O,
160 channel := int2bit(c, 4),
161 channelMode := int2bit(cm, 4)
162}
163
164template (value) BSSMAP_IE_OldToNewBSSInfo ts_BSSMAP_IE_OldToNewBSSInfo(oldToNewBSSIEs val) := {
165 elementIdentifier := '3A'O,
166 lengthIndicator := 0, /* overwritten by codec */
167 oldToNewBSSIEs := val
168}
169
Pau Espin Pedrol5eff9752019-05-23 15:03:54 +0200170template BSSMAP_IE_Osmo_OsmuxSupport tr_BSSMAP_IE_Osmo_OsmuxSupport := {
171 elementIdentifier := 'F0'O
172}
173
174private function f_enc_osmux_support(boolean osmux_enabled) return template BSSMAP_IE_Osmo_OsmuxSupport {
175 if (osmux_enabled) {
176 return tr_BSSMAP_IE_Osmo_OsmuxSupport;
177 }
178 return omit;
179}
180
181template (value) PDU_BSSAP ts_BSSMAP_Reset(BssmapCause cause, boolean osmux_enabled := false) modifies ts_BSSAP_BSSMAP := {
Harald Weltec76f29f2017-11-22 12:46:46 +0100182 pdu := {
183 bssmap := {
184 reset := {
185 messageType := '30'O,
186 cause := ts_BSSMAP_IE_Cause(cause),
Pau Espin Pedrol5eff9752019-05-23 15:03:54 +0200187 a_InterfaceSelectorForReset := omit,
188 osmuxSupport := f_enc_osmux_support(osmux_enabled)
Harald Weltec76f29f2017-11-22 12:46:46 +0100189 }
190 }
191 }
192}
193
Pau Espin Pedrol5eff9752019-05-23 15:03:54 +0200194template PDU_BSSAP tr_BSSMAP_Reset(boolean osmux_enabled := false) modifies tr_BSSAP_BSSMAP := {
Harald Welte365f4ed2017-11-23 00:00:43 +0100195 pdu := {
196 bssmap := {
197 reset := {
198 messageType := '30'O,
199 cause := ?,
Pau Espin Pedrol5eff9752019-05-23 15:03:54 +0200200 a_InterfaceSelectorForReset := *,
201 osmuxSupport := f_enc_osmux_support(osmux_enabled)
Harald Welte365f4ed2017-11-23 00:00:43 +0100202 }
203 }
204 }
205}
206
Pau Espin Pedrol5eff9752019-05-23 15:03:54 +0200207template (value) PDU_BSSAP ts_BSSMAP_ResetAck(boolean osmux_enabled := false) modifies ts_BSSAP_BSSMAP := {
Harald Weltec76f29f2017-11-22 12:46:46 +0100208 pdu := {
209 bssmap := {
210 resetAck := {
211 messageType := '31'O,
Pau Espin Pedrol5eff9752019-05-23 15:03:54 +0200212 a_InterfaceSelectorForReset := omit,
213 osmuxSupport := f_enc_osmux_support(osmux_enabled)
Harald Weltec76f29f2017-11-22 12:46:46 +0100214 }
215 }
216 }
217}
218
Pau Espin Pedrol5eff9752019-05-23 15:03:54 +0200219template PDU_BSSAP tr_BSSMAP_ResetAck(boolean osmux_enabled := false) modifies tr_BSSAP_BSSMAP := {
Harald Weltec76f29f2017-11-22 12:46:46 +0100220 pdu := {
221 bssmap := {
222 resetAck := {
223 messageType := '31'O,
Pau Espin Pedrol5eff9752019-05-23 15:03:54 +0200224 a_InterfaceSelectorForReset := *,
225 osmuxSupport := f_enc_osmux_support(osmux_enabled)
Harald Weltec76f29f2017-11-22 12:46:46 +0100226 }
227 }
228 }
229}
230
231template BSSMAP_IE_CellIdentifier ts_BSSMAP_IE_CellID := {
232 elementIdentifier := '05'O,
233 lengthIndicator := 0,
234 cellIdentifierDiscriminator := '0000'B,
235 spare1_4 := '0000'B,
236 cellIdentification := ?
237}
238
239type uint16_t BssmapLAC;
240type uint16_t BssmapCI;
241
Harald Welteae8ce232018-01-21 13:56:46 +0100242template BSSMAP_IE_CellIdentifier ts_CellId_CGI(hexstring mcc, hexstring mnc, BssmapLAC lac, BssmapCI ci)
Harald Weltec76f29f2017-11-22 12:46:46 +0100243modifies ts_BSSMAP_IE_CellID := {
244 cellIdentification := {
Harald Welteae8ce232018-01-21 13:56:46 +0100245 cI_CGI := ts_BSSMAP_CI_CGI(mcc, mnc, lac, ci)
Harald Weltec76f29f2017-11-22 12:46:46 +0100246 }
247}
Harald Weltec76f29f2017-11-22 12:46:46 +0100248
249template BSSMAP_IE_CellIdentifier ts_CellID_LAC_CI(BssmapLAC lac, BssmapCI ci)
250modifies ts_BSSMAP_IE_CellID := {
251 cellIdentification := {
252 cI_LAC_CI := {
253 lac := int2oct(lac, 2),
254 ci := int2oct(ci, 2)
255 }
256 }
257}
258
259template BSSMAP_IE_CellIdentifier ts_CellId_CI(BssmapCI ci)
260modifies ts_BSSMAP_IE_CellID := {
261 cellIdentification := {
262 cI_CI := int2oct(ci, 2)
263 }
264}
265
266template BSSMAP_IE_CellIdentifier ts_CellId_none
267modifies ts_BSSMAP_IE_CellID := {
268 cellIdentification := {
269 cI_noCell := ''O
270 }
271}
272
273
274template BSSMAP_IE_Layer3Information ts_BSSMAP_IE_L3Info(octetstring l3info) := {
275 elementIdentifier := '17'O,
276 lengthIndicator := 0,
277 layer3info := l3info
278}
279
Harald Weltef8a0bda2017-12-09 00:53:17 +0100280template BSSMAP_IE_Layer3Information tr_BSSMAP_IE_L3Info(template octetstring l3info) := {
281 elementIdentifier := '17'O,
282 lengthIndicator := ?,
283 layer3info := l3info
284}
285
286
Harald Weltec76f29f2017-11-22 12:46:46 +0100287template PDU_BSSAP ts_BSSMAP_ComplL3(BSSMAP_IE_CellIdentifier cell_id, octetstring l3_info)
288modifies ts_BSSAP_BSSMAP := {
289 pdu := {
290 bssmap := {
291 completeLayer3Information := {
292 messageType := '57'O,
293 cellIdentifier := cell_id,
294 layer3Information := ts_BSSMAP_IE_L3Info(l3_info),
295 chosenChannel := omit,
296 lSAIdentifier := omit,
297 aPDU := omit,
298 codecList := omit,
299 redirectAttemptFlag := omit,
300 sendSequenceNumber := omit,
301 iMSI := omit
302 }
303 }
304 }
305}
306
Harald Weltef8a0bda2017-12-09 00:53:17 +0100307template PDU_BSSAP tr_BSSMAP_ComplL3(template octetstring l3_info := ?,
308 template BSSMAP_IE_CellIdentifier cell_id := ?)
309modifies tr_BSSAP_BSSMAP := {
Harald Welte365f4ed2017-11-23 00:00:43 +0100310 pdu := {
311 bssmap := {
Harald Weltef8a0bda2017-12-09 00:53:17 +0100312 completeLayer3Information := {
313 messageType := '57'O,
314 cellIdentifier := cell_id,
315 layer3Information := tr_BSSMAP_IE_L3Info(l3_info),
316 chosenChannel := *,
317 lSAIdentifier := *,
318 aPDU := *,
319 codecList := *,
320 redirectAttemptFlag := *,
321 sendSequenceNumber := *,
322 iMSI := *
323 }
Harald Welte365f4ed2017-11-23 00:00:43 +0100324 }
325 }
326}
327
Neels Hofmeyr0ac63152019-05-07 01:20:17 +0200328template BSSMAP_IE_CellIdentifierList ts_BSSMAP_IE_CidList(template BSSMAP_FIELD_CellIdentificationList cid_list) := {
Harald Welte28d943e2017-11-25 15:00:50 +0100329 elementIdentifier := '1A'O,
330 lengthIndicator := 0, /* overwritten */
331 cellIdentifierDiscriminator := '0000'B, /* overwritten */
332 spare1_4 := '0000'B,
333 cellIdentificationList := cid_list
334}
Harald Welte365f4ed2017-11-23 00:00:43 +0100335
Harald Welte4bf5fc92017-12-15 13:56:06 +0100336const OCT1 ChRate_ANY := '00'O;
Harald Welte365f4ed2017-11-23 00:00:43 +0100337const OCT1 ChRate_TCHF := '08'O;
338const OCT1 ChRate_TCHH := '09'O;
Harald Welte4bf5fc92017-12-15 13:56:06 +0100339const OCT1 ChRate_TCHForH_Fpref := '0A'O;
340const OCT1 ChRate_TCHForH_Hpref := '0B'O;
341const OCT1 ChRate_TCHForH_Fpref_nochg := '1A'O;
342const OCT1 ChRate_TCHForH_Hpref_nochg := '1B'O;
343const OCT1 ChRate_TCHForH := '0F'O;
344const OCT1 ChRate_TCHForH_nochg := '1F'O;
Harald Welte365f4ed2017-11-23 00:00:43 +0100345
Harald Weltedbd6b3f2018-03-21 18:45:02 +0100346const OCT1 Spdi_TCHF_FR := '01'O;
347const OCT1 Spdi_TCHF_EFR := '11'O;
348const OCT1 Spdi_TCHF_AMR := '21'O;
349const OCT1 Spdi_TCHH_HR := '05'O;
350const OCT1 Spdi_TCHH_AMR := '25'O;
351
Harald Welte365f4ed2017-11-23 00:00:43 +0100352template (value) BSSMAP_IE_ChannelType ts_BSSMAP_IE_ChannelType := {
353 elementIdentifier := '0B'O, /* overwritten */
354 lengthIndicator := 0, /* overwritten */
355 speechOrDataIndicator := '0001'B, /* speech */
356 spare1_4 := '0000'B,
357 channelRateAndType := ChRate_TCHF,
Harald Weltedbd6b3f2018-03-21 18:45:02 +0100358 speechId_DataIndicator := Spdi_TCHF_FR
Harald Welte365f4ed2017-11-23 00:00:43 +0100359}
360
Harald Welte4bf5fc92017-12-15 13:56:06 +0100361template (value) BSSMAP_IE_ChannelType ts_BSSMAP_IE_ChannelTypeCTM modifies ts_BSSMAP_IE_ChannelType := {
362 speechOrDataIndicator := '0100'B /* speech + CTM */
363}
364
365template (value) BSSMAP_IE_ChannelType ts_BSSMAP_IE_ChannelTypeCSD := {
366 elementIdentifier := '0B'O, /* overwritten */
367 lengthIndicator := 0, /* overwritten */
368 speechOrDataIndicator := '0010'B, /* data */
369 spare1_4 := '0000'B,
370 channelRateAndType := ChRate_TCHF,
371 speechId_DataIndicator := '10'O /* 9600 bps / transparent */
372}
373
374template (value) BSSMAP_IE_ChannelType ts_BSSMAP_IE_ChannelTypeSIGNAL := {
375 elementIdentifier := '0B'O, /* overwritten */
376 lengthIndicator := 0, /* overwritten */
377 speechOrDataIndicator := '0011'B, /* data */
378 spare1_4 := '0000'B,
379 channelRateAndType := ChRate_ANY,
380 speechId_DataIndicator := '00'O /* spare */
381}
382
383template (value) BSSMAP_IE_EncryptionInformation ts_BSSMAP_IE_EncrInfo(OCT8 kc, OCT1 algs := '05'O) := {
384 elementIdentifier := '0A'O,
385 lengthIndicator := 0, /* overwritten */
386 permittedAlgorithms := algs,
387 key := kc
388}
389
Harald Welte16114282018-01-24 22:41:21 +0100390template BSSMAP_IE_EncryptionInformation tr_BSSMAP_IE_EncrInfo(template OCT8 kc := ?, template OCT1 algs := ?) := {
391 elementIdentifier := '0A'O,
392 lengthIndicator := ?, /* overwritten */
393 permittedAlgorithms := algs,
394 key := kc
395}
396
397
Harald Welte4bf5fc92017-12-15 13:56:06 +0100398
Harald Welte365f4ed2017-11-23 00:00:43 +0100399template (value) BSSMAP_IE_CircuitIdentityCode ts_BSSMAP_IE_CIC(uint11_t span, uint5_t ts) := {
400 elementIdentifier := '01'O, /* overwritten */
401 cicHigh := bit2oct(substr(int2bit(span, 11) << 5, 0, 8)),
402 cicLow := bit2oct((substr(int2bit(span, 11), 8, 3) << 5) & int2bit(ts, 5))
403}
404
Pau Espin Pedrol43021cb2019-06-18 17:32:15 +0200405function f_bssmap_ie_cic_2_int(BSSMAP_IE_CircuitIdentityCode cic_ie) return integer {
406 var integer cic := (oct2int(cic_ie.cicHigh) * 256) + oct2int(cic_ie.cicLow);
407 return cic;
408}
409
Harald Weltecc7e4dc2017-12-14 21:55:10 +0100410template (value) BSSMAP_IE_AoIP_TransportLayerAddress ts_BSSMAP_IE_AoIP_TLA(BSSMAP_FIELD_IPAddress addr,
Harald Welteb6e1d7e2018-01-26 21:38:59 +0100411 uint16_t udp_port,
412 integer len) := {
Harald Weltecc7e4dc2017-12-14 21:55:10 +0100413 elementIdentifier := '7C'O,
Harald Welteb6e1d7e2018-01-26 21:38:59 +0100414 lengthIndicator := len, /* overwritten */
Harald Weltecc7e4dc2017-12-14 21:55:10 +0100415 ipAddress := addr,
416 uDPPortValue := udp_port
417}
Harald Welte235ebf12017-12-15 14:18:16 +0100418template (value) BSSMAP_IE_AoIP_TransportLayerAddress ts_BSSMAP_IE_AoIP_TLA4(OCT4 ip, uint16_t pt) :=
Harald Welteb6e1d7e2018-01-26 21:38:59 +0100419 ts_BSSMAP_IE_AoIP_TLA({ipv4:=ip}, pt, 6);
Harald Welte235ebf12017-12-15 14:18:16 +0100420template (value) BSSMAP_IE_AoIP_TransportLayerAddress ts_BSSMAP_IE_AoIP_TLA6(OCT16 ip, uint16_t pt) :=
Harald Welteb6e1d7e2018-01-26 21:38:59 +0100421 ts_BSSMAP_IE_AoIP_TLA({ipv6:=ip}, pt, 18);
Harald Weltecc7e4dc2017-12-14 21:55:10 +0100422
Harald Welte4bf5fc92017-12-15 13:56:06 +0100423template (value) BSSMAP_IE_KC128 ts_BSSMAP_IE_Kc128(OCT16 kc128) := {
424 elementIdentifier := '83'O,
425 kC128_Value := kc128
426}
427
Harald Weltef1b64e22017-12-15 14:55:14 +0100428/* 3.2.2.103 */
429template (value) BSSMAP_FIELD_CodecElement ts_CodecBase := {
430 codecType := GSM_FR,
431 tF := '0'B,
432 pT := '0'B,
433 pI := '0'B,
434 fI := '1'B,
435 extendedCodecType := omit,
436 s0_7 := omit,
437 s8_15 := omit
438}
439template (value) BSSMAP_FIELD_CodecElement ts_CodecFR modifies ts_CodecBase := {
440 codecType := GSM_FR
441}
442template (value) BSSMAP_FIELD_CodecElement ts_CodecEFR modifies ts_CodecBase := {
443 codecType := GSM_EFR
444}
445template (value) BSSMAP_FIELD_CodecElement ts_CodecHR modifies ts_CodecBase := {
446 codecType := GSM_HR
447}
448template (value) BSSMAP_FIELD_CodecElement ts_CodecAMR_F modifies ts_CodecBase := {
449 codecType := FR_AMR,
450 s0_7 := '11111111'B,
451 s8_15 := '01010111'B /* S11, S13 and S15 are reserved and coded with zeroes */
452}
453template (value) BSSMAP_FIELD_CodecElement ts_CodecAMR_H modifies ts_CodecBase := {
454 codecType := HR_AMR,
455 s0_7 := '00111111'B,
456 s8_15 := '00000111'B /* S6 - S7 and S11 – S15 are reserved and coded with zeroes */
457}
458template BSSMAP_IE_SpeechCodecList ts_BSSMAP_IE_CodecList(template BSSMAP_FIELD_CodecElements elem) := {
459 elementIdentifier := '7D'O,
460 lengthIndicator := 0, /* overwritten */
461 codecElements := valueof(elem)
462}
Neels Hofmeyr82fd04b2019-02-28 08:43:00 +0100463template BSSMAP_IE_SpeechCodec ts_BSSMAP_IE_SpeechCodec(template BSSMAP_FIELD_CodecElements elem) := {
464 elementIdentifier := '7E'O,
465 lengthIndicator := 0, /* overwritten */
466 codecElements := valueof(elem)
467}
Harald Weltef1b64e22017-12-15 14:55:14 +0100468
Pau Espin Pedrol5eff9752019-05-23 15:03:54 +0200469template (value) BSSMAP_IE_Osmo_OsmuxCID ts_OsmuxCID(INT1 cid) := {
470 elementIdentifier := 'F1'O,
471 osmuxCID := cid
472}
473
Harald Weltecc7e4dc2017-12-14 21:55:10 +0100474template PDU_BSSAP
475ts_BSSMAP_AssignmentReq(template BSSMAP_IE_CircuitIdentityCode cic := omit,
Pau Espin Pedrol5eff9752019-05-23 15:03:54 +0200476 template BSSMAP_IE_AoIP_TransportLayerAddress aoip := omit,
477 template BSSMAP_IE_Osmo_OsmuxCID osmuxCID := omit)
Harald Welte365f4ed2017-11-23 00:00:43 +0100478modifies ts_BSSAP_BSSMAP := {
479 pdu := {
480 bssmap := {
481 assignmentRequest := {
482 messageType :='01'O, /* overwritten */
483 channelType := ts_BSSMAP_IE_ChannelType,
484 layer3HeaderInfo := omit,
485 priority := omit,
Harald Weltecc7e4dc2017-12-14 21:55:10 +0100486 circuitIdentityCode := cic,
Harald Welte365f4ed2017-11-23 00:00:43 +0100487 downLinkDTX_Flag := omit,
488 interferenceBandToBeUsed := omit,
489 classmarkInformationType2 := omit,
490 groupCallReference := omit,
491 talkerFlag := omit,
492 configurationEvolutionIndication := omit,
493 lsaAccesControlSuppression := omit,
494 serviceHandover := omit,
495 encryptionInformation := omit,
496 talkerPriority := omit,
Harald Weltecc7e4dc2017-12-14 21:55:10 +0100497 aoIPTransportLayer := aoip,
Harald Welte365f4ed2017-11-23 00:00:43 +0100498 codecList := omit,
499 callIdentifier := omit,
500 kC128 := omit,
501 globalCallReference := omit,
502 lCLS_Configuration := omit,
503 lCLS_ConnectionStatusControl := omit,
Pau Espin Pedrol5eff9752019-05-23 15:03:54 +0200504 lCLS_CorrelationNotNeeded := omit,
505 osmuxCID := osmuxCID
Harald Welte365f4ed2017-11-23 00:00:43 +0100506 }
507 }
508 }
509}
Harald Weltec76f29f2017-11-22 12:46:46 +0100510
Harald Weltebe48a7c2018-01-26 21:39:25 +0100511template PDU_BSSAP tr_BSSMAP_AssignmentReq(template BSSMAP_IE_CircuitIdentityCode cic := *,
Pau Espin Pedrol5eff9752019-05-23 15:03:54 +0200512 template BSSMAP_IE_AoIP_TransportLayerAddress aoip := *,
513 template BSSMAP_IE_Osmo_OsmuxCID osmuxCID := *)
Harald Weltebe48a7c2018-01-26 21:39:25 +0100514modifies tr_BSSAP_BSSMAP := {
Harald Welteb3414b22017-11-23 18:22:10 +0100515 pdu := {
516 bssmap := {
517 assignmentRequest := {
518 messageType :='01'O, /* overwritten */
519 channelType := ?,
520 layer3HeaderInfo := *,
521 priority := *,
Harald Weltebe48a7c2018-01-26 21:39:25 +0100522 circuitIdentityCode := cic,
Harald Welteb3414b22017-11-23 18:22:10 +0100523 downLinkDTX_Flag := *,
524 interferenceBandToBeUsed := *,
525 classmarkInformationType2 := *,
526 groupCallReference := *,
527 talkerFlag := *,
528 configurationEvolutionIndication := *,
529 lsaAccesControlSuppression := *,
530 serviceHandover := *,
531 encryptionInformation := *,
532 talkerPriority := *,
Harald Weltebe48a7c2018-01-26 21:39:25 +0100533 aoIPTransportLayer := aoip,
Harald Welteb3414b22017-11-23 18:22:10 +0100534 codecList := *,
535 callIdentifier := *,
536 kC128 := *,
537 globalCallReference := *,
538 lCLS_Configuration := *,
539 lCLS_ConnectionStatusControl := *,
Pau Espin Pedrol5eff9752019-05-23 15:03:54 +0200540 lCLS_CorrelationNotNeeded := *,
541 osmuxCID := osmuxCID
Harald Welteb3414b22017-11-23 18:22:10 +0100542 }
543 }
544 }
545}
546
Harald Weltecc7e4dc2017-12-14 21:55:10 +0100547template PDU_BSSAP
548ts_BSSMAP_AssignmentComplete(template BSSMAP_IE_CircuitIdentityCode cic := omit,
Neels Hofmeyr82fd04b2019-02-28 08:43:00 +0100549 template BSSMAP_IE_AoIP_TransportLayerAddress aoip := omit,
Pau Espin Pedrol5eff9752019-05-23 15:03:54 +0200550 template BSSMAP_IE_SpeechCodec speechCodec := omit,
551 template BSSMAP_IE_Osmo_OsmuxCID osmuxCID := omit)
Harald Welteb3414b22017-11-23 18:22:10 +0100552modifies ts_BSSAP_BSSMAP := {
553 pdu := {
554 bssmap := {
555 assignmentComplete := {
556 messageType :='02'O, /* overwritten */
Harald Welte7ed2b082017-11-23 18:52:13 +0100557 rR_Cause := omit,
Harald Welteb3414b22017-11-23 18:22:10 +0100558 circuitIdentityCode := cic,
559 cellIdentifier := omit,
560 chosenChannel := omit,
561 chosenEncryptionAlgorithm := omit,
562 circuitPool := omit,
563 speechVersion := omit,
564 lSAIdentifier := omit,
565 talkerPriority := omit,
Harald Weltecc7e4dc2017-12-14 21:55:10 +0100566 aoIPTransportLayer := aoip,
Neels Hofmeyr82fd04b2019-02-28 08:43:00 +0100567 speechCodec := speechCodec,
Harald Welteb3414b22017-11-23 18:22:10 +0100568 codecList := omit,
Pau Espin Pedrol5eff9752019-05-23 15:03:54 +0200569 lCLS_BSS_Status := omit,
570 osmuxCID := osmuxCID
Harald Welteb3414b22017-11-23 18:22:10 +0100571 }
572 }
573 }
574}
575
Harald Weltecc7e4dc2017-12-14 21:55:10 +0100576template PDU_BSSAP tr_BSSMAP_AssignmentComplete(template BSSMAP_IE_CircuitIdentityCode cic := *,
Pau Espin Pedrol5eff9752019-05-23 15:03:54 +0200577 template BSSMAP_IE_AoIP_TransportLayerAddress aoip := *,
578 template BSSMAP_IE_Osmo_OsmuxCID osmuxCID := *)
Harald Weltecc7e4dc2017-12-14 21:55:10 +0100579modifies tr_BSSAP_BSSMAP := {
Harald Welteb3414b22017-11-23 18:22:10 +0100580 pdu := {
581 bssmap := {
582 assignmentComplete := {
583 messageType := '02'O, /* overwritten */
Harald Welte7ed2b082017-11-23 18:52:13 +0100584 rR_Cause := *,
Harald Weltecc7e4dc2017-12-14 21:55:10 +0100585 circuitIdentityCode := cic,
Harald Welteb3414b22017-11-23 18:22:10 +0100586 cellIdentifier := *,
587 chosenChannel := *,
588 chosenEncryptionAlgorithm := *,
589 circuitPool := *,
590 speechVersion := *,
591 lSAIdentifier := *,
592 talkerPriority := *,
Harald Weltecc7e4dc2017-12-14 21:55:10 +0100593 aoIPTransportLayer := aoip,
Harald Welteb3414b22017-11-23 18:22:10 +0100594 speechCodec := *,
595 codecList := *,
Pau Espin Pedrol5eff9752019-05-23 15:03:54 +0200596 lCLS_BSS_Status := *,
597 osmuxCID := osmuxCID
Harald Welteb3414b22017-11-23 18:22:10 +0100598 }
599 }
600 }
601}
602
Harald Welte16a4adf2017-12-14 18:54:01 +0100603template PDU_BSSAP tr_BSSMAP_AssignmentFail modifies tr_BSSAP_BSSMAP := {
604 pdu := {
605 bssmap := {
606 assignmentFailure := {
607 messageType := '03'O, /* overwritten */
608 rR_Cause := *,
609 circuitPool := *,
610 circuitPoolList := *,
611 talkerPriority := *,
612 codecList := *
613 }
614 }
615 }
616}
617
618
Harald Welteb3414b22017-11-23 18:22:10 +0100619template (value) PDU_BSSAP ts_BSSMAP_ClearCommand(BssmapCause cause)
620modifies ts_BSSAP_BSSMAP := {
621 pdu := {
622 bssmap := {
623 clearCommand := {
624 messageType := '20'O, /* overwritten */
625 layer3HeaderInfo := omit,
626 cause := ts_BSSMAP_IE_Cause(cause),
627 cSFB_Indication := omit
628 }
629 }
630 }
631}
Harald Welte99787102019-02-04 10:41:36 +0100632template (value) PDU_BSSAP ts_BSSMAP_ClearCommandCSFB(BssmapCause cause)
633modifies ts_BSSMAP_ClearCommand := {
634 pdu := {
635 bssmap := {
636 clearCommand := {
637 cSFB_Indication := {
638 elementIdentifier := '8F'O
639 }
640 }
641 }
642 }
643}
Harald Welteb3414b22017-11-23 18:22:10 +0100644
645template PDU_BSSAP tr_BSSMAP_ClearCommand modifies tr_BSSAP_BSSMAP := {
646 pdu := {
647 bssmap := {
648 clearCommand := {
649 messageType := '20'O, /* overwritten */
650 layer3HeaderInfo := *,
651 cause := ?,
652 cSFB_Indication := *
653 }
654 }
655 }
656}
657
Harald Welte4c422b72019-02-17 16:27:10 +0100658template PDU_BSSAP tr_BSSMAP_ClearCommandCSFB modifies tr_BSSAP_BSSMAP := {
659 pdu := {
660 bssmap := {
661 clearCommand := {
662 messageType := '20'O, /* overwritten */
663 layer3HeaderInfo := *,
664 cause := ?,
665 cSFB_Indication := {
666 elementIdentifier := '8F'O
667 }
668 }
669 }
670 }
671}
672
Harald Welteb3414b22017-11-23 18:22:10 +0100673template (value) PDU_BSSAP ts_BSSMAP_ClearComplete
674modifies ts_BSSAP_BSSMAP := {
675 pdu := {
676 bssmap := {
677 clearComplete := {
678 messageType := '21'O /* overwritten */
679 }
680 }
681 }
682}
683
Harald Weltec859df52017-11-24 23:41:41 +0100684template PDU_BSSAP tr_BSSMAP_ClearComplete modifies tr_BSSAP_BSSMAP := {
685 pdu := {
686 bssmap := {
687 clearComplete := {
688 messageType := '21'O
689 }
690 }
691 }
692}
693
Harald Weltebc881782018-01-23 20:09:15 +0100694template (value) PDU_BSSAP ts_BSSMAP_ClearRequest(BssmapCause cause)
695modifies ts_BSSAP_BSSMAP := {
696 pdu := {
697 bssmap := {
698 clearRequest := {
699 messageType := '22'O, /* overwritten */
700 cause := ts_BSSMAP_IE_Cause(cause)
701 }
702 }
703 }
704}
705
Harald Weltecfa79ad2017-12-09 22:33:47 +0100706template PDU_BSSAP tr_BSSMAP_ClearRequest modifies tr_BSSAP_BSSMAP := {
707 pdu := {
708 bssmap := {
709 clearRequest := {
710 messageType := '22'O, /* overwritten */
711 cause := ?
712 }
713 }
714 }
715}
716
Neels Hofmeyr0ac63152019-05-07 01:20:17 +0200717template PDU_BSSAP ts_BSSMAP_HandoverRequired(BssmapCause cause,
718 template BSSMAP_FIELD_CellIdentificationList cid_list)
719modifies ts_BSSAP_BSSMAP := {
720 pdu := {
721 bssmap := {
722 handoverRequired := {
723 messageType := '11'O,
724 cause := ts_BSSMAP_IE_Cause(cause),
725 responseRequest := omit,
726 cellIdentifierList := ts_BSSMAP_IE_CidList(cid_list),
727 circuitPoolList := omit,
728 currentChannelType1 := omit,
729 speechVersion := omit,
730 queueingIndicator := omit,
731 oldToNewBSSInfo := omit,
732 sourceToTargetRNCTransparentInfo := omit,
733 sourceToTargetRNCTransparentInfoCDMA := omit,
734 gERANClassmark := omit,
735 talkerPriority := omit,
736 speechCodec := omit,
737 cSG_Identifier := omit
738 }
739 }
740 }
741}
742
743
Neels Hofmeyrbd0ef932018-03-19 14:58:46 +0100744template PDU_BSSAP tr_BSSMAP_HandoverRequired modifies tr_BSSAP_BSSMAP := {
745 pdu := {
746 bssmap := {
747 handoverRequired := {
748 messageType := '11'O
749 }
750 }
751 }
752}
753
Neels Hofmeyr0ac63152019-05-07 01:20:17 +0200754template PDU_BSSAP tr_BSSMAP_HandoverRequiredReject modifies tr_BSSAP_BSSMAP := {
755 pdu := {
756 bssmap := {
757 handoverRequiredReject := {
758 messageType := '1A'O
759 }
760 }
761 }
762}
763
764template PDU_BSSAP tr_BSSMAP_HandoverCommand
765modifies tr_BSSAP_BSSMAP := {
766 pdu := {
767 bssmap := {
768 handoverCommand := {
769 messageType := '13'O
770 }
771 }
772 }
773}
774
775template PDU_BSSAP tr_BSSMAP_HandoverSucceeded
776modifies tr_BSSAP_BSSMAP := {
777 pdu := {
778 bssmap := {
779 handoverSucceeded := {
780 messageType := '15'O
781 }
782 }
783 }
784}
785
Neels Hofmeyrbd0ef932018-03-19 14:58:46 +0100786template (value) PDU_BSSAP ts_BSSMAP_HandoverCommand(octetstring layer3info)
787modifies ts_BSSAP_BSSMAP := {
788 pdu := {
789 bssmap := {
790 handoverCommand := {
791 messageType := '13'O,
792 layer3Information := {
793 elementIdentifier := '17'O,
794 lengthIndicator := 0,
795 layer3info := layer3info
796 },
797 cellIdentifier := omit,
798 newBSSToOldBSSInfo := omit,
799 talkerPriority := omit
800 }
801 }
802 }
803}
804
Neels Hofmeyr61ebb8b2018-10-09 18:28:06 +0200805template PDU_BSSAP tr_BSSMAP_HandoverFailure modifies tr_BSSAP_BSSMAP := {
806 pdu := {
807 bssmap := {
808 handoverFailure := {
809 messageType := '16'O,
810 cause := ?,
811 rR_Cause := *,
812 circuitPool := *,
813 circuitPoolList := *,
814 gERANClassmark := *,
815 newBSSToOldBSSInfo := *,
816 interSystemInformation := *,
817 talkerPriority := *,
818 codecList := *
819 }
820 }
821 }
822}
823
Neels Hofmeyr0ac63152019-05-07 01:20:17 +0200824template PDU_BSSAP tr_BSSMAP_HandoverRequest modifies tr_BSSAP_BSSMAP := {
825 pdu := {
826 bssmap := {
827 handoverRequest := {
828 messageType := '10'O
829 }
830 }
831 }
832}
833
Neels Hofmeyrbd0ef932018-03-19 14:58:46 +0100834template PDU_BSSAP ts_BSSMAP_HandoverRequest(
835 template BSSMAP_IE_CircuitIdentityCode cic := omit,
836 template BSSMAP_IE_AoIP_TransportLayerAddress aoip_tla := omit,
837 template BSSMAP_IE_CellIdentifier cell_id_target := ts_CellID_LAC_CI(1, 0),
838 template BSSMAP_IE_CellIdentifier cell_id_source := ts_CellID_LAC_CI(1, 1)
839 )
840modifies ts_BSSAP_BSSMAP := {
841 pdu := {
842 bssmap := {
843 handoverRequest := {
844 messageType := '10'O,
845 channelType := ts_BSSMAP_IE_ChannelType,
846 encryptionInformation :=
847 ts_BSSMAP_IE_EncrInfo('0000000000000000'O,'01'O),
848 classmarkInformationType := {
849 classmarkInformationType1 := {
850 elementIdentifier := '1D'O,
851 rf_PowerCapability := '000'B,
852 a5_1 := '0'B,
853 esind := '0'B,
854 revisionLevel := '10'B,
855 spare1_1 := '0'B
856 }
857 },
858 cellIdentifierSource := cell_id_source,
859 priority := omit,
860 circuitIdentityCode := cic,
861 downLinkDTX_Flag := omit,
862 cellIdentifierTarget := cell_id_target,
863 interferenceBandToBeUsed := omit,
864 cause := omit,
865 classmarkInformationType3 := omit,
866 currentChannelType1 := omit,
867 speechVersion := omit,
868 groupCallReference := omit,
869 talkerFlag := omit,
870 configurationEvolutionIndication := omit,
871 chosenEncryptionAlgorithm := omit,
872 oldToNewBSSInfo := omit,
873 lSAInformation := omit,
874 lSAAccessControlSuppression := omit,
875 serviceHandover := omit,
876 iMSI_bssmap := omit,
877 sourceToTargetRNCTransparentInfo := omit,
878 sourceToTargetRNCTransparentInfoCDMA := omit,
879 sNAAccessInformation := omit,
880 talkerPriority := omit,
881 aoIPTransportLayer := aoip_tla,
882 codecList := omit,
883 callIdentifier := omit,
884 kC128 := omit,
885 globalCallReference := omit,
886 lCLS_Configuration := omit,
887 connectionStatusControl := omit
888 }
889 }
890 }
891}
892
893template PDU_BSSAP tr_BSSMAP_HandoverRequestAcknowledge(template octetstring layer3info)
894modifies tr_BSSAP_BSSMAP := {
895 pdu := {
896 bssmap := {
897 handoverRequestAck := {
898 messageType := '12'O,
899 layer3Information := {
900 elementIdentifier := '17'O,
901 lengthIndicator := ?,
902 layer3info := layer3info
903 }
904 }
905 }
906 }
907}
908
Neels Hofmeyr0ac63152019-05-07 01:20:17 +0200909template PDU_BSSAP ts_BSSMAP_HandoverRequestAcknowledge(
910 template octetstring layer3info,
911 template LIN1 layer3infoLength,
912 template BSSMAP_IE_AoIP_TransportLayerAddress aoIPTransportLayer := omit,
913 template BSSMAP_IE_SpeechCodec speechCodec := omit,
914 template BSSMAP_IE_ChosenChannel chosenChannel := omit,
915 template BSSMAP_IE_ChosenEncryptionAlgorithm chosenEncryptionAlgorithm := omit)
916modifies ts_BSSAP_BSSMAP := {
917 pdu := {
918 bssmap := {
919 handoverRequestAck := {
920 messageType := '12'O,
921 layer3Information := {
922 elementIdentifier := '17'O,
923 lengthIndicator := layer3infoLength,
924 layer3info := layer3info
925 },
926 chosenChannel := chosenChannel,
927 chosenEncryptionAlgorithm := chosenEncryptionAlgorithm,
928 circuitPool := omit,
929 speechVersion := omit,
930 circuitIdentityCode := omit,
931 lSAIdentifier := omit,
932 newBSSToOldBSSInfo := omit,
933 interSystemInformation := omit,
934 talkerPriority := omit,
935 aoIPTransportLayer := aoIPTransportLayer,
936 codecList := omit,
937 speechCodec := speechCodec,
938 lCLS_bSS_Status := omit
939 }
940 }
941 }
942}
943
Neels Hofmeyrbd0ef932018-03-19 14:58:46 +0100944template PDU_BSSAP tr_BSSMAP_HandoverDetect
945modifies tr_BSSAP_BSSMAP := {
946 pdu := {
947 bssmap := {
948 handoverDetect := {
949 messageType := '1B'O,
950 talkerPriority := *
951 }
952 }
953 }
954}
955
Neels Hofmeyr0ac63152019-05-07 01:20:17 +0200956template PDU_BSSAP ts_BSSMAP_HandoverDetect
957modifies ts_BSSAP_BSSMAP := {
958 pdu := {
959 bssmap := {
960 handoverDetect := {
961 messageType := '1B'O,
962 talkerPriority := omit
963 }
964 }
965 }
966}
967
Neels Hofmeyrbd0ef932018-03-19 14:58:46 +0100968template PDU_BSSAP tr_BSSMAP_HandoverComplete
969modifies tr_BSSAP_BSSMAP := {
970 pdu := {
971 bssmap := {
972 handoverComplete := {
973 messageType := '14'O,
974 rR_Cause := *,
975 talkerPriority := *,
976 speechCodec := *,
977 codecList := *,
978 chosenEncryptionAlgorithm := *,
979 chosenChannel := *,
980 lCLS_BSS_Status := *
981 }
982 }
983 }
984}
Harald Weltecfa79ad2017-12-09 22:33:47 +0100985
Neels Hofmeyr0ac63152019-05-07 01:20:17 +0200986template PDU_BSSAP ts_BSSMAP_HandoverComplete
987modifies ts_BSSAP_BSSMAP := {
988 pdu := {
989 bssmap := {
990 handoverComplete := {
991 messageType := '14'O,
992 rR_Cause := omit,
993 talkerPriority := omit,
994 speechCodec := omit,
995 codecList := omit,
996 chosenEncryptionAlgorithm := omit,
997 chosenChannel := omit,
998 lCLS_BSS_Status := omit
999 }
1000 }
1001 }
1002}
1003
Philipp Maieraee60392018-11-05 17:09:00 +01001004template PDU_BSSAP tr_BSSMAP_HandoverPerformed
1005modifies tr_BSSAP_BSSMAP := {
1006 pdu := {
1007 bssmap := {
1008 handoverPerformed := {
1009 messageType := '17'O,
1010 cause := ?,
1011 cellIdentifier := ?,
Philipp Maier8d33a132018-11-12 11:58:55 +01001012 chosenChannel := *,
1013 chosenEncryptionAlgorithm := *,
1014 speechVersion := *,
1015 lSAIdentifier := *,
1016 talkerPriority := *,
1017 codecList := *,
1018 speechCodec := *,
1019 lCLS_BSS_Status := *
Philipp Maieraee60392018-11-05 17:09:00 +01001020 }
1021 }
1022 }
1023}
1024
Harald Welte28d943e2017-11-25 15:00:50 +01001025template BSSMAP_IE_IMSI ts_BSSMAP_Imsi(hexstring imsi_digits) := {
1026 elementIdentifier := '08'O,
1027 lengthIndicator := 0, /* overwritten */
1028 typeOfIdentity := '001'B, /* IMSI */
1029 oddEvenIndicator := f_hex_is_odd_length(imsi_digits),
1030 digits := imsi_digits
1031}
1032
Harald Welte17d21152018-01-27 00:47:11 +01001033template BSSMAP_IE_IMSI tr_BSSMAP_Imsi(template hexstring imsi_digits) := {
1034 elementIdentifier := '08'O,
1035 lengthIndicator := ?, /* overwritten */
1036 typeOfIdentity := '001'B, /* IMSI */
1037 oddEvenIndicator := ?,
1038 digits := imsi_digits
1039}
1040
Harald Welte72cecfa2017-12-11 19:50:14 +01001041template BSSMAP_FIELD_CellIdentificationList ts_BSSMAP_CIL_noCell := {
1042 cIl_noCell := ''O
1043}
1044
1045private function f_enc_mcc_mnc(GsmMcc mcc, GsmMnc mnc) return OCT3 {
Harald Welte24135bd2018-03-17 19:27:53 +01001046 if (lengthof(mnc) == 2) {
1047 return hex2oct(mcc[1] & mcc[0] & 'F'H & mcc[2] & mnc[1] & mnc[0]);
Stefan Sperling83348bc2018-03-14 17:44:40 +01001048 } else {
1049 return hex2oct(mcc[1] & mcc[0] & mnc[2] & mcc[2] & mnc[1] & mnc[0]);
1050 }
Harald Welte72cecfa2017-12-11 19:50:14 +01001051}
1052
1053template BSSMAP_FIELD_CellIdentification_CGI ts_BSSMAP_CI_CGI(GsmMcc mcc, GsmMnc mnc, GsmLac lac, GsmCellId ci) := {
1054 mcc_mnc := f_enc_mcc_mnc(mcc, mnc),
1055 lac := int2oct(lac, 2),
1056 ci := int2oct(ci, 2)
1057}
1058
1059template BSSMAP_FIELD_CellIdentification_LAC_CI ts_BSSMAP_CI_LAC_CI(GsmLac lac, GsmCellId ci) := {
1060 lac := int2oct(lac, 2),
1061 ci := int2oct(ci, 2)
1062}
1063
1064template BSSMAP_FIELD_CellIdentification_LAI ts_BSSMAP_CI_LAI(GsmMcc mcc, GsmMnc mnc, GsmLac lac) := {
1065 mcc_mnc := f_enc_mcc_mnc(mcc, mnc),
1066 lac := int2oct(lac, 2)
1067}
1068
1069template OCT2 ts_BSSMAP_CI_CI(GsmCellId ci) := int2oct(ci, 2);
1070template OCT2 ts_BSSMAP_CI_LAC(GsmLac lac) := int2oct(lac, 2);
1071
Harald Welte751d3eb2018-01-31 15:51:06 +01001072template BSSMAP_FIELD_CellIdentification_PLMN_LAC_RNC
1073ts_BSSMAP_CI_PLMN_LAC_RNC(GsmMcc mcc, GsmMnc mnc, GsmLac lac, uint16_t rnc_id) := {
1074 mcc_mnc := f_enc_mcc_mnc(mcc, mnc),
1075 lac := int2oct(lac, 2),
1076 rncId := int2oct(rnc_id, 2)
1077}
1078
1079template BSSMAP_FIELD_CellIdentification_LAC_RNC ts_BSSMAP_CI_LAC_RNC(GsmLac lac, uint16_t rnc_id) := {
1080 lac := int2oct(lac, 2),
1081 rncId := int2oct(rnc_id, 2)
1082}
1083
Harald Welte72cecfa2017-12-11 19:50:14 +01001084template BSSMAP_IE_ChannelNeeded ts_BSSMAP_IE_ChanNeeded(BIT2 chneed) := {
1085 elementIdentifier := '24'O,
1086 channel := chneed,
1087 spare := '000000'B
1088}
1089
1090template BSSMAP_IE_TMSI ts_BSSMAP_IE_TMSI(OCT4 tmsi) := {
1091 elementIdentifier := '09'O,
1092 lengthIndicator := 4,
1093 tmsiOctets := tmsi
1094};
1095
Harald Welte17d21152018-01-27 00:47:11 +01001096template BSSMAP_IE_TMSI tr_BSSMAP_IE_TMSI(template OCT4 tmsi) := {
1097 elementIdentifier := '09'O,
1098 lengthIndicator := 4,
1099 tmsiOctets := tmsi
1100};
1101
Harald Welte72cecfa2017-12-11 19:50:14 +01001102private function f_tmsi_or_omit(template OCT4 tmsi) return template BSSMAP_IE_TMSI {
1103 var template BSSMAP_IE_TMSI ret;
1104 if (ispresent(tmsi)) {
1105 ret := ts_BSSMAP_IE_TMSI(valueof(tmsi));
1106 } else {
1107 ret := omit;
1108 }
1109 return ret;
1110}
1111
1112template PDU_BSSAP ts_BSSMAP_Paging(hexstring imsi_digits,
1113 template BSSMAP_FIELD_CellIdentificationList cid_list,
1114 template OCT4 tmsi := omit,
1115 template BSSMAP_IE_ChannelNeeded chneed := omit)
Harald Welte28d943e2017-11-25 15:00:50 +01001116modifies ts_BSSAP_BSSMAP := {
1117 pdu := {
1118 bssmap := {
1119 paging := {
Harald Welte17d21152018-01-27 00:47:11 +01001120 messageType := '52'O,
Harald Welte28d943e2017-11-25 15:00:50 +01001121 iMSI := ts_BSSMAP_Imsi(imsi_digits),
Harald Welte72cecfa2017-12-11 19:50:14 +01001122 tMSI := f_tmsi_or_omit(tmsi),
Neels Hofmeyr0ac63152019-05-07 01:20:17 +02001123 cellIdentifierList := ts_BSSMAP_IE_CidList(cid_list),
Harald Welte72cecfa2017-12-11 19:50:14 +01001124 channelNeeded := chneed,
Harald Welte28d943e2017-11-25 15:00:50 +01001125 eMLPP_Priority := omit,
1126 pagingInformation := omit /* only VGCS/VBS flag */
1127 }
1128 }
1129 }
1130}
1131
Harald Welte17d21152018-01-27 00:47:11 +01001132template PDU_BSSAP tr_BSSMAP_Paging(template hexstring imsi_digits := ?,
1133 template OCT4 tmsi := *,
1134 template BSSMAP_IE_ChannelNeeded chneed := *)
1135modifies tr_BSSAP_BSSMAP := {
1136 pdu := {
1137 bssmap := {
1138 paging := {
1139 messageType := '52'O,
1140 iMSI := tr_BSSMAP_Imsi(imsi_digits),
1141 tMSI := tr_BSSMAP_IE_TMSI(tmsi) ifpresent,
1142 cellIdentifierList := ?,
1143 channelNeeded := chneed,
1144 eMLPP_Priority := omit,
1145 pagingInformation := omit /* only VGCS/VBS flag */
1146 }
1147 }
1148 }
1149}
1150
1151
Harald Welte73cd2712017-12-17 00:44:52 +01001152template PDU_BSSAP ts_BSSMAP_CipherModeCmd(OCT1 alg, OCT8 key)
1153modifies ts_BSSAP_BSSMAP := {
1154 pdu := {
1155 bssmap := {
1156 cipherModeCommand := {
1157 messageType := '53'O,
1158 layer3HeaderInfo := omit,
1159 encryptionInformation := ts_BSSMAP_IE_EncrInfo(key, alg),
1160 cipherResponseMode := omit,
1161 kC128 := omit
1162 }
1163 }
1164 }
1165}
1166
1167template PDU_BSSAP ts_BSSMAP_CipherModeCmdKc128(OCT1 alg, OCT8 key, OCT16 kc128)
1168modifies ts_BSSAP_BSSMAP := {
1169 pdu := {
1170 bssmap := {
1171 cipherModeCommand := {
1172 messageType := '53'O,
1173 layer3HeaderInfo := omit,
1174 encryptionInformation := ts_BSSMAP_IE_EncrInfo(key, alg),
1175 cipherResponseMode := omit,
1176 kC128 := { '83'O, kc128 }
1177 }
1178 }
1179 }
1180}
1181
Harald Welte16114282018-01-24 22:41:21 +01001182template PDU_BSSAP tr_BSSMAP_CipherModeCmd(template OCT1 alg, template OCT8 key)
1183modifies tr_BSSAP_BSSMAP := {
1184 pdu := {
1185 bssmap := {
1186 cipherModeCommand := {
1187 messageType := '53'O,
1188 layer3HeaderInfo := *,
1189 encryptionInformation := tr_BSSMAP_IE_EncrInfo(key, alg),
1190 cipherResponseMode := *,
1191 kC128 := *
1192 }
1193 }
1194 }
1195}
1196
1197template PDU_BSSAP ts_BSSMAP_CipherModeCompl(OCT1 alg)
1198modifies ts_BSSAP_BSSMAP := {
1199 pdu := {
1200 bssmap := {
1201 cipherModeComplete := {
1202 messageType := '55'O,
1203 layer3MessageContents := omit,
1204 chosenEncryptionAlgorithm := {
1205 elementIdentifier := '2C'O,
1206 algorithmIdentifier := alg
1207 }
1208 }
1209 }
1210 }
1211}
1212
Stefan Sperlinga2d59c62018-12-18 16:32:44 +01001213template PDU_BSSAP ts_BSSMAP_CipherModeComplAlg(template BSSMAP_IE_ChosenEncryptionAlgorithm chosenEncryptionAlgorithm := ?)
1214modifies ts_BSSAP_BSSMAP := {
1215 pdu := {
1216 bssmap := {
1217 cipherModeComplete := {
1218 messageType := '55'O,
1219 layer3MessageContents := omit,
1220 chosenEncryptionAlgorithm := chosenEncryptionAlgorithm
1221 }
1222 }
1223 }
1224}
1225
Harald Welte73cd2712017-12-17 00:44:52 +01001226template PDU_BSSAP tr_BSSMAP_CipherModeCompl(template OCT1 alg := ?) modifies tr_BSSAP_BSSMAP := {
1227 pdu := {
1228 bssmap := {
1229 cipherModeComplete := {
1230 messageType := '55'O,
1231 layer3MessageContents := *,
1232 chosenEncryptionAlgorithm := {
1233 elementIdentifier := '2C'O,
1234 algorithmIdentifier := alg
1235 }
1236 }
1237 }
1238 }
1239}
1240
1241template PDU_BSSAP tr_BSSMAP_CipherModeRej modifies tr_BSSAP_BSSMAP := {
1242 pdu := {
1243 bssmap := {
1244 cipherModeReject := {
1245 messageType := '59'O,
1246 cause := ?
1247 }
1248 }
1249 }
1250}
1251
Daniel Willmann52918e52018-09-20 14:39:09 +02001252template PDU_BSSAP tr_BSSMAP_ClassmarkReq modifies tr_BSSAP_BSSMAP := {
1253 pdu := {
1254 bssmap := {
1255 classmarkRequest := {
1256 messageType := '58'O,
1257 talkerPriority := *
1258 }
1259 }
1260 }
1261}
1262
Harald Welte5c2622c2018-01-21 20:45:20 +01001263template BSSMAP_IE_ClassmarkInformationType2 ts_CM2_default := {
1264 elementIdentifier := '12'O,
1265 lengthIndicator := 0, /* overwritten */
1266 /* CM1 */
1267 rf_PowerCapability := '010'B, /* class3 */
1268 a5_1 := '0'B, /* supported */
1269 esind := '1'B, /* early classmark supported */
1270 revisionLevel := '10'B, /* R99 */
1271 spare1_1 := '0'B,
1272 /* CM2 */
1273 fc := '1'B, /* E-GSM support */
1274 vgcs := '0'B,
1275 vbs := '0'B,
1276 sm_Capability := '1'B,
1277 ss_ScreenIndicator := '00'B,
1278 ps_Capability := '1'B,
1279 spare2_1 := '0'B,
1280 classmarkInformationType2_oct5 := {
1281 a5_2 := '0'B, /* not available */
1282 a5_3 := '1'B, /* available */
1283 cmsp := '0'B, /* not supported */
1284 solsa := '0'B, /* not suported */
1285 ucs2 := '0'B, /* GSM alphabet preferred */
1286 lcsvacap := '0'B, /* not supported */
1287 spare := '0'B,
1288 cm3 := '0'B /* no CM3 */
1289 }
1290}
1291
1292template PDU_BSSAP ts_BSSMAP_ClassmarkUpd(template BSSMAP_IE_ClassmarkInformationType2 cm2 := ts_CM2_default,
1293 template BSSMAP_IE_ClassmarkInformationType3 cm3 := omit)
1294modifies ts_BSSAP_BSSMAP := {
1295 pdu := {
1296 bssmap := {
1297 classmarkUpdate := {
1298 messageType := '54'O,
1299 classmarkInformationType2 := cm2,
1300 classmarkInformationType3 := cm3,
1301 talkerPriority := omit
1302 }
1303 }
1304 }
1305}
1306
Harald Welte898113b2018-01-31 18:32:21 +01001307template PDU_BSSAP tr_BSSMAP_ClassmarkUpd(template BSSMAP_IE_ClassmarkInformationType2 cm2 := *,
1308 template BSSMAP_IE_ClassmarkInformationType3 cm3 := *)
1309modifies tr_BSSAP_BSSMAP := {
1310 pdu := {
1311 bssmap := {
1312 classmarkUpdate := {
1313 messageType := '54'O,
1314 classmarkInformationType2 := cm2,
1315 classmarkInformationType3 := cm3,
1316 talkerPriority := *
1317 }
1318 }
1319 }
1320}
1321
Neels Hofmeyr92b12b72018-09-18 14:30:23 +02001322template PDU_BSSAP ts_BSSMAP_ClassmarkRequest
1323modifies ts_BSSAP_BSSMAP := {
1324 pdu := {
1325 bssmap := {
1326 classmarkRequest := {
1327 messageType := '58'O,
1328 talkerPriority := omit
1329 }
1330 }
1331 }
1332}
1333
Harald Welte49518bf2018-02-10 11:39:19 +01001334/* return Layer3 octetstring inside BSSAP PDU */
1335function f_bssap_extract_l3(PDU_BSSAP bssap) return template octetstring {
1336 if (ischosen(bssap.pdu.bssmap)) {
1337 var PDU_BSSMAP bssmap := bssap.pdu.bssmap;
1338 if (ischosen(bssmap.completeLayer3Information)) {
1339 return bssmap.completeLayer3Information.layer3Information.layer3info;
1340 } else if (ischosen(bssmap.handoverRequestAck)) {
1341 return bssmap.handoverRequestAck.layer3Information.layer3info;
1342 } else if (ischosen(bssmap.handoverCommand)) {
1343 return bssmap.handoverCommand.layer3Information.layer3info;
1344 } else if (ischosen(bssmap.uplinkRequest)) {
1345 return bssmap.uplinkRequest.layer3Information.layer3info;
1346 } else if (ischosen(bssmap.uplinkRequestConfirmation)) {
1347 return bssmap.uplinkRequestConfirmation.layer3Information.layer3info;
1348 } else if (ischosen(bssmap.uplinkApplicationData)) {
1349 return bssmap.uplinkApplicationData.layer3Information.layer3info;
1350 } else if (ischosen(bssmap.rerouteCommand)) {
1351 return bssmap.rerouteCommand.initialLayer3Information.layer3info;
1352 } else {
1353 return omit;
1354 }
1355 } else {
1356 return bssap.pdu.dtap;
1357 }
1358}
1359
Harald Welte0b50aed2018-05-28 22:33:07 +02001360/* TS 29.205 B.2.1.9 */
1361template (value) GlobalCallReferenceValue ts_GCR(octetstring net_id, OCT2 node_id, OCT5 cref_id) := {
1362 networkIDLengthIndicator := 0, /* overwritten */
1363 networkID := net_id,
1364 nodeIDLengthIndicator := 0, /* overwritten */
1365 nodeID := node_id,
1366 callReferenceIDLengthIndicator := 0, /* overwritten */
1367 callReferenceID := cref_id
1368}
1369template GlobalCallReferenceValue tr_GCR(template octetstring net_id,
1370 template OCT2 node_id,
1371 template OCT5 cref_id) := {
1372 networkIDLengthIndicator := ?,
1373 networkID := net_id,
1374 nodeIDLengthIndicator := ?,
1375 nodeID := node_id,
1376 callReferenceIDLengthIndicator := ?,
1377 callReferenceID := cref_id
1378}
1379
1380/* TS 47.008 3.2.2.115 */
1381template (value) BSSMAP_IE_GlobalCallReference ts_BSSMAP_IE_GCR(template (value) GlobalCallReferenceValue gcr) := {
1382 elementIdentifier := '89'O,
1383 lengthIndicator := 0, /* overwritten */
1384 globalCallReferenceValue := gcr
1385}
1386template BSSMAP_IE_GlobalCallReference tr_BSSMAP_IE_GCR(template GlobalCallReferenceValue gcr) := {
1387 elementIdentifier := '89'O,
1388 lengthIndicator := ?,
1389 globalCallReferenceValue := gcr
1390}
1391
1392/* TS 48.008 3.2.2.116 */
1393const BIT4 LCLS_CFG_both_way := '0000'B;
1394const BIT4 LCLS_CFG_both_way_and_bicast_UL := '0001'B;
1395const BIT4 LCLS_CFG_both_way_and_send_DL := '0010'B;
1396const BIT4 LCLS_CFG_both_way_and_send_DL_block_local_DL := '0011'B;
1397const BIT4 LCLS_CFG_both_way_and_bicast_UL_send_DL := '0100'B;
1398const BIT4 LCLS_CFG_both_way_and_bicast_UL_send_DL_block_local_DL := '0101'B;
1399
1400template (value) BSSMAP_IE_LCLS_Configuration ts_BSSMAP_IE_LclsCfg(BIT4 cfg_val) := {
1401 elementIdentifier := '8A'O,
1402 lCLS_ConfigurationValue := cfg_val,
1403 spare := '0000'B
1404}
1405template BSSMAP_IE_LCLS_Configuration tr_BSSMAP_IE_LclsCfg(template BIT4 cfg_val) := {
1406 elementIdentifier := '8A'O,
1407 lCLS_ConfigurationValue := cfg_val,
1408 spare := '0000'B
1409}
1410
1411/* TS 48.008 3.2.2.117 */
1412const BIT4 LCLS_CSC_connect := '0000'B;
1413const BIT4 LCLS_CSC_do_not_connect := '0001'B;
1414const BIT4 LCLS_CSC_release_lcls := '0010'B;
1415const BIT4 LCLS_CSC_bicast_UL_at_handover := '0011'B;
1416const BIT4 LCLS_CSC_bicast_UL_and_recv_DL_at_handover := '0100'B;
1417
1418template (value) BSSMAP_IE_LCLS_ConnectionStatusControl ts_BSSMAP_IE_LclsCsc(BIT4 csc) := {
1419 elementIdentifier := '8B'O,
1420 lCLS_ConnectionStatusControlValue := csc,
1421 spare := '0000'B
1422}
1423template BSSMAP_IE_LCLS_ConnectionStatusControl tr_BSSMAP_IE_LclsCsc(template BIT4 csc) := {
1424 elementIdentifier := '8B'O,
1425 lCLS_ConnectionStatusControlValue := csc,
1426 spare := '0000'B
1427}
1428
1429/* TS 48.008 3.2.2.119 */
1430const BIT4 LCLS_STS_not_yet_ls := '0000'B;
1431const BIT4 LCLS_STS_not_possible_ls := '0001'B;
1432const BIT4 LCLS_STS_no_longer_ls := '0010'B;
1433const BIT4 LCLS_STS_req_lcls_not_supp := '0011'B;
1434const BIT4 LCLS_STS_locally_switched := '0100'B;
1435
1436template (value) BSSMAP_IE_LCLS_BSS_Status ts_BSSMAP_IE_LclsSts(BIT4 sts) := {
1437 elementIdentifier := '8D'O,
1438 lCLS_BSS_StatusValue := sts,
1439 spare := '0000'B
1440}
1441template BSSMAP_IE_LCLS_BSS_Status tr_BSSMAP_IE_LclsSts(template BIT4 sts) := {
1442 elementIdentifier := '8D'O,
1443 lCLS_BSS_StatusValue := sts,
1444 spare := '0000'B
1445}
1446
1447/* TS 48.008 3.2.1.91 */
1448template (value) PDU_BSSAP ts_BSSMAP_LclsConnCtrl(template (omit) BSSMAP_IE_LCLS_Configuration cfg,
Harald Welte354722e2018-06-01 13:15:32 +02001449 template (omit) BSSMAP_IE_LCLS_ConnectionStatusControl csc) modifies ts_BSSAP_BSSMAP := {
Harald Welte0b50aed2018-05-28 22:33:07 +02001450 pdu := {
1451 bssmap := {
1452 lCLS_ConnectControl := {
1453 messageType := '74'O,
1454 lCLS_Configuration := cfg,
1455 lCLS_ConnectionStatusControl := csc
1456 }
1457 }
1458 }
1459}
1460template PDU_BSSAP tr_BSSMAP_LclsConnCtrl(template BSSMAP_IE_LCLS_Configuration cfg,
Harald Welte354722e2018-06-01 13:15:32 +02001461 template BSSMAP_IE_LCLS_ConnectionStatusControl csc)
1462modifies tr_BSSAP_BSSMAP := {
Harald Welte0b50aed2018-05-28 22:33:07 +02001463 pdu := {
1464 bssmap := {
1465 lCLS_ConnectControl := {
1466 messageType := '74'O,
1467 lCLS_Configuration := cfg,
1468 lCLS_ConnectionStatusControl := csc
1469 }
1470 }
1471 }
1472}
1473
1474/* TS 48.008 3.2.1.92 */
Harald Welte354722e2018-06-01 13:15:32 +02001475template (value) PDU_BSSAP ts_BSSMAP_LclsConnCtrlAck(template (value) BSSMAP_IE_LCLS_BSS_Status sts)
1476modifies ts_BSSAP_BSSMAP := {
Harald Welte0b50aed2018-05-28 22:33:07 +02001477 pdu := {
1478 bssmap := {
1479 lCLS_connectControlAck := {
1480 messageType := '75'O,
1481 lCLS_BSS_Status := sts
1482 }
1483 }
1484 }
1485}
Harald Welte354722e2018-06-01 13:15:32 +02001486template PDU_BSSAP tr_BSSMAP_LclsConnCtrlAck(template BSSMAP_IE_LCLS_BSS_Status sts)
1487modifies tr_BSSAP_BSSMAP := {
Harald Welte0b50aed2018-05-28 22:33:07 +02001488 pdu := {
1489 bssmap := {
1490 lCLS_connectControlAck := {
1491 messageType := '75'O,
1492 lCLS_BSS_Status := sts
1493 }
1494 }
1495 }
1496}
1497
1498/* TS 48.008 3.2.1.93 */
1499template (value) PDU_BSSAP ts_BSSMAP_LclsNotification(template (omit) BSSMAP_IE_LCLS_BSS_Status sts,
Harald Welte354722e2018-06-01 13:15:32 +02001500 template (omit) BSSMAP_IE_LCLS_BreakRequest brq)
1501modifies ts_BSSAP_BSSMAP := {
Harald Welte0b50aed2018-05-28 22:33:07 +02001502 pdu := {
1503 bssmap := {
1504 lCLS_Notification := {
1505 messageType := '76'O,
1506 lCLS_BSS_Status := sts,
1507 lCLS_BreakRequest := brq
1508 }
1509 }
1510 }
1511}
1512template PDU_BSSAP tr_BSSMAP_LclsNotification(template BSSMAP_IE_LCLS_BSS_Status sts,
Harald Welte354722e2018-06-01 13:15:32 +02001513 template BSSMAP_IE_LCLS_BreakRequest brq)
1514modifies tr_BSSAP_BSSMAP := {
Harald Welte0b50aed2018-05-28 22:33:07 +02001515 pdu := {
1516 bssmap := {
1517 lCLS_Notification := {
1518 messageType := '76'O,
1519 lCLS_BSS_Status := sts,
1520 lCLS_BreakRequest := brq
1521 }
1522 }
1523 }
1524}
1525
Harald Weltecc0b0142018-05-29 15:19:33 +02001526template PDU_BSSAP tr_BSSMAP_LclsNotificationSts(BIT4 sts)
1527modifies tr_BSSAP_BSSMAP := {
1528 pdu := {
1529 bssmap := {
1530 lCLS_Notification := {
1531 messageType := '76'O,
1532 lCLS_BSS_Status := tr_BSSMAP_IE_LclsSts(sts),
1533 lCLS_BreakRequest := omit
1534 }
1535 }
1536 }
1537}
Harald Welte898113b2018-01-31 18:32:21 +01001538
1539
Harald Welte73cd2712017-12-17 00:44:52 +01001540
Harald Weltec859df52017-11-24 23:41:41 +01001541
Harald Welteb69533d2017-12-15 13:55:17 +01001542} with { encode "RAW" };