blob: ad314a3f875413c663b57565fc8acb58fda068c3 [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 *
5 * (C) 2017 by Harald Welte <laforge@gnumonks.org>
6 * All rights reserved.
7 *
8 * Released under the terms of GNU General Public License, Version 2 or
9 * (at your option) any later version.
10 */
11
Harald Weltec76f29f2017-11-22 12:46:46 +010012import from General_Types all;
13import from Osmocom_Types all;
Harald Welte72cecfa2017-12-11 19:50:14 +010014import from GSM_Types all;
Harald Weltec76f29f2017-11-22 12:46:46 +010015import from BSSAP_Types all;
16
17type integer BssmapCause;
Philipp Maier34bd80e2018-03-27 14:28:52 +020018type integer SpeechVersion;
19type integer Channel;
20type integer ChannelMode;
21type octetstring oldToNewBSSIEs;
Harald Weltec76f29f2017-11-22 12:46:46 +010022
Harald Welteb69533d2017-12-15 13:55:17 +010023/* 48.008 3.2.2.5 - this actually belongs to BSSAP_Types.ttcn */
24type enumerated myBSSMAP_Cause {
25 /* 000 / 001: Normal event */
26 GSM0808_CAUSE_RADIO_INTERFACE_MESSAGE_FAILURE ('0000000'B),
27 GSM0808_CAUSE_RADIO_INTERFACE_FAILURE ('0000001'B),
28 GSM0808_CAUSE_UPLINK_QUALITY ('0000010'B),
29 GSM0808_CAUSE_UPLINK_STRENGTH ('0000011'B),
30 GSM0808_CAUSE_DOWNLINK_QUALITY ('0000100'B),
31 GSM0808_CAUSE_DOWNLINK_STRENGTH ('0000101'B),
32 GSM0808_CAUSE_DISTANCE ('0000110'B),
33 GSM0808_CAUSE_O_AND_M_INTERVENTION ('0000111'B),
34 GSM0808_CAUSE_RESPONSE_TO_MSC_INVOCATION ('0001000'B),
35 GSM0808_CAUSE_CALL_CONTROL ('0001001'B),
36 GSM0808_CAUSE_RADIO_INTERFACE_FAILURE_REVERSION ('0001010'B),
37 GSM0808_CAUSE_HANDOVER_SUCCESSFUL ('0001011'B),
38 GSM0808_CAUSE_BETTER_CELL ('0001100'B),
39 GSM0808_CAUSE_DIRECTED_RETRY ('0001101'B),
40 GSM0808_CAUSE_JOINED_GROUP_CALL_CHANNEL ('0001110'B),
41 GSM0808_CAUSE_TRAFFIC ('0001111'B),
42 GSM0808_CAUSE_REDUCE_LOAD_IN_SERVING_CELL ('0010000'B),
43 GSM0808_CAUSE_TRAFFIC_LOAD_IN_TGT_HIGHER_THAN_IN_SRC_CELL ('0010001'B),
44 GSM0808_CAUSE_RELOCATION_TRIGGERED ('0010010'B),
45 GSM0808_CAUSE_REQUSTED_OPT_NOT_AUTHORISED ('0010100'B),
46 GSM0808_CAUSE_ALT_CHAN_CONFIG_REQUESTED ('0010101'B),
47 GSM0808_CAUSE_RESP_TO_INT_HO_ENQ_MSG ('0010110'B),
48 GSM0808_CAUSE_INT_HO_ENQUIRY_REJECT ('0010111'B),
49 GSM0808_CAUSE_REDUNDANCY_LEVEL_NOT_ADEQUATE ('0011000'B),
50 /* reserved */
51 /* 010: Resource unavailable */
52 GSM0808_CAUSE_EQUIPMENT_FAILURE ('0100000'B),
53 GSM0808_CAUSE_NO_RADIO_RESOURCE_AVAILABLE ('0100001'B),
54 GSM0808_CAUSE_RQSTED_TERRESTRIAL_RESOURCE_UNAVAILABLE ('0100010'B),
55 GSM0808_CAUSE_CCCH_OVERLOAD ('0100011'B),
56 GSM0808_CAUSE_PROCESSOR_OVERLOAD ('0100100'B),
57 GSM0808_CAUSE_BSS_NOT_EQUIPPED ('0100101'B),
58 GSM0808_CAUSE_MS_NOT_EQUIPPED ('0100110'B),
59 GSM0808_CAUSE_INVALID_CELL ('0100111'B),
60 GSM0808_CAUSE_TRAFFIC_LOAD ('0101000'B),
61 GSM0808_CAUSE_PREEMPTION ('0101001'B),
62 GSM0808_CAUSE_DTM_HO_SGSN_FAILURE ('0101010'B),
63 GSM0808_CAUSE_DTM_HO_PS_ALLOC_FAILURE ('0101011'B),
64 /* reserved */
65 /* 011: Service or option not available, but implemented */
66 GSM0808_CAUSE_RQSTED_TRANSCODING_RATE_ADAPTION_UNAVAILABLE ('0110000'B),
67 GSM0808_CAUSE_CIRCUIT_POOL_MISMATCH ('0110001'B),
68 GSM0808_CAUSE_SWITCH_CIRCUIT_POOL ('0110010'B),
69 GSM0808_CAUSE_RQSTED_SPEECH_VERSION_UNAVAILABLE ('0110011'B),
70 GSM0808_CAUSE_LSA_NOT_ALLOWED ('0110100'B),
71 GSM0808_CAUSE_REQ_CODEC_TYPE_OR_CONFIG_UNAVAIL ('0110101'B),
72 GSM0808_CAUSE_REQ_A_IF_TYPE_UNAVAIL ('0110110'B),
73 GSM0808_CAUSE_INVALID_CSG_CELL ('0110111'B),
74 /* reserved */
75 /* 100: Service or option not implemented or currently disabled */
76 GSM0808_CAUSE_REQ_REDUND_LEVEL_NOT_AVAIL ('0111111'B),
77 GSM0808_CAUSE_CIPHERING_ALGORITHM_NOT_SUPPORTED ('1000000'B),
78 GSM0808_CAUSE_GERAN_IU_MODE_FAILURE ('1000001'B),
79 GSM0808_CAUSE_INC_RELOC_NOT_SUPP_DT_PUESBINE_FEATURE ('1000010'B),
80 GSM0808_CAUSE_ACCESS_RESTRICTED_DUE_TO_SHARED_NETWORKS ('1000011'B),
81 GSM0808_CAUSE_REQ_CODEC_TYPE_OR_CONFIG_NOT_SUPP ('1000100'B),
82 GSM0808_CAUSE_REQ_A_IF_TYPE_NOT_SUPP ('1000101'B),
83 GSM0808_CAUSE_REQ_REDUND_LVL_NOT_SUPP ('1000110'B),
84 /* reserved */
85 /* 101: Invalid message */
86 GSM0808_CAUSE_TERRESTRIAL_CIRCUIT_ALREADY_ALLOCATED ('1010000'B),
87 GSM0808_CAUSE_INVALID_MESSAGE_CONTENTS ('1010001'B),
88 GSM0808_CAUSE_INFORMATION_ELEMENT_OR_FIELD_MISSING ('1010010'B),
89 GSM0808_CAUSE_INCORRECT_VALUE ('1010011'B),
90 GSM0808_CAUSE_UNKNOWN_MESSAGE_TYPE ('1010100'B),
91 GSM0808_CAUSE_UNKNOWN_INFORMATION_ELEMENT ('1010101'B),
92 GSM0808_CAUSE_DTM_HO_INVALID_PS_IND ('1010110'B),
93 GSM0808_CAUSE_CALL_ID_ALREADY_ALLOC ('1010111'B),
94 /* reserved */
95 /* 110: protocol error */
96 GSM0808_CAUSE_PROTOCOL_ERROR_BETWEEN_BSS_AND_MSC ('1100000'B),
97 GSM0808_CAUSE_VGCS_VBS_CALL_NON_EXISTANT ('1100001'B),
98 GSM0808_CAUSE_DTM_HO_TIMER_EXPIRY ('1100010'B)
99} with { variant "FIELDLENGTH(7)" };
100
Harald Weltec76f29f2017-11-22 12:46:46 +0100101template PDU_BSSAP ts_BSSAP_BSSMAP := {
102 discriminator := '0'B,
103 spare := '0000000'B,
104 dlci := omit,
105 lengthIndicator := 0, /* overwritten by codec */
Harald Welteb3414b22017-11-23 18:22:10 +0100106 pdu := {
107 bssmap := ?
108 }
Harald Weltec76f29f2017-11-22 12:46:46 +0100109}
110
111template PDU_BSSAP tr_BSSAP_BSSMAP := {
112 discriminator := '0'B,
113 spare := '0000000'B,
Harald Welte049ca642018-01-21 13:54:34 +0100114 dlci := *,
Harald Weltec76f29f2017-11-22 12:46:46 +0100115 lengthIndicator := ?,
116 pdu := {
117 bssmap := ?
118 }
119}
120
Harald Welte0a6835c2018-01-21 13:56:01 +0100121template PDU_BSSAP ts_BSSAP_DTAP(octetstring dtap, template OCT1 dlci := omit) := {
Harald Welteb3414b22017-11-23 18:22:10 +0100122 discriminator := '1'B,
123 spare := '0000000'B,
Harald Welte0a6835c2018-01-21 13:56:01 +0100124 dlci := dlci,
Harald Welteb3414b22017-11-23 18:22:10 +0100125 lengthIndicator := 0, /* overwritten by codec */
126 pdu := {
Harald Welte0a6835c2018-01-21 13:56:01 +0100127 dtap := dtap
Harald Welteb3414b22017-11-23 18:22:10 +0100128 }
129}
130
131template PDU_BSSAP tr_BSSAP_DTAP := {
132 discriminator := '1'B,
133 spare := '0000000'B,
Harald Welte049ca642018-01-21 13:54:34 +0100134 dlci := *,
Harald Welteb3414b22017-11-23 18:22:10 +0100135 lengthIndicator := ?,
136 pdu := {
137 dtap := ?
138 }
139}
140
Harald Weltec76f29f2017-11-22 12:46:46 +0100141template (value) BSSMAP_IE_Cause ts_BSSMAP_IE_Cause(BssmapCause val) := {
142 elementIdentifier := '04'O,
143 lengthIndicator := 0,
144 causeValue := int2bit(val, 7),
145 extensionCauseValue := '0'B,
146 spare1 := omit
147}
148
Philipp Maier34bd80e2018-03-27 14:28:52 +0200149template (value) BSSMAP_IE_SpeechVersion ts_BSSMAP_IE_SpeechVersion(SpeechVersion val) := {
150 elementIdentifier := '40'O,
151 speechVersionIdentifier := int2bit(val, 7),
152 spare1_1 := '0'B
153}
154
155template (value) BSSMAP_IE_CurrentChannelType1 ts_BSSMAP_IE_CurrentChannelType1(Channel c, ChannelMode cm) := {
156 elementIdentifier := '31'O,
157 channel := int2bit(c, 4),
158 channelMode := int2bit(cm, 4)
159}
160
161template (value) BSSMAP_IE_OldToNewBSSInfo ts_BSSMAP_IE_OldToNewBSSInfo(oldToNewBSSIEs val) := {
162 elementIdentifier := '3A'O,
163 lengthIndicator := 0, /* overwritten by codec */
164 oldToNewBSSIEs := val
165}
166
Pau Espin Pedrol5eff9752019-05-23 15:03:54 +0200167template BSSMAP_IE_Osmo_OsmuxSupport tr_BSSMAP_IE_Osmo_OsmuxSupport := {
168 elementIdentifier := 'F0'O
169}
170
171private function f_enc_osmux_support(boolean osmux_enabled) return template BSSMAP_IE_Osmo_OsmuxSupport {
172 if (osmux_enabled) {
173 return tr_BSSMAP_IE_Osmo_OsmuxSupport;
174 }
175 return omit;
176}
177
178template (value) PDU_BSSAP ts_BSSMAP_Reset(BssmapCause cause, boolean osmux_enabled := false) modifies ts_BSSAP_BSSMAP := {
Harald Weltec76f29f2017-11-22 12:46:46 +0100179 pdu := {
180 bssmap := {
181 reset := {
182 messageType := '30'O,
183 cause := ts_BSSMAP_IE_Cause(cause),
Pau Espin Pedrol5eff9752019-05-23 15:03:54 +0200184 a_InterfaceSelectorForReset := omit,
185 osmuxSupport := f_enc_osmux_support(osmux_enabled)
Harald Weltec76f29f2017-11-22 12:46:46 +0100186 }
187 }
188 }
189}
190
Pau Espin Pedrol5eff9752019-05-23 15:03:54 +0200191template PDU_BSSAP tr_BSSMAP_Reset(boolean osmux_enabled := false) modifies tr_BSSAP_BSSMAP := {
Harald Welte365f4ed2017-11-23 00:00:43 +0100192 pdu := {
193 bssmap := {
194 reset := {
195 messageType := '30'O,
196 cause := ?,
Pau Espin Pedrol5eff9752019-05-23 15:03:54 +0200197 a_InterfaceSelectorForReset := *,
198 osmuxSupport := f_enc_osmux_support(osmux_enabled)
Harald Welte365f4ed2017-11-23 00:00:43 +0100199 }
200 }
201 }
202}
203
Pau Espin Pedrol5eff9752019-05-23 15:03:54 +0200204template (value) PDU_BSSAP ts_BSSMAP_ResetAck(boolean osmux_enabled := false) modifies ts_BSSAP_BSSMAP := {
Harald Weltec76f29f2017-11-22 12:46:46 +0100205 pdu := {
206 bssmap := {
207 resetAck := {
208 messageType := '31'O,
Pau Espin Pedrol5eff9752019-05-23 15:03:54 +0200209 a_InterfaceSelectorForReset := omit,
210 osmuxSupport := f_enc_osmux_support(osmux_enabled)
Harald Weltec76f29f2017-11-22 12:46:46 +0100211 }
212 }
213 }
214}
215
Pau Espin Pedrol5eff9752019-05-23 15:03:54 +0200216template PDU_BSSAP tr_BSSMAP_ResetAck(boolean osmux_enabled := false) modifies tr_BSSAP_BSSMAP := {
Harald Weltec76f29f2017-11-22 12:46:46 +0100217 pdu := {
218 bssmap := {
219 resetAck := {
220 messageType := '31'O,
Pau Espin Pedrol5eff9752019-05-23 15:03:54 +0200221 a_InterfaceSelectorForReset := *,
222 osmuxSupport := f_enc_osmux_support(osmux_enabled)
Harald Weltec76f29f2017-11-22 12:46:46 +0100223 }
224 }
225 }
226}
227
228template BSSMAP_IE_CellIdentifier ts_BSSMAP_IE_CellID := {
229 elementIdentifier := '05'O,
230 lengthIndicator := 0,
231 cellIdentifierDiscriminator := '0000'B,
232 spare1_4 := '0000'B,
233 cellIdentification := ?
234}
235
236type uint16_t BssmapLAC;
237type uint16_t BssmapCI;
238
Harald Welteae8ce232018-01-21 13:56:46 +0100239template BSSMAP_IE_CellIdentifier ts_CellId_CGI(hexstring mcc, hexstring mnc, BssmapLAC lac, BssmapCI ci)
Harald Weltec76f29f2017-11-22 12:46:46 +0100240modifies ts_BSSMAP_IE_CellID := {
241 cellIdentification := {
Harald Welteae8ce232018-01-21 13:56:46 +0100242 cI_CGI := ts_BSSMAP_CI_CGI(mcc, mnc, lac, ci)
Harald Weltec76f29f2017-11-22 12:46:46 +0100243 }
244}
Harald Weltec76f29f2017-11-22 12:46:46 +0100245
246template BSSMAP_IE_CellIdentifier ts_CellID_LAC_CI(BssmapLAC lac, BssmapCI ci)
247modifies ts_BSSMAP_IE_CellID := {
248 cellIdentification := {
249 cI_LAC_CI := {
250 lac := int2oct(lac, 2),
251 ci := int2oct(ci, 2)
252 }
253 }
254}
255
256template BSSMAP_IE_CellIdentifier ts_CellId_CI(BssmapCI ci)
257modifies ts_BSSMAP_IE_CellID := {
258 cellIdentification := {
259 cI_CI := int2oct(ci, 2)
260 }
261}
262
263template BSSMAP_IE_CellIdentifier ts_CellId_none
264modifies ts_BSSMAP_IE_CellID := {
265 cellIdentification := {
266 cI_noCell := ''O
267 }
268}
269
270
271template BSSMAP_IE_Layer3Information ts_BSSMAP_IE_L3Info(octetstring l3info) := {
272 elementIdentifier := '17'O,
273 lengthIndicator := 0,
274 layer3info := l3info
275}
276
Harald Weltef8a0bda2017-12-09 00:53:17 +0100277template BSSMAP_IE_Layer3Information tr_BSSMAP_IE_L3Info(template octetstring l3info) := {
278 elementIdentifier := '17'O,
279 lengthIndicator := ?,
280 layer3info := l3info
281}
282
283
Harald Weltec76f29f2017-11-22 12:46:46 +0100284template PDU_BSSAP ts_BSSMAP_ComplL3(BSSMAP_IE_CellIdentifier cell_id, octetstring l3_info)
285modifies ts_BSSAP_BSSMAP := {
286 pdu := {
287 bssmap := {
288 completeLayer3Information := {
289 messageType := '57'O,
290 cellIdentifier := cell_id,
291 layer3Information := ts_BSSMAP_IE_L3Info(l3_info),
292 chosenChannel := omit,
293 lSAIdentifier := omit,
294 aPDU := omit,
295 codecList := omit,
296 redirectAttemptFlag := omit,
297 sendSequenceNumber := omit,
298 iMSI := omit
299 }
300 }
301 }
302}
303
Harald Weltef8a0bda2017-12-09 00:53:17 +0100304template PDU_BSSAP tr_BSSMAP_ComplL3(template octetstring l3_info := ?,
305 template BSSMAP_IE_CellIdentifier cell_id := ?)
306modifies tr_BSSAP_BSSMAP := {
Harald Welte365f4ed2017-11-23 00:00:43 +0100307 pdu := {
308 bssmap := {
Harald Weltef8a0bda2017-12-09 00:53:17 +0100309 completeLayer3Information := {
310 messageType := '57'O,
311 cellIdentifier := cell_id,
312 layer3Information := tr_BSSMAP_IE_L3Info(l3_info),
313 chosenChannel := *,
314 lSAIdentifier := *,
315 aPDU := *,
316 codecList := *,
317 redirectAttemptFlag := *,
318 sendSequenceNumber := *,
319 iMSI := *
320 }
Harald Welte365f4ed2017-11-23 00:00:43 +0100321 }
322 }
323}
324
Neels Hofmeyr0ac63152019-05-07 01:20:17 +0200325template BSSMAP_IE_CellIdentifierList ts_BSSMAP_IE_CidList(template BSSMAP_FIELD_CellIdentificationList cid_list) := {
Harald Welte28d943e2017-11-25 15:00:50 +0100326 elementIdentifier := '1A'O,
327 lengthIndicator := 0, /* overwritten */
328 cellIdentifierDiscriminator := '0000'B, /* overwritten */
329 spare1_4 := '0000'B,
330 cellIdentificationList := cid_list
331}
Harald Welte365f4ed2017-11-23 00:00:43 +0100332
Harald Welte4bf5fc92017-12-15 13:56:06 +0100333const OCT1 ChRate_ANY := '00'O;
Harald Welte365f4ed2017-11-23 00:00:43 +0100334const OCT1 ChRate_TCHF := '08'O;
335const OCT1 ChRate_TCHH := '09'O;
Harald Welte4bf5fc92017-12-15 13:56:06 +0100336const OCT1 ChRate_TCHForH_Fpref := '0A'O;
337const OCT1 ChRate_TCHForH_Hpref := '0B'O;
338const OCT1 ChRate_TCHForH_Fpref_nochg := '1A'O;
339const OCT1 ChRate_TCHForH_Hpref_nochg := '1B'O;
340const OCT1 ChRate_TCHForH := '0F'O;
341const OCT1 ChRate_TCHForH_nochg := '1F'O;
Harald Welte365f4ed2017-11-23 00:00:43 +0100342
Harald Weltedbd6b3f2018-03-21 18:45:02 +0100343const OCT1 Spdi_TCHF_FR := '01'O;
344const OCT1 Spdi_TCHF_EFR := '11'O;
345const OCT1 Spdi_TCHF_AMR := '21'O;
346const OCT1 Spdi_TCHH_HR := '05'O;
347const OCT1 Spdi_TCHH_AMR := '25'O;
348
Harald Welte365f4ed2017-11-23 00:00:43 +0100349template (value) BSSMAP_IE_ChannelType ts_BSSMAP_IE_ChannelType := {
350 elementIdentifier := '0B'O, /* overwritten */
351 lengthIndicator := 0, /* overwritten */
352 speechOrDataIndicator := '0001'B, /* speech */
353 spare1_4 := '0000'B,
354 channelRateAndType := ChRate_TCHF,
Harald Weltedbd6b3f2018-03-21 18:45:02 +0100355 speechId_DataIndicator := Spdi_TCHF_FR
Harald Welte365f4ed2017-11-23 00:00:43 +0100356}
357
Harald Welte4bf5fc92017-12-15 13:56:06 +0100358template (value) BSSMAP_IE_ChannelType ts_BSSMAP_IE_ChannelTypeCTM modifies ts_BSSMAP_IE_ChannelType := {
359 speechOrDataIndicator := '0100'B /* speech + CTM */
360}
361
362template (value) BSSMAP_IE_ChannelType ts_BSSMAP_IE_ChannelTypeCSD := {
363 elementIdentifier := '0B'O, /* overwritten */
364 lengthIndicator := 0, /* overwritten */
365 speechOrDataIndicator := '0010'B, /* data */
366 spare1_4 := '0000'B,
367 channelRateAndType := ChRate_TCHF,
368 speechId_DataIndicator := '10'O /* 9600 bps / transparent */
369}
370
371template (value) BSSMAP_IE_ChannelType ts_BSSMAP_IE_ChannelTypeSIGNAL := {
372 elementIdentifier := '0B'O, /* overwritten */
373 lengthIndicator := 0, /* overwritten */
374 speechOrDataIndicator := '0011'B, /* data */
375 spare1_4 := '0000'B,
376 channelRateAndType := ChRate_ANY,
377 speechId_DataIndicator := '00'O /* spare */
378}
379
380template (value) BSSMAP_IE_EncryptionInformation ts_BSSMAP_IE_EncrInfo(OCT8 kc, OCT1 algs := '05'O) := {
381 elementIdentifier := '0A'O,
382 lengthIndicator := 0, /* overwritten */
383 permittedAlgorithms := algs,
384 key := kc
385}
386
Harald Welte16114282018-01-24 22:41:21 +0100387template BSSMAP_IE_EncryptionInformation tr_BSSMAP_IE_EncrInfo(template OCT8 kc := ?, template OCT1 algs := ?) := {
388 elementIdentifier := '0A'O,
389 lengthIndicator := ?, /* overwritten */
390 permittedAlgorithms := algs,
391 key := kc
392}
393
394
Harald Welte4bf5fc92017-12-15 13:56:06 +0100395
Harald Welte365f4ed2017-11-23 00:00:43 +0100396template (value) BSSMAP_IE_CircuitIdentityCode ts_BSSMAP_IE_CIC(uint11_t span, uint5_t ts) := {
397 elementIdentifier := '01'O, /* overwritten */
398 cicHigh := bit2oct(substr(int2bit(span, 11) << 5, 0, 8)),
399 cicLow := bit2oct((substr(int2bit(span, 11), 8, 3) << 5) & int2bit(ts, 5))
400}
401
Harald Weltecc7e4dc2017-12-14 21:55:10 +0100402template (value) BSSMAP_IE_AoIP_TransportLayerAddress ts_BSSMAP_IE_AoIP_TLA(BSSMAP_FIELD_IPAddress addr,
Harald Welteb6e1d7e2018-01-26 21:38:59 +0100403 uint16_t udp_port,
404 integer len) := {
Harald Weltecc7e4dc2017-12-14 21:55:10 +0100405 elementIdentifier := '7C'O,
Harald Welteb6e1d7e2018-01-26 21:38:59 +0100406 lengthIndicator := len, /* overwritten */
Harald Weltecc7e4dc2017-12-14 21:55:10 +0100407 ipAddress := addr,
408 uDPPortValue := udp_port
409}
Harald Welte235ebf12017-12-15 14:18:16 +0100410template (value) BSSMAP_IE_AoIP_TransportLayerAddress ts_BSSMAP_IE_AoIP_TLA4(OCT4 ip, uint16_t pt) :=
Harald Welteb6e1d7e2018-01-26 21:38:59 +0100411 ts_BSSMAP_IE_AoIP_TLA({ipv4:=ip}, pt, 6);
Harald Welte235ebf12017-12-15 14:18:16 +0100412template (value) BSSMAP_IE_AoIP_TransportLayerAddress ts_BSSMAP_IE_AoIP_TLA6(OCT16 ip, uint16_t pt) :=
Harald Welteb6e1d7e2018-01-26 21:38:59 +0100413 ts_BSSMAP_IE_AoIP_TLA({ipv6:=ip}, pt, 18);
Harald Weltecc7e4dc2017-12-14 21:55:10 +0100414
Harald Welte4bf5fc92017-12-15 13:56:06 +0100415template (value) BSSMAP_IE_KC128 ts_BSSMAP_IE_Kc128(OCT16 kc128) := {
416 elementIdentifier := '83'O,
417 kC128_Value := kc128
418}
419
Harald Weltef1b64e22017-12-15 14:55:14 +0100420/* 3.2.2.103 */
421template (value) BSSMAP_FIELD_CodecElement ts_CodecBase := {
422 codecType := GSM_FR,
423 tF := '0'B,
424 pT := '0'B,
425 pI := '0'B,
426 fI := '1'B,
427 extendedCodecType := omit,
428 s0_7 := omit,
429 s8_15 := omit
430}
431template (value) BSSMAP_FIELD_CodecElement ts_CodecFR modifies ts_CodecBase := {
432 codecType := GSM_FR
433}
434template (value) BSSMAP_FIELD_CodecElement ts_CodecEFR modifies ts_CodecBase := {
435 codecType := GSM_EFR
436}
437template (value) BSSMAP_FIELD_CodecElement ts_CodecHR modifies ts_CodecBase := {
438 codecType := GSM_HR
439}
440template (value) BSSMAP_FIELD_CodecElement ts_CodecAMR_F modifies ts_CodecBase := {
441 codecType := FR_AMR,
442 s0_7 := '11111111'B,
443 s8_15 := '01010111'B /* S11, S13 and S15 are reserved and coded with zeroes */
444}
445template (value) BSSMAP_FIELD_CodecElement ts_CodecAMR_H modifies ts_CodecBase := {
446 codecType := HR_AMR,
447 s0_7 := '00111111'B,
448 s8_15 := '00000111'B /* S6 - S7 and S11 – S15 are reserved and coded with zeroes */
449}
450template BSSMAP_IE_SpeechCodecList ts_BSSMAP_IE_CodecList(template BSSMAP_FIELD_CodecElements elem) := {
451 elementIdentifier := '7D'O,
452 lengthIndicator := 0, /* overwritten */
453 codecElements := valueof(elem)
454}
Neels Hofmeyr82fd04b2019-02-28 08:43:00 +0100455template BSSMAP_IE_SpeechCodec ts_BSSMAP_IE_SpeechCodec(template BSSMAP_FIELD_CodecElements elem) := {
456 elementIdentifier := '7E'O,
457 lengthIndicator := 0, /* overwritten */
458 codecElements := valueof(elem)
459}
Harald Weltef1b64e22017-12-15 14:55:14 +0100460
Pau Espin Pedrol5eff9752019-05-23 15:03:54 +0200461template (value) BSSMAP_IE_Osmo_OsmuxCID ts_OsmuxCID(INT1 cid) := {
462 elementIdentifier := 'F1'O,
463 osmuxCID := cid
464}
465
Harald Weltecc7e4dc2017-12-14 21:55:10 +0100466template PDU_BSSAP
467ts_BSSMAP_AssignmentReq(template BSSMAP_IE_CircuitIdentityCode cic := omit,
Pau Espin Pedrol5eff9752019-05-23 15:03:54 +0200468 template BSSMAP_IE_AoIP_TransportLayerAddress aoip := omit,
469 template BSSMAP_IE_Osmo_OsmuxCID osmuxCID := omit)
Harald Welte365f4ed2017-11-23 00:00:43 +0100470modifies ts_BSSAP_BSSMAP := {
471 pdu := {
472 bssmap := {
473 assignmentRequest := {
474 messageType :='01'O, /* overwritten */
475 channelType := ts_BSSMAP_IE_ChannelType,
476 layer3HeaderInfo := omit,
477 priority := omit,
Harald Weltecc7e4dc2017-12-14 21:55:10 +0100478 circuitIdentityCode := cic,
Harald Welte365f4ed2017-11-23 00:00:43 +0100479 downLinkDTX_Flag := omit,
480 interferenceBandToBeUsed := omit,
481 classmarkInformationType2 := omit,
482 groupCallReference := omit,
483 talkerFlag := omit,
484 configurationEvolutionIndication := omit,
485 lsaAccesControlSuppression := omit,
486 serviceHandover := omit,
487 encryptionInformation := omit,
488 talkerPriority := omit,
Harald Weltecc7e4dc2017-12-14 21:55:10 +0100489 aoIPTransportLayer := aoip,
Harald Welte365f4ed2017-11-23 00:00:43 +0100490 codecList := omit,
491 callIdentifier := omit,
492 kC128 := omit,
493 globalCallReference := omit,
494 lCLS_Configuration := omit,
495 lCLS_ConnectionStatusControl := omit,
Pau Espin Pedrol5eff9752019-05-23 15:03:54 +0200496 lCLS_CorrelationNotNeeded := omit,
497 osmuxCID := osmuxCID
Harald Welte365f4ed2017-11-23 00:00:43 +0100498 }
499 }
500 }
501}
Harald Weltec76f29f2017-11-22 12:46:46 +0100502
Harald Weltebe48a7c2018-01-26 21:39:25 +0100503template PDU_BSSAP tr_BSSMAP_AssignmentReq(template BSSMAP_IE_CircuitIdentityCode cic := *,
Pau Espin Pedrol5eff9752019-05-23 15:03:54 +0200504 template BSSMAP_IE_AoIP_TransportLayerAddress aoip := *,
505 template BSSMAP_IE_Osmo_OsmuxCID osmuxCID := *)
Harald Weltebe48a7c2018-01-26 21:39:25 +0100506modifies tr_BSSAP_BSSMAP := {
Harald Welteb3414b22017-11-23 18:22:10 +0100507 pdu := {
508 bssmap := {
509 assignmentRequest := {
510 messageType :='01'O, /* overwritten */
511 channelType := ?,
512 layer3HeaderInfo := *,
513 priority := *,
Harald Weltebe48a7c2018-01-26 21:39:25 +0100514 circuitIdentityCode := cic,
Harald Welteb3414b22017-11-23 18:22:10 +0100515 downLinkDTX_Flag := *,
516 interferenceBandToBeUsed := *,
517 classmarkInformationType2 := *,
518 groupCallReference := *,
519 talkerFlag := *,
520 configurationEvolutionIndication := *,
521 lsaAccesControlSuppression := *,
522 serviceHandover := *,
523 encryptionInformation := *,
524 talkerPriority := *,
Harald Weltebe48a7c2018-01-26 21:39:25 +0100525 aoIPTransportLayer := aoip,
Harald Welteb3414b22017-11-23 18:22:10 +0100526 codecList := *,
527 callIdentifier := *,
528 kC128 := *,
529 globalCallReference := *,
530 lCLS_Configuration := *,
531 lCLS_ConnectionStatusControl := *,
Pau Espin Pedrol5eff9752019-05-23 15:03:54 +0200532 lCLS_CorrelationNotNeeded := *,
533 osmuxCID := osmuxCID
Harald Welteb3414b22017-11-23 18:22:10 +0100534 }
535 }
536 }
537}
538
Harald Weltecc7e4dc2017-12-14 21:55:10 +0100539template PDU_BSSAP
540ts_BSSMAP_AssignmentComplete(template BSSMAP_IE_CircuitIdentityCode cic := omit,
Neels Hofmeyr82fd04b2019-02-28 08:43:00 +0100541 template BSSMAP_IE_AoIP_TransportLayerAddress aoip := omit,
Pau Espin Pedrol5eff9752019-05-23 15:03:54 +0200542 template BSSMAP_IE_SpeechCodec speechCodec := omit,
543 template BSSMAP_IE_Osmo_OsmuxCID osmuxCID := omit)
Harald Welteb3414b22017-11-23 18:22:10 +0100544modifies ts_BSSAP_BSSMAP := {
545 pdu := {
546 bssmap := {
547 assignmentComplete := {
548 messageType :='02'O, /* overwritten */
Harald Welte7ed2b082017-11-23 18:52:13 +0100549 rR_Cause := omit,
Harald Welteb3414b22017-11-23 18:22:10 +0100550 circuitIdentityCode := cic,
551 cellIdentifier := omit,
552 chosenChannel := omit,
553 chosenEncryptionAlgorithm := omit,
554 circuitPool := omit,
555 speechVersion := omit,
556 lSAIdentifier := omit,
557 talkerPriority := omit,
Harald Weltecc7e4dc2017-12-14 21:55:10 +0100558 aoIPTransportLayer := aoip,
Neels Hofmeyr82fd04b2019-02-28 08:43:00 +0100559 speechCodec := speechCodec,
Harald Welteb3414b22017-11-23 18:22:10 +0100560 codecList := omit,
Pau Espin Pedrol5eff9752019-05-23 15:03:54 +0200561 lCLS_BSS_Status := omit,
562 osmuxCID := osmuxCID
Harald Welteb3414b22017-11-23 18:22:10 +0100563 }
564 }
565 }
566}
567
Harald Weltecc7e4dc2017-12-14 21:55:10 +0100568template PDU_BSSAP tr_BSSMAP_AssignmentComplete(template BSSMAP_IE_CircuitIdentityCode cic := *,
Pau Espin Pedrol5eff9752019-05-23 15:03:54 +0200569 template BSSMAP_IE_AoIP_TransportLayerAddress aoip := *,
570 template BSSMAP_IE_Osmo_OsmuxCID osmuxCID := *)
Harald Weltecc7e4dc2017-12-14 21:55:10 +0100571modifies tr_BSSAP_BSSMAP := {
Harald Welteb3414b22017-11-23 18:22:10 +0100572 pdu := {
573 bssmap := {
574 assignmentComplete := {
575 messageType := '02'O, /* overwritten */
Harald Welte7ed2b082017-11-23 18:52:13 +0100576 rR_Cause := *,
Harald Weltecc7e4dc2017-12-14 21:55:10 +0100577 circuitIdentityCode := cic,
Harald Welteb3414b22017-11-23 18:22:10 +0100578 cellIdentifier := *,
579 chosenChannel := *,
580 chosenEncryptionAlgorithm := *,
581 circuitPool := *,
582 speechVersion := *,
583 lSAIdentifier := *,
584 talkerPriority := *,
Harald Weltecc7e4dc2017-12-14 21:55:10 +0100585 aoIPTransportLayer := aoip,
Harald Welteb3414b22017-11-23 18:22:10 +0100586 speechCodec := *,
587 codecList := *,
Pau Espin Pedrol5eff9752019-05-23 15:03:54 +0200588 lCLS_BSS_Status := *,
589 osmuxCID := osmuxCID
Harald Welteb3414b22017-11-23 18:22:10 +0100590 }
591 }
592 }
593}
594
Harald Welte16a4adf2017-12-14 18:54:01 +0100595template PDU_BSSAP tr_BSSMAP_AssignmentFail modifies tr_BSSAP_BSSMAP := {
596 pdu := {
597 bssmap := {
598 assignmentFailure := {
599 messageType := '03'O, /* overwritten */
600 rR_Cause := *,
601 circuitPool := *,
602 circuitPoolList := *,
603 talkerPriority := *,
604 codecList := *
605 }
606 }
607 }
608}
609
610
Harald Welteb3414b22017-11-23 18:22:10 +0100611template (value) PDU_BSSAP ts_BSSMAP_ClearCommand(BssmapCause cause)
612modifies ts_BSSAP_BSSMAP := {
613 pdu := {
614 bssmap := {
615 clearCommand := {
616 messageType := '20'O, /* overwritten */
617 layer3HeaderInfo := omit,
618 cause := ts_BSSMAP_IE_Cause(cause),
619 cSFB_Indication := omit
620 }
621 }
622 }
623}
Harald Welte99787102019-02-04 10:41:36 +0100624template (value) PDU_BSSAP ts_BSSMAP_ClearCommandCSFB(BssmapCause cause)
625modifies ts_BSSMAP_ClearCommand := {
626 pdu := {
627 bssmap := {
628 clearCommand := {
629 cSFB_Indication := {
630 elementIdentifier := '8F'O
631 }
632 }
633 }
634 }
635}
Harald Welteb3414b22017-11-23 18:22:10 +0100636
637template PDU_BSSAP tr_BSSMAP_ClearCommand modifies tr_BSSAP_BSSMAP := {
638 pdu := {
639 bssmap := {
640 clearCommand := {
641 messageType := '20'O, /* overwritten */
642 layer3HeaderInfo := *,
643 cause := ?,
644 cSFB_Indication := *
645 }
646 }
647 }
648}
649
Harald Welte4c422b72019-02-17 16:27:10 +0100650template PDU_BSSAP tr_BSSMAP_ClearCommandCSFB modifies tr_BSSAP_BSSMAP := {
651 pdu := {
652 bssmap := {
653 clearCommand := {
654 messageType := '20'O, /* overwritten */
655 layer3HeaderInfo := *,
656 cause := ?,
657 cSFB_Indication := {
658 elementIdentifier := '8F'O
659 }
660 }
661 }
662 }
663}
664
Harald Welteb3414b22017-11-23 18:22:10 +0100665template (value) PDU_BSSAP ts_BSSMAP_ClearComplete
666modifies ts_BSSAP_BSSMAP := {
667 pdu := {
668 bssmap := {
669 clearComplete := {
670 messageType := '21'O /* overwritten */
671 }
672 }
673 }
674}
675
Harald Weltec859df52017-11-24 23:41:41 +0100676template PDU_BSSAP tr_BSSMAP_ClearComplete modifies tr_BSSAP_BSSMAP := {
677 pdu := {
678 bssmap := {
679 clearComplete := {
680 messageType := '21'O
681 }
682 }
683 }
684}
685
Harald Weltebc881782018-01-23 20:09:15 +0100686template (value) PDU_BSSAP ts_BSSMAP_ClearRequest(BssmapCause cause)
687modifies ts_BSSAP_BSSMAP := {
688 pdu := {
689 bssmap := {
690 clearRequest := {
691 messageType := '22'O, /* overwritten */
692 cause := ts_BSSMAP_IE_Cause(cause)
693 }
694 }
695 }
696}
697
Harald Weltecfa79ad2017-12-09 22:33:47 +0100698template PDU_BSSAP tr_BSSMAP_ClearRequest modifies tr_BSSAP_BSSMAP := {
699 pdu := {
700 bssmap := {
701 clearRequest := {
702 messageType := '22'O, /* overwritten */
703 cause := ?
704 }
705 }
706 }
707}
708
Neels Hofmeyr0ac63152019-05-07 01:20:17 +0200709template PDU_BSSAP ts_BSSMAP_HandoverRequired(BssmapCause cause,
710 template BSSMAP_FIELD_CellIdentificationList cid_list)
711modifies ts_BSSAP_BSSMAP := {
712 pdu := {
713 bssmap := {
714 handoverRequired := {
715 messageType := '11'O,
716 cause := ts_BSSMAP_IE_Cause(cause),
717 responseRequest := omit,
718 cellIdentifierList := ts_BSSMAP_IE_CidList(cid_list),
719 circuitPoolList := omit,
720 currentChannelType1 := omit,
721 speechVersion := omit,
722 queueingIndicator := omit,
723 oldToNewBSSInfo := omit,
724 sourceToTargetRNCTransparentInfo := omit,
725 sourceToTargetRNCTransparentInfoCDMA := omit,
726 gERANClassmark := omit,
727 talkerPriority := omit,
728 speechCodec := omit,
729 cSG_Identifier := omit
730 }
731 }
732 }
733}
734
735
Neels Hofmeyrbd0ef932018-03-19 14:58:46 +0100736template PDU_BSSAP tr_BSSMAP_HandoverRequired modifies tr_BSSAP_BSSMAP := {
737 pdu := {
738 bssmap := {
739 handoverRequired := {
740 messageType := '11'O
741 }
742 }
743 }
744}
745
Neels Hofmeyr0ac63152019-05-07 01:20:17 +0200746template PDU_BSSAP tr_BSSMAP_HandoverRequiredReject modifies tr_BSSAP_BSSMAP := {
747 pdu := {
748 bssmap := {
749 handoverRequiredReject := {
750 messageType := '1A'O
751 }
752 }
753 }
754}
755
756template PDU_BSSAP tr_BSSMAP_HandoverCommand
757modifies tr_BSSAP_BSSMAP := {
758 pdu := {
759 bssmap := {
760 handoverCommand := {
761 messageType := '13'O
762 }
763 }
764 }
765}
766
767template PDU_BSSAP tr_BSSMAP_HandoverSucceeded
768modifies tr_BSSAP_BSSMAP := {
769 pdu := {
770 bssmap := {
771 handoverSucceeded := {
772 messageType := '15'O
773 }
774 }
775 }
776}
777
Neels Hofmeyrbd0ef932018-03-19 14:58:46 +0100778template (value) PDU_BSSAP ts_BSSMAP_HandoverCommand(octetstring layer3info)
779modifies ts_BSSAP_BSSMAP := {
780 pdu := {
781 bssmap := {
782 handoverCommand := {
783 messageType := '13'O,
784 layer3Information := {
785 elementIdentifier := '17'O,
786 lengthIndicator := 0,
787 layer3info := layer3info
788 },
789 cellIdentifier := omit,
790 newBSSToOldBSSInfo := omit,
791 talkerPriority := omit
792 }
793 }
794 }
795}
796
Neels Hofmeyr61ebb8b2018-10-09 18:28:06 +0200797template PDU_BSSAP tr_BSSMAP_HandoverFailure modifies tr_BSSAP_BSSMAP := {
798 pdu := {
799 bssmap := {
800 handoverFailure := {
801 messageType := '16'O,
802 cause := ?,
803 rR_Cause := *,
804 circuitPool := *,
805 circuitPoolList := *,
806 gERANClassmark := *,
807 newBSSToOldBSSInfo := *,
808 interSystemInformation := *,
809 talkerPriority := *,
810 codecList := *
811 }
812 }
813 }
814}
815
Neels Hofmeyr0ac63152019-05-07 01:20:17 +0200816template PDU_BSSAP tr_BSSMAP_HandoverRequest modifies tr_BSSAP_BSSMAP := {
817 pdu := {
818 bssmap := {
819 handoverRequest := {
820 messageType := '10'O
821 }
822 }
823 }
824}
825
Neels Hofmeyrbd0ef932018-03-19 14:58:46 +0100826template PDU_BSSAP ts_BSSMAP_HandoverRequest(
827 template BSSMAP_IE_CircuitIdentityCode cic := omit,
828 template BSSMAP_IE_AoIP_TransportLayerAddress aoip_tla := omit,
829 template BSSMAP_IE_CellIdentifier cell_id_target := ts_CellID_LAC_CI(1, 0),
830 template BSSMAP_IE_CellIdentifier cell_id_source := ts_CellID_LAC_CI(1, 1)
831 )
832modifies ts_BSSAP_BSSMAP := {
833 pdu := {
834 bssmap := {
835 handoverRequest := {
836 messageType := '10'O,
837 channelType := ts_BSSMAP_IE_ChannelType,
838 encryptionInformation :=
839 ts_BSSMAP_IE_EncrInfo('0000000000000000'O,'01'O),
840 classmarkInformationType := {
841 classmarkInformationType1 := {
842 elementIdentifier := '1D'O,
843 rf_PowerCapability := '000'B,
844 a5_1 := '0'B,
845 esind := '0'B,
846 revisionLevel := '10'B,
847 spare1_1 := '0'B
848 }
849 },
850 cellIdentifierSource := cell_id_source,
851 priority := omit,
852 circuitIdentityCode := cic,
853 downLinkDTX_Flag := omit,
854 cellIdentifierTarget := cell_id_target,
855 interferenceBandToBeUsed := omit,
856 cause := omit,
857 classmarkInformationType3 := omit,
858 currentChannelType1 := omit,
859 speechVersion := omit,
860 groupCallReference := omit,
861 talkerFlag := omit,
862 configurationEvolutionIndication := omit,
863 chosenEncryptionAlgorithm := omit,
864 oldToNewBSSInfo := omit,
865 lSAInformation := omit,
866 lSAAccessControlSuppression := omit,
867 serviceHandover := omit,
868 iMSI_bssmap := omit,
869 sourceToTargetRNCTransparentInfo := omit,
870 sourceToTargetRNCTransparentInfoCDMA := omit,
871 sNAAccessInformation := omit,
872 talkerPriority := omit,
873 aoIPTransportLayer := aoip_tla,
874 codecList := omit,
875 callIdentifier := omit,
876 kC128 := omit,
877 globalCallReference := omit,
878 lCLS_Configuration := omit,
879 connectionStatusControl := omit
880 }
881 }
882 }
883}
884
885template PDU_BSSAP tr_BSSMAP_HandoverRequestAcknowledge(template octetstring layer3info)
886modifies tr_BSSAP_BSSMAP := {
887 pdu := {
888 bssmap := {
889 handoverRequestAck := {
890 messageType := '12'O,
891 layer3Information := {
892 elementIdentifier := '17'O,
893 lengthIndicator := ?,
894 layer3info := layer3info
895 }
896 }
897 }
898 }
899}
900
Neels Hofmeyr0ac63152019-05-07 01:20:17 +0200901template PDU_BSSAP ts_BSSMAP_HandoverRequestAcknowledge(
902 template octetstring layer3info,
903 template LIN1 layer3infoLength,
904 template BSSMAP_IE_AoIP_TransportLayerAddress aoIPTransportLayer := omit,
905 template BSSMAP_IE_SpeechCodec speechCodec := omit,
906 template BSSMAP_IE_ChosenChannel chosenChannel := omit,
907 template BSSMAP_IE_ChosenEncryptionAlgorithm chosenEncryptionAlgorithm := omit)
908modifies ts_BSSAP_BSSMAP := {
909 pdu := {
910 bssmap := {
911 handoverRequestAck := {
912 messageType := '12'O,
913 layer3Information := {
914 elementIdentifier := '17'O,
915 lengthIndicator := layer3infoLength,
916 layer3info := layer3info
917 },
918 chosenChannel := chosenChannel,
919 chosenEncryptionAlgorithm := chosenEncryptionAlgorithm,
920 circuitPool := omit,
921 speechVersion := omit,
922 circuitIdentityCode := omit,
923 lSAIdentifier := omit,
924 newBSSToOldBSSInfo := omit,
925 interSystemInformation := omit,
926 talkerPriority := omit,
927 aoIPTransportLayer := aoIPTransportLayer,
928 codecList := omit,
929 speechCodec := speechCodec,
930 lCLS_bSS_Status := omit
931 }
932 }
933 }
934}
935
Neels Hofmeyrbd0ef932018-03-19 14:58:46 +0100936template PDU_BSSAP tr_BSSMAP_HandoverDetect
937modifies tr_BSSAP_BSSMAP := {
938 pdu := {
939 bssmap := {
940 handoverDetect := {
941 messageType := '1B'O,
942 talkerPriority := *
943 }
944 }
945 }
946}
947
Neels Hofmeyr0ac63152019-05-07 01:20:17 +0200948template PDU_BSSAP ts_BSSMAP_HandoverDetect
949modifies ts_BSSAP_BSSMAP := {
950 pdu := {
951 bssmap := {
952 handoverDetect := {
953 messageType := '1B'O,
954 talkerPriority := omit
955 }
956 }
957 }
958}
959
Neels Hofmeyrbd0ef932018-03-19 14:58:46 +0100960template PDU_BSSAP tr_BSSMAP_HandoverComplete
961modifies tr_BSSAP_BSSMAP := {
962 pdu := {
963 bssmap := {
964 handoverComplete := {
965 messageType := '14'O,
966 rR_Cause := *,
967 talkerPriority := *,
968 speechCodec := *,
969 codecList := *,
970 chosenEncryptionAlgorithm := *,
971 chosenChannel := *,
972 lCLS_BSS_Status := *
973 }
974 }
975 }
976}
Harald Weltecfa79ad2017-12-09 22:33:47 +0100977
Neels Hofmeyr0ac63152019-05-07 01:20:17 +0200978template PDU_BSSAP ts_BSSMAP_HandoverComplete
979modifies ts_BSSAP_BSSMAP := {
980 pdu := {
981 bssmap := {
982 handoverComplete := {
983 messageType := '14'O,
984 rR_Cause := omit,
985 talkerPriority := omit,
986 speechCodec := omit,
987 codecList := omit,
988 chosenEncryptionAlgorithm := omit,
989 chosenChannel := omit,
990 lCLS_BSS_Status := omit
991 }
992 }
993 }
994}
995
Philipp Maieraee60392018-11-05 17:09:00 +0100996template PDU_BSSAP tr_BSSMAP_HandoverPerformed
997modifies tr_BSSAP_BSSMAP := {
998 pdu := {
999 bssmap := {
1000 handoverPerformed := {
1001 messageType := '17'O,
1002 cause := ?,
1003 cellIdentifier := ?,
Philipp Maier8d33a132018-11-12 11:58:55 +01001004 chosenChannel := *,
1005 chosenEncryptionAlgorithm := *,
1006 speechVersion := *,
1007 lSAIdentifier := *,
1008 talkerPriority := *,
1009 codecList := *,
1010 speechCodec := *,
1011 lCLS_BSS_Status := *
Philipp Maieraee60392018-11-05 17:09:00 +01001012 }
1013 }
1014 }
1015}
1016
Harald Welte28d943e2017-11-25 15:00:50 +01001017template BSSMAP_IE_IMSI ts_BSSMAP_Imsi(hexstring imsi_digits) := {
1018 elementIdentifier := '08'O,
1019 lengthIndicator := 0, /* overwritten */
1020 typeOfIdentity := '001'B, /* IMSI */
1021 oddEvenIndicator := f_hex_is_odd_length(imsi_digits),
1022 digits := imsi_digits
1023}
1024
Harald Welte17d21152018-01-27 00:47:11 +01001025template BSSMAP_IE_IMSI tr_BSSMAP_Imsi(template hexstring imsi_digits) := {
1026 elementIdentifier := '08'O,
1027 lengthIndicator := ?, /* overwritten */
1028 typeOfIdentity := '001'B, /* IMSI */
1029 oddEvenIndicator := ?,
1030 digits := imsi_digits
1031}
1032
Harald Welte72cecfa2017-12-11 19:50:14 +01001033template BSSMAP_FIELD_CellIdentificationList ts_BSSMAP_CIL_noCell := {
1034 cIl_noCell := ''O
1035}
1036
1037private function f_enc_mcc_mnc(GsmMcc mcc, GsmMnc mnc) return OCT3 {
Harald Welte24135bd2018-03-17 19:27:53 +01001038 if (lengthof(mnc) == 2) {
1039 return hex2oct(mcc[1] & mcc[0] & 'F'H & mcc[2] & mnc[1] & mnc[0]);
Stefan Sperling83348bc2018-03-14 17:44:40 +01001040 } else {
1041 return hex2oct(mcc[1] & mcc[0] & mnc[2] & mcc[2] & mnc[1] & mnc[0]);
1042 }
Harald Welte72cecfa2017-12-11 19:50:14 +01001043}
1044
1045template BSSMAP_FIELD_CellIdentification_CGI ts_BSSMAP_CI_CGI(GsmMcc mcc, GsmMnc mnc, GsmLac lac, GsmCellId ci) := {
1046 mcc_mnc := f_enc_mcc_mnc(mcc, mnc),
1047 lac := int2oct(lac, 2),
1048 ci := int2oct(ci, 2)
1049}
1050
1051template BSSMAP_FIELD_CellIdentification_LAC_CI ts_BSSMAP_CI_LAC_CI(GsmLac lac, GsmCellId ci) := {
1052 lac := int2oct(lac, 2),
1053 ci := int2oct(ci, 2)
1054}
1055
1056template BSSMAP_FIELD_CellIdentification_LAI ts_BSSMAP_CI_LAI(GsmMcc mcc, GsmMnc mnc, GsmLac lac) := {
1057 mcc_mnc := f_enc_mcc_mnc(mcc, mnc),
1058 lac := int2oct(lac, 2)
1059}
1060
1061template OCT2 ts_BSSMAP_CI_CI(GsmCellId ci) := int2oct(ci, 2);
1062template OCT2 ts_BSSMAP_CI_LAC(GsmLac lac) := int2oct(lac, 2);
1063
Harald Welte751d3eb2018-01-31 15:51:06 +01001064template BSSMAP_FIELD_CellIdentification_PLMN_LAC_RNC
1065ts_BSSMAP_CI_PLMN_LAC_RNC(GsmMcc mcc, GsmMnc mnc, GsmLac lac, uint16_t rnc_id) := {
1066 mcc_mnc := f_enc_mcc_mnc(mcc, mnc),
1067 lac := int2oct(lac, 2),
1068 rncId := int2oct(rnc_id, 2)
1069}
1070
1071template BSSMAP_FIELD_CellIdentification_LAC_RNC ts_BSSMAP_CI_LAC_RNC(GsmLac lac, uint16_t rnc_id) := {
1072 lac := int2oct(lac, 2),
1073 rncId := int2oct(rnc_id, 2)
1074}
1075
Harald Welte72cecfa2017-12-11 19:50:14 +01001076template BSSMAP_IE_ChannelNeeded ts_BSSMAP_IE_ChanNeeded(BIT2 chneed) := {
1077 elementIdentifier := '24'O,
1078 channel := chneed,
1079 spare := '000000'B
1080}
1081
1082template BSSMAP_IE_TMSI ts_BSSMAP_IE_TMSI(OCT4 tmsi) := {
1083 elementIdentifier := '09'O,
1084 lengthIndicator := 4,
1085 tmsiOctets := tmsi
1086};
1087
Harald Welte17d21152018-01-27 00:47:11 +01001088template BSSMAP_IE_TMSI tr_BSSMAP_IE_TMSI(template OCT4 tmsi) := {
1089 elementIdentifier := '09'O,
1090 lengthIndicator := 4,
1091 tmsiOctets := tmsi
1092};
1093
Harald Welte72cecfa2017-12-11 19:50:14 +01001094private function f_tmsi_or_omit(template OCT4 tmsi) return template BSSMAP_IE_TMSI {
1095 var template BSSMAP_IE_TMSI ret;
1096 if (ispresent(tmsi)) {
1097 ret := ts_BSSMAP_IE_TMSI(valueof(tmsi));
1098 } else {
1099 ret := omit;
1100 }
1101 return ret;
1102}
1103
1104template PDU_BSSAP ts_BSSMAP_Paging(hexstring imsi_digits,
1105 template BSSMAP_FIELD_CellIdentificationList cid_list,
1106 template OCT4 tmsi := omit,
1107 template BSSMAP_IE_ChannelNeeded chneed := omit)
Harald Welte28d943e2017-11-25 15:00:50 +01001108modifies ts_BSSAP_BSSMAP := {
1109 pdu := {
1110 bssmap := {
1111 paging := {
Harald Welte17d21152018-01-27 00:47:11 +01001112 messageType := '52'O,
Harald Welte28d943e2017-11-25 15:00:50 +01001113 iMSI := ts_BSSMAP_Imsi(imsi_digits),
Harald Welte72cecfa2017-12-11 19:50:14 +01001114 tMSI := f_tmsi_or_omit(tmsi),
Neels Hofmeyr0ac63152019-05-07 01:20:17 +02001115 cellIdentifierList := ts_BSSMAP_IE_CidList(cid_list),
Harald Welte72cecfa2017-12-11 19:50:14 +01001116 channelNeeded := chneed,
Harald Welte28d943e2017-11-25 15:00:50 +01001117 eMLPP_Priority := omit,
1118 pagingInformation := omit /* only VGCS/VBS flag */
1119 }
1120 }
1121 }
1122}
1123
Harald Welte17d21152018-01-27 00:47:11 +01001124template PDU_BSSAP tr_BSSMAP_Paging(template hexstring imsi_digits := ?,
1125 template OCT4 tmsi := *,
1126 template BSSMAP_IE_ChannelNeeded chneed := *)
1127modifies tr_BSSAP_BSSMAP := {
1128 pdu := {
1129 bssmap := {
1130 paging := {
1131 messageType := '52'O,
1132 iMSI := tr_BSSMAP_Imsi(imsi_digits),
1133 tMSI := tr_BSSMAP_IE_TMSI(tmsi) ifpresent,
1134 cellIdentifierList := ?,
1135 channelNeeded := chneed,
1136 eMLPP_Priority := omit,
1137 pagingInformation := omit /* only VGCS/VBS flag */
1138 }
1139 }
1140 }
1141}
1142
1143
Harald Welte73cd2712017-12-17 00:44:52 +01001144template PDU_BSSAP ts_BSSMAP_CipherModeCmd(OCT1 alg, OCT8 key)
1145modifies ts_BSSAP_BSSMAP := {
1146 pdu := {
1147 bssmap := {
1148 cipherModeCommand := {
1149 messageType := '53'O,
1150 layer3HeaderInfo := omit,
1151 encryptionInformation := ts_BSSMAP_IE_EncrInfo(key, alg),
1152 cipherResponseMode := omit,
1153 kC128 := omit
1154 }
1155 }
1156 }
1157}
1158
1159template PDU_BSSAP ts_BSSMAP_CipherModeCmdKc128(OCT1 alg, OCT8 key, OCT16 kc128)
1160modifies ts_BSSAP_BSSMAP := {
1161 pdu := {
1162 bssmap := {
1163 cipherModeCommand := {
1164 messageType := '53'O,
1165 layer3HeaderInfo := omit,
1166 encryptionInformation := ts_BSSMAP_IE_EncrInfo(key, alg),
1167 cipherResponseMode := omit,
1168 kC128 := { '83'O, kc128 }
1169 }
1170 }
1171 }
1172}
1173
Harald Welte16114282018-01-24 22:41:21 +01001174template PDU_BSSAP tr_BSSMAP_CipherModeCmd(template OCT1 alg, template OCT8 key)
1175modifies tr_BSSAP_BSSMAP := {
1176 pdu := {
1177 bssmap := {
1178 cipherModeCommand := {
1179 messageType := '53'O,
1180 layer3HeaderInfo := *,
1181 encryptionInformation := tr_BSSMAP_IE_EncrInfo(key, alg),
1182 cipherResponseMode := *,
1183 kC128 := *
1184 }
1185 }
1186 }
1187}
1188
1189template PDU_BSSAP ts_BSSMAP_CipherModeCompl(OCT1 alg)
1190modifies ts_BSSAP_BSSMAP := {
1191 pdu := {
1192 bssmap := {
1193 cipherModeComplete := {
1194 messageType := '55'O,
1195 layer3MessageContents := omit,
1196 chosenEncryptionAlgorithm := {
1197 elementIdentifier := '2C'O,
1198 algorithmIdentifier := alg
1199 }
1200 }
1201 }
1202 }
1203}
1204
Stefan Sperlinga2d59c62018-12-18 16:32:44 +01001205template PDU_BSSAP ts_BSSMAP_CipherModeComplAlg(template BSSMAP_IE_ChosenEncryptionAlgorithm chosenEncryptionAlgorithm := ?)
1206modifies ts_BSSAP_BSSMAP := {
1207 pdu := {
1208 bssmap := {
1209 cipherModeComplete := {
1210 messageType := '55'O,
1211 layer3MessageContents := omit,
1212 chosenEncryptionAlgorithm := chosenEncryptionAlgorithm
1213 }
1214 }
1215 }
1216}
1217
Harald Welte73cd2712017-12-17 00:44:52 +01001218template PDU_BSSAP tr_BSSMAP_CipherModeCompl(template OCT1 alg := ?) modifies tr_BSSAP_BSSMAP := {
1219 pdu := {
1220 bssmap := {
1221 cipherModeComplete := {
1222 messageType := '55'O,
1223 layer3MessageContents := *,
1224 chosenEncryptionAlgorithm := {
1225 elementIdentifier := '2C'O,
1226 algorithmIdentifier := alg
1227 }
1228 }
1229 }
1230 }
1231}
1232
1233template PDU_BSSAP tr_BSSMAP_CipherModeRej modifies tr_BSSAP_BSSMAP := {
1234 pdu := {
1235 bssmap := {
1236 cipherModeReject := {
1237 messageType := '59'O,
1238 cause := ?
1239 }
1240 }
1241 }
1242}
1243
Daniel Willmann52918e52018-09-20 14:39:09 +02001244template PDU_BSSAP tr_BSSMAP_ClassmarkReq modifies tr_BSSAP_BSSMAP := {
1245 pdu := {
1246 bssmap := {
1247 classmarkRequest := {
1248 messageType := '58'O,
1249 talkerPriority := *
1250 }
1251 }
1252 }
1253}
1254
Harald Welte5c2622c2018-01-21 20:45:20 +01001255template BSSMAP_IE_ClassmarkInformationType2 ts_CM2_default := {
1256 elementIdentifier := '12'O,
1257 lengthIndicator := 0, /* overwritten */
1258 /* CM1 */
1259 rf_PowerCapability := '010'B, /* class3 */
1260 a5_1 := '0'B, /* supported */
1261 esind := '1'B, /* early classmark supported */
1262 revisionLevel := '10'B, /* R99 */
1263 spare1_1 := '0'B,
1264 /* CM2 */
1265 fc := '1'B, /* E-GSM support */
1266 vgcs := '0'B,
1267 vbs := '0'B,
1268 sm_Capability := '1'B,
1269 ss_ScreenIndicator := '00'B,
1270 ps_Capability := '1'B,
1271 spare2_1 := '0'B,
1272 classmarkInformationType2_oct5 := {
1273 a5_2 := '0'B, /* not available */
1274 a5_3 := '1'B, /* available */
1275 cmsp := '0'B, /* not supported */
1276 solsa := '0'B, /* not suported */
1277 ucs2 := '0'B, /* GSM alphabet preferred */
1278 lcsvacap := '0'B, /* not supported */
1279 spare := '0'B,
1280 cm3 := '0'B /* no CM3 */
1281 }
1282}
1283
1284template PDU_BSSAP ts_BSSMAP_ClassmarkUpd(template BSSMAP_IE_ClassmarkInformationType2 cm2 := ts_CM2_default,
1285 template BSSMAP_IE_ClassmarkInformationType3 cm3 := omit)
1286modifies ts_BSSAP_BSSMAP := {
1287 pdu := {
1288 bssmap := {
1289 classmarkUpdate := {
1290 messageType := '54'O,
1291 classmarkInformationType2 := cm2,
1292 classmarkInformationType3 := cm3,
1293 talkerPriority := omit
1294 }
1295 }
1296 }
1297}
1298
Harald Welte898113b2018-01-31 18:32:21 +01001299template PDU_BSSAP tr_BSSMAP_ClassmarkUpd(template BSSMAP_IE_ClassmarkInformationType2 cm2 := *,
1300 template BSSMAP_IE_ClassmarkInformationType3 cm3 := *)
1301modifies tr_BSSAP_BSSMAP := {
1302 pdu := {
1303 bssmap := {
1304 classmarkUpdate := {
1305 messageType := '54'O,
1306 classmarkInformationType2 := cm2,
1307 classmarkInformationType3 := cm3,
1308 talkerPriority := *
1309 }
1310 }
1311 }
1312}
1313
Neels Hofmeyr92b12b72018-09-18 14:30:23 +02001314template PDU_BSSAP ts_BSSMAP_ClassmarkRequest
1315modifies ts_BSSAP_BSSMAP := {
1316 pdu := {
1317 bssmap := {
1318 classmarkRequest := {
1319 messageType := '58'O,
1320 talkerPriority := omit
1321 }
1322 }
1323 }
1324}
1325
Harald Welte49518bf2018-02-10 11:39:19 +01001326/* return Layer3 octetstring inside BSSAP PDU */
1327function f_bssap_extract_l3(PDU_BSSAP bssap) return template octetstring {
1328 if (ischosen(bssap.pdu.bssmap)) {
1329 var PDU_BSSMAP bssmap := bssap.pdu.bssmap;
1330 if (ischosen(bssmap.completeLayer3Information)) {
1331 return bssmap.completeLayer3Information.layer3Information.layer3info;
1332 } else if (ischosen(bssmap.handoverRequestAck)) {
1333 return bssmap.handoverRequestAck.layer3Information.layer3info;
1334 } else if (ischosen(bssmap.handoverCommand)) {
1335 return bssmap.handoverCommand.layer3Information.layer3info;
1336 } else if (ischosen(bssmap.uplinkRequest)) {
1337 return bssmap.uplinkRequest.layer3Information.layer3info;
1338 } else if (ischosen(bssmap.uplinkRequestConfirmation)) {
1339 return bssmap.uplinkRequestConfirmation.layer3Information.layer3info;
1340 } else if (ischosen(bssmap.uplinkApplicationData)) {
1341 return bssmap.uplinkApplicationData.layer3Information.layer3info;
1342 } else if (ischosen(bssmap.rerouteCommand)) {
1343 return bssmap.rerouteCommand.initialLayer3Information.layer3info;
1344 } else {
1345 return omit;
1346 }
1347 } else {
1348 return bssap.pdu.dtap;
1349 }
1350}
1351
Harald Welte0b50aed2018-05-28 22:33:07 +02001352/* TS 29.205 B.2.1.9 */
1353template (value) GlobalCallReferenceValue ts_GCR(octetstring net_id, OCT2 node_id, OCT5 cref_id) := {
1354 networkIDLengthIndicator := 0, /* overwritten */
1355 networkID := net_id,
1356 nodeIDLengthIndicator := 0, /* overwritten */
1357 nodeID := node_id,
1358 callReferenceIDLengthIndicator := 0, /* overwritten */
1359 callReferenceID := cref_id
1360}
1361template GlobalCallReferenceValue tr_GCR(template octetstring net_id,
1362 template OCT2 node_id,
1363 template OCT5 cref_id) := {
1364 networkIDLengthIndicator := ?,
1365 networkID := net_id,
1366 nodeIDLengthIndicator := ?,
1367 nodeID := node_id,
1368 callReferenceIDLengthIndicator := ?,
1369 callReferenceID := cref_id
1370}
1371
1372/* TS 47.008 3.2.2.115 */
1373template (value) BSSMAP_IE_GlobalCallReference ts_BSSMAP_IE_GCR(template (value) GlobalCallReferenceValue gcr) := {
1374 elementIdentifier := '89'O,
1375 lengthIndicator := 0, /* overwritten */
1376 globalCallReferenceValue := gcr
1377}
1378template BSSMAP_IE_GlobalCallReference tr_BSSMAP_IE_GCR(template GlobalCallReferenceValue gcr) := {
1379 elementIdentifier := '89'O,
1380 lengthIndicator := ?,
1381 globalCallReferenceValue := gcr
1382}
1383
1384/* TS 48.008 3.2.2.116 */
1385const BIT4 LCLS_CFG_both_way := '0000'B;
1386const BIT4 LCLS_CFG_both_way_and_bicast_UL := '0001'B;
1387const BIT4 LCLS_CFG_both_way_and_send_DL := '0010'B;
1388const BIT4 LCLS_CFG_both_way_and_send_DL_block_local_DL := '0011'B;
1389const BIT4 LCLS_CFG_both_way_and_bicast_UL_send_DL := '0100'B;
1390const BIT4 LCLS_CFG_both_way_and_bicast_UL_send_DL_block_local_DL := '0101'B;
1391
1392template (value) BSSMAP_IE_LCLS_Configuration ts_BSSMAP_IE_LclsCfg(BIT4 cfg_val) := {
1393 elementIdentifier := '8A'O,
1394 lCLS_ConfigurationValue := cfg_val,
1395 spare := '0000'B
1396}
1397template BSSMAP_IE_LCLS_Configuration tr_BSSMAP_IE_LclsCfg(template BIT4 cfg_val) := {
1398 elementIdentifier := '8A'O,
1399 lCLS_ConfigurationValue := cfg_val,
1400 spare := '0000'B
1401}
1402
1403/* TS 48.008 3.2.2.117 */
1404const BIT4 LCLS_CSC_connect := '0000'B;
1405const BIT4 LCLS_CSC_do_not_connect := '0001'B;
1406const BIT4 LCLS_CSC_release_lcls := '0010'B;
1407const BIT4 LCLS_CSC_bicast_UL_at_handover := '0011'B;
1408const BIT4 LCLS_CSC_bicast_UL_and_recv_DL_at_handover := '0100'B;
1409
1410template (value) BSSMAP_IE_LCLS_ConnectionStatusControl ts_BSSMAP_IE_LclsCsc(BIT4 csc) := {
1411 elementIdentifier := '8B'O,
1412 lCLS_ConnectionStatusControlValue := csc,
1413 spare := '0000'B
1414}
1415template BSSMAP_IE_LCLS_ConnectionStatusControl tr_BSSMAP_IE_LclsCsc(template BIT4 csc) := {
1416 elementIdentifier := '8B'O,
1417 lCLS_ConnectionStatusControlValue := csc,
1418 spare := '0000'B
1419}
1420
1421/* TS 48.008 3.2.2.119 */
1422const BIT4 LCLS_STS_not_yet_ls := '0000'B;
1423const BIT4 LCLS_STS_not_possible_ls := '0001'B;
1424const BIT4 LCLS_STS_no_longer_ls := '0010'B;
1425const BIT4 LCLS_STS_req_lcls_not_supp := '0011'B;
1426const BIT4 LCLS_STS_locally_switched := '0100'B;
1427
1428template (value) BSSMAP_IE_LCLS_BSS_Status ts_BSSMAP_IE_LclsSts(BIT4 sts) := {
1429 elementIdentifier := '8D'O,
1430 lCLS_BSS_StatusValue := sts,
1431 spare := '0000'B
1432}
1433template BSSMAP_IE_LCLS_BSS_Status tr_BSSMAP_IE_LclsSts(template BIT4 sts) := {
1434 elementIdentifier := '8D'O,
1435 lCLS_BSS_StatusValue := sts,
1436 spare := '0000'B
1437}
1438
1439/* TS 48.008 3.2.1.91 */
1440template (value) PDU_BSSAP ts_BSSMAP_LclsConnCtrl(template (omit) BSSMAP_IE_LCLS_Configuration cfg,
Harald Welte354722e2018-06-01 13:15:32 +02001441 template (omit) BSSMAP_IE_LCLS_ConnectionStatusControl csc) modifies ts_BSSAP_BSSMAP := {
Harald Welte0b50aed2018-05-28 22:33:07 +02001442 pdu := {
1443 bssmap := {
1444 lCLS_ConnectControl := {
1445 messageType := '74'O,
1446 lCLS_Configuration := cfg,
1447 lCLS_ConnectionStatusControl := csc
1448 }
1449 }
1450 }
1451}
1452template PDU_BSSAP tr_BSSMAP_LclsConnCtrl(template BSSMAP_IE_LCLS_Configuration cfg,
Harald Welte354722e2018-06-01 13:15:32 +02001453 template BSSMAP_IE_LCLS_ConnectionStatusControl csc)
1454modifies tr_BSSAP_BSSMAP := {
Harald Welte0b50aed2018-05-28 22:33:07 +02001455 pdu := {
1456 bssmap := {
1457 lCLS_ConnectControl := {
1458 messageType := '74'O,
1459 lCLS_Configuration := cfg,
1460 lCLS_ConnectionStatusControl := csc
1461 }
1462 }
1463 }
1464}
1465
1466/* TS 48.008 3.2.1.92 */
Harald Welte354722e2018-06-01 13:15:32 +02001467template (value) PDU_BSSAP ts_BSSMAP_LclsConnCtrlAck(template (value) BSSMAP_IE_LCLS_BSS_Status sts)
1468modifies ts_BSSAP_BSSMAP := {
Harald Welte0b50aed2018-05-28 22:33:07 +02001469 pdu := {
1470 bssmap := {
1471 lCLS_connectControlAck := {
1472 messageType := '75'O,
1473 lCLS_BSS_Status := sts
1474 }
1475 }
1476 }
1477}
Harald Welte354722e2018-06-01 13:15:32 +02001478template PDU_BSSAP tr_BSSMAP_LclsConnCtrlAck(template BSSMAP_IE_LCLS_BSS_Status sts)
1479modifies tr_BSSAP_BSSMAP := {
Harald Welte0b50aed2018-05-28 22:33:07 +02001480 pdu := {
1481 bssmap := {
1482 lCLS_connectControlAck := {
1483 messageType := '75'O,
1484 lCLS_BSS_Status := sts
1485 }
1486 }
1487 }
1488}
1489
1490/* TS 48.008 3.2.1.93 */
1491template (value) PDU_BSSAP ts_BSSMAP_LclsNotification(template (omit) BSSMAP_IE_LCLS_BSS_Status sts,
Harald Welte354722e2018-06-01 13:15:32 +02001492 template (omit) BSSMAP_IE_LCLS_BreakRequest brq)
1493modifies ts_BSSAP_BSSMAP := {
Harald Welte0b50aed2018-05-28 22:33:07 +02001494 pdu := {
1495 bssmap := {
1496 lCLS_Notification := {
1497 messageType := '76'O,
1498 lCLS_BSS_Status := sts,
1499 lCLS_BreakRequest := brq
1500 }
1501 }
1502 }
1503}
1504template PDU_BSSAP tr_BSSMAP_LclsNotification(template BSSMAP_IE_LCLS_BSS_Status sts,
Harald Welte354722e2018-06-01 13:15:32 +02001505 template BSSMAP_IE_LCLS_BreakRequest brq)
1506modifies tr_BSSAP_BSSMAP := {
Harald Welte0b50aed2018-05-28 22:33:07 +02001507 pdu := {
1508 bssmap := {
1509 lCLS_Notification := {
1510 messageType := '76'O,
1511 lCLS_BSS_Status := sts,
1512 lCLS_BreakRequest := brq
1513 }
1514 }
1515 }
1516}
1517
Harald Weltecc0b0142018-05-29 15:19:33 +02001518template PDU_BSSAP tr_BSSMAP_LclsNotificationSts(BIT4 sts)
1519modifies tr_BSSAP_BSSMAP := {
1520 pdu := {
1521 bssmap := {
1522 lCLS_Notification := {
1523 messageType := '76'O,
1524 lCLS_BSS_Status := tr_BSSMAP_IE_LclsSts(sts),
1525 lCLS_BreakRequest := omit
1526 }
1527 }
1528 }
1529}
Harald Welte898113b2018-01-31 18:32:21 +01001530
1531
Harald Welte73cd2712017-12-17 00:44:52 +01001532
Harald Weltec859df52017-11-24 23:41:41 +01001533
Harald Welteb69533d2017-12-15 13:55:17 +01001534} with { encode "RAW" };