blob: 56f8553b9867765df48a9a16566eff14b0b70e92 [file] [log] [blame]
Harald Weltea814f262017-07-24 13:21:35 +02001///////////////////////////////////////////////////////////////////////////////
2// //
3// Copyright Test Competence Center (TCC) ETH 2016 //
4// //
5// The copyright to the computer program(s) herein is the property of TCC. //
6// The program(s) may be used and/or copied only with the written permission //
7// of TCC or in accordance with the terms and conditions stipulated in the //
8// agreement/contract under which the program(s) has been supplied. //
9// //
10///////////////////////////////////////////////////////////////////////////////
11//
12// File: MobileL3_MM_Types.ttcn
13// Rev: R1B
14// Prodnr: CNL 113 832
15// Contact: http://ttcn.ericsson.se
16// Reference: 3GPP TS 24.008 v13.4.0
17
18
19module MobileL3_MM_Types
20{
21
22import from General_Types all;
23import from MobileL3_CommonIE_Types all;
24
25//============================================================================
26// 24.008/ 10.5.3 Mobility Management information elements
27//============================================================================
28
29//10.5.3.1 AuthenticationParRAND
30//**********************************************************************
31type record AuthenticationParameterRANDTV
32{
33 OCT1 elementIdentifier,
34 OCT16 randValue
35} with { variant "PRESENCE (elementIdentifier = '21'O)"; };
36
37//10.5.3.1.1 Authentication Par AUTN (UMTS auth. ch. only)
38//**********************************************************************
39type record AuthenticationParameterAUTNTLV
40{
41 OCT1 elementIdentifier,
42 LIN1 lengthIndicator,
43 OCT16 autnValue
44} with { variant (lengthIndicator) "LENGTHTO (autnValue)"};
45
46//10.5.3.2 Authentication Response parameter
47//**********************************************************************
48type record AuthenticationResponseParameterTV
49{
50 OCT1 elementIdentifier,
51 OCT4 valueField length (4)
52} with { variant "PRESENCE (elementIdentifier = '22'O)"; };
53
54//10.5.3.2.1 Authentication Response parameter (extension)
55//**********************************************************************
56type record AuthenticationResponseParameterUMTSTLV
57{
58 OCT1 elementIdentifier,
59 LIN1 lengthIndicator,
60 octetstring valueField length (1..12)
61} with { variant (lengthIndicator) "LENGTHTO (valueField)"};
62
63
64//10.5.3.2.2 Authentication Failure parameter (UMTS authentication challenge only)
65//**********************************************************************
66type record AuthenticationFailureParametersTLV
67{
68 OCT1 elementIdentifier,
69 LIN1 lengthIndicator,
70 octetstring valueField length (14)
71} with { variant "PRESENCE (elementIdentifier = '30'O)";
72 variant (lengthIndicator) "LENGTHTO (valueField)"};
73
74//10.5.3.5 Location Update Type
75//****************************************************************************
76type record LocationUpdatingType
77{
78 BIT2 lut, // LU Normal (00)
79 // LU Periodic (01)
80 // Attach IMSI (10)
81 // reserved (11)
82 BIT1 spare1_1, // 0
83 BIT1 fop // Follow Pending on (1), not (0)
84};
85
86//10.5.3.5a Network Name
87//****************************************************************************
88type record NetworkNameTLV
89{
90 BIT7 elementIdentifier,
91 BIT1 spare1,
92 LIN1 lengthIndicator,
93 NetworkNameV valueField
94} with { variant (lengthIndicator) "LENGTHTO (valueField)"};
95
96
97type record NetworkNameV
98{
99 BIT3 nSpareBits,
100 BIT1 addCI,
101 BIT3 codingScheme,
102 BIT1 ext1, //'1'B
103 octetstring textString // length (0..infinity)
104 // actually the upper limit depends on the max size of the PDU, see 44.006
105};
106
107//10.5.3.7 Follow-on Proceed
108//****************************************************************************
109type Type2 FollowOnProceed; //'A1'O
110
111//10.5.3.8 TimeZone
112//****************************************************************************
113type record TimeZoneTV
114{
115 BIT7 elementIdentifier,
116 BIT1 spare,
117 TimeZoneV valueField
118} with { variant "PRESENCE (elementIdentifier = '1000110'B)"; }; //'46'O 7 bits
119
120type record TimeZoneV
121{
122 OCT1 timeZone
123};
124
125//10.5.3.9 Time Zone And Time
126//****************************************************************************
127type record TimeZoneAndTimeTV
128{
129 BIT7 elementIdentifier,
130 BIT1 spare,
131 TimeZoneAndTimeV valueField
132} with { variant "PRESENCE (elementIdentifier = '1000111'B)"; }; //'47'O 7 bits;
133
134
135type record TimeZoneAndTimeV
136{
137 OCT1 year,
138 OCT1 month,
139 OCT1 day,
140 OCT1 hour,
141 OCT1 minute,
142 OCT1 second,
143 OCT1 timeZone
144};
145
146//10.5.3.10 CTS permission
147//**********************************************************************
148type Type2 CTS_Permission;
149
150//10.5.3.11 LSA identifier (Localised Service Area)
151//**********************************************************************
152type record LSA_IdentifierTLV
153{
154 BIT7 elementIdentifier,
155 BIT1 spare,
156 LIN1 lengthIndicator,
157 LSA_IdentifierV valueField
158} with { variant "PRESENCE (elementIdentifier = '1001000'B)"; //'48'O 7 bits
159 variant (lengthIndicator) "LENGTHTO (valueField)"};
160
161type record LSA_IdentifierV
162{
163 octetstring lsa_id length (0..3)
164};
165
166//10.5.3.12 Daylight Saving Time
167//**********************************************************************
168type record DaylightSavingTimeTLV
169{
170 OCT1 elementIdentifier,
171 LIN1 lengthIndicator,
172 DaylightSavingTimeV valueField
173} with { variant "PRESENCE (elementIdentifier = '49'O)";
174 variant (lengthIndicator) "LENGTHTO (valueField)"};
175
176type record DaylightSavingTimeV
177{
178 BIT2 valueField,
179 BIT6 spare // Shall be set to 000000
180};
181
182//10.5.3.13 Emergency Number List
183//**********************************************************************
184type record EmergencyNumberListTLV
185{
186 OCT1 elementIdentifier,
187 LIN1 lengthIndicator,
188 EmergencyNumberListV emergencyNumberListV
189} with { variant "PRESENCE (elementIdentifier = '34'O)";
190 variant (lengthIndicator) "LENGTHTO (emergencyNumberListV)"};
191
192type record of EmergencyNumber EmergencyNumberListV
193
194type record EmergencyNumber
195{
196 LIN1 lengthIndicator,
197 EmergencyServiceCategory emergencyServiceCategory,
198 hexstring emergencyNumber length (1..44)
199} with { variant (lengthIndicator) "LENGTHTO (emergencyServiceCategory,emergencyNumber)";
200 variant "PADDING(yes)";
201 variant "PADDING_PATTERN('1111'B)"};
202
203type record EmergencyServiceCategory
204{
205 BIT5 valueFiled,
206 BIT3 spare //'000'B
207};
208
209//10.5.3.14 Additional Update Parameter
210//moved into MobileL3_CommonIE_Types
211
212
213//10.5.3.16 MM Timer
214//**********************************************************************
215type record MM_TimerTLV
216{
217 OCT1 elementIdentifier,
218 LIN1 lengthIndicator,
219 MM_TimerV valueField
220} with { variant "PRESENCE (elementIdentifier = '36'O)";
221 variant (lengthIndicator) "LENGTHTO (valueField)"};
222
223type record MM_TimerV
224{
225 BIT5 timerValue,
226 BIT3 unit
227}
228
229//============================================================================
230// 24.008/9.2 Messages for mobility management (MM)
231//============================================================================
232
233//**********************************************************************
234// Security Messages
235//**********************************************************************
236
237// 9.2.1 Authentication Reject
238//**********************************************************************
239type record PDU_ML3_AuthenticationReject
240{
241 BIT6 messageType, // '010001'B (AuthenticationReject)
242 BIT2 nsd
243};
244
245// 9.2.2 Authentication Request
246//**********************************************************************
247type record PDU_ML3_AuthenticationRequest
248{
249 BIT6 messageType, // '010010'B
250 BIT2 nsd,
251 CipheringKeySequenceNumberV cipheringKeySequenceNumber,
252 BIT4 spare2_4, // B'0000
253 OCT16 authenticationParRAND,
254 AuthenticationParameterAUTNTLV authenticationParAUTN optional
255 // added by ethcky acc to 10/155 17_1/APT 210 26/1 Uen Rev A
256} with { variant "TAG (
257 authenticationParAUTN, elementIdentifier = '20'O ) "};
258
259// 9.2.3 Authentication Response
260//****************************************************************************
261type record PDU_ML3_AuthenticationResponse
262{
263 BIT6 messageType, // '010100'B (AuthenticationResponse)
264 BIT2 nsd,
265 OCT4 authenticationParSRES, //10.5.3.2
266 AuthenticationResponseParameterUMTSTLV authenticationParSRESext optional
267} with { variant "TAG (authenticationParSRESext, elementIdentifier = '21'O )"};
268
269// 9.2.3a Authentication Failure
270//****************************************************************************
271type record PDU_ML3_AuthenticationFailure
272{
273 BIT6 messageType, // '011100'B (AuthenticationFailure)
274 BIT2 nsd,
275 OCT1 rejectCause, //10.5.3.6
276 AuthenticationFailureParametersTLV authenticationParFailure optional
277} with { variant "TAG (authenticationParFailure , elementIdentifier = '22'O ) " };
278
279//**********************************************************************
280// Mobility Management Message Types (TS 24.008/ chapter 9)
281// Connection management (CM) messages
282//**********************************************************************
283
284// 9.2.4 CM Re-establishment Request
285//**********************************************************************
286type record PDU_ML3_CMReestablishmentRequest
287{
288 BIT6 messageType, // '101000'B
289 BIT2 nsd,
290 CipheringKeySequenceNumberV cipheringKeySequenceNumber,
291 BIT4 spare,
292 MobileStationClassmark2_LV mobileStationClassmark2,
293 MobileIdentityLV mobileIdentityLV,
294 LocationAreaIdentification_TV locationAreaIdentification optional,
295 DevicePropertiesTV deviceProperties optional
296} with { variant "TAG (locationAreaIdentification, elementIdentifier = '13'O;
297 deviceProperties, elementIdentifier = '1101'B;)
298"};
299
300// 9.2.5 CM Service Accept (NW->MS)
301//**********************************************************************
302type record PDU_ML3_CMServiceAccept
303{
304 BIT6 messageType, // '100001'B
305 BIT2 nsd
306};
307
308// 9.2.5a CMServicePrompt (NW->MS)
309//**********************************************************************
310type record PDU_ML3_CMServicePrompt
311{
312 BIT6 messageType, // '100101'B
313 BIT2 nsd,
314 PdAndSapi pd_sapi
315};
316
317// 9.2.6 CMServiceReject (NW->MS)
318//**********************************************************************
319type record PDU_ML3_CMServiceReject
320{
321 BIT6 messageType, // '100010'B
322 BIT2 nsd,
323 OCT1 rejectCause, //10.5.3.6
324 MM_TimerTLV t3246_Value optional
325};
326
327// 9.2.7 CM Service Abort (MS->NW to request the abortion)
328//**********************************************************************
329type record PDU_ML3_CMServiceAbort
330{
331 BIT6 messageType, // '100011'B
332 BIT2 nsd
333};
334
335// 9.2.8 Abort (NW->MS to initiate the abortion)
336//**********************************************************************
337type record PDU_ML3_Abort
338{
339 BIT6 messageType, // '100010'B
340 BIT2 nsd,
341 OCT1 rejectCause //10.5.3.6
342};
343
344// 9.2.9 CM Service Request (MS->NW)
345//**********************************************************************
346type record PDU_ML3_CMServiceRequest
347{
348 BIT6 messageType,// '100100'B
349 BIT2 nsd,
350 BIT4 cm_ServiceType, // '0001'B establishment MOC
351 // '0010'B Emergency Call
352 // '0100'SMS B
353 // '1000'B SS activation
354 CipheringKeySequenceNumberV cipheringKeySequenceNumber,
355 MobileStationClassmark2_LV mobileStationClassmark2,
356 MobileIdentityLV mobileIdentity,
357 PriorityLevel_ML3 priorityLevel optional,
358 AdditionalUpdateParameterTV additionalUpdateParameterTV optional,
359 DevicePropertiesTV deviceProperties optional
360} with { variant "TAG (priorityLevel, elementIdentifier = '1000'B;
361 deviceProperties, elementIdentifier = '1101'B;)
362"};
363
364//9.2.10 Identity Request
365//**********************************************************************
366type record PDU_ML3_IdentityRequest
367{
368 BIT6 messageType, // '011000'B ( IdentityRequest )
369 BIT2 nsd,
370 BIT3 identityType, // IMSI:'001'B IMEI:'010'B IMEISV:'011'B
371 //(TMSI:'100'B not allowed?) 10.5.3.4
372 BIT5 spare1_5 // '00000'B
373};
374
375//9.2.11 Identity Response
376//**********************************************************************
377type record PDU_ML3_IdentityResponse
378{
379 BIT6 messageType, // '011001'B (IdentityResponse)
380 BIT2 nsd,
381 MobileIdentityLV mobileIdentityLV,
382 P_TMSI_TypeTV p_TMSI_TypeTV optional,
383 RoutingAreaIdentification2TLV routingAreaIdentification2TLV optional,
384 P_TMSISignature2TLV p_TMSISignature2TLV optional
385};
386
387//9.2.12 IMSI Detach Indication
388//**********************************************************************
389type record PDU_ML3_IMSI_DetachIndication
390{
391 BIT6 messageType, // '000001'IMSI Detach Indication
392 BIT2 nsd,
393 MobileStationClassmark1_V mobileStationClassmark1,
394 MobileIdentityLV mobileIdentityLV
395};
396
397//****************************************************************************
398// 24.008/9 Mobility Management message contents
399//****************************************************************************
400
401// 9.2.13 Location Update Accept
402//****************************************************************************
403type record PDU_ML3_LocationUpdateAccept
404{
405 BIT6 messageType, // '000010'B (LocationUpdateRequest)
406 BIT2 nsd,
407 LocationAreaIdentification_V locationAreaIdentification,
408 MobileIdentityTLV mobileIdentityTLV optional,
409 Type2 followOnProceed optional,
410 CTS_Permission cTS_Permission optional,
411 PLMNListTLV equivalentPLMNs optional,
412 EmergencyNumberListTLV emergencyNumberList optional,
413 GPRSTimer3TLV perMS_T3212 optional
414} with { variant "TAG ( mobileIdentityTLV, elementIdentifier = '0010111'B; //'17'O;
415 followOnProceed, elementIdentifier = 'A1'O;
416 cTS_Permission, elementIdentifier = 'A2'O;
417 equivalentPLMNs, elementIdentifier = '1001010'B; //'4A'O;
418 emergencyNumberList, elementIdentifier = '34'O;) "};
419
420// 9.2.14 Location Update Reject (NW->MS)
421//****************************************************************************
422type record PDU_ML3_LocationUpdateReject
423{
424 BIT6 messageType, // '000100'B (LocationUpdateReject)
425 BIT2 nsd,
426 OCT1 rejectCause, // see 10.5.3.6
427 MM_TimerTLV t3246_Value optional
428};
429
430//9.2.15 Location Update Request (MS->NW)
431//****************************************************************************
432type record PDU_ML3_LocationUpdateRequest
433{
434 BIT6 messageType, // B'_001000 (LocationUpdateRequest)
435 BIT2 nsd,
436 LocationUpdatingType locationUpdatingType,
437 CipheringKeySequenceNumberV cipheringKeySequenceNumber,
438 LocationAreaIdentification_V locationAreaIdentification,
439 MobileStationClassmark1_V mobileStationClassmark1,
440 MobileIdentityLV mobileIdentityLV,
441 ClassmarkInformationType2_forUMTS classmarkInformationType2_forUMTS optional,
442 AdditionalUpdateParameterTV additionalUpdateParameterTV optional,
443 DevicePropertiesTV deviceProperties optional,
444 MS_NetworkFeatureSupportTV mS_NetworkFeatureSupport optional
445} with {
446 variant "TAG (
447 deviceProperties, elementIdentifier = '1101'B;
448 mS_NetworkFeatureSupport, elementIdentifier = '1110'B; //E
449 )"
450};
451
452//9.2.15a MM information
453//****************************************************************************
454type record PDU_ML3_MMInformation
455{
456 BIT6 messageType, //
457 BIT2 nsd,
458 NetworkNameTLV fullNetworkName optional,
459 NetworkNameTLV shortNetworkName optional,
460 TimeZoneTV localtimeZone optional,
461 TimeZoneAndTimeTV univTime optional,
462 LSA_IdentifierTLV lSAIdentity optional,
463 DaylightSavingTimeTLV networkDST optional
464} with { variant "TAG (
465 fullNetworkName, elementIdentifier = '1000011'B; // '43'O;
466 shortNetworkName, elementIdentifier = '1000101'B; // '45'O;
467 localtimeZone, elementIdentifier = '1000110'B; // '46'O;
468 univTime, elementIdentifier = '1000111'B; // '47'O;
469 lSAIdentity, elementIdentifier = '1001000'B; //' 48'O;
470 networkDST, elementIdentifier = '49'O;)"};
471
472//9.2.16 MM Status
473//****************************************************************************
474type record PDU_ML3_MMStatus
475{
476 BIT6 messageType,
477 BIT2 nsd,
478 OCT1 rejectCause //10.5.3.6
479 };
480
481//9.2.17 TMSI reallocation command (NW->MS)
482//****************************************************************************
483type record PDU_ML3_TMSI_ReallocationCommand
484{
485 BIT6 messageType, // '011010'B
486 BIT2 nsd,
487 LocationAreaIdentification_V locationAreaIdentification,
488 MobileIdentityLV mobileIdentity
489};
490
491//9.2.18 TMSI reallocation complete (MS->NW)
492//****************************************************************************
493type record PDU_ML3_TMSI_ReallocationComplete
494{
495 BIT6 messageType, // '011011'B
496 BIT2 nsd
497};
498
499//9.2.19 MM Null (MS->NW)
500//****************************************************************************
501type record PDU_ML3_MMNull
502{
503 BIT6 messageType, // '110000'B
504 BIT2 nsd
505};
506
507
508// ***************************************************************************
509// * Mobility Management Messages
510// ***************************************************************************
511// 24.008/ Table 10.2
512type union PDU_ML3_MM
513{
514 PDU_ML3_IMSI_DetachIndication imsiDetachIndication,
515 PDU_ML3_LocationUpdateAccept locationUpdateAccept,
516 PDU_ML3_LocationUpdateReject locationUpdateReject,
517 PDU_ML3_LocationUpdateRequest locationUpdateRequest,
518
519 PDU_ML3_AuthenticationReject authenticationReject,
520 PDU_ML3_AuthenticationRequest authenticationRequest,
521 PDU_ML3_AuthenticationResponse authenticationResponse,
522 PDU_ML3_AuthenticationFailure authenticationFailure,
523 PDU_ML3_IdentityRequest identityRequest,
524 PDU_ML3_IdentityResponse identityResponse,
525 PDU_ML3_TMSI_ReallocationCommand tmsiReallocCommand,
526 PDU_ML3_TMSI_ReallocationComplete tmsiReallocComplete,
527
528 PDU_ML3_CMServiceAbort cMServiceAbort,
529 PDU_ML3_CMServiceAccept cMServiceAccept,
530 PDU_ML3_CMServiceReject cMServiceReject,
531 PDU_ML3_CMServiceRequest cMServiceRequest,
532 PDU_ML3_CMServicePrompt cMServicePrompt,
533 PDU_ML3_CMReestablishmentRequest cMReEstablReq,
534 PDU_ML3_Abort abort,
535
536 PDU_ML3_MMNull mMNull,
537 PDU_ML3_MMStatus mMStatus,
538 PDU_ML3_MMInformation mMInformation
539} with { variant "TAG (
540 imsiDetachIndication, messageType ='000001'B; //registration msgs
541 locationUpdateAccept, messageType ='000010'B;
542 locationUpdateReject, messageType ='000100'B;
543 locationUpdateRequest, messageType ='001000'B;
544
545 authenticationReject, messageType ='010001'B;//security msgs
546 authenticationRequest, messageType ='010010'B;
547 authenticationResponse, messageType ='010100'B;
548 authenticationFailure, messageType ='011100'B;
549 identityRequest, messageType ='011000'B;
550 identityResponse, messageType ='011001'B;
551 tmsiReallocCommand, messageType ='011010'B;
552 tmsiReallocComplete, messageType ='011011'B;
553
554 cMServiceAbort, messageType ='100011'B; //conn, mgmt
555 cMServiceAccept, messageType ='100001'B;
556 cMServiceReject, messageType ='100010'B;
557 cMServiceRequest, messageType ='100100'B;
558 cMServicePrompt, messageType ='100101'B;
559 cMReEstablReq, messageType ='101000'B;
560 abort, messageType ='101001'B;
561
562 mMNull, messageType ='110000'B; //misc
563 mMStatus, messageType ='110001'B;
564 mMInformation, messageType ='110010'B;
565 )"};
566
567}//end of module
568with {
569extension "version R1B"
570encode "RAW"
571}
572