2 * Routines for Radio Access Network Application Part Protocol dissection
3 * Based on 3GPP TS 25.413 V3.4.0
4 * Copyright 2001, Martin Held <Martin.Held@icn.siemens.de>
6 * $Id: packet-ranap.c,v 1.14 2002/08/02 23:35:57 jmayer Exp $
8 * Ethereal - Network traffic analyzer
9 * By Gerald Combs <gerald@ethereal.com>
10 * Copyright 1998 Gerald Combs
12 * Copied from README.developer
14 * This program is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU General Public License
16 * as published by the Free Software Foundation; either version 2
17 * of the License, or (at your option) any later version.
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, write to the Free Software
26 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
40 #include <epan/packet.h>
43 #define SCCP_SSN_RANAP 0x8E
44 #define SCCP_SSN_RANAP_C 0x19
45 #define SCCP_SSN_RANAP_D 0x1A
47 /* description of PDU header */
48 #define PDU_NUMBER_OF_OCTETS_OFFSET 3
50 /* PDU Index Values */
51 #define InitiatingMessage 0
52 #define SuccessfulOutcome 1
53 #define UnsuccessfulOutcome 2
56 static const value_string ranap_pdu_index_values[] = {
57 {InitiatingMessage, "InitiatingMessage"},
58 {SuccessfulOutcome, "SuccessfulOutcome"},
59 {UnsuccessfulOutcome, "UnsuccessfulOutcome"},
65 /* Procedure Code Values */
66 #define PC_RAB_Assignment 0
67 #define PC_Iu_Release 1
68 #define PC_RelocationPreparation 2
69 #define PC_RelocationResourceAllocation 3
70 #define PC_RelocationCancel 4
71 #define PC_SRNS_ContextTransfer 5
72 #define PC_SecurityModeControl 6
73 #define PC_DataVolumeReport 7
74 #define PC_CN_InformationBroadcast 8
76 #define PC_RAB_ReleaseRequest 10
77 #define PC_Iu_ReleaseRequest 11
78 #define PC_RelocationDetect 12
79 #define PC_RelocationComplete 13
81 #define PC_CommonID 15
82 #define PC_CN_InvokeTrace 16
83 #define PC_LocationReportingControl 17
84 #define PC_LocationReport 18
85 #define PC_InitialUE_Message 19
86 #define PC_DirectTransfer 20
87 #define PC_OverloadControl 21
88 #define PC_ErrorIndication 22
89 #define PC_SRNS_DataForward 23
90 #define PC_ForwardSRNS_Context 24
91 #define PC_privateMessage 25
92 #define PC_CN_DeactivateTrace 26
93 #define PC_ResetResource 27
94 #define PC_RANAP_Relocation 28
97 static const value_string ranap_procedure_code_values[] = {
98 {PC_RAB_Assignment, "RAB-Assignment"},
99 {PC_Iu_Release, "IU-Release"},
100 {PC_RelocationPreparation, "RelocationPreparation"},
101 {PC_RelocationResourceAllocation, "RelocationResourceAllocation"},
102 {PC_RelocationCancel, "RelocationCancel"},
103 {PC_SRNS_ContextTransfer, "SRNS-ContextTransfer"},
104 {PC_SecurityModeControl, "SecurityModeControl"},
105 {PC_DataVolumeReport, "DataVolumeReport"},
106 {PC_CN_InformationBroadcast, "CN-InformationBroadcast"},
108 {PC_RAB_ReleaseRequest, "RAB-ReleaseRequest"},
109 {PC_Iu_ReleaseRequest, "Iu-ReleaseRequest"},
110 {PC_RelocationDetect, "RelocationDetect"},
111 {PC_RelocationComplete, "RelocationComplete"},
112 {PC_Paging, "Paging"},
113 {PC_CommonID, "CommonID"},
114 {PC_CN_InvokeTrace, "CN-InvokeTrace"},
115 {PC_LocationReportingControl, "LocationReportingControl"},
116 {PC_LocationReport, "LocationReport"},
117 {PC_InitialUE_Message, "InitialUE_Message"},
118 {PC_DirectTransfer, "DirectTransfer"},
119 {PC_OverloadControl, "OverloadControl"},
120 {PC_ErrorIndication, "ErrorIndication"},
121 {PC_SRNS_DataForward, "SRNS-DataForward"},
122 {PC_ForwardSRNS_Context, "ForwardSRNS-Context"},
123 {PC_privateMessage, "privateMessage"},
124 {PC_CN_DeactivateTrace, "CN-DeactivateTrace"},
125 {PC_ResetResource, "ResetResource"},
126 {PC_RANAP_Relocation, "RANAP-Relocation"},
131 static const value_string ranap_message_names[][5] = {
132 {/* PC_RAB_Assignment */
133 { InitiatingMessage, "RAB-AssignmentRequest"},
134 { SuccessfulOutcome, "undefined message"},
135 { UnsuccessfulOutcome, "undefined message"},
136 { Outcome, "RAB-AssignmentResponse"},
138 { /* PC_Iu_Release */
139 { InitiatingMessage, "Iu-ReleaseCommand"},
140 { SuccessfulOutcome, "Iu-ReleaseComplete"},
141 { UnsuccessfulOutcome, NULL},
144 { /* PC_RelocationPreparation */
145 { InitiatingMessage, "RelocationRequired"},
146 { SuccessfulOutcome, "RelocationCommand"},
147 { UnsuccessfulOutcome, "RelocationPreparationFailure"},
150 { /* PC_RelocationResourceAllocation */
151 { InitiatingMessage, "RelocationRequest"},
152 { SuccessfulOutcome, "RelocationRequestAcknowledge"},
153 { UnsuccessfulOutcome, "RelocationFailure"},
156 { /* PC_RelocationCancel */
157 { InitiatingMessage, "RelocationCancel"},
158 { SuccessfulOutcome, "RelocationCancelAcknowledge"},
159 { UnsuccessfulOutcome, NULL},
162 { /* PC_SRNS_ContextTransfer */
163 { InitiatingMessage, "SRNS-ContextRequest"},
164 { SuccessfulOutcome, "SRNS-ContextResponse"},
165 { UnsuccessfulOutcome, NULL},
168 { /* PC_SecurityModeControl */
169 { InitiatingMessage, "SecurityModeCommand"},
170 { SuccessfulOutcome, "SecurityModeComplete"},
171 { UnsuccessfulOutcome, "SecurityModeReject"},
174 { /* PC_DataVolumeReport */
175 { InitiatingMessage, "DataVolumeReportRequest"},
176 { SuccessfulOutcome, "DataVolumeReport"},
177 { UnsuccessfulOutcome, NULL},
180 { /* PC_CN_InformationBroadcast */
181 { InitiatingMessage, "CN-InformationBroadcastRequest"},
182 { SuccessfulOutcome, "CN-InformationBroadcastConfirm"},
183 { UnsuccessfulOutcome, "CN-InformationBroadcastReject"},
187 { InitiatingMessage, "Reset"},
188 { SuccessfulOutcome, "ResetAcknowledge"},
189 { UnsuccessfulOutcome, NULL},
192 { /* PC_RAB_ReleaseRequest */
193 { InitiatingMessage, "RAB-ReleaseRequest"},
194 { SuccessfulOutcome, NULL},
195 { UnsuccessfulOutcome, NULL},
198 { /* PC_Iu_ReleaseRequest */
199 { InitiatingMessage, "Iu-ReleaseRequest"},
200 { SuccessfulOutcome, NULL},
201 { UnsuccessfulOutcome, NULL},
204 { /* PC_RelocationDetect */
205 { InitiatingMessage, "RelocationDetect"},
206 { SuccessfulOutcome, NULL},
207 { UnsuccessfulOutcome, NULL},
210 { /* PC_RelocationComplete */
211 { InitiatingMessage, "RelocationComplete"},
212 { SuccessfulOutcome, NULL},
213 { UnsuccessfulOutcome, NULL},
217 { InitiatingMessage, "Paging"},
218 { SuccessfulOutcome, NULL},
219 { UnsuccessfulOutcome, NULL},
223 { InitiatingMessage, "CommonID"},
224 { SuccessfulOutcome, NULL},
225 { UnsuccessfulOutcome, NULL},
228 { /* PC_CN_InvokeTrace */
229 { InitiatingMessage, "CN-InvokeTrace"},
230 { SuccessfulOutcome, NULL},
231 { UnsuccessfulOutcome, NULL},
234 {/* PC_LocationReportingControl */
235 { InitiatingMessage, "LocationReportingControl"},
236 { SuccessfulOutcome, NULL},
237 { UnsuccessfulOutcome, NULL},
240 { /* PC_LocationReport */
241 { InitiatingMessage, "LocationReport"},
242 { SuccessfulOutcome, NULL},
243 { UnsuccessfulOutcome, NULL},
246 { /* PC_InitialUE_Message */
247 { InitiatingMessage, "InitialUE-Message"},
248 { SuccessfulOutcome, NULL},
249 { UnsuccessfulOutcome, NULL},
252 { /* PC_DirectTransfer */
253 { InitiatingMessage, "DirectTransfer"},
254 { SuccessfulOutcome, NULL},
255 { UnsuccessfulOutcome, NULL},
258 { /* PC_OverloadControl */
259 { InitiatingMessage, "Overload"},
260 { SuccessfulOutcome, NULL},
261 { UnsuccessfulOutcome, NULL},
264 { /* PC_ErrorIndication */
265 { InitiatingMessage, "ErrorIndication"},
266 { SuccessfulOutcome, NULL},
267 { UnsuccessfulOutcome, NULL},
270 { /* PC_SRNS_DataForward */
271 { InitiatingMessage, "SRNS-DataForwardCommand"},
272 { SuccessfulOutcome, NULL},
273 { UnsuccessfulOutcome, NULL},
276 { /* PC_ForwardSRNS_Context */
277 { InitiatingMessage, "ForwardSRNS-Context"},
278 { SuccessfulOutcome, NULL},
279 { UnsuccessfulOutcome, NULL},
282 { /* PC_privateMessage */
283 { InitiatingMessage, "PrivateMessage"},
284 { SuccessfulOutcome, NULL},
285 { UnsuccessfulOutcome, NULL},
288 { /* PC_CN_DeactivateTrace */
289 { InitiatingMessage, "CN-DeactivateTrace"},
290 { SuccessfulOutcome, NULL},
291 { UnsuccessfulOutcome, NULL},
294 { /* PC_ResetResource */
295 { InitiatingMessage, "ResetResource"},
296 { SuccessfulOutcome, "ResetResourceAcknowledge"},
297 { UnsuccessfulOutcome, NULL},
300 { /* PC_RANAP_Relocation */
301 { InitiatingMessage, "RANAP-RelocationInformation"},
302 { SuccessfulOutcome, NULL},
303 { UnsuccessfulOutcome, NULL},
309 /* Criticality Values */
314 static const value_string ranap_criticality_values[] = {
315 {CR_reject, "reject"},
316 {CR_ignore, "ignore"},
317 {CR_notify, "notify"},
321 /* presence values for optional components */
322 #define PR_not_present 0
325 static const value_string ranap_presence_values[] = {
326 {PR_not_present, "not present"},
327 {PR_present, "present"},
331 /* description of IE Header */
332 #define IE_ID_LENGTH 2
333 #define IE_CRITICALITY_LENGTH 1
336 /* description of IE-ID values */
337 #define IE_AreaIdentity 0
338 #define IE_CN_BroadcastInformationPiece 1
339 #define IE_CN_BroadcastInformationPieceList 2
340 #define IE_CN_DomainIndicator 3
342 #define IE_ChosenEncryptionAlgorithm 5
343 #define IE_ChosenIntegrityProtectionAlgorithm 6
344 #define IE_ClassmarkInformation2 7
345 #define IE_ClassmarkInformation3 8
346 #define IE_CriticalityDiagnostics 9
347 #define IE_DL_GTP_PDU_SequenceNumber 10
348 #define IE_EncryptionInformation 11
349 #define IE_IntegrityProtectionInformation 12
350 #define IE_IuTransportAssociation 13
351 #define IE_L3_Information 14
353 #define IE_NAS_PDU 16
354 #define IE_NonSearchingIndication 17
355 #define IE_NumberOfSteps 18
357 #define IE_OldBSS_ToNewBSS_Information 20
358 #define IE_PagingAreaID 21
359 #define IE_PagingCause 22
360 #define IE_PermanentNAS_UE_ID 23
361 #define IE_RAB_ContextItem 24
362 #define IE_RAB_ContextList 25
363 #define IE_RAB_DataForwardingItem 26
364 #define IE_RAB_DataForwardingItem_SRNS_CtxReq 27
365 #define IE_RAB_DataForwardingList 28
366 #define IE_RAB_DataForwardingList_SRNS_CtxReq 29
367 #define IE_RAB_DataVolumeReportItem 30
368 #define IE_RAB_DataVolumeReportList 31
369 #define IE_RAB_DataVolumeReportRequestItem 32
370 #define IE_RAB_DataVolumeReportRequestList 33
371 #define IE_RAB_FailedItem 34
372 #define IE_RAB_FailedList 35
374 #define IE_RAB_QueuedItem 37
375 #define IE_RAB_QueuedList 38
376 #define IE_RAB_ReleaseFailedList 39
377 #define IE_RAB_ReleaseItem 40
378 #define IE_RAB_ReleaseList 41
379 #define IE_RAB_ReleasedItem 42
380 #define IE_RAB_ReleasedList 43
381 #define IE_RAB_ReleasedList_IuRelComp 44
382 #define IE_RAB_RelocationReleaseItem 45
383 #define IE_RAB_RelocationReleaseList 46
384 #define IE_RAB_SetupItem_RelocReq 47
385 #define IE_RAB_SetupItem_RelocReqAck 48
386 #define IE_RAB_SetupList_RelocReq 49
387 #define IE_RAB_SetupList_RelocReqAck 50
388 #define IE_RAB_SetupOrModifiedItem 51
389 #define IE_RAB_SetupOrModifiedList 52
390 #define IE_RAB_SetupOrModifyItem 53
391 #define IE_RAB_SetupOrModifyList 54
393 #define IE_RelocationType 56
394 #define IE_RequestType 57
397 #define IE_SourceID 60
398 #define IE_SourceRNC_ToTargetRNC_TransparentContainer 61
399 #define IE_TargetID 62
400 #define IE_TargetRNC_ToSourceRNC_TransparentContainer 63
401 #define IE_TemporaryUE_ID 64
402 #define IE_TraceReference 65
403 #define IE_TraceType 66
404 #define IE_TransportLayerAddress 67
405 #define IE_TriggerID 68
407 #define IE_UL_GTP_PDU_SequenceNumber 70
408 #define IE_RAB_FailedtoReportItem 71
409 #define IE_RAB_FailedtoReportList 72
410 #define IE_KeyStatus 75
411 #define IE_DRX_CycleLengthCoefficient 76
412 #define IE_IuSigConIdList 77
413 #define IE_IuSigConIdItem 78
414 #define IE_IuSigConId 79
415 #define IE_DirectTransferInformationItem_RANAP_RelocInf 80
416 #define IE_DirectTransferInformationList_RANAP_RelocInf 81
417 #define IE_RAB_ContextItem_RANAP_RelocInf 82
418 #define IE_RAB_ContextList_RANAP_RelocInf 83
419 #define IE_RAB_ContextFailedtoTransferItem 84
420 #define IE_RAB_ContextFailedtoTransferList 85
421 #define IE_GlobalRNC_ID 86
422 #define IE_RAB_ReleasedItem_IuRelComp 87
424 static const value_string ranap_ie_id_values[] = {
425 {IE_AreaIdentity, "AreaIdentity"},
426 {IE_CN_BroadcastInformationPiece, "CN_BroadcastInformationPiece"},
427 {IE_CN_BroadcastInformationPieceList, "CN_BroadcastInformationPieceList"},
428 {IE_CN_DomainIndicator, "CN_DomainIndicator"},
430 {IE_ChosenEncryptionAlgorithm, "ChosenEncryptionAlgorithm"},
431 {IE_ChosenIntegrityProtectionAlgorithm, "ChosenIntegrityProtectionAlgorithm"},
432 {IE_ClassmarkInformation2, "ClassmarkInformation2"},
433 {IE_ClassmarkInformation3, "ClassmarkInformation3"},
434 {IE_CriticalityDiagnostics, "CriticalityDiagnostics"},
435 {IE_DL_GTP_PDU_SequenceNumber, "DL_GTP_PDU_SequenceNumber"},
436 {IE_EncryptionInformation, "EncryptionInformation"},
437 {IE_IntegrityProtectionInformation, "IntegrityProtectionInformation"},
438 {IE_IuTransportAssociation, "IuTransportAssociation"},
439 {IE_L3_Information, "L3_Information"},
441 {IE_NAS_PDU, "NAS_PDU"},
442 {IE_NonSearchingIndication, "NonSearchingIndication"},
443 {IE_NumberOfSteps, "NumberOfSteps"},
444 {IE_OMC_ID, "OMC_ID"},
445 {IE_OldBSS_ToNewBSS_Information, "OldBSS_ToNewBSS_Information"},
446 {IE_PagingAreaID, "PagingAreaID"},
447 {IE_PagingCause, "PagingCause"},
448 {IE_PermanentNAS_UE_ID, "PermanentNAS_UE_ID"},
449 {IE_RAB_ContextItem, "RAB_ContextItem"},
450 {IE_RAB_ContextList, "RAB_ContextList"},
451 {IE_RAB_DataForwardingItem, "RAB_DataForwardingItem"},
452 {IE_RAB_DataForwardingItem_SRNS_CtxReq, "RAB_DataForwardingItem_SRNS_CtxReq"},
453 {IE_RAB_DataForwardingList, "RAB_DataForwardingList"},
454 {IE_RAB_DataForwardingList_SRNS_CtxReq, "RAB_DataForwardingList_SRNS_CtxReq"},
455 {IE_RAB_DataVolumeReportItem, "RAB_DataVolumeReportItem"},
456 {IE_RAB_DataVolumeReportList, "RAB_DataVolumeReportList"},
457 {IE_RAB_DataVolumeReportRequestItem, "RAB_DataVolumeReportRequestItem"},
458 {IE_RAB_DataVolumeReportRequestList, "RAB_DataVolumeReportRequestList"},
459 {IE_RAB_FailedItem, "RAB_FailedItem"},
460 {IE_RAB_FailedList, "RAB_FailedList"},
461 {IE_RAB_ID, "RAB_ID"},
462 {IE_RAB_QueuedItem, "RAB_QueuedItem"},
463 {IE_RAB_QueuedList, "RAB_QueuedList"},
464 {IE_RAB_ReleaseFailedList, "RAB_ReleaseFailedList"},
465 {IE_RAB_ReleaseItem, "RAB_ReleaseItem"},
466 {IE_RAB_ReleaseList, "RAB_ReleaseList"},
467 {IE_RAB_ReleasedItem, "RAB_ReleasedItem"},
468 {IE_RAB_ReleasedList, "RAB_ReleasedList"},
469 {IE_RAB_ReleasedList_IuRelComp, "RAB_ReleasedList_IuRelComp"},
470 {IE_RAB_RelocationReleaseItem, "RAB_RelocationReleaseItem"},
471 {IE_RAB_RelocationReleaseList, "RAB_RelocationReleaseList"},
472 {IE_RAB_SetupItem_RelocReq, "RAB_SetupItem_RelocReq"},
473 {IE_RAB_SetupItem_RelocReqAck, "RAB_SetupItem_RelocReqAck"},
474 {IE_RAB_SetupList_RelocReq, "RAB_SetupList_RelocReq"},
475 {IE_RAB_SetupList_RelocReqAck, "RAB_SetupList_RelocReqAck"},
476 {IE_RAB_SetupOrModifiedItem, "RAB_SetupOrModifiedItem"},
477 {IE_RAB_SetupOrModifiedList, "RAB_SetupOrModifiedList"},
478 {IE_RAB_SetupOrModifyItem, "RAB_SetupOrModifyItem"},
479 {IE_RAB_SetupOrModifyList, "RAB_SetupOrModifyList"},
481 {IE_RelocationType, "RelocationType"},
482 {IE_RequestType, "RequestType"},
485 {IE_SourceID, "SourceID"},
486 {IE_SourceRNC_ToTargetRNC_TransparentContainer,
487 "SourceRNC_ToTargetRNC_TransparentContainer"},
488 {IE_TargetID, "TargetID"},
489 {IE_TargetRNC_ToSourceRNC_TransparentContainer,
490 "TargetRNC_ToSourceRNC_TransparentContainer"},
491 {IE_TemporaryUE_ID, "TemporaryUE_ID"},
492 {IE_TraceReference, "TraceReference"},
493 {IE_TraceType, "TraceType"},
494 {IE_TransportLayerAddress, "TransportLayerAddress"},
495 {IE_TriggerID, "TriggerID"},
497 {IE_UL_GTP_PDU_SequenceNumber, "UL_GTP_PDU_SequenceNumber"},
498 {IE_RAB_FailedtoReportItem, "RAB_FailedtoReportItem"},
499 {IE_RAB_FailedtoReportList, "RAB_FailedtoReportList"},
500 {IE_KeyStatus, "KeyStatus"},
501 {IE_DRX_CycleLengthCoefficient, "DRX_CycleLengthCoefficient"},
502 {IE_IuSigConIdList, "IuSigConIdList"},
503 {IE_IuSigConIdItem, "IuSigConIdItem"},
504 {IE_IuSigConId, "IuSigConId"},
505 {IE_DirectTransferInformationItem_RANAP_RelocInf,
506 "DirectTransferInformationItem_RANAP_RelocInf"},
507 {IE_DirectTransferInformationList_RANAP_RelocInf,
508 "DirectTransferInformationList_RANAP_RelocInf"},
509 {IE_RAB_ContextItem_RANAP_RelocInf, "RAB_ContextItem_RANAP_RelocInf"},
510 {IE_RAB_ContextList_RANAP_RelocInf, "RAB_ContextList_RANAP_RelocInf"},
511 {IE_RAB_ContextFailedtoTransferItem, "RAB_ContextFailedtoTransferItem"},
512 {IE_RAB_ContextFailedtoTransferList, "RAB_ContextFailedtoTransferList"},
513 {IE_GlobalRNC_ID, "GlobalRNC_ID"},
514 {IE_RAB_ReleasedItem_IuRelComp, "RAB_ReleasedItem_IuRelComp"},
519 /* Description of IE-Contents */
521 /* Length of fields within IEs */
522 #define RAB_ID_LENGTH 1
523 #define PLMN_ID_LENGTH 3
525 #define IE_PROTOCOL_EXTENSION_LENGTH 1
528 #define NUM_RABS_LENGTH 1
531 /* Traffic Class values */
532 #define TC_conversational 0
533 #define TC_streaming 1
534 #define TC_interactive 2
535 #define TC_background 3
537 static const value_string ranap_trafficClass_values[] = {
538 {TC_conversational, "conversational"},
539 {TC_streaming, "streaming"},
540 {TC_interactive, "interactive"},
541 {TC_background, "background"},
545 /* rAB-AsymmetryIndicator values */
546 #define AI_symmetric_bidirectional 0
547 #define AI_asymmetric_unidirectional_downlink 1
548 #define AI_asymmetric_unidirectional_uplink 2
549 #define AI_asymmetric_bidirectional 3
551 static const value_string ranap_rAB_AsymmetryIndicator_values[] = {
552 {AI_symmetric_bidirectional, "symmetric-bidirectional"},
553 {AI_asymmetric_unidirectional_downlink, "asymmetric-unidirectional-downlink"},
554 {AI_asymmetric_unidirectional_uplink, "asymmetric-unidirectional-uplink"},
555 {AI_asymmetric_bidirectional, "asymmetric-bidirectional"},
559 /* DeliveryOrder values */
560 #define DO_delivery_order_requested 0
561 #define DO_delivery_order_not_requested 1
563 static const value_string ranap_DeliveryOrder_values[] = {
564 {DO_delivery_order_requested, "delivery-order-requested"},
565 {DO_delivery_order_not_requested, "delivery-order-not-requested"},
568 #define maxSDU_Size_LENGTH 2
570 /* deliveryOfErroneousSDU values */
573 #define DOES_no_error_detection_consideration 2
575 static const value_string ranap_deliveryOfErroneousSDU_values[] = {
578 {DOES_no_error_detection_consideration, "no-error-detection-consideration"},
582 #define subflowSDU_Size_LENGTH 2
583 #define transferDelay_LENGTH 2
586 /* trafficHandlingPriority values */
587 static const value_string ranap_priority_values[] = {
603 { 15, "no-priority-used"},
607 /* pre-emptionCapability values */
608 static const value_string ranap_pre_emptionCapability_values[] = {
609 { 0, "shall-not-trigger-pre-emption"},
610 { 1, "may-trigger-pre-emption"},
613 /* pre-emptionVulnerability values */
614 static const value_string ranap_pre_emptionVulnerability_values[] = {
615 { 0, "not-pre-emptable"},
616 { 1, "pre-emptable"},
620 /* queuingAllowed values */
621 static const value_string ranap_queuingAllowed_values[] = {
622 { 0, "queueing-not-allowed"},
623 { 1, "queueing-allowed"},
627 /* sourceStatisticsDescriptor values */
628 static const value_string ranap_sourceStatisticsDescriptor_values[] = {
633 /* relocationRequirement values */
634 static const value_string ranap_relocationRequirement_values[] = {
639 /* userPlaneMode values */
640 static const value_string ranap_userPlaneMode_values[] = {
641 { 0, "transparent-mode"},
642 { 1, "support-mode-for-predefined-SDU-sizes"},
645 /* PDP_Type values */
646 static const value_string ranap_PDP_Type_values[] = {
654 /* dataVolumeReportingIndication values */
655 static const value_string ranap_dataVolumeReportingIndication_values[] = {
657 { 1, "do-not-report"},
661 /* cause_choice values */
662 #define CC_CauseRadioNetwork 0
663 #define CC_CauseTransmissionNetwork 1
664 #define CC_CauseNAS 2
665 #define CC_CauseProtocol 3
666 #define CC_CauseMisc 4
667 #define CC_CauseNon_Standard 5
669 static const value_string ranap_cause_choice_values[] = {
670 { CC_CauseRadioNetwork, "CauseRadioNetwork"},
671 { CC_CauseTransmissionNetwork, "CauseTransmissionNetwork"},
672 { CC_CauseNAS, "CauseNAS"},
673 { CC_CauseProtocol, "CauseProtocol"},
674 { CC_CauseMisc, "CauseMisc"},
675 { CC_CauseNon_Standard, "CauseNon-Standard"},
680 static const value_string ranap_cause_value_str[] = {
681 /* CauseRadioNetwork (1..64) */
682 { 1, "rab-pre-empted"},
683 { 2, "trelocoverall-expiry"},
684 { 3, "trelocprep-expiry"},
685 { 4, "treloccomplete-expiry"},
686 { 5, "tqueing-expiry"},
687 { 6, "relocation-triggered"},
688 { 7, "trellocalloc-expiry"},
689 { 8, "unable-to-establish-during-relocation"},
690 { 9, "unknown-target-rnc"},
691 { 10, "relocation-cancelled"},
692 { 11, "successful-relocation"},
693 { 12, "requested-ciphering-and-or-integrity-protection-algorithms-not-supported"},
694 { 13, "change-of-ciphering-and-or-integrity-protection-is-not-supported"},
695 { 14, "failure-in-the-radio-interface-procedure"},
696 { 15, "release-due-to-utran-generated-reason"},
697 { 16, "user-inactivity"},
698 { 17, "time-critical-relocation"},
699 { 18, "requested-traffic-class-not-available"},
700 { 19, "invalid-rab-parameters-value"},
701 { 20, "requested-maximum-bit-rate-not-available"},
702 { 21, "requested-guaranteed-bit-rate-not-available"},
703 { 22, "requested-transfer-delay-not-achievable"},
704 { 23, "invalid-rab-parameters-combination"},
705 { 24, "condition-violation-for-sdu-parameters"},
706 { 25, "condition-violation-for-traffic-handling-priority"},
707 { 26, "condition-violation-for-guaranteed-bit-rate"},
708 { 27, "user-plane-versions-not-supported"},
709 { 28, "iu-up-failure"},
710 { 29, "relocation-failure-in-target-CN-RNC-or-target-system"},
711 { 30, "invalid-RAB-ID"},
712 { 31, "no-remaining-rab"},
713 { 32, "interaction-with-other-procedure"},
714 { 33, "requested-maximum-bit-rate-for-dl-not-available"},
715 { 34, "requested-maximum-bit-rate-for-ul-not-available"},
716 { 35, "requested-guaranteed-bit-rate-for-dl-not-available"},
717 { 36, "requested-guaranteed-bit-rate-for-ul-not-available"},
718 { 37, "repeated-integrity-checking-failure"},
719 { 38, "requested-report-type-not-supported"},
720 { 39, "request-superseded"},
721 { 40, "release-due-to-UE-generated-signalling-connection-release"},
722 { 41, "resource-optimisation-relocation"},
723 { 42, "requested-information-not-available"},
724 { 43, "relocation-desirable-for-radio-reasons"},
725 { 44, "relocation-not-supported-in-target-RNC-or-target-system"},
726 { 45, "directed-retry"},
727 { 46, "radio-connection-with-UE-Lost"},
729 /* CauseTransmissionNetwork (65..80) */
730 { 65, "logical-error-unknown-iu-transport-association"},
731 { 66, "iu-transport-connection-failed-to-establish"},
733 /* CauseNAS (81..96) */
734 { 81, "user-restriction-start-indication"},
735 { 82, "user-restriction-end-indication"},
736 { 83, "normal-release"},
738 /* CauseProtocol (97..112) */
739 { 97, "transfer-syntax-error"},
740 { 98, "semantic-error"},
741 { 99, "message-not-compatible-with-receiver-state"},
742 {100, "abstract-syntax-error-reject"},
743 {101, "abstract-syntax-error-ignore-and-notify"},
744 {102, "abstract-syntax-error-falsely-constructed-message"},
746 /* CauseMisc (113..128) */
747 {113, "om-intervention"},
748 {114, "no-resource-available"},
749 {115, "unspecified-failure"},
750 {116, "network-optimisation"},
754 /* CN_DomainIndicator_values */
755 static const value_string ranap_CN_DomainIndicator_values[] = {
762 static const value_string ranap_SAPI_values[] = {
767 /* service_Handover_values */
768 static const value_string ranap_service_Handover_values[] = {
769 { 0, "handover-to-GSM-should-be-performed"},
770 { 1, "handover-to-GSM-should-not-be-performed"},
771 { 2, "handover-to-GSM-shall-not-be-performed"},
774 /* Initialize the protocol and registered fields */
776 static int proto_ranap = -1;
778 /* pdu header fields */
779 static int hf_ranap_pdu_number_of_octets = -1;
780 static int hf_ranap_pdu_index = -1;
781 static int hf_ranap_procedure_code = -1;
782 static int hf_ranap_pdu_criticality = -1;
783 static int hf_ranap_number_of_ies = -1;
785 /* ie header fields */
786 static int hf_ranap_ie_ie_id = -1;
787 static int hf_ranap_ie_criticality = -1;
788 static int hf_ranap_ie_number_of_octets = -1;
789 static int hf_ranap_ie_protocol_extension = -1;
791 /*ie contents fields */
792 static int hf_ranap_number_of_ies_in_list = -1;
793 static int hf_ranap_ie_pair_first_criticality = -1;
794 static int hf_ranap_ie_pair_second_criticality = -1;
795 static int hf_ranap_first_value_number_of_octets = -1;
796 static int hf_ranap_second_value_number_of_octets = -1;
797 static int hf_ranap_rab_id = -1;
798 static int hf_ranap_nas_pdu = -1;
799 static int hf_ranap_plmn_id = -1;
800 static int hf_ranap_lac = -1;
801 static int hf_ranap_sac = -1;
802 static int hf_ranap_rac = -1;
803 static int hf_ranap_nAS_SynchronisationIndicator = -1;
804 static int hf_ranap_trafficClass = -1;
805 static int hf_ranap_deliveryOrder = -1;
806 static int hf_ranap_iE_Extensions_present = -1;
807 static int hf_ranap_num_rabs = -1;
808 static int hf_ranap_nAS_SynchronisationIndicator_present = -1;
809 static int hf_ranap_rAB_Parameters_present = -1;
810 static int hf_ranap_userPlaneInformation_present = -1;
811 static int hf_ranap_transportLayerInformation_present = -1;
812 static int hf_ranap_service_Handover_present = -1;
813 static int hf_ranap_guaranteedBitRate_present = -1;
814 static int hf_ranap_transferDelay_present = -1;
815 static int hf_ranap_trafficHandlingPriority_present = -1;
816 static int hf_ranap_allocationOrRetentionPriority_present = -1;
817 static int hf_ranap_sourceStatisticsDescriptor_present = -1;
818 static int hf_ranap_relocationRequirement_present = -1;
819 static int hf_ranap_rAB_AsymmetryIndicator = -1;
820 static int hf_ranap_maxBitrate = -1;
821 static int hf_ranap_guaranteedBitrate = -1;
822 static int hf_ranap_maxSDU_Size = -1;
823 static int hf_ranap_sDU_ErrorRatio_mantissa = -1;
824 static int hf_ranap_sDU_ErrorRatio_exponent = -1;
825 static int hf_ranap_residualBitErrorRatio_mantissa = -1;
826 static int hf_ranap_residualBitErrorRatio_exponent = -1;
827 static int hf_ranap_deliveryOfErroneousSDU = -1;
828 static int hf_ranap_subflowSDU_Size = -1;
829 static int hf_ranap_rAB_SubflowCombinationBitRate = -1;
830 static int hf_ranap_sDU_ErrorRatio_present = -1;
831 static int hf_ranap_sDU_FormatInformationParameters_present = -1;
832 static int hf_ranap_subflowSDU_Size_present = -1;
833 static int hf_ranap_rAB_SubflowCombinationBitRate_present = -1;
834 static int hf_ranap_transferDelay = -1;
835 static int hf_ranap_trafficHandlingPriority = -1;
836 static int hf_ranap_priorityLevel = -1;
837 static int hf_ranap_pre_emptionCapability = -1;
838 static int hf_ranap_pre_emptionVulnerability = -1;
839 static int hf_ranap_queuingAllowed = -1;
840 static int hf_ranap_sourceStatisticsDescriptor = -1;
841 static int hf_ranap_userPlaneMode = -1;
842 static int hf_ranap_uP_ModeVersions = -1;
843 static int hf_ranap_number_of_ProtocolExtensionFields = -1;
844 static int hf_ranap_ext_field_id = -1;
845 static int hf_ranap_ext_field_criticality = -1;
846 static int hf_ranap_ext_field_number_of_octets = -1;
847 static int hf_ranap_transportLayerAddress = -1;
848 static int hf_ranap_transportLayerAddress_length = -1;
849 static int hf_ranap_gTP_TEI = -1;
850 static int hf_ranap_bindingID = -1;
851 static int hf_ranap_pDP_TypeInformation_present = -1;
852 static int hf_ranap_dataVolumeReportingIndication_present = -1;
853 static int hf_ranap_dl_GTP_PDU_SequenceNumber_present = -1;
854 static int hf_ranap_ul_GTP_PDU_SequenceNumber_present = -1;
855 static int hf_ranap_dl_N_PDU_SequenceNumber_present = -1;
856 static int hf_ranap_ul_N_PDU_SequenceNumber_present = -1;
857 static int hf_ranap_PDP_Type = -1;
858 static int hf_ranap_dataVolumeReportingIndication = -1;
859 static int hf_ranap_dl_GTP_PDU_SequenceNumber = -1;
860 static int hf_ranap_ul_GTP_PDU_SequenceNumber = -1;
861 static int hf_ranap_dl_N_PDU_SequenceNumber = -1;
862 static int hf_ranap_ul_N_PDU_SequenceNumber = -1;
863 static int hf_ranap_cause_choice = -1;
864 static int hf_ranap_cause_value = -1;
865 static int hf_ranap_transportLayerAddress_present = -1;
866 static int hf_ranap_iuTransportAssociation_present = -1;
867 static int hf_ranap_dl_dataVolumes_present = -1;
868 static int hf_ranap_dataVolumeReference_present = -1;
869 static int hf_ranap_dl_UnsuccessfullyTransmittedDataVolume = -1;
870 static int hf_ranap_dataVolumeReference = -1;
871 static int hf_ranap_procedureCode_present = -1;
872 static int hf_ranap_triggeringMessage_present = -1;
873 static int hf_ranap_procedureCriticality_present = -1;
874 static int hf_ranap_iEsCriticalityDiagnostics_present = -1;
875 static int hf_ranap_triggeringMessage = -1;
876 static int hf_ranap_iECriticality = -1;
877 static int hf_ranap_procedureCriticality = -1;
878 static int hf_ranap_repetitionNumber = -1;
879 static int hf_ranap_num_of_CriticalityDiagnostics_IEs = -1;
880 static int hf_ranap_repetitionNumber_present = -1;
881 static int hf_ranap_dl_UnsuccessfullyTransmittedDataVolume_present = -1;
882 static int hf_ranap_CN_DomainIndicator = -1;
883 static int hf_ranap_IuSigConId = -1;
884 static int hf_ranap_SAPI = -1;
885 static int hf_ranap_msg_extension_present = -1;
886 static int hf_ranap_ProtocolExtensionContainer_present = -1;
887 static int hf_ranap_nas_pdu_length = -1;
888 static int hf_ranap_relocationRequirement = -1;
889 static int hf_ranap_service_Handover = -1;
890 static int hf_ranap_extension_field = -1;
894 static gint ett_ranap = -1;
895 static gint ett_ranap_optionals = -1;
896 static gint ett_ranap_iE_Extension = -1;
897 static gint ett_ranap_ie = -1;
898 static gint ett_ranap_ie_pair = -1;
899 static gint ett_ranap_rab = -1;
900 static gint ett_ranap_ie_pair_first_value = -1;
901 static gint ett_ranap_ie_pair_second_value = -1;
902 static gint ett_ranap_rAB_Parameters = -1;
903 static gint ett_ranap_sDU = -1;
904 static gint ett_ranap_allocationOrRetentionPriority = -1;
905 static gint ett_ranap_CriticalityDiagnostics_IE = -1;
909 /*****************************************************************************/
911 /* Utility Functions */
913 /*****************************************************************************/
915 /* sets *offset and *bitoffset n bits further */
917 proceed_nbits(gint *offset, gint *bitoffset, gint n)
920 *offset += *bitoffset / 8;
924 /* sets *offset and *bitoffset to the next byte boundary */
925 static void allign(gint *offset, gint *bitoffset)
927 if ( *bitoffset != 0 )
934 /* sets *offset and *bitoffset behind the following integer */
936 proceed_perint32(gint *offset, gint *bitoffset, gint length)
938 proceed_nbits(offset, bitoffset, 2);
939 allign(offset, bitoffset);
944 /* extract length field found at offset */
945 /* if length field spans more than two bytes -1 is returned and the field is not decoded */
947 extract_length(tvbuff_t *tvb, gint offset, gint *length, gint *length_size)
950 guint16 tmp_length16;
952 tmp_length8 = tvb_get_guint8(tvb, offset);
953 if ((tmp_length8 & 0x80) == 0)
955 /* length coded in one byte */
956 *length = tmp_length8;
961 tmp_length16 = tvb_get_ntohs(tvb, offset);
962 if ( ((tmp_length16 & 0x8000) == 0x8000) && ((tmp_length16 & 0x4000) == 0) )
964 /* length coded in two bytes */
965 *length = tmp_length16 & 0x3FFF;
969 { /* length is coded in more than 2 bytes */
976 /* extract the next n bits and return them alligned to the LSB */
978 extract_nbits(tvbuff_t *tvb, gint offset, gint bitoffset, gint n)
984 if (bitoffset + n <= 8)
986 /* all bits contained in one byte */
987 uint_bits = tvb_get_guint8(tvb, offset);
988 uint_bits <<= bitoffset; /* remove bitoffset */
989 uint_bits >>= 8-n; /* allign to LSB */
993 /* bits contained within 2 bytes */
994 tmp_2bytes = tvb_get_ntohs(tvb, offset);
995 tmp_2bytes <<= bitoffset; /* remove bitoffset */
996 uint_bits = tmp_2bytes >> ( 8 + (8-n)); /* allign to LSB */
1003 /* extract an integer with 2bit length field and return the int value*/
1005 extract_int32(tvbuff_t *tvb, gint offset, gint bitoffset, gint *length)
1010 tmp_2byte = tvb_get_ntohs(tvb, offset);
1012 tmp_2byte <<= bitoffset; /* remove bitoffset */
1013 *length = tmp_2byte >> (6 + 8); /* allign 2bit length field to LSB */
1014 (*length)++; /* now we have the length of the int value */
1016 proceed_nbits(&offset, &bitoffset, 2);
1017 allign(&offset, &bitoffset);
1022 result = tvb_get_guint8(tvb, offset);
1025 result = tvb_get_ntohs(tvb, offset);
1028 result = tvb_get_ntoh24(tvb, offset);
1031 result = tvb_get_ntohl(tvb, offset);
1039 /* return bitmask string looking like "..01 0..." */
1041 bitmaskstr(guint bitoffset, guint bitlength, guint16 value, guint *length)
1043 static char maskstr[20];
1047 strcpy(maskstr, " ");
1049 for (i=0; i<16; i++)
1051 if ( i < bitoffset || i > bitoffset+bitlength-1 )
1053 /* i is outside extracted bitfield */
1054 maskstr[i + i/4] = '.';
1057 { /* i is inside extracted bitfield */
1058 if ( ((0x8000 >> i) & value) != 0x0000 )
1061 maskstr[i + i/4] = '1';
1065 /* bit is not set */
1066 maskstr[i + i/4] = '0';
1070 if (bitoffset + bitlength <= 8)
1072 /* bitfield is located within first byte only */
1078 /* bitfield is located within first & second byte */
1088 proto_tree_add_bitstring(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint offset,
1089 gint bitoffset, gint bitlength)
1091 guint16 read_2bytes;
1092 guint16 alligned_2bytes;
1095 char maskstr_buf[56] = "\0";
1099 char buf[256] = "\0";
1100 header_field_info *hf_info_p;
1102 gint initial_offset = offset;
1104 memset(bitstr, 0, 128);
1106 /* create bitmask string for first byte */
1107 read_2bytes = tvb_get_ntohs(tvb, offset);
1108 maskstr = bitmaskstr(bitoffset, (bitoffset+bitlength >8) ? 8-bitoffset : bitlength, read_2bytes, &length);
1109 if (bitoffset+bitlength > 8)
1111 sprintf(maskstr_buf, "%s + %d Bits = ", maskstr, bitlength - (8-bitoffset));
1115 sprintf(maskstr_buf, "%s = ", maskstr);
1119 /* print all but the last byte to buf */
1120 byte_span = (bitoffset + bitlength + 7) / 8;
1121 for (i=0; i < byte_span - 1; i++, offset++)
1123 read_2bytes = tvb_get_ntohs(tvb, offset);
1124 alligned_2bytes = read_2bytes << bitoffset; /* remove bitoffset */
1125 one_byte = alligned_2bytes >> 8; /* move to low byte */
1128 sprintf(&(buf[2*i]), "%02X", one_byte);
1131 /* add last byte if it contains bits which have not yet been shifted in */
1132 if ( ((bitlength + 7) / 8 ) == byte_span )
1134 read_2bytes = tvb_get_ntohs(tvb, offset);
1135 alligned_2bytes = read_2bytes << bitoffset; /* remove bitoffset */
1136 one_byte = alligned_2bytes >> 8; /* move to low byte */
1137 one_byte >>= (8 - (bitlength%8)); /*cut off surplus bits */
1138 one_byte <<= (8 - (bitlength%8)); /* allign to MSB in low byte*/
1141 sprintf(&(buf[2*i]), "%02X", one_byte);
1144 /* get header field info */
1145 hf_info_p = proto_registrar_get_nth(hfindex);
1148 return ( proto_tree_add_bytes_format(tree, hfindex, tvb, initial_offset,
1149 byte_span , bitstr, "%s %s: %s", maskstr_buf, hf_info_p->name, buf) );
1154 /* add unsigned int, 1-8 bits long */
1156 proto_tree_add_uint_bits(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint offset,
1157 gint bitoffset, gint bitlength, gint min)
1160 guint16 read_2bytes, alligned_2bytes;
1163 header_field_info *hf_info_p;
1167 if (bitoffset + bitlength <= 8)
1169 /* all bits contained in one byte */
1170 uint_bits = tvb_get_guint8(tvb, offset);
1171 read_2bytes = uint_bits;
1176 /* bits contained within 2 bytes */
1177 read_2bytes = tvb_get_ntohs(tvb, offset);
1179 alligned_2bytes = read_2bytes << bitoffset; /* remove bitoffset */
1180 uint_bits = alligned_2bytes >> ( 8 + (8-bitlength)); /* allign to LSB */
1184 /* create bitmask string */
1185 maskstr = bitmaskstr(bitoffset, bitlength, read_2bytes, &length);
1187 /* get header field info */
1188 hf_info_p = proto_registrar_get_nth(hfindex);
1190 if (hf_info_p->strings != NULL)
1192 /* string representation for decoded header field present */
1193 return ( proto_tree_add_uint_format(tree, hfindex, tvb, offset,
1194 length, uint_bits, "%s = %s: %s (%d)", maskstr, hf_info_p->name,
1195 val_to_str(uint_bits, hf_info_p->strings, "%d"), uint_bits) );
1199 /* no string representation */
1200 return ( proto_tree_add_uint_format(tree, hfindex, tvb, offset,
1201 length, uint_bits, "%s = %s: %d", maskstr, hf_info_p->name, uint_bits) );
1205 /* add PER encoded integer (maximum length of value: 4 bytes) */
1207 proto_tree_add_PERint32(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint offset,
1208 gint bitoffset, gint *length, gint min)
1214 header_field_info *hf_info_p;
1217 value = extract_int32(tvb, offset, bitoffset, length);
1220 /* create bitmask string for 2 bit length field */
1221 tmp_2bytes = tvb_get_ntohs(tvb, offset);
1222 maskstr = bitmaskstr(bitoffset, 2, tmp_2bytes, &length_size);
1224 /* get header field info */
1225 hf_info_p = proto_registrar_get_nth(hfindex);
1227 return ( proto_tree_add_uint_format(tree, hfindex, tvb, offset,
1228 (*length) + length_size, value,
1229 "%s + %d Bytes = %s: %d", maskstr, *length, hf_info_p->name, value) );
1234 /*****************************************************************************/
1236 /* Dissecting Functions for single parameters */
1238 /*****************************************************************************/
1240 dissect_iE_Extension(tvbuff_t *tvb, proto_tree *tree, gint *offset, gint *bitoffset, char *description)
1242 proto_item *ext_item = NULL;
1243 proto_tree *ext_tree = NULL;
1244 guint16 number_of_extFields;
1245 gint number_of_octets = 0;
1246 gint number_of_octets_size = 0;
1249 allign(offset, bitoffset);
1251 /* create subtree for iE_Extension */
1254 ext_item = proto_tree_add_text(tree, tvb, *offset, 0, "%s iE-Extensions", description);
1255 ext_tree = proto_item_add_subtree(ext_item, ett_ranap_iE_Extension);
1258 /* number of extension fields */
1259 number_of_extFields = tvb_get_ntohs(tvb, *offset) + 1;
1262 proto_tree_add_uint(ext_tree, hf_ranap_number_of_ProtocolExtensionFields,
1263 tvb, *offset, 2, number_of_extFields);
1268 /* for each extension field */
1269 for (i=1; i <= number_of_extFields; i++)
1271 /* add fields to ie subtee */
1272 /* Extension Field ID */
1275 proto_tree_add_item(ext_tree, hf_ranap_ext_field_id, tvb,
1276 *offset, IE_ID_LENGTH, FALSE);
1278 *offset += IE_ID_LENGTH;
1283 proto_tree_add_uint_bits(ext_tree, hf_ranap_ext_field_criticality, tvb,
1284 *offset, *bitoffset, 2, 0);
1286 proceed_nbits(offset, bitoffset, 2);
1288 /* number of octets in the IE */
1289 allign(offset, bitoffset);
1290 if (0 == extract_length(tvb, *offset, &number_of_octets, &number_of_octets_size))
1294 proto_tree_add_uint(ext_tree, hf_ranap_ext_field_number_of_octets, tvb,
1295 *offset, number_of_octets_size, number_of_octets);
1300 /* decoding is not supported */
1303 proto_tree_add_text(ext_tree, tvb, *offset, 0,
1304 "Number of Octets greater than 0x3FFF, dissection not supported");
1309 *offset += number_of_octets_size;
1312 proto_tree_add_item(ext_tree, hf_ranap_extension_field, tvb,
1313 *offset, number_of_octets, FALSE);
1317 *offset += number_of_octets;
1325 dissect_userPlaneInformation(tvbuff_t *tvb, proto_tree *tree, gint *offset, gint *bitoffset)
1327 int extension_present;
1328 int iE_Extensions_present;
1329 int tmp_extension_present;
1331 /* protocol_extension present ? */
1332 extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1333 proceed_nbits(offset, bitoffset, 1);
1335 /* iE_Extensions present ? */
1336 iE_Extensions_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1337 proceed_nbits(offset, bitoffset, 1);
1340 tmp_extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1341 proceed_nbits(offset, bitoffset, 1);
1343 proto_tree_add_uint_bits(tree, hf_ranap_userPlaneMode, tvb, *offset,
1345 proceed_nbits(offset, bitoffset, 1);
1347 /* uP-ModeVersions */
1348 proto_tree_add_bitstring(tree, hf_ranap_uP_ModeVersions, tvb, *offset,
1350 proceed_nbits(offset, bitoffset, 16);
1353 if (iE_Extensions_present)
1355 return(dissect_iE_Extension(tvb, tree, offset, bitoffset, "UserPlaneInformation"));
1363 dissect_sDU_Parameters(tvbuff_t *tvb, proto_tree *ie_tree, gint *offset, gint *bitoffset)
1365 proto_item *sDU_item = NULL;
1366 proto_tree *sDU_tree = NULL;
1367 proto_item *optionals_item = NULL;
1368 proto_tree *optionals_tree = NULL;
1370 int extension_present;
1371 int sDU_ErrorRatio_present;
1372 int sDU_FormatInformationParameters_present;
1373 int iE_Extensions_present;
1374 int sDU_ErrorRatio_iE_Extensions_present;
1375 int residualBitErrorRatio_iE_Extensions_present;
1377 gint number_of_sDU_FormatInformationParameters;
1378 int sDU_FormatInformationParameters_extension_present;
1379 int subflowSDU_Size_present;
1380 int rAB_SubflowCombinationBitRate_present;
1381 int sDU_FormatInformationParameters_iE_Extensions_present;
1384 /* create subtree for sDU_Parameters */
1385 sDU_item = proto_tree_add_text(ie_tree, tvb, *offset, 0,
1387 sDU_tree = proto_item_add_subtree(sDU_item, ett_ranap_sDU);
1389 /* create subtree for extension/optional/default bitmap */
1390 optionals_item = proto_tree_add_text(sDU_tree, tvb, *offset, 1,
1391 "sDU_Parameters Extension/Optional/Default bitmap");
1392 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
1394 /* protocol_extension present ? */
1395 extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1396 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
1397 *offset, *bitoffset, 1, 0);
1398 proceed_nbits(offset, bitoffset, 1);
1400 /* sDU_ErrorRatio present ? */
1401 sDU_ErrorRatio_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1402 proto_tree_add_uint_bits(optionals_tree, hf_ranap_sDU_ErrorRatio_present, tvb,
1403 *offset, *bitoffset, 1, 0);
1404 proceed_nbits(offset, bitoffset, 1);
1406 /* sDU_FormatInformationParameters present ? */
1407 sDU_FormatInformationParameters_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1408 proto_tree_add_uint_bits(optionals_tree, hf_ranap_sDU_FormatInformationParameters_present, tvb,
1409 *offset, *bitoffset, 1, 0);
1410 proceed_nbits(offset, bitoffset, 1);
1412 /* iE_Extensions present ? */
1413 iE_Extensions_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1414 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present, tvb,
1415 *offset, *bitoffset, 1, 0);
1416 proceed_nbits(offset, bitoffset, 1);
1419 /* sDU_ErrorRatio */
1420 if (sDU_ErrorRatio_present)
1422 sDU_ErrorRatio_iE_Extensions_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1423 proceed_nbits(offset, bitoffset, 1);
1425 proto_tree_add_uint_bits(sDU_tree, hf_ranap_sDU_ErrorRatio_mantissa, tvb, *offset,
1427 proceed_nbits(offset, bitoffset, 4);
1429 proto_tree_add_uint_bits(sDU_tree, hf_ranap_sDU_ErrorRatio_exponent, tvb, *offset,
1431 proceed_nbits(offset, bitoffset, 3);
1433 if (sDU_ErrorRatio_iE_Extensions_present)
1435 if ((ret=dissect_iE_Extension(tvb, sDU_tree, offset, bitoffset, "sDU_ErrorRatio")) != 0)
1440 /* residualBitErrorRatio */
1441 residualBitErrorRatio_iE_Extensions_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1442 proceed_nbits(offset, bitoffset, 1);
1444 proto_tree_add_uint_bits(sDU_tree, hf_ranap_residualBitErrorRatio_mantissa, tvb, *offset,
1446 proceed_nbits(offset, bitoffset, 4);
1448 proto_tree_add_uint_bits(sDU_tree, hf_ranap_sDU_ErrorRatio_exponent, tvb, *offset,
1450 proceed_nbits(offset, bitoffset, 3);
1453 if (residualBitErrorRatio_iE_Extensions_present)
1455 if ((ret=dissect_iE_Extension(tvb, sDU_tree, offset, bitoffset, "residualBitErrorRatio")) != 0)
1460 /* deliveryOfErroneousSDU */
1461 proto_tree_add_uint_bits(sDU_tree, hf_ranap_deliveryOfErroneousSDU, tvb, *offset,
1463 proceed_nbits(offset, bitoffset, 2);
1466 /* sDU_FormatInformationParameters */
1467 if (sDU_FormatInformationParameters_present)
1469 number_of_sDU_FormatInformationParameters = extract_nbits(tvb, *offset, *bitoffset, 6) + 1;
1470 proceed_nbits(offset, bitoffset, 6);
1472 for (i=1; i<= number_of_sDU_FormatInformationParameters; i++)
1474 /* create subtree for extension/optional/default bitmap */
1475 optionals_item = proto_tree_add_text(sDU_tree, tvb, *offset, 1,
1476 "sDU_FormatInformationParameters Extension/Optional/Default bitmap");
1477 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
1479 /* protocol extension present ? */
1480 sDU_FormatInformationParameters_extension_present =
1481 extract_nbits(tvb, *offset, *bitoffset, 1);
1482 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
1483 *offset, *bitoffset, 1, 0);
1484 proceed_nbits(offset, bitoffset, 1);
1486 /* subflowSDU_Size present ? */
1487 subflowSDU_Size_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1488 proto_tree_add_uint_bits(optionals_tree, hf_ranap_subflowSDU_Size_present, tvb,
1489 *offset, *bitoffset, 1, 0);
1490 proceed_nbits(offset, bitoffset, 1);
1492 /* rAB_SubflowCombinationBitRate present ? */
1493 rAB_SubflowCombinationBitRate_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1494 proto_tree_add_uint_bits(optionals_tree, hf_ranap_rAB_SubflowCombinationBitRate_present, tvb,
1495 *offset, *bitoffset, 1, 0);
1496 proceed_nbits(offset, bitoffset, 1);
1498 /* ie_Extension present ? */
1499 sDU_FormatInformationParameters_iE_Extensions_present =
1500 extract_nbits(tvb, *offset, *bitoffset, 1);
1501 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present, tvb,
1502 *offset, *bitoffset, 1, 0);
1503 proceed_nbits(offset, bitoffset, 1);
1505 if (subflowSDU_Size_present)
1507 allign(offset, bitoffset);
1508 proto_tree_add_item(sDU_tree, hf_ranap_subflowSDU_Size,
1509 tvb, *offset, subflowSDU_Size_LENGTH, FALSE);
1510 offset += subflowSDU_Size_LENGTH;
1513 if (rAB_SubflowCombinationBitRate_present)
1515 proto_tree_add_PERint32(sDU_tree, hf_ranap_rAB_SubflowCombinationBitRate,
1516 tvb, *offset, *bitoffset, &length, 0);
1517 proceed_perint32(offset, bitoffset, length);
1520 if (sDU_FormatInformationParameters_iE_Extensions_present)
1522 if ((ret=dissect_iE_Extension(tvb, sDU_tree, offset, bitoffset,
1523 "sDU_FormatInformationParameters" )) != 0)
1529 if (extension_present)
1531 /* extended sequence */
1532 /* decoding is not supported */
1533 proto_tree_add_text(ie_tree, tvb, *offset, IE_PROTOCOL_EXTENSION_LENGTH,
1534 "Protocol extension for sDU_FormatInformationParameters present, dissection not supported");
1544 dissect_rAB_Parameters(tvbuff_t *tvb, proto_tree *ie_tree, gint *offset, gint *bitoffset)
1547 proto_item *rab_item = NULL;
1548 proto_tree *rab_tree = NULL;
1549 proto_item *optionals_item = NULL;
1550 proto_tree *optionals_tree = NULL;
1551 proto_item *prio_item = NULL;
1552 proto_tree *prio_tree = NULL;
1554 int extension_present;
1555 int tmp_extension_present;
1556 int guaranteedBitRate_present;
1557 int transferDelay_present;
1558 int trafficHandlingPriority_present;
1559 int allocationOrRetentionPriority_present;
1560 int sourceStatisticsDescriptor_present;
1561 int relocationRequirement_present;
1562 int iE_Extensions_present;
1563 int tmp_iE_Extensions_present;
1567 /* create subtree for rAB_Parameters */
1568 rab_item = proto_tree_add_text(ie_tree, tvb, *offset, 0,
1570 rab_tree = proto_item_add_subtree(rab_item, ett_ranap_rAB_Parameters);
1572 /* create subtree for extension/optional/default bitmap */
1573 optionals_item = proto_tree_add_text(rab_tree, tvb, *offset, IE_PROTOCOL_EXTENSION_LENGTH,
1574 "rAB_Parameters Extension/Optional/Default bitmap");
1575 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
1577 /* protocol extension present ? */
1578 extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1579 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
1580 *offset, *bitoffset, 1, 0);
1581 proceed_nbits(offset, bitoffset, 1);
1583 /* guaranteedBitRate present ? */
1584 guaranteedBitRate_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1585 proto_tree_add_uint_bits(optionals_tree, hf_ranap_guaranteedBitRate_present,
1586 tvb, *offset, *bitoffset, 1, 0);
1587 proceed_nbits(offset, bitoffset, 1);
1589 /* transferDelay present ? */
1590 transferDelay_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1591 proto_tree_add_uint_bits(optionals_tree, hf_ranap_transferDelay_present,
1592 tvb, *offset, *bitoffset, 1, 0);
1593 proceed_nbits(offset, bitoffset, 1);
1595 /* trafficHandlingPriority present ? */
1596 trafficHandlingPriority_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1597 proto_tree_add_uint_bits(optionals_tree, hf_ranap_trafficHandlingPriority_present,
1598 tvb, *offset, *bitoffset, 1, 0);
1599 proceed_nbits(offset, bitoffset, 1);
1601 /* allocationOrRetentionPriority present ? */
1602 allocationOrRetentionPriority_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1603 proto_tree_add_uint_bits(optionals_tree, hf_ranap_allocationOrRetentionPriority_present,
1604 tvb, *offset, *bitoffset, 1, 0);
1605 proceed_nbits(offset, bitoffset, 1);
1607 /* sourceStatisticsDescriptor present ? */
1608 sourceStatisticsDescriptor_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1609 proto_tree_add_uint_bits(optionals_tree, hf_ranap_sourceStatisticsDescriptor_present,
1610 tvb, *offset, *bitoffset, 1, 0);
1611 proceed_nbits(offset, bitoffset, 1);
1613 /* relocationRequirement present ? */
1614 relocationRequirement_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1615 proto_tree_add_uint_bits(optionals_tree, hf_ranap_relocationRequirement_present,
1616 tvb, *offset, *bitoffset, 1, 0);
1617 proceed_nbits(offset, bitoffset, 1);
1619 /* iE-Extensions present ? */
1620 iE_Extensions_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1621 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present,
1622 tvb, *offset, *bitoffset, 1, 0);
1623 proceed_nbits(offset, bitoffset, 1);
1627 tmp_extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1628 proceed_nbits(offset, bitoffset, 1);
1630 proto_tree_add_uint_bits(rab_tree, hf_ranap_trafficClass,
1631 tvb, *offset, *bitoffset, 2, 0);
1632 proceed_nbits(offset, bitoffset, 2);
1634 if (tmp_extension_present)
1636 /* decoding is not supported */
1637 proto_tree_add_text(rab_tree, tvb, *offset, IE_PROTOCOL_EXTENSION_LENGTH,
1638 "Protocol extension for trafficClass present, dissection not supported");
1643 /* rAB-AsymmetryIndicator */
1644 tmp_extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1645 proceed_nbits(offset, bitoffset, 1);
1647 proto_tree_add_uint_bits(rab_tree, hf_ranap_rAB_AsymmetryIndicator,
1648 tvb, *offset, *bitoffset, 2, 0);
1649 proceed_nbits(offset, bitoffset, 2);
1651 if (tmp_extension_present)
1653 /* decoding is not supported */
1654 proto_tree_add_text(rab_tree, tvb, *offset, IE_PROTOCOL_EXTENSION_LENGTH,
1655 "Protocol extension for rAB-AsymmetryIndicator present, dissection not supported");
1661 tmp_byte = extract_nbits(tvb, *offset, *bitoffset, 1) +1 ; /*sequence 1..2 */
1662 proceed_nbits(offset, bitoffset, 1);
1664 for (i=1; i<= tmp_byte; i++)
1666 proto_tree_add_PERint32(rab_tree, hf_ranap_maxBitrate,
1667 tvb, *offset, *bitoffset, &length, 1);
1668 proceed_perint32(offset, bitoffset, length);
1672 /* guaranteedBitRate */
1673 if (guaranteedBitRate_present)
1675 tmp_byte = extract_nbits(tvb, *offset, *bitoffset, 1) +1 ; /*sequence 1..2 */
1676 proceed_nbits(offset, bitoffset, 1);
1678 for (i=1; i<= tmp_byte; i++)
1680 proto_tree_add_PERint32(rab_tree, hf_ranap_guaranteedBitrate,
1681 tvb, *offset, *bitoffset, &length, 0);
1682 proceed_perint32(offset, bitoffset, length);
1687 proto_tree_add_uint_bits(rab_tree, hf_ranap_deliveryOrder, tvb, *offset,
1689 proceed_nbits(offset, bitoffset, 1);
1693 allign(offset, bitoffset);
1694 proto_tree_add_item(rab_tree, hf_ranap_maxSDU_Size,
1695 tvb, *offset, maxSDU_Size_LENGTH, FALSE);
1696 *offset += maxSDU_Size_LENGTH;
1698 /* sDU-Parameters */
1699 tmp_byte = extract_nbits(tvb, *offset, *bitoffset, 3) + 1; /*sequence 1..7 */
1700 proceed_nbits(offset, bitoffset, 3);
1701 for (i=1; i<= tmp_byte; i++)
1703 if ((ret=dissect_sDU_Parameters(tvb, rab_tree, offset, bitoffset))!=0) return(ret);
1707 if (transferDelay_present)
1709 allign(offset, bitoffset);
1710 proto_tree_add_item(rab_tree, hf_ranap_transferDelay,
1711 tvb, *offset, transferDelay_LENGTH, FALSE);
1712 *offset += transferDelay_LENGTH;
1716 /* trafficHandlingPriority */
1717 if (trafficHandlingPriority_present)
1719 proto_tree_add_uint_bits(rab_tree, hf_ranap_trafficHandlingPriority, tvb, *offset,
1721 proceed_nbits(offset, bitoffset, 4);
1724 /* allocationOrRetentionPriority */
1725 if (allocationOrRetentionPriority_present)
1727 /* create subtree for */
1728 prio_item = proto_tree_add_text(rab_tree, tvb, *offset, 0,
1729 "allocationOrRetentionPriority");
1730 prio_tree = proto_item_add_subtree(prio_item, ett_ranap_allocationOrRetentionPriority);
1732 /* protocol extension present ? */
1733 tmp_extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1734 proceed_nbits(offset, bitoffset, 1);
1736 /* iE Extension present ? */
1737 tmp_iE_Extensions_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1738 proceed_nbits(offset, bitoffset, 1);
1740 /* allocationOrRetentionPriority */
1741 proto_tree_add_uint_bits(prio_tree, hf_ranap_priorityLevel, tvb, *offset,
1743 proceed_nbits(offset, bitoffset, 4);
1745 /* pre-emptionCapability */
1746 proto_tree_add_uint_bits(prio_tree, hf_ranap_pre_emptionCapability, tvb, *offset,
1748 proceed_nbits(offset, bitoffset, 1);
1750 /* pre-emptionVulnerability */
1751 proto_tree_add_uint_bits(prio_tree, hf_ranap_pre_emptionVulnerability, tvb, *offset,
1753 proceed_nbits(offset, bitoffset, 1);
1755 /* queuingAllowed */
1756 proto_tree_add_uint_bits(prio_tree, hf_ranap_queuingAllowed, tvb, *offset,
1758 proceed_nbits(offset, bitoffset, 1);
1760 if (tmp_iE_Extensions_present)
1762 if ((ret=dissect_iE_Extension(tvb, prio_tree, offset, bitoffset,
1763 "AllocationOrRetentionPriority")) != 0)
1767 if (tmp_extension_present)
1769 /* decoding is not supported */
1770 proto_tree_add_text(prio_tree, tvb, *offset, IE_PROTOCOL_EXTENSION_LENGTH,
1771 "Protocol extension for rAB-allocationOrRetentionPriority present, dissection not supported");
1776 /* sourceStatisticsDescriptor */
1777 if (sourceStatisticsDescriptor_present)
1779 /* protocol extension */
1780 tmp_extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1781 proceed_nbits(offset, bitoffset, 1);
1783 if (tmp_extension_present)
1785 /* decoding is not supported */
1786 proto_tree_add_text(prio_tree, tvb, *offset, IE_PROTOCOL_EXTENSION_LENGTH,
1787 "Protocol extension for sourceStatisticsDescriptor present, dissection not supported");
1791 proto_tree_add_uint_bits(rab_tree, hf_ranap_sourceStatisticsDescriptor, tvb, *offset,
1793 proceed_nbits(offset, bitoffset, 1);
1796 /* relocationRequirement */
1797 if (relocationRequirement_present)
1799 /* protocol extension */
1800 tmp_extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1801 proceed_nbits(offset, bitoffset, 1);
1803 if (tmp_extension_present)
1805 /* decoding is not supported */
1806 proto_tree_add_text(prio_tree, tvb, *offset, IE_PROTOCOL_EXTENSION_LENGTH,
1807 "Protocol extension for relocationRequirement present, dissection not supported");
1811 proto_tree_add_uint_bits(rab_tree, hf_ranap_relocationRequirement, tvb, *offset,
1813 proceed_nbits(offset, bitoffset, 1);
1818 if (iE_Extensions_present)
1820 if ((ret=dissect_iE_Extension(tvb, rab_tree, offset, bitoffset, "rAB_Parameters" )) != 0 )
1825 if (extension_present)
1827 /* decoding is not supported */
1828 proto_tree_add_text(rab_tree, tvb, *offset, IE_PROTOCOL_EXTENSION_LENGTH,
1829 "Protocol extension for rAB_Parameters present, dissection not supported");
1839 dissect_TransportLayerAddress(tvbuff_t *tvb, proto_tree *ie_tree, gint *offset, gint *bitoffset)
1841 gint extension_present;
1844 extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1845 proceed_nbits(offset, bitoffset, 1);
1846 if (extension_present)
1848 /* extended integer */
1849 proto_tree_add_text(ie_tree, tvb, *offset, 0,
1850 "extension present for TransportLayerAddress, dissection not supported");
1854 /* extract and add length of transportLayerAddress bitstring */
1855 str_length = extract_nbits(tvb, *offset, *bitoffset, 8) + 1;
1856 proto_tree_add_uint_bits(ie_tree, hf_ranap_transportLayerAddress_length,
1857 tvb, *offset, *bitoffset, 8, 1);
1858 proceed_nbits(offset, bitoffset, 8);
1859 allign(offset, bitoffset);
1861 /* add transportLayerAddress */
1862 proto_tree_add_bitstring(ie_tree, hf_ranap_transportLayerAddress, tvb, *offset,
1863 *bitoffset, str_length);
1864 proceed_nbits(offset, bitoffset, str_length);
1872 dissect_iuTransportAssociation(tvbuff_t *tvb, proto_tree *ie_tree, gint *offset, gint *bitoffset)
1874 guint extension_present;
1877 /* extension present ? */
1878 extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1879 if (extension_present)
1881 /* extended choice */
1882 proto_tree_add_text(ie_tree, tvb, *offset, 0,
1883 "extension present for IuTransportAssociation, dissection not supported");
1886 proceed_nbits(offset, bitoffset, 1);
1889 choice_value = extract_nbits(tvb, *offset, *bitoffset, 1);
1890 proceed_nbits(offset, bitoffset, 1);
1891 allign(offset, bitoffset);
1892 if (choice_value == 0)
1895 proto_tree_add_item(ie_tree, hf_ranap_gTP_TEI, tvb, *offset, 4, FALSE);
1901 proto_tree_add_item(ie_tree, hf_ranap_bindingID, tvb, *offset, 4, FALSE);
1910 dissect_transportLayerInformation(tvbuff_t *tvb, proto_tree *ie_tree, gint *offset, gint *bitoffset)
1912 proto_item *optionals_item = NULL;
1913 proto_tree *optionals_tree = NULL;
1914 int extension_present;
1915 int iE_Extensions_present;
1918 /* create subtree for extension/optional/default bitmap */
1919 optionals_item = proto_tree_add_text(ie_tree, tvb, *offset, IE_PROTOCOL_EXTENSION_LENGTH,
1920 "TransportLayerInformation Extension/Optional/Default bitmap");
1921 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
1924 /* protocol extension present ? */
1925 extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1926 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
1927 *offset, *bitoffset, 1, 0);
1928 proceed_nbits(offset, bitoffset, 1);
1930 /* iE-Extensions present ? */
1931 iE_Extensions_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1932 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present,
1933 tvb, *offset, *bitoffset, 1, 0);
1934 proceed_nbits(offset, bitoffset, 1);
1937 /* transportLayerAddress */
1938 if ((ret=dissect_TransportLayerAddress(tvb, ie_tree, offset, bitoffset)) != 0)
1941 /* iuTransportAssociation */
1942 if ((ret=dissect_iuTransportAssociation(tvb, ie_tree, offset, bitoffset)) != 0)
1946 if (iE_Extensions_present)
1948 if ((ret=dissect_iE_Extension(tvb, ie_tree, offset, bitoffset, "TransportLayerInformation" )) != 0 )
1952 /* protocol extension */
1953 if (extension_present)
1955 /* extended sequence */
1956 proto_tree_add_text(ie_tree, tvb, *offset, 0,
1957 "extension present for TransportLayerInformation, dissection not supported");
1966 dissect_dataVolumeList (tvbuff_t *tvb, proto_tree *ie_tree, gint *offset, gint *bitoffset, char *parname)
1968 proto_item *optionals_item = NULL;
1969 proto_tree *optionals_tree = NULL;
1970 gint extension_present;
1971 gint dataVolumeReference_present;
1972 gint iE_Extensions_present;
1978 /* number of volumes */
1979 number_vol = extract_nbits(tvb, *offset, *bitoffset, 1) + 1;
1980 proceed_nbits(offset, bitoffset, 1);
1982 for (i=1; i<=number_vol; i++)
1984 /* create subtree for extension/optional/default bitmap */
1985 optionals_item = proto_tree_add_text(ie_tree, tvb, *offset, 1,
1986 "%d. %s Extension/Optional/Default bitmap",
1988 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
1990 /* protocol_extension present ? */
1991 extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1992 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
1993 *offset, *bitoffset, 1, 0);
1994 proceed_nbits(offset, bitoffset, 1);
1996 /* dataVolumeReference present ? */
1997 dataVolumeReference_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1998 proto_tree_add_uint_bits(optionals_tree, hf_ranap_dataVolumeReference_present, tvb,
1999 *offset, *bitoffset, 1, 0);
2000 proceed_nbits(offset, bitoffset, 1);
2002 /* iE_Extensions present ? */
2003 iE_Extensions_present = extract_nbits(tvb, *offset, *bitoffset, 1);
2004 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present, tvb,
2005 *offset, *bitoffset, 1, 0);
2006 proceed_nbits(offset, bitoffset, 1);
2009 /* UnsuccessfullyTransmittedDataVolume */
2010 proto_tree_add_PERint32(ie_tree, hf_ranap_dl_UnsuccessfullyTransmittedDataVolume,
2011 tvb, *offset, *bitoffset, &length, 0);
2012 proceed_perint32(offset, bitoffset, length);
2014 /* DataVolumeReference */
2015 if (dataVolumeReference_present)
2017 proto_tree_add_uint_bits(ie_tree, hf_ranap_dataVolumeReference, tvb,
2018 *offset, *bitoffset, 8, 0);
2019 proceed_nbits(offset, bitoffset, 8);
2023 if (iE_Extensions_present)
2025 if ((ret=dissect_iE_Extension(tvb, ie_tree, offset, bitoffset, "dl-dataVolumes" )) != 0)
2029 /* protocol extended */
2030 if (extension_present)
2032 /* extended sequence */
2033 /* decoding is not supported */
2034 proto_tree_add_text(ie_tree, tvb, *offset, IE_PROTOCOL_EXTENSION_LENGTH,
2035 "Protocol extension for dl-dataVolumes present, dissection not supported");
2045 dissect_cause(tvbuff_t *tvb, proto_tree *ie_tree, gint *offset, gint *bitoffset)
2047 gint extension_present;
2050 /* protocol extension present ? */
2051 extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
2052 proceed_nbits(offset, bitoffset, 1);
2053 if (extension_present)
2055 /* choice extension present */
2056 proto_tree_add_text(ie_tree, tvb, *offset, 0,
2057 "extension present for cause, dissection not supported");
2060 cause_choice = extract_nbits(tvb, *offset, *bitoffset, 3);
2061 proto_tree_add_uint_bits(ie_tree, hf_ranap_cause_choice,
2062 tvb, *offset, *bitoffset, 3, 0);
2063 proceed_nbits(offset, bitoffset, 3);
2065 switch (cause_choice)
2067 case CC_CauseRadioNetwork:
2068 proto_tree_add_uint_bits(ie_tree, hf_ranap_cause_value,
2069 tvb, *offset, *bitoffset, 6, 1);
2070 proceed_nbits(offset, bitoffset, 6);
2072 case CC_CauseTransmissionNetwork:
2073 proto_tree_add_uint_bits(ie_tree, hf_ranap_cause_value,
2074 tvb, *offset, *bitoffset, 4, 65);
2075 proceed_nbits(offset, bitoffset, 4);
2078 proto_tree_add_uint_bits(ie_tree, hf_ranap_cause_value,
2079 tvb, *offset, *bitoffset, 4, 81);
2080 proceed_nbits(offset, bitoffset, 4);
2082 case CC_CauseProtocol:
2083 proto_tree_add_uint_bits(ie_tree, hf_ranap_cause_value,
2084 tvb, *offset, *bitoffset, 4, 97);
2085 proceed_nbits(offset, bitoffset, 4);
2087 proto_tree_add_uint_bits(ie_tree, hf_ranap_cause_value,
2088 tvb, *offset, *bitoffset, 4, 113);
2089 proceed_nbits(offset, bitoffset, 4);
2091 case CC_CauseNon_Standard:
2092 proto_tree_add_uint_bits(ie_tree, hf_ranap_cause_value,
2093 tvb, *offset, *bitoffset, 7, 129);
2094 proceed_nbits(offset, bitoffset, 7);
2097 proto_tree_add_text(ie_tree, tvb, *offset, 0,
2098 "unexpected cause choice value, dissection not supported");
2106 dissect_iEsCriticalityDiagnostics(tvbuff_t *tvb, proto_tree *ie_tree, gint *offset, gint *bitoffset)
2108 proto_item *diag_item = NULL;
2109 proto_tree *diag_tree = NULL;
2110 proto_item *optionals_item = NULL;
2111 proto_tree *optionals_tree = NULL;
2112 int extension_present;
2113 int repetitionNumber_present;
2114 int iE_Extensions_present;
2118 allign(offset, bitoffset);
2119 num_of_errors = extract_nbits(tvb, *offset, *bitoffset, 8) + 1;
2120 proto_tree_add_uint_bits(ie_tree, hf_ranap_num_of_CriticalityDiagnostics_IEs, tvb,
2121 *offset, *bitoffset, 8, 1);
2122 proceed_nbits(offset, bitoffset, 8);
2124 for ( i= 1; i <= num_of_errors; i++)
2126 /* add subtree for CriticalityDiagnostics-IE */
2127 diag_item = proto_tree_add_text(ie_tree, tvb, *offset, 0,
2128 "%d. CriticalityDiagnostics-IE", i);
2129 diag_tree = proto_item_add_subtree(diag_item, ett_ranap_CriticalityDiagnostics_IE);
2131 /* create subtree for extension/optional/default bitmap */
2132 optionals_item = proto_tree_add_text(diag_tree, tvb, *offset, 1,
2133 "CriticalityDiagnostics-IE Extension/Optional/Default bitmap");
2134 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
2136 /* protocol_extension present ? */
2137 extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
2138 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
2139 *offset, *bitoffset, 1, 0);
2140 proceed_nbits(offset, bitoffset, 1);
2142 /* repetitionNumber present ? */
2143 repetitionNumber_present = extract_nbits(tvb, *offset, *bitoffset, 1);
2144 proto_tree_add_uint_bits(optionals_tree, hf_ranap_repetitionNumber_present, tvb,
2145 *offset, *bitoffset, 1, 0);
2146 proceed_nbits(offset, bitoffset, 1);
2148 /* iE_Extensions present ? */
2149 iE_Extensions_present = extract_nbits(tvb, *offset, *bitoffset, 1);
2150 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present,
2151 tvb, *offset, *bitoffset, 1, 0);
2152 proceed_nbits(offset, bitoffset, 1);
2155 proto_tree_add_uint_bits(diag_tree, hf_ranap_iECriticality,
2156 tvb, *offset, *bitoffset, 2, 0);
2157 proceed_nbits(offset, bitoffset, 2);
2160 allign(offset, bitoffset);
2161 proto_tree_add_item(diag_tree, hf_ranap_ie_ie_id, tvb,
2162 *offset, IE_ID_LENGTH, FALSE);
2163 *offset += IE_ID_LENGTH;
2165 /* repetitionNumber */
2166 if (repetitionNumber_present)
2168 allign(offset, bitoffset);
2169 proto_tree_add_uint_bits(diag_tree, hf_ranap_repetitionNumber,
2170 tvb, *offset, *bitoffset, 8, 1);
2171 proceed_nbits(offset, bitoffset, 8);
2175 if (iE_Extensions_present)
2177 return(dissect_iE_Extension(tvb, diag_tree, offset, bitoffset, "CriticalityDiagnostics-IE"));
2181 /* protocol extended */
2182 if (extension_present)
2184 /* extended sequence */
2185 /* decoding is not supported */
2186 proto_tree_add_text(diag_tree, tvb, *offset, IE_PROTOCOL_EXTENSION_LENGTH,
2187 "Protocol extension for CriticalityDiagnostics-IE present, dissection not supported");
2197 /*****************************************************************************/
2199 /* Dissecting Functions for IEs */
2201 /*****************************************************************************/
2204 dissect_IE_RAB_ID(tvbuff_t *tvb, proto_tree *ie_tree)
2208 proto_tree_add_item(ie_tree, hf_ranap_rab_id, tvb,
2209 0, RAB_ID_LENGTH, FALSE);
2216 dissect_IE_RAC(tvbuff_t *tvb, proto_tree *ie_tree)
2220 proto_tree_add_item(ie_tree, hf_ranap_rac, tvb,
2221 0, RAC_LENGTH, FALSE);
2228 dissect_IE_LAI(tvbuff_t *tvb, proto_tree *ie_tree)
2230 proto_item *optionals_item = NULL;
2231 proto_tree *optionals_tree = NULL;
2232 int iE_Extensions_present;
2239 /* create subtree for extension/optional/default bitmap */
2240 optionals_item = proto_tree_add_text(ie_tree, tvb, offset, 1,
2241 "LAI Extension/Optional/Default bitmap");
2242 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
2244 /* iE_Extensions_present present ? */
2245 iE_Extensions_present = extract_nbits(tvb, offset, bitoffset, 1);
2246 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present, tvb,
2247 offset, bitoffset, 1, 0);
2248 proceed_nbits(&offset, &bitoffset, 1);
2251 allign(&offset, &bitoffset);
2252 proto_tree_add_item(ie_tree, hf_ranap_plmn_id, tvb,
2253 offset, PLMN_ID_LENGTH, FALSE);
2254 offset += PLMN_ID_LENGTH;
2257 proto_tree_add_item(ie_tree, hf_ranap_lac, tvb,
2258 offset, LAC_LENGTH, FALSE);
2259 offset += LAC_LENGTH;
2262 if (iE_Extensions_present)
2264 if ((ret=dissect_iE_Extension(tvb, ie_tree, &offset, &bitoffset, "LAI")) != 0)
2273 dissect_IE_SAI(tvbuff_t *tvb, proto_tree *ie_tree)
2275 proto_item *optionals_item = NULL;
2276 proto_tree *optionals_tree = NULL;
2277 int iE_Extensions_present;
2284 /* create subtree for extension/optional/default bitmap */
2285 optionals_item = proto_tree_add_text(ie_tree, tvb, offset, 1,
2286 "SAI Extension/Optional/Default bitmap");
2287 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
2289 /* iE_Extensions_present present ? */
2290 iE_Extensions_present = extract_nbits(tvb, offset, bitoffset, 1);
2291 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present, tvb,
2292 offset, bitoffset, 1, 0);
2293 proceed_nbits(&offset, &bitoffset, 1);
2296 proto_tree_add_item(ie_tree, hf_ranap_plmn_id, tvb,
2297 offset, PLMN_ID_LENGTH, FALSE);
2298 offset += PLMN_ID_LENGTH;
2301 proto_tree_add_item(ie_tree, hf_ranap_lac, tvb,
2302 offset, LAC_LENGTH, FALSE);
2303 offset += LAC_LENGTH;
2306 proto_tree_add_item(ie_tree, hf_ranap_sac, tvb,
2307 offset, SAC_LENGTH, FALSE);
2308 offset += SAC_LENGTH;
2311 if (iE_Extensions_present)
2313 if ((ret=dissect_iE_Extension(tvb, ie_tree, &offset, &bitoffset, "LAI")) != 0)
2322 dissect_IE_NAS_PDU(tvbuff_t *tvb, proto_tree *ie_tree)
2327 if (extract_length(tvb, 0, &length, &length_size) != 0)
2331 /* decoding is not supported */
2332 proto_tree_add_text(ie_tree, tvb, 0,
2333 2, "Number of Octets greater than 0x3FFF, dissection not supported");
2340 /* NAS - PDU length */
2341 proto_tree_add_item(ie_tree, hf_ranap_nas_pdu_length, tvb,
2342 0, length_size, FALSE);
2345 /* call NAS dissector (not implemented yet) */
2348 /* meanwhile display in hex */
2352 proto_tree_add_item(ie_tree, hf_ranap_nas_pdu, tvb,
2353 length_size, length, FALSE);
2360 dissect_IE_CN_DomainIndicator(tvbuff_t *tvb, proto_tree *ie_tree)
2367 proto_tree_add_uint_bits(ie_tree, hf_ranap_CN_DomainIndicator, tvb,
2368 offset, bitoffset, 1, 0);
2375 dissect_IE_IuSigConId(tvbuff_t *tvb, proto_tree *ie_tree)
2379 proto_tree_add_bitstring(ie_tree, hf_ranap_IuSigConId, tvb, 0, 0, 24);
2386 dissect_IE_SAPI(tvbuff_t *tvb, proto_tree *ie_tree)
2390 int extension_present;
2394 /* protocol_extension present ? */
2395 extension_present = extract_nbits(tvb, offset, bitoffset, 1);
2396 proceed_nbits(&offset, &bitoffset, 1);
2398 if (extension_present)
2401 /* decoding is not supported */
2402 proto_tree_add_text(ie_tree, tvb, offset, IE_PROTOCOL_EXTENSION_LENGTH,
2403 "Protocol extension for IE_SAPI present, dissection not supported");
2408 proto_tree_add_uint_bits(ie_tree, hf_ranap_SAPI, tvb,
2409 offset, bitoffset, 1, 0);
2416 dissect_IE_TransportLayerAddress(tvbuff_t *tvb, proto_tree *ie_tree)
2423 return(dissect_TransportLayerAddress(tvb, ie_tree, &offset, &bitoffset));
2430 dissect_IE_IuTransportAssociation(tvbuff_t *tvb, proto_tree *ie_tree)
2437 return(dissect_iuTransportAssociation(tvb, ie_tree, &offset, &bitoffset));
2444 dissect_IE_Cause(tvbuff_t *tvb, proto_tree *ie_tree)
2451 return(dissect_cause(tvb, ie_tree, &offset, &bitoffset));
2458 dissect_IE_RAB_ReleasedItem_IuRelComp(tvbuff_t *tvb, proto_tree *ie_tree)
2460 proto_item *optionals_item = NULL;
2461 proto_tree *optionals_tree = NULL;
2462 int extension_present;
2463 int dl_GTP_PDU_SequenceNumber_present;
2464 int ul_GTP_PDU_SequenceNumber_present;
2465 int iE_Extensions_present;
2472 /* create subtree for extension/optional/default bitmap */
2473 optionals_item = proto_tree_add_text(ie_tree, tvb, offset, 1,
2474 "RAB_ReleasedItem_IuRelComp Extension/Optional/Default bitmap");
2475 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
2477 /* protocol_extension present ? */
2478 extension_present = extract_nbits(tvb, offset, bitoffset, 1);
2479 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
2480 offset, bitoffset, 1, 0);
2481 proceed_nbits(&offset, &bitoffset, 1);
2483 /* dl_GTP_PDU_SequenceNumber present ? */
2484 dl_GTP_PDU_SequenceNumber_present = extract_nbits(tvb, offset, bitoffset, 1);
2485 proto_tree_add_uint_bits(optionals_tree, hf_ranap_dl_GTP_PDU_SequenceNumber_present, tvb,
2486 offset, bitoffset, 1, 0);
2487 proceed_nbits(&offset, &bitoffset, 1);
2489 /* ul_GTP_PDU_SequenceNumber present ? */
2490 ul_GTP_PDU_SequenceNumber_present = extract_nbits(tvb, offset, bitoffset, 1);
2491 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ul_GTP_PDU_SequenceNumber_present, tvb,
2492 offset, bitoffset, 1, 0);
2493 proceed_nbits(&offset, &bitoffset, 1);
2495 /* iE_Extensions_present present ? */
2496 iE_Extensions_present = extract_nbits(tvb, offset, bitoffset, 1);
2497 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present, tvb,
2498 offset, bitoffset, 1, 0);
2499 proceed_nbits(&offset, &bitoffset, 1);
2503 proto_tree_add_uint_bits(ie_tree, hf_ranap_rab_id,
2504 tvb, offset, bitoffset, 8, 0);
2505 proceed_nbits(&offset, &bitoffset, 8);
2507 /* dl-GTP-PDU-SequenceNumber */
2508 if (dl_GTP_PDU_SequenceNumber_present)
2510 allign(&offset, &bitoffset);
2511 proto_tree_add_item(ie_tree, hf_ranap_dl_GTP_PDU_SequenceNumber, tvb, offset, 2, FALSE);
2515 /* ul-GTP-PDU-SequenceNumber */
2516 if (ul_GTP_PDU_SequenceNumber_present)
2518 allign(&offset, &bitoffset);
2519 proto_tree_add_item(ie_tree, hf_ranap_ul_GTP_PDU_SequenceNumber, tvb, offset, 2, FALSE);
2524 if (iE_Extensions_present)
2526 if ((ret=dissect_iE_Extension(tvb, ie_tree, &offset, &bitoffset, "RAB_ReleasedItem_IuRelComp")) != 0)
2530 /* protocol extended */
2531 if (extension_present)
2533 /* extended sequence */
2534 /* decoding is not supported */
2535 proto_tree_add_text(ie_tree, tvb, offset, IE_PROTOCOL_EXTENSION_LENGTH,
2536 "Protocol extension for RAB_ReleasedItem_IuRelComp present, dissection not supported");
2545 dissect_IE_RAB_DataVolumeReportItem(tvbuff_t *tvb, proto_tree *ie_tree)
2547 proto_item *optionals_item = NULL;
2548 proto_tree *optionals_tree = NULL;
2549 int extension_present;
2550 int dl_UnsuccessfullyTransmittedDataVolume_present;
2551 int iE_Extensions_present;
2558 /* create subtree for extension/optional/default bitmap */
2559 optionals_item = proto_tree_add_text(ie_tree, tvb, offset, 1,
2560 "RAB_DataVolumeReportItem Extension/Optional/Default bitmap");
2561 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
2563 /* protocol_extension present ? */
2564 extension_present = extract_nbits(tvb, offset, bitoffset, 1);
2565 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
2566 offset, bitoffset, 1, 0);
2567 proceed_nbits(&offset, &bitoffset, 1);
2569 /* dl_UnsuccessfullyTransmittedDataVolume present ? */
2570 dl_UnsuccessfullyTransmittedDataVolume_present = extract_nbits(tvb, offset, bitoffset, 1);
2571 proto_tree_add_uint_bits(optionals_tree, hf_ranap_dl_UnsuccessfullyTransmittedDataVolume_present, tvb,
2572 offset, bitoffset, 1, 0);
2573 proceed_nbits(&offset, &bitoffset, 1);
2575 /* iE_Extensions_present present ? */
2576 iE_Extensions_present = extract_nbits(tvb, offset, bitoffset, 1);
2577 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present, tvb,
2578 offset, bitoffset, 1, 0);
2579 proceed_nbits(&offset, &bitoffset, 1);
2583 proto_tree_add_uint_bits(ie_tree, hf_ranap_rab_id,
2584 tvb, offset, bitoffset, 8, 0);
2585 proceed_nbits(&offset, &bitoffset, 8);
2587 /* dl_UnsuccessfullyTransmittedDataVolume */
2588 if (dl_UnsuccessfullyTransmittedDataVolume_present)
2591 if ((ret = dissect_dataVolumeList(tvb, ie_tree, &offset, &bitoffset,
2592 "dl_UnsuccessfullyTransmittedDataVolume")) != 0)
2597 if (iE_Extensions_present)
2599 if ((ret=dissect_iE_Extension(tvb, ie_tree, &offset, &bitoffset, "IE_RAB_DataVolumeReportItem")) != 0)
2603 /* protocol extended */
2604 if (extension_present)
2607 /* decoding is not supported */
2608 proto_tree_add_text(ie_tree, tvb, offset, IE_PROTOCOL_EXTENSION_LENGTH,
2609 "Protocol extension for IE_RAB_DataVolumeReportItem present, dissection not supported");
2618 dissect_IE_RAB_SetupOrModifyItemSecond(tvbuff_t *tvb, proto_tree *ie_tree)
2620 proto_item *optionals_item = NULL;
2621 proto_tree *optionals_tree = NULL;
2622 int extension_present;
2624 int pDP_TypeInformation_present;
2625 int dataVolumeReportingIndication_present;
2626 int dl_GTP_PDU_SequenceNumber_present;
2627 int ul_GTP_PDU_SequenceNumber_present;
2628 int dl_N_PDU_SequenceNumber_present;
2629 int ul_N_PDU_SequenceNumber_present;
2630 int iE_Extensions_present;
2639 /* create subtree for extension/optional/default bitmap */
2640 optionals_item = proto_tree_add_text(ie_tree, tvb, offset, 1,
2641 "SetupOrModifyItemSecond Extension/Optional/Default bitmap");
2642 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
2644 /* protocol_extension present ? */
2645 extension_present = extract_nbits(tvb, offset, bitoffset, 1);
2646 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
2647 offset, bitoffset, 1, 0);
2648 proceed_nbits(&offset, &bitoffset, 1);
2650 /* pDP_TypeInformation present ? */
2651 pDP_TypeInformation_present = extract_nbits(tvb, offset, bitoffset, 1);
2652 proto_tree_add_uint_bits(optionals_tree, hf_ranap_pDP_TypeInformation_present, tvb,
2653 offset, bitoffset, 1, 0);
2654 proceed_nbits(&offset, &bitoffset, 1);
2656 /* dataVolumeReportingIndication present ? */
2657 dataVolumeReportingIndication_present = extract_nbits(tvb, offset, bitoffset, 1);
2658 proto_tree_add_uint_bits(optionals_tree, hf_ranap_dataVolumeReportingIndication_present, tvb,
2659 offset, bitoffset, 1, 0);
2660 proceed_nbits(&offset, &bitoffset, 1);
2662 /* dl_GTP_PDU_SequenceNumber present present ? */
2663 dl_GTP_PDU_SequenceNumber_present = extract_nbits(tvb, offset, bitoffset, 1);
2664 proto_tree_add_uint_bits(optionals_tree, hf_ranap_dl_GTP_PDU_SequenceNumber_present, tvb,
2665 offset, bitoffset, 1, 0);
2666 proceed_nbits(&offset, &bitoffset, 1);
2669 /* ul_GTP_PDU_SequenceNumber present ? */
2670 ul_GTP_PDU_SequenceNumber_present = extract_nbits(tvb, offset, bitoffset, 1);
2671 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ul_GTP_PDU_SequenceNumber_present, tvb,
2672 offset, bitoffset, 1, 0);
2673 proceed_nbits(&offset, &bitoffset, 1);
2675 /* dl_N_PDU_SequenceNumber present ? */
2676 dl_N_PDU_SequenceNumber_present = extract_nbits(tvb, offset, bitoffset, 1);
2677 proto_tree_add_uint_bits(optionals_tree, hf_ranap_dl_N_PDU_SequenceNumber_present, tvb,
2678 offset, bitoffset, 1, 0);
2679 proceed_nbits(&offset, &bitoffset, 1);
2681 /* ul_N_PDU_SequenceNumber present ? */
2682 ul_N_PDU_SequenceNumber_present = extract_nbits(tvb, offset, bitoffset, 1);
2683 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ul_N_PDU_SequenceNumber_present, tvb,
2684 offset, bitoffset, 1, 0);
2685 proceed_nbits(&offset, &bitoffset, 1);
2687 /* iE_Extensions present ? */
2688 iE_Extensions_present = extract_nbits(tvb, offset, bitoffset, 1);
2689 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present, tvb,
2690 offset, bitoffset, 1, 0);
2691 proceed_nbits(&offset, &bitoffset, 1);
2693 /* pDP-TypeInformation */
2694 if (pDP_TypeInformation_present)
2696 tmp_byte = extract_nbits(tvb, offset, bitoffset, 1) + 1; /* Sequence 1..2 */
2697 proceed_nbits(&offset, &bitoffset, 1);
2698 for (i=1; i<=tmp_byte; i++)
2700 tmp_extension = extract_nbits(tvb, offset, bitoffset, 1);
2701 proceed_nbits(&offset, &bitoffset, 1);
2702 if (tmp_extension != 0)
2705 /* decoding is not supported */
2706 proto_tree_add_text(ie_tree, tvb, offset, IE_PROTOCOL_EXTENSION_LENGTH,
2707 "Protocol extension for PDP-Type present, dissection not supported");
2711 proto_tree_add_uint_bits(ie_tree, hf_ranap_PDP_Type, tvb,
2712 offset, bitoffset, 3, 0);
2713 proceed_nbits(&offset, &bitoffset, 3);
2717 /* dataVolumeReportingIndication */
2718 if (dataVolumeReportingIndication_present)
2720 proto_tree_add_uint_bits(ie_tree, hf_ranap_dataVolumeReportingIndication, tvb,
2721 offset, bitoffset, 1, 0);
2722 proceed_nbits(&offset, &bitoffset, 1);
2725 /* dl-GTP-PDU-SequenceNumber */
2726 if (dl_GTP_PDU_SequenceNumber_present)
2728 allign(&offset, &bitoffset);
2729 proto_tree_add_item(ie_tree, hf_ranap_dl_GTP_PDU_SequenceNumber, tvb, offset, 2, FALSE);
2733 /* ul-GTP-PDU-SequenceNumber */
2734 if (ul_GTP_PDU_SequenceNumber_present)
2736 allign(&offset, &bitoffset);
2737 proto_tree_add_item(ie_tree, hf_ranap_ul_GTP_PDU_SequenceNumber, tvb, offset, 2, FALSE);
2741 /* dl-N-PDU-SequenceNumber */
2742 if (dl_N_PDU_SequenceNumber_present)
2744 allign(&offset, &bitoffset);
2745 proto_tree_add_item(ie_tree, hf_ranap_dl_N_PDU_SequenceNumber, tvb, offset, 2, FALSE);
2749 /* ul-N-PDU-SequenceNumber */
2750 if (ul_N_PDU_SequenceNumber_present)
2752 allign(&offset, &bitoffset);
2753 proto_tree_add_item(ie_tree, hf_ranap_ul_N_PDU_SequenceNumber, tvb, offset, 2, FALSE);
2758 if (iE_Extensions_present)
2760 if ((ret=dissect_iE_Extension(tvb, ie_tree, &offset, &bitoffset, "SetupOrModifyItemSecond")) != 0)
2764 /* protocol extended */
2765 if (extension_present)
2768 /* decoding is not supported */
2769 proto_tree_add_text(ie_tree, tvb, offset, IE_PROTOCOL_EXTENSION_LENGTH,
2770 "Protocol extension for SetupOrModifyItemSecond present, dissection not supported");
2779 dissect_IE_RAB_SetupOrModifiedItem (tvbuff_t *tvb, proto_tree *ie_tree)
2781 proto_item *optionals_item = NULL;
2782 proto_tree *optionals_tree = NULL;
2784 int extension_present;
2785 int transportLayerAddress_present;
2786 int iuTransportAssociation_present;
2787 int dl_dataVolumes_present;
2788 int iE_Extensions_present;
2795 /* create subtree for extension/optional/default bitmap */
2796 optionals_item = proto_tree_add_text(ie_tree, tvb, offset, 1,
2797 "RAB-SetupOrModifiedItem Extension/Optional/Default bitmap");
2798 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
2800 /* protocol_extension present ? */
2801 extension_present = extract_nbits(tvb, offset, bitoffset, 1);
2802 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
2803 offset, bitoffset, 1, 0);
2804 proceed_nbits(&offset, &bitoffset, 1);
2806 /* transportLayerAddress present ? */
2807 transportLayerAddress_present = extract_nbits(tvb, offset, bitoffset, 1);
2808 proto_tree_add_uint_bits(optionals_tree, hf_ranap_transportLayerAddress_present, tvb,
2809 offset, bitoffset, 1, 0);
2810 proceed_nbits(&offset, &bitoffset, 1);
2812 /* iuTransportAssociation present ? */
2813 iuTransportAssociation_present = extract_nbits(tvb, offset, bitoffset, 1);
2814 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iuTransportAssociation_present, tvb,
2815 offset, bitoffset, 1, 0);
2816 proceed_nbits(&offset, &bitoffset, 1);
2818 /* dl_dataVolumes present ? */
2819 dl_dataVolumes_present = extract_nbits(tvb, offset, bitoffset, 1);
2820 proto_tree_add_uint_bits(optionals_tree, hf_ranap_dl_dataVolumes_present, tvb,
2821 offset, bitoffset, 1, 0);
2822 proceed_nbits(&offset, &bitoffset, 1);
2824 /* iE_Extensions present ? */
2825 iE_Extensions_present = extract_nbits(tvb, offset, bitoffset, 1);
2826 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present, tvb,
2827 offset, bitoffset, 1, 0);
2828 proceed_nbits(&offset, &bitoffset, 1);
2832 proto_tree_add_uint_bits(ie_tree, hf_ranap_rab_id,
2833 tvb, offset, bitoffset, 8, 0);
2834 proceed_nbits(&offset, &bitoffset, 8);
2836 /* transportLayerAddress */
2837 if (transportLayerAddress_present)
2839 if ((ret=dissect_TransportLayerAddress(tvb, ie_tree, &offset, &bitoffset)) != 0)
2843 /* iuTransportAssociation */
2844 if (iuTransportAssociation_present)
2846 if ((ret=dissect_iuTransportAssociation(tvb, ie_tree, &offset, &bitoffset)) != 0)
2850 /* dl-dataVolumes */
2851 if (dl_dataVolumes_present)
2853 if ((ret = dissect_dataVolumeList(tvb, ie_tree, &offset, &bitoffset,
2854 "dl-dataVolumes")) != 0)
2859 if (iE_Extensions_present)
2861 if ((ret=dissect_iE_Extension(tvb, ie_tree, &offset, &bitoffset, "RAB_SetupOrModifiedItem")) != 0)
2865 /* protocol extended */
2866 if (extension_present)
2868 /* extended sequence */
2869 /* decoding is not supported */
2870 proto_tree_add_text(ie_tree, tvb, offset, IE_PROTOCOL_EXTENSION_LENGTH,
2871 "Protocol extension for RAB_SetupOrModifiedItem present, dissection not supported");
2881 dissect_IE_RAB_SetupOrModifyItemFirst (tvbuff_t *tvb, proto_tree *ie_tree)
2885 proto_item *optionals_item = NULL;
2886 proto_tree *optionals_tree = NULL;
2887 int extension_present;
2888 int nAS_SynchronisationIndicator_present;
2889 int rAB_Parameters_present;
2890 int userPlaneInformation_present;
2891 int transportLayerInformation_present;
2892 int service_Handover_present;
2893 int iE_Extensions_present;
2894 int tmp_extension_present;
2899 offset = 0; bitoffset = 0;
2901 /* create subtree for extension/optional/default bitmap */
2902 optionals_item = proto_tree_add_text(ie_tree, tvb, offset,IE_PROTOCOL_EXTENSION_LENGTH,
2903 "RAB_SetupOrModifyItemFirst Extension/Optional/Default bitmap");
2904 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
2906 /* protocol extension present ? */
2907 extension_present = extract_nbits(tvb, offset, bitoffset, 1);
2908 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension,
2909 tvb, offset, bitoffset, 1, 0);
2910 proceed_nbits(&offset, &bitoffset, 1);
2912 /* nAS_SynchronisationIndicator present ? */
2913 nAS_SynchronisationIndicator_present = extract_nbits(tvb, offset, bitoffset, 1);
2914 proto_tree_add_uint_bits(optionals_tree, hf_ranap_nAS_SynchronisationIndicator_present,
2915 tvb, offset, bitoffset, 1, 0);
2916 proceed_nbits(&offset, &bitoffset, 1);
2918 /* rAB_Parameters present ? */
2919 rAB_Parameters_present = extract_nbits(tvb, offset, bitoffset, 1);
2920 proto_tree_add_uint_bits(optionals_tree, hf_ranap_rAB_Parameters_present,
2921 tvb, offset, bitoffset, 1, 0);
2922 proceed_nbits(&offset, &bitoffset, 1);
2924 /* userPlaneInformation present ? */
2925 userPlaneInformation_present = extract_nbits(tvb, offset, bitoffset, 1);
2926 proto_tree_add_uint_bits(optionals_tree, hf_ranap_userPlaneInformation_present,
2927 tvb, offset, bitoffset, 1, 0);
2928 proceed_nbits(&offset, &bitoffset, 1);
2930 /* transportLayerInformation present ? */
2931 transportLayerInformation_present = extract_nbits(tvb, offset, bitoffset, 1);
2932 proto_tree_add_uint_bits(optionals_tree, hf_ranap_transportLayerInformation_present,
2933 tvb, offset, bitoffset, 1, 0);
2934 proceed_nbits(&offset, &bitoffset, 1);
2936 /* service_Handover present ? */
2937 service_Handover_present = extract_nbits(tvb, offset, bitoffset, 1);
2938 proto_tree_add_uint_bits(optionals_tree, hf_ranap_service_Handover_present,
2939 tvb, offset, bitoffset, 1, 0);
2940 proceed_nbits(&offset, &bitoffset, 1);
2942 /* iE_Extensions present ? */
2943 iE_Extensions_present = extract_nbits(tvb, offset, bitoffset, 1);
2944 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present,
2945 tvb, offset, bitoffset, 1, 0);
2946 proceed_nbits(&offset, &bitoffset, 1);
2950 proto_tree_add_uint_bits(ie_tree, hf_ranap_rab_id,
2951 tvb, offset, bitoffset, 8, 0);
2952 proceed_nbits(&offset, &bitoffset, 8);
2954 /* nAS-SynchronisationIndicator */
2955 if (nAS_SynchronisationIndicator_present)
2957 proto_tree_add_uint_bits(ie_tree, hf_ranap_nAS_SynchronisationIndicator,
2958 tvb, offset, bitoffset, 4, 0);
2959 proceed_nbits(&offset, &bitoffset, 4);
2962 /* rAB-Parameters */
2963 if (rAB_Parameters_present)
2965 if ((ret=dissect_rAB_Parameters(tvb, ie_tree, &offset, &bitoffset)) != 0)
2969 /* userPlaneInformation */
2970 if (userPlaneInformation_present)
2972 if ((ret=dissect_userPlaneInformation(tvb, ie_tree, &offset, &bitoffset)) != 0)
2976 /* transportLayerInformation */
2977 if (transportLayerInformation_present)
2979 if ((ret=dissect_transportLayerInformation(tvb, ie_tree, &offset, &bitoffset)) != 0)
2983 /* service_Handover */
2984 if (service_Handover_present)
2986 tmp_extension_present = extract_nbits(tvb, offset, bitoffset, 1);
2987 proceed_nbits(&offset, &bitoffset, 1);
2989 if (tmp_extension_present)
2992 /* decoding is not supported */
2993 proto_tree_add_text(ie_tree, tvb, offset, IE_PROTOCOL_EXTENSION_LENGTH,
2994 "Protocol extension for service_Handover present, dissection not supported");
2998 proto_tree_add_uint_bits(ie_tree, hf_ranap_service_Handover,
2999 tvb, offset, bitoffset, 2, 0);
3000 proceed_nbits(&offset, &bitoffset, 2);
3004 if (iE_Extensions_present)
3006 if ((ret=dissect_iE_Extension(tvb, ie_tree, &offset, &bitoffset, "SetupOrModifyItemFirst" )) != 0)
3016 dissect_IE_RAB_ReleaseItem(tvbuff_t *tvb, proto_tree *ie_tree)
3018 proto_item *optionals_item = NULL;
3019 proto_tree *optionals_tree = NULL;
3022 int extension_present;
3023 int iE_Extensions_present;
3027 /* create subtree for extension/optional/default bitmap */
3028 optionals_item = proto_tree_add_text(ie_tree, tvb, offset,IE_PROTOCOL_EXTENSION_LENGTH,
3029 "RAB_ReleaseItem Extension/Optional/Default bitmap");
3030 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
3032 /* protocol extension present ? */
3033 extension_present = extract_nbits(tvb, offset, bitoffset, 1);
3034 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension,
3035 tvb, offset, bitoffset, 1, 0);
3036 proceed_nbits(&offset, &bitoffset, 1);
3039 /* iE_Extensions present ? */
3040 iE_Extensions_present = extract_nbits(tvb, offset, bitoffset, 1);
3041 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present,
3042 tvb, offset, bitoffset, 1, 0);
3043 proceed_nbits(&offset, &bitoffset, 1);
3047 proto_tree_add_uint_bits(ie_tree, hf_ranap_rab_id,
3048 tvb, offset, bitoffset, 8, 0);
3049 proceed_nbits(&offset, &bitoffset, 8);
3053 if ((ret=dissect_cause(tvb, ie_tree, &offset, &bitoffset)) != 0)
3057 if (iE_Extensions_present)
3059 if ((ret=dissect_iE_Extension(tvb, ie_tree, &offset, &bitoffset, "RAB_ReleasedItem")) != 0)
3063 /* protocol extended */
3064 if (extension_present)
3066 /* extended sequence */
3067 /* decoding is not supported */
3068 proto_tree_add_text(ie_tree, tvb, offset, IE_PROTOCOL_EXTENSION_LENGTH,
3069 "Protocol extension for RAB_ReleasedItem present, dissection not supported");
3078 dissect_IE_RAB_ReleasedItem (tvbuff_t *tvb, proto_tree *ie_tree)
3080 proto_item *optionals_item = NULL;
3081 proto_tree *optionals_tree = NULL;
3083 int extension_present;
3084 int dl_dataVolumes_present;
3085 int dl_GTP_PDU_SequenceNumber_present;
3086 int ul_GTP_PDU_SequenceNumber_present;
3087 int iE_Extensions_present;
3093 /* create subtree for extension/optional/default bitmap */
3094 optionals_item = proto_tree_add_text(ie_tree, tvb, offset, 1,
3095 "RAB-ReleasedItem Extension/Optional/Default bitmap");
3096 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
3098 /* protocol_extension present ? */
3099 extension_present = extract_nbits(tvb, offset, bitoffset, 1);
3100 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
3101 offset, bitoffset, 1, 0);
3102 proceed_nbits(&offset, &bitoffset, 1);
3104 /* dl_dataVolumes present ? */
3105 dl_dataVolumes_present = extract_nbits(tvb, offset, bitoffset, 1);
3106 proto_tree_add_uint_bits(optionals_tree, hf_ranap_dl_dataVolumes_present, tvb,
3107 offset, bitoffset, 1, 0);
3108 proceed_nbits(&offset, &bitoffset, 1);
3110 /* dL_GTP_PDU_SequenceNumber present ? */
3111 dl_GTP_PDU_SequenceNumber_present = extract_nbits(tvb, offset, bitoffset, 1);
3112 proto_tree_add_uint_bits(optionals_tree, hf_ranap_dl_GTP_PDU_SequenceNumber_present,
3113 tvb, offset, bitoffset, 1, 0);
3114 proceed_nbits(&offset, &bitoffset, 1);
3116 /* uL_GTP_PDU_SequenceNumber present ? */
3117 ul_GTP_PDU_SequenceNumber_present = extract_nbits(tvb, offset, bitoffset, 1);
3118 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ul_GTP_PDU_SequenceNumber_present,
3119 tvb, offset, bitoffset, 1, 0);
3120 proceed_nbits(&offset, &bitoffset, 1);
3122 /* iE_Extensions present ? */
3123 iE_Extensions_present = extract_nbits(tvb, offset, bitoffset, 1);
3124 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present,
3125 tvb, offset, bitoffset, 1, 0);
3126 proceed_nbits(&offset, &bitoffset, 1);
3129 proto_tree_add_uint_bits(ie_tree, hf_ranap_rab_id,
3130 tvb, offset, bitoffset, 8, 0);
3131 proceed_nbits(&offset, &bitoffset, 8);
3133 /* dl-dataVolumes */
3134 if (dl_dataVolumes_present)
3136 if ((ret=dissect_dataVolumeList(tvb, ie_tree, &offset, &bitoffset,
3137 "dl-dataVolumes")) != 0)
3141 /* dL-GTP-PDU-SequenceNumber */
3142 if (dl_GTP_PDU_SequenceNumber_present)
3144 allign(&offset, &bitoffset);
3145 proto_tree_add_item(ie_tree, hf_ranap_dl_GTP_PDU_SequenceNumber, tvb, offset, 2, FALSE);
3149 /* uL-GTP-PDU-SequenceNumber */
3150 if (ul_GTP_PDU_SequenceNumber_present)
3152 allign(&offset, &bitoffset);
3153 proto_tree_add_item(ie_tree, hf_ranap_ul_GTP_PDU_SequenceNumber, tvb, offset, 2, FALSE);
3158 if (iE_Extensions_present)
3160 if ((ret=dissect_iE_Extension(tvb, ie_tree, &offset, &bitoffset, "UserPlaneInformation")) != 0)
3164 /* protocol extended */
3165 if (extension_present)
3167 /* extended sequence */
3168 /* decoding is not supported */
3169 proto_tree_add_text(ie_tree, tvb, offset, IE_PROTOCOL_EXTENSION_LENGTH,
3170 "Protocol extension for RAB_ReleasedItem present, dissection not supported");
3180 dissect_IE_RAB_QueuedItem (tvbuff_t *tvb, proto_tree *ie_tree)
3182 proto_item *optionals_item = NULL;
3183 proto_tree *optionals_tree = NULL;
3185 int extension_present;
3186 int iE_Extensions_present;
3193 /* create subtree for extension/optional/default bitmap */
3194 optionals_item = proto_tree_add_text(ie_tree, tvb, offset, 1,
3195 "RAB-QueuedItem Extension/Optional/Default bitmap");
3196 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
3198 /* protocol_extension present ? */
3199 extension_present = extract_nbits(tvb, offset, bitoffset, 1);
3200 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
3201 offset, bitoffset, 1, 0);
3202 proceed_nbits(&offset, &bitoffset, 1);
3204 /* iE_Extensions present ? */
3205 iE_Extensions_present = extract_nbits(tvb, offset, bitoffset, 1);
3206 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present,
3207 tvb, offset, bitoffset, 1, 0);
3208 proceed_nbits(&offset, &bitoffset, 1);
3211 proto_tree_add_uint_bits(ie_tree, hf_ranap_rab_id,
3212 tvb, offset, bitoffset, 8, 0);
3213 proceed_nbits(&offset, &bitoffset, 8);
3216 if (iE_Extensions_present)
3218 if ((ret=dissect_iE_Extension(tvb, ie_tree, &offset, &bitoffset, "RAB_QueuedItem" )) != 0 )
3222 /* protocol extended */
3223 if (extension_present)
3225 /* extended sequence */
3226 /* decoding is not supported */
3227 proto_tree_add_text(ie_tree, tvb, offset, IE_PROTOCOL_EXTENSION_LENGTH,
3228 "Protocol extension for RAB_QueuedItem present, dissection not supported");
3238 dissect_IE_RAB_FailedItem(tvbuff_t *tvb, proto_tree *ie_tree)
3240 proto_item *optionals_item = NULL;
3241 proto_tree *optionals_tree = NULL;
3243 int extension_present;
3244 int iE_Extensions_present;
3250 /* create subtree for extension/optional/default bitmap */
3251 optionals_item = proto_tree_add_text(ie_tree, tvb, offset, 1,
3252 "RAB-FailedItem Extension/Optional/Default bitmap");
3253 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
3255 /* protocol_extension present ? */
3256 extension_present = extract_nbits(tvb, offset, bitoffset, 1);
3257 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
3258 offset, bitoffset, 1, 0);
3259 proceed_nbits(&offset, &bitoffset, 1);
3261 /* iE_Extensions present ? */
3262 iE_Extensions_present = extract_nbits(tvb, offset, bitoffset, 1);
3263 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present,
3264 tvb, offset, bitoffset, 1, 0);
3265 proceed_nbits(&offset, &bitoffset, 1);
3268 proto_tree_add_uint_bits(ie_tree, hf_ranap_rab_id,
3269 tvb, offset, bitoffset, 8, 0);
3270 proceed_nbits(&offset, &bitoffset, 8);
3273 if ((ret=dissect_cause(tvb, ie_tree, &offset, &bitoffset)) != 0)
3277 if (iE_Extensions_present)
3279 if ((ret=dissect_iE_Extension(tvb, ie_tree, &offset, &bitoffset, "RAB-FailedItem")) != 0)
3284 /* protocol extended */
3285 if (extension_present)
3287 /* extended sequence */
3288 /* decoding is not supported */
3289 proto_tree_add_text(ie_tree, tvb, offset, IE_PROTOCOL_EXTENSION_LENGTH,
3290 "Protocol extension for RAB-FailedItem present, dissection not supported");
3299 dissect_IE_CriticalityDiagnostics(tvbuff_t *tvb, proto_tree *ie_tree)
3302 proto_item *optionals_item = NULL;
3303 proto_tree *optionals_tree = NULL;
3305 int extension_present;
3306 int procedureCode_present;
3307 int triggeringMessage_present;
3308 int procedureCriticality_present;
3309 int iEsCriticalityDiagnostics_present;
3310 int iE_Extensions_present;
3317 /* create subtree for extension/optional/default bitmap */
3318 optionals_item = proto_tree_add_text(ie_tree, tvb, offset, 1,
3319 "IE-CriticalityDiagnostics Extension/Optional/Default bitmap");
3320 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
3322 /* protocol_extension present ? */
3323 extension_present = extract_nbits(tvb, offset, bitoffset, 1);
3324 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
3325 offset, bitoffset, 1, 0);
3326 proceed_nbits(&offset, &bitoffset, 1);
3328 /* procedureCode present ? */
3329 procedureCode_present = extract_nbits(tvb, offset, bitoffset, 1);
3330 proto_tree_add_uint_bits(optionals_tree, hf_ranap_procedureCode_present,
3331 tvb, offset, bitoffset, 1, 0);
3332 proceed_nbits(&offset, &bitoffset, 1);
3334 /* triggeringMessage present ? */
3335 triggeringMessage_present = extract_nbits(tvb, offset, bitoffset, 1);
3336 proto_tree_add_uint_bits(optionals_tree, hf_ranap_triggeringMessage_present,
3337 tvb, offset, bitoffset, 1, 0);
3338 proceed_nbits(&offset, &bitoffset, 1);
3340 /* procedureCriticality present ? */
3341 procedureCriticality_present = extract_nbits(tvb, offset, bitoffset, 1);
3342 proto_tree_add_uint_bits(optionals_tree, hf_ranap_procedureCriticality_present,
3343 tvb, offset, bitoffset, 1, 0);
3344 proceed_nbits(&offset, &bitoffset, 1);
3346 /* iEsCriticalityDiagnostics present ? */
3347 iEsCriticalityDiagnostics_present = extract_nbits(tvb, offset, bitoffset, 1);
3348 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iEsCriticalityDiagnostics_present,
3349 tvb, offset, bitoffset, 1, 0);
3350 proceed_nbits(&offset, &bitoffset, 1);
3352 /* iE_Extensions present ? */
3353 iE_Extensions_present = extract_nbits(tvb, offset, bitoffset, 1);
3354 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present,
3355 tvb, offset, bitoffset, 1, 0);
3356 proceed_nbits(&offset, &bitoffset, 1);
3360 if (procedureCode_present)
3362 allign (&offset, &bitoffset);
3363 proto_tree_add_item(ie_tree, hf_ranap_procedure_code, tvb, offset, 1, FALSE);
3367 /* triggeringMessage */
3368 if (triggeringMessage_present)
3370 proto_tree_add_uint_bits(ie_tree, hf_ranap_triggeringMessage,
3371 tvb, offset, bitoffset, 2, 0);
3372 proceed_nbits(&offset, &bitoffset, 2);
3375 /* procedureCriticality */
3376 if (procedureCriticality_present)
3378 proto_tree_add_uint_bits(ie_tree, hf_ranap_procedureCriticality,
3379 tvb, offset, bitoffset, 2, 0);
3380 proceed_nbits(&offset, &bitoffset, 2);
3383 /* iEsCriticalityDiagnostics */
3384 if (iEsCriticalityDiagnostics_present)
3386 if ((ret=dissect_iEsCriticalityDiagnostics(tvb, ie_tree, &offset, &bitoffset)) != 0)
3391 if (iE_Extensions_present)
3393 if ((ret=dissect_iE_Extension(tvb, ie_tree, &offset, &bitoffset, "IE_CriticalityDiagnostics")) != 0)
3398 /* protocol extended */
3399 if (extension_present)
3401 /* extended sequence */
3402 /* decoding is not supported */
3403 proto_tree_add_text(ie_tree, tvb, offset, IE_PROTOCOL_EXTENSION_LENGTH,
3404 "Protocol extension for IE CriticalityDiagnostics present, dissection not supported");
3413 dissect_unknown_IE(tvbuff_t *tvb, proto_tree *ie_tree)
3417 proto_tree_add_text(ie_tree, tvb, 0, -1,
3418 "IE Contents (dissection not implemented)");
3425 /*****************************************************************************/
3427 /* Dissecting Functions for IE Lists / Containers */
3429 /*****************************************************************************/
3432 dissect_RAB_IE_ContainerPairList(tvbuff_t *tvb, proto_tree *ie_tree)
3434 proto_item *rab_item = NULL;
3435 proto_tree *rab_tree = NULL;
3436 proto_item *ie_pair_item = NULL;
3437 proto_tree *ie_pair_tree = NULL;
3438 proto_item *first_value_item = NULL;
3439 proto_tree *first_value_tree = NULL;
3440 proto_item *second_value_item = NULL;
3441 proto_tree *second_value_tree = NULL;
3442 guint number_of_RABs, currentRAB;
3443 guint number_of_IEs, currentIE;
3444 gint number_of_octets_first, number_of_octets_second;
3445 gint number_of_octets_first_size, number_of_octets_second_size ;
3450 tvbuff_t *first_value_tvb;
3451 tvbuff_t *second_value_tvb;
3455 /* number of RABs in the list */
3456 number_of_RABs = 1 + tvb_get_guint8(tvb, offset);
3457 proto_tree_add_uint(ie_tree, hf_ranap_num_rabs,
3459 NUM_RABS_LENGTH, number_of_RABs);
3461 offset += NUM_RABS_LENGTH;
3463 /* do for each RAB */
3464 for (currentRAB=1; currentRAB<=number_of_RABs; currentRAB++)
3466 /* create subtree for RAB */
3467 rab_item = proto_tree_add_text(ie_tree, tvb, offset, 0, "%d. RAB", currentRAB);
3468 rab_tree = proto_item_add_subtree(rab_item, ett_ranap_rab);
3470 /* number of IE pairs for this RAB */
3471 number_of_IEs = tvb_get_ntohs(tvb, offset);
3472 proto_tree_add_uint(rab_tree, hf_ranap_number_of_ies_in_list,
3473 tvb, offset, 2, number_of_IEs);
3475 offset += 2; /*points now to beginning of first IE pair */
3477 /* do for each IE pair */
3478 for (currentIE=1; currentIE<=number_of_IEs; currentIE++)
3480 /* use tmp_offset to point to current field */
3481 tmp_offset = offset;
3483 ie_id = tvb_get_ntohs(tvb, tmp_offset);
3484 tmp_offset += IE_ID_LENGTH;
3486 tmp_offset += 1; /* skip first criticality byte */
3487 /* number of octets in first value */
3488 extract_length(tvb, tmp_offset, &number_of_octets_first, &number_of_octets_first_size);
3489 tmp_offset += number_of_octets_first_size + number_of_octets_first;
3491 tmp_offset += 1; /* skip second criticality byte */
3492 /* number of octets in second value */
3493 extract_length(tvb, tmp_offset, &number_of_octets_second, &number_of_octets_second_size);
3494 tmp_offset += number_of_octets_second_size + number_of_octets_second;
3496 /* create subtree for ie_pair */
3497 ie_pair_item = proto_tree_add_text(rab_tree, tvb, offset,
3498 tmp_offset - offset,
3500 val_to_str(ie_id, ranap_ie_id_values, "Unknown"),
3502 ie_pair_tree = proto_item_add_subtree(ie_pair_item, ett_ranap_ie_pair);
3504 /* add fields to ie pair subtee */
3505 /* use offset to point to current field */
3507 proto_tree_add_item(ie_pair_tree, hf_ranap_ie_ie_id, tvb, offset, IE_ID_LENGTH, FALSE);
3508 offset += IE_ID_LENGTH;
3510 /* first criticality */
3511 proto_tree_add_uint_bits(ie_pair_tree, hf_ranap_ie_pair_first_criticality, tvb,
3512 offset, bitoffset, 2, 0);
3513 proceed_nbits(&offset, &bitoffset, 2);
3515 /* number of octets in first value */
3516 allign(&offset, &bitoffset);
3517 if (number_of_octets_first != 0)
3519 proto_tree_add_uint(ie_pair_tree, hf_ranap_first_value_number_of_octets,
3521 number_of_octets_first_size,
3522 number_of_octets_first);
3526 /* decoding is not supported */
3527 proto_tree_add_text(ie_pair_tree, tvb, offset,
3528 2, "Number of Octets greater than 0x3FFF, dissection not supported");
3531 offset += number_of_octets_first_size;
3533 /* add subtree for first value */
3534 first_value_item = proto_tree_add_text(ie_pair_tree, tvb, offset,
3535 number_of_octets_first,
3537 val_to_str(ie_id, ranap_ie_id_values, "Unknown"));
3538 first_value_tree = proto_item_add_subtree(first_value_item, ett_ranap_ie_pair_first_value);
3540 /* create tvb containing first value */
3541 first_value_tvb = tvb_new_subset(tvb, offset, number_of_octets_first, number_of_octets_first);
3543 /* add fields of first value */
3546 case IE_RAB_SetupOrModifyItem:
3547 dissect_IE_RAB_SetupOrModifyItemFirst (first_value_tvb, first_value_tree);
3551 dissect_unknown_IE(first_value_tvb, first_value_tree);
3555 offset += number_of_octets_first;
3558 /* second criticality */
3559 proto_tree_add_uint_bits(ie_pair_tree, hf_ranap_ie_pair_second_criticality, tvb,
3560 offset, bitoffset, 2, 0);
3561 proceed_nbits(&offset, &bitoffset, 2);
3563 /* number of octets of second value */
3564 allign(&offset, &bitoffset);
3565 if (number_of_octets_second != 0)
3567 proto_tree_add_uint(ie_pair_tree, hf_ranap_second_value_number_of_octets,
3569 number_of_octets_second_size,
3570 number_of_octets_second);
3574 /* decoding is not supported */
3575 proto_tree_add_text(ie_pair_tree, tvb, offset,
3576 2, "Number of Octets greater than 0x3FFF, dissection not supported");
3579 offset += number_of_octets_second_size;
3581 /* add subtree for second value */
3582 second_value_item = proto_tree_add_text(ie_pair_tree, tvb, offset,
3583 number_of_octets_second,
3585 val_to_str(ie_id, ranap_ie_id_values, "Unknown"));
3586 second_value_tree = proto_item_add_subtree(second_value_item, ett_ranap_ie_pair_second_value);
3588 /* create tvb containing first value */
3589 second_value_tvb = tvb_new_subset(tvb, offset, number_of_octets_second, number_of_octets_second);
3591 /* add fields of second value */
3594 case IE_RAB_SetupOrModifyItem:
3595 dissect_IE_RAB_SetupOrModifyItemSecond (second_value_tvb, second_value_tree);
3599 dissect_unknown_IE(second_value_tvb, second_value_tree);
3603 offset += number_of_octets_second;
3605 }/* for each IE ... */
3606 }/* for each RAB ... */
3613 dissect_RAB_IE_ContainerList(tvbuff_t *tvb, proto_tree *list_tree)
3615 proto_item *rab_item = NULL;
3616 proto_tree *rab_tree = NULL;
3617 proto_item *ie_item = NULL;
3618 proto_tree *ie_tree = NULL;
3620 guint number_of_RABs, currentRAB;
3621 guint number_of_IEs, currentIE;
3622 gint ie_number_of_octets = 0;
3623 gint ie_number_of_octets_size = 0;
3627 gint ie_header_length;
3634 /* number of RABs in the list */
3635 number_of_RABs = 1 + tvb_get_guint8(tvb, offset);
3636 proto_tree_add_uint(list_tree, hf_ranap_num_rabs,
3638 NUM_RABS_LENGTH, number_of_RABs);
3640 offset += NUM_RABS_LENGTH;
3642 /* do for each RAB */
3643 for (currentRAB=1; currentRAB<=number_of_RABs; currentRAB++)
3645 /* create subtree for RAB */
3646 rab_item = proto_tree_add_text(list_tree, tvb, offset, 0, "%d. RAB", currentRAB);
3647 rab_tree = proto_item_add_subtree(rab_item, ett_ranap_rab);
3649 /* number of IEs for this RAB */
3650 number_of_IEs = tvb_get_ntohs(tvb, offset);
3651 proto_tree_add_uint(rab_tree, hf_ranap_number_of_ies_in_list,
3652 tvb, offset, 2, number_of_IEs);
3654 offset += 2; /*points now to beginning of first IE in list */
3657 /* do for each IE */
3658 for (currentIE=1; currentIE<=number_of_IEs; currentIE++)
3661 ie_id = tvb_get_ntohs(tvb, offset);
3662 offset += IE_ID_LENGTH;
3664 offset += IE_CRITICALITY_LENGTH; /* skip criticality byte */
3666 /* number of octets */
3667 extract_length(tvb, offset, &ie_number_of_octets, &ie_number_of_octets_size);
3668 ie_header_length = IE_ID_LENGTH + IE_CRITICALITY_LENGTH + ie_number_of_octets_size;
3670 /* reset offset to beginning of ie */
3673 /* create subtree for ie */
3674 ie_item = proto_tree_add_text(rab_tree, tvb, offset,
3675 ie_header_length + ie_number_of_octets,
3677 val_to_str(ie_id, ranap_ie_id_values, "Unknown"),
3679 ie_tree = proto_item_add_subtree(ie_item, ett_ranap_ie);
3682 proto_tree_add_item(ie_tree, hf_ranap_ie_ie_id, tvb,
3683 offset, IE_ID_LENGTH, FALSE);
3684 offset += IE_ID_LENGTH;
3687 proto_tree_add_uint_bits(ie_tree, hf_ranap_ie_criticality, tvb,
3688 offset, bitoffset, 2, 0);
3689 proceed_nbits(&offset, &bitoffset, 2);
3691 allign(&offset, &bitoffset);
3692 if (ie_number_of_octets != 0)
3694 proto_tree_add_uint(ie_tree, hf_ranap_ie_number_of_octets, tvb,
3695 offset, ie_number_of_octets_size, ie_number_of_octets);
3699 /* decoding is not supported */
3700 proto_tree_add_text(ie_tree, tvb, offset,
3701 0, "Number of Octets greater than 0x3FFF, dissection not supported");
3704 offset += ie_number_of_octets_size;
3707 /* create tvb containing ie */
3708 ie_tvb = tvb_new_subset(tvb, offset, ie_number_of_octets, ie_number_of_octets);
3710 /* add fields of ie */
3713 case IE_RAB_SetupOrModifiedItem:
3714 dissect_IE_RAB_SetupOrModifiedItem(ie_tvb, ie_tree);
3716 case IE_RAB_ReleaseItem:
3717 dissect_IE_RAB_ReleaseItem(ie_tvb, ie_tree);
3719 case IE_RAB_ReleasedItem:
3720 dissect_IE_RAB_ReleasedItem(ie_tvb, ie_tree);
3722 case IE_RAB_ReleasedItem_IuRelComp:
3723 dissect_IE_RAB_ReleasedItem_IuRelComp(ie_tvb, ie_tree);
3725 case IE_RAB_QueuedItem:
3726 dissect_IE_RAB_QueuedItem(ie_tvb, ie_tree);
3728 case IE_RAB_FailedItem:
3729 dissect_IE_RAB_FailedItem(ie_tvb, ie_tree);
3731 case IE_RAB_DataVolumeReportItem:
3732 dissect_IE_RAB_DataVolumeReportItem(ie_tvb, ie_tree);
3735 dissect_unknown_IE(ie_tvb, ie_tree);
3739 ie_offset += (ie_header_length + ie_number_of_octets);
3742 } /* for each RAB */
3749 dissect_ranap_ie(guint16 ie_id, tvbuff_t *ie_contents_tvb, proto_tree *ie_tree)
3751 /* call specific dissection function for ie contents */
3755 return(dissect_IE_RAB_ID(ie_contents_tvb, ie_tree));
3758 return(dissect_IE_NAS_PDU(ie_contents_tvb, ie_tree));
3761 return(dissect_IE_LAI(ie_contents_tvb, ie_tree));
3764 return(dissect_IE_RAC(ie_contents_tvb, ie_tree));
3767 return(dissect_IE_SAI(ie_contents_tvb, ie_tree));
3769 case IE_CN_DomainIndicator:
3770 return(dissect_IE_CN_DomainIndicator(ie_contents_tvb, ie_tree));
3773 return(dissect_IE_IuSigConId(ie_contents_tvb, ie_tree));
3776 return(dissect_IE_SAPI(ie_contents_tvb, ie_tree));
3778 case IE_TransportLayerAddress:
3779 return(dissect_IE_TransportLayerAddress(ie_contents_tvb, ie_tree));
3781 case IE_IuTransportAssociation:
3782 return(dissect_IE_IuTransportAssociation(ie_contents_tvb, ie_tree));
3784 case IE_RAB_SetupOrModifyList:
3785 return(dissect_RAB_IE_ContainerPairList(ie_contents_tvb, ie_tree));
3787 case IE_RAB_SetupOrModifiedList:
3788 case IE_RAB_ReleaseList:
3789 case IE_RAB_ReleasedList:
3790 case IE_RAB_QueuedList:
3791 case IE_RAB_FailedList:
3792 case IE_RAB_ReleaseFailedList:
3793 case IE_RAB_DataVolumeReportList:
3794 case IE_RAB_ReleasedList_IuRelComp:
3795 case IE_RAB_RelocationReleaseList:
3796 case IE_RAB_DataForwardingList:
3797 case IE_RAB_SetupList_RelocReq:
3798 case IE_RAB_SetupList_RelocReqAck:
3799 case IE_RAB_DataForwardingList_SRNS_CtxReq:
3800 case IE_RAB_ContextList:
3801 case IE_RAB_ContextFailedtoTransferList:
3802 case IE_RAB_DataVolumeReportRequestList:
3803 case IE_RAB_FailedtoReportList:
3804 case IE_RAB_ContextList_RANAP_RelocInf:
3805 return(dissect_RAB_IE_ContainerList(ie_contents_tvb, ie_tree));
3807 case IE_CriticalityDiagnostics:
3808 return(dissect_IE_CriticalityDiagnostics(ie_contents_tvb, ie_tree));
3811 return(dissect_IE_Cause(ie_contents_tvb, ie_tree));
3814 return(dissect_unknown_IE(ie_contents_tvb, ie_tree));
3821 dissect_ranap_ie_container(tvbuff_t *tvb, proto_tree *ranap_tree)
3823 proto_item *ie_item = NULL;
3824 proto_tree *ie_tree = NULL;
3825 proto_item *optionals_item = NULL;
3826 proto_tree *optionals_tree = NULL;
3828 int msg_extension_present;
3829 int ProtocolExtensionContainer_present;
3831 guint16 number_of_ies;
3833 gint ie_number_of_octets = 0;
3834 gint ie_number_of_octets_size = 0;
3835 guint16 ie_header_length;
3839 tvbuff_t *ie_contents_tvb;
3843 /* create subtree for extension/optional bitmap of message */
3844 optionals_item = proto_tree_add_text(ranap_tree, tvb, offset, 1,
3845 "Message Extension/Optional/Default bitmap");
3846 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
3849 /* msg_extension present ? */
3850 msg_extension_present = extract_nbits(tvb, offset, bitoffset, 1);
3854 proto_tree_add_uint_bits(optionals_tree, hf_ranap_msg_extension_present, tvb,
3855 offset, bitoffset, 1, 0);
3857 proceed_nbits(&offset, &bitoffset, 1);
3859 /* ProtocolExtensionContainer present ? */
3860 ProtocolExtensionContainer_present = extract_nbits(tvb, offset, bitoffset, 1);
3863 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ProtocolExtensionContainer_present,
3864 tvb, offset, bitoffset, 1, 0);
3866 proceed_nbits(&offset, &bitoffset, 1);
3869 /* extract ie container data */
3871 allign(&offset, &bitoffset);
3872 number_of_ies = tvb_get_ntohs(tvb, offset);
3875 proto_tree_add_uint(ranap_tree, hf_ranap_number_of_ies,
3876 tvb, offset, 2, number_of_ies);
3880 ie_offset = offset; /* ie_offset marks beginning of IE-Header */
3882 /* do the following for each IE in the PDU */
3883 for (i=1; i <= number_of_ies; i++)
3885 /* extract IE header fields which are needed even if no ranap tree exists*/
3887 ie_id = tvb_get_ntohs(tvb, offset);
3888 offset += IE_ID_LENGTH;
3890 /* number of octets in the IE */
3891 offset += IE_CRITICALITY_LENGTH; /* skip criticality byte */
3892 ie_number_of_octets = 0;
3893 extract_length(tvb, offset, &ie_number_of_octets, &ie_number_of_octets_size);
3894 ie_header_length = IE_ID_LENGTH + IE_CRITICALITY_LENGTH + ie_number_of_octets_size;
3898 offset = ie_offset; /* start from beginning of IE */
3899 /* create subtree for ie */
3900 ie_item = proto_tree_add_text(ranap_tree, tvb, offset,
3901 ie_header_length + ie_number_of_octets,
3903 val_to_str(ie_id, ranap_ie_id_values, "Unknown"),
3905 ie_tree = proto_item_add_subtree(ie_item, ett_ranap_ie);
3907 /* add fields to ie subtee */
3909 proto_tree_add_item(ie_tree, hf_ranap_ie_ie_id, tvb,
3910 offset, IE_ID_LENGTH, FALSE);
3911 offset += IE_ID_LENGTH;
3914 proto_tree_add_uint_bits(ie_tree, hf_ranap_ie_criticality, tvb,
3915 offset, bitoffset, 2, 0);
3916 proceed_nbits(&offset, &bitoffset, 2);
3918 /* number of octets */
3919 allign(&offset, &bitoffset);
3920 if (ie_number_of_octets != 0)
3922 proto_tree_add_uint(ie_tree, hf_ranap_ie_number_of_octets, tvb,
3923 offset, ie_number_of_octets_size, ie_number_of_octets);
3924 offset += ie_number_of_octets_size;
3928 /* decoding is not supported */
3929 proto_tree_add_text(ranap_tree, tvb, offset,
3930 2, "Number of Octets greater than 0x3FFF, dissection not supported");
3935 /* check if number_of_octets could be decoded */
3936 /* in case we skipped if (ranap_tree) {....} */
3937 if (ie_number_of_octets == 0) return (-1);
3939 /* create tvb containing the ie contents */
3940 ie_contents_tvb = tvb_new_subset(tvb, ie_offset + ie_header_length,
3941 ie_number_of_octets, ie_number_of_octets);
3943 /* call specific dissection function for ie contents */
3944 dissect_ranap_ie(ie_id, ie_contents_tvb, ie_tree);
3946 /* set ie_offset to beginning of next ie */
3947 ie_offset += (ie_header_length + ie_number_of_octets);
3951 /* protocol Extensions */
3952 if (ProtocolExtensionContainer_present)
3954 return(dissect_iE_Extension(tvb, ranap_tree, &offset, &bitoffset, "PDU"));
3963 dissect_ranap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
3965 proto_item *ranap_item = NULL;
3966 proto_tree *ranap_tree = NULL;
3968 guint procedure_code;
3970 gint number_of_octets = 0;
3971 gint number_of_octets_size = 0;
3973 gint tmp_offset = 0;
3975 gint tmp_bitoffset = 0;
3976 guint extension_present;
3981 /* make entry in the Protocol column on summary display */
3982 if (check_col(pinfo->cinfo, COL_PROTOCOL))
3983 col_set_str(pinfo->cinfo, COL_PROTOCOL, "RANAP");
3985 /* extract header fields which are needed even if no tree exists */
3987 /* protocol_extension present ? */
3988 extension_present = extract_nbits(tvb, tmp_offset, tmp_bitoffset, 1);
3989 proceed_nbits(&tmp_offset, &tmp_bitoffset, 1);
3990 if (extension_present)
3992 /* extended choice */
3993 /* decoding is not supported */
3994 col_append_str(pinfo->cinfo, COL_INFO, "RANAP-PDU Protocol extension present, dissection not supported");
3998 /* pdu_index choice 0..3 */
3999 pdu_index = extract_nbits(tvb, tmp_offset, tmp_bitoffset, 2);
4000 proceed_nbits(&tmp_offset, &tmp_bitoffset, 2);
4002 /* procedure code */
4003 allign(&tmp_offset, &tmp_bitoffset);
4004 procedure_code = tvb_get_guint8(tvb, tmp_offset);
4007 /* add Procedure Code to Info Column */
4008 if (check_col(pinfo->cinfo, COL_INFO))
4010 if (procedure_code <= PC_max)
4012 col_append_str(pinfo->cinfo, COL_INFO,
4013 val_to_str(pdu_index, ranap_message_names[procedure_code],
4014 "unknown message"));
4015 col_append_str(pinfo->cinfo, COL_INFO, " ");
4019 /* extract number of octets */
4020 tmp_offset += 1; /* leave out criticality byte */
4021 extract_length(tvb, tmp_offset, &number_of_octets, &number_of_octets_size);
4023 /* In the interest of speed, if "tree" is NULL, don't do any work not
4024 necessary to generate protocol tree items. */
4027 /* create the ranap protocol tree */
4028 ranap_item = proto_tree_add_item(tree, proto_ranap, tvb, 0, -1, FALSE);
4029 ranap_tree = proto_item_add_subtree(ranap_item, ett_ranap);
4031 /* Add fields to ranap protocol tree */
4033 proceed_nbits(&offset, &bitoffset, 1); /* leave out extension bit, checked above */
4034 proto_tree_add_uint_bits(ranap_tree, hf_ranap_pdu_index, tvb,
4035 offset, bitoffset, 2, 0);
4036 proceed_nbits(&offset, &bitoffset, 2);
4039 /* Procedure Code */
4040 allign(&offset, &bitoffset);
4041 proto_tree_add_item(ranap_tree, hf_ranap_procedure_code, tvb, offset, 1, FALSE);
4044 /* PDU Criticality */
4045 proto_tree_add_uint_bits(ranap_tree, hf_ranap_pdu_criticality, tvb,
4046 offset, bitoffset, 2, 0);
4047 proceed_nbits(&offset, &bitoffset, 2);
4049 /* number of octets */
4050 allign(&offset, &bitoffset);
4051 if (number_of_octets != 0)
4053 proto_tree_add_uint(ranap_tree, hf_ranap_pdu_number_of_octets,
4055 number_of_octets_size, number_of_octets);
4056 offset += number_of_octets_size;
4060 /* decoding is not supported */
4061 proto_tree_add_text(ranap_tree, tvb, offset,
4062 2, "Number of Octets greater than 0x3FFF, dissection not supported");
4067 /* set offset to the beginning of ProtocolIE-Container */
4068 /* in case we skipped "if(tree){...}" above */
4069 offset = PDU_NUMBER_OF_OCTETS_OFFSET + number_of_octets_size;
4071 /* create a tvb containing the remainder of the PDU */
4072 ie_tvb = tvb_new_subset(tvb, offset, -1, -1);
4074 /* dissect the ies */
4075 dissect_ranap_ie_container(ie_tvb, ranap_tree);
4080 /*****************************************************************************/
4082 /* Protocol Registration Functions */
4084 /*****************************************************************************/
4087 proto_register_ranap(void)
4089 /* Setup list of header fields */
4090 static hf_register_info hf[] = {
4091 { &hf_ranap_pdu_index,
4092 { "RANAP-PDU Index",
4093 "ranap.ranap_pdu_index",
4094 FT_UINT8, BASE_HEX, VALS(&ranap_pdu_index_values), 0x0,
4097 { &hf_ranap_procedure_code,
4099 "ranap.procedure_code",
4100 FT_UINT8, BASE_DEC, VALS(&ranap_procedure_code_values), 0x0,
4103 { &hf_ranap_pdu_criticality,
4104 { "Criticality of PDU",
4105 "ranap.pdu.criticality",
4106 FT_UINT8, BASE_HEX, VALS(&ranap_criticality_values), 0x0,
4109 { &hf_ranap_pdu_number_of_octets,
4110 { "Number of Octets in PDU",
4111 "ranap.pdu.num_of_octets",
4112 FT_UINT16, BASE_DEC, NULL, 0x0,
4115 { &hf_ranap_ie_protocol_extension,
4116 { "Protocol Extension",
4117 "ranap.ie.protocol_extension_present",
4118 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4121 { &hf_ranap_number_of_ies,
4122 { "Number of IEs in PDU",
4123 "ranap.pdu.number_of_ies",
4124 FT_UINT16, BASE_DEC, NULL, 0x0,
4127 { &hf_ranap_number_of_ProtocolExtensionFields,
4128 { "Number of Protocol Extension Fields",
4129 "ranap.ie.number_of_ProtocolExtensionFields",
4130 FT_UINT16, BASE_DEC, NULL, 0x0,
4133 { &hf_ranap_number_of_ies_in_list,
4134 { "Number of IEs in list",
4135 "ranap.number_of_ies",
4136 FT_UINT16, BASE_DEC, NULL, 0x0,
4139 { &hf_ranap_ie_ie_id,
4142 FT_UINT16, BASE_DEC, VALS(&ranap_ie_id_values), 0x0,
4145 { &hf_ranap_ext_field_id,
4146 { "ProtocolExtensionField ID",
4147 "ranap.ie.ProtocolExtensionFields.Id",
4148 FT_UINT16, BASE_DEC, NULL, 0x0,
4151 { &hf_ranap_ie_criticality,
4152 { "Criticality of IE",
4153 "ranap.ie.criticality",
4154 FT_UINT8, BASE_HEX, VALS(&ranap_criticality_values), 0x0,
4157 { &hf_ranap_ext_field_criticality,
4158 { "Criticality of ProtocolExtensionField",
4159 "ranap.ie.ProtocolExtensionFields.criticality",
4160 FT_UINT8, BASE_HEX, VALS(&ranap_criticality_values), 0x0,
4163 { &hf_ranap_ie_pair_first_criticality,
4164 { "First Criticality",
4165 "ranap.ie_pair.first_criticality",
4166 FT_UINT8, BASE_HEX, VALS(&ranap_criticality_values), 0x0,
4169 { &hf_ranap_ie_pair_second_criticality,
4170 { "Second Criticality",
4171 "ranap.ie_pair.second_criticality",
4172 FT_UINT8, BASE_HEX, VALS(&ranap_criticality_values), 0x0,
4175 { &hf_ranap_ie_number_of_octets,
4176 { "Number of Octets in IE",
4177 "ranap.ie.number_of_octets",
4178 FT_UINT16, BASE_DEC, NULL, 0x0,
4181 { &hf_ranap_first_value_number_of_octets,
4182 { "Number of Octets in first value",
4183 "ranap.ie_pair.first_value.number_of_octets",
4184 FT_UINT16, BASE_DEC, NULL, 0x0,
4187 { &hf_ranap_second_value_number_of_octets,
4188 { "Number of Octets in second value",
4189 "ranap.ie_pair.second_value.number_of_octets",
4190 FT_UINT16, BASE_DEC, NULL, 0x0,
4196 FT_UINT8, BASE_HEX, NULL, 0x0,
4199 { &hf_ranap_nas_pdu,
4202 FT_BYTES, BASE_NONE, NULL, 0x0,
4205 { &hf_ranap_extension_field,
4206 { "Extension Field Value",
4207 "ranap.Extension_Field_Value",
4208 FT_BYTES, BASE_NONE, NULL, 0x0,
4211 { &hf_ranap_plmn_id,
4214 FT_BYTES, BASE_NONE, NULL, 0x0,
4220 FT_BYTES, BASE_NONE, NULL, 0x0,
4223 { &hf_ranap_plmn_id,
4226 FT_BYTES, BASE_NONE, NULL, 0x0,
4232 FT_BYTES, BASE_NONE, NULL, 0x0,
4238 FT_BYTES, BASE_NONE, NULL, 0x0,
4244 FT_BYTES, BASE_NONE, NULL, 0x0,
4247 { &hf_ranap_num_rabs,
4249 "ranap.number_of_RABs",
4250 FT_UINT8, BASE_DEC, NULL, 0x0,
4253 { &hf_ranap_nAS_SynchronisationIndicator_present,
4254 { "nAS-SynchronisationIndicator",
4255 "ranap.nAS-SynchronisationIndicator_present",
4256 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4259 { &hf_ranap_rAB_Parameters_present,
4261 "ranap.rAB_Parameters_present",
4262 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4265 { &hf_ranap_userPlaneInformation_present,
4266 { "userPlaneInformation",
4267 "ranap.userPlaneInformation_present",
4268 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4271 { &hf_ranap_transportLayerInformation_present,
4272 { "transportLayerInformation",
4273 "ranap.transportLayerInformation_present",
4274 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4277 { &hf_ranap_service_Handover_present,
4278 { "service-Handover",
4279 "ranap.service_Handover_present",
4280 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4283 { &hf_ranap_iE_Extensions_present,
4285 "ranap.ie.iE-Extensions_present",
4286 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4289 { &hf_ranap_nAS_SynchronisationIndicator,
4290 { "nAS-SynchronisationIndicator",
4291 "ranap.nAS-SynchronisationIndicator",
4292 FT_UINT8, BASE_HEX, NULL, 0x0,
4295 { &hf_ranap_guaranteedBitRate_present,
4296 { "guaranteedBitRate",
4297 "ranap.guaranteedBitRate_present",
4298 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4301 { &hf_ranap_transferDelay_present,
4303 "ranap.transferDelay_present",
4304 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4307 { &hf_ranap_trafficHandlingPriority_present,
4308 { "trafficHandlingPriority",
4309 "ranap.trafficHandlingPriority_present",
4310 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4313 { &hf_ranap_allocationOrRetentionPriority_present,
4314 { "allocationOrRetentionPriority",
4315 "ranap.allocationOrRetentionPriority_present",
4316 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4319 { &hf_ranap_sourceStatisticsDescriptor_present,
4320 { "sourceStatisticsDescriptor",
4321 "ranap.sourceStatisticsDescriptor_present",
4322 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4325 { &hf_ranap_relocationRequirement_present,
4326 { "relocationRequirement",
4327 "ranap.relocationRequirement_present",
4328 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4331 { &hf_ranap_trafficClass,
4333 "ranap.rab_Parameters.trafficClass",
4334 FT_UINT8, BASE_DEC, VALS(&ranap_trafficClass_values), 0x0,
4337 { &hf_ranap_rAB_AsymmetryIndicator,
4338 { "rAB_AsymmetryIndicator",
4339 "ranap.rab_Parameters.rAB_AsymmetryIndicator",
4340 FT_UINT8, BASE_DEC, VALS(&ranap_rAB_AsymmetryIndicator_values), 0x0,
4343 { &hf_ranap_maxBitrate,
4345 "ranap.rab_Parameters.maxBitrate",
4346 FT_UINT32, BASE_DEC, NULL, 0x0,
4349 { &hf_ranap_guaranteedBitrate,
4350 { "guaranteedBitrate",
4351 "ranap.rab_Parameters.guaranteedBitrate",
4352 FT_UINT32, BASE_DEC, NULL, 0x0,
4355 { &hf_ranap_deliveryOrder,
4357 "ranap.rab_Parameters.deliveryOrder",
4358 FT_UINT8, BASE_DEC, VALS(&ranap_DeliveryOrder_values), 0x0,
4361 { &hf_ranap_maxSDU_Size,
4363 "ranap.rab_Parameters.maxSDU_Size",
4364 FT_UINT16, BASE_DEC, NULL, 0x0,
4367 { &hf_ranap_sDU_ErrorRatio_mantissa,
4368 { "sDU_ErrorRatio: mantissa",
4369 "ranap.rab_Parameters.sDU_ErrorRatio.mantissa",
4370 FT_UINT8, BASE_DEC, NULL, 0x0,
4373 { &hf_ranap_sDU_ErrorRatio_exponent,
4374 { "sDU_ErrorRatio: exponent",
4375 "ranap.rab_Parameters.sDU_ErrorRatio.exponent",
4376 FT_UINT8, BASE_DEC, NULL, 0x0,
4379 { &hf_ranap_residualBitErrorRatio_mantissa,
4380 { "residualBitErrorRatio: mantissa",
4381 "ranap.rab_Parameters.residualBitErrorRatio.mantissa",
4382 FT_UINT8, BASE_DEC, NULL, 0x0,
4385 { &hf_ranap_residualBitErrorRatio_exponent,
4386 { "residualBitErrorRatio: exponent",
4387 "ranap.rab_Parameters.residualBitErrorRatio.exponent",
4388 FT_UINT8, BASE_DEC, NULL, 0x0,
4391 { &hf_ranap_deliveryOfErroneousSDU,
4392 { "deliveryOfErroneousSDU",
4393 "ranap.rab_Parameters.ranap_deliveryOfErroneousSDU",
4394 FT_UINT8, BASE_DEC, VALS(&ranap_deliveryOfErroneousSDU_values), 0x0,
4397 { &hf_ranap_subflowSDU_Size,
4398 { "subflowSDU_Size",
4399 "ranap.rab_Parameters.subflowSDU_Size",
4400 FT_UINT8, BASE_DEC, NULL, 0x0,
4403 { &hf_ranap_rAB_SubflowCombinationBitRate,
4404 { "rAB_SubflowCombinationBitRate",
4405 "ranap.rab_Parameters.rAB_SubflowCombinationBitRate",
4406 FT_UINT32, BASE_DEC, NULL, 0x0,
4409 { &hf_ranap_sDU_ErrorRatio_present,
4411 "ranap.sDU_ErrorRatio_present",
4412 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4415 { &hf_ranap_sDU_FormatInformationParameters_present,
4416 { "sDU_FormatInformationParameters",
4417 "ranap.sDU_FormatInformationParameters_present",
4418 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4421 { &hf_ranap_subflowSDU_Size_present,
4422 { "subflowSDU_Size",
4423 "ranap.subflowSDU_Size_present",
4424 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4427 { &hf_ranap_rAB_SubflowCombinationBitRate_present,
4428 { "subflowSDU_Size",
4429 "ranap.rAB_SubflowCombinationBitRate_present",
4430 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4433 { &hf_ranap_transferDelay,
4435 "ranap.rab_Parameters.transferDelay",
4436 FT_UINT16, BASE_DEC, NULL, 0x0,
4439 { &hf_ranap_trafficHandlingPriority,
4440 { "trafficHandlingPriority",
4441 "ranap.rab_Parameters.trafficHandlingPriority",
4442 FT_UINT8, BASE_DEC, VALS(&ranap_priority_values), 0x0,
4445 { &hf_ranap_priorityLevel,
4447 "ranap.rab_Parameters.allocationOrRetentionPriority.priorityLevel",
4448 FT_UINT8, BASE_DEC, VALS(&ranap_priority_values), 0x0,
4451 { &hf_ranap_pre_emptionCapability,
4452 { "pre-emptionCapability",
4453 "ranap.rab_Parameters.allocationOrRetentionPriority.pre_emptionCapability",
4454 FT_UINT8, BASE_DEC, VALS(&ranap_pre_emptionCapability_values), 0x0,
4457 { &hf_ranap_pre_emptionVulnerability,
4458 { "pre-emptionVulnerability",
4459 "ranap.rab_Parameters.allocationOrRetentionPriority.pre_emptionVulnerability",
4460 FT_UINT8, BASE_DEC, VALS(&ranap_pre_emptionVulnerability_values), 0x0,
4463 { &hf_ranap_queuingAllowed,
4465 "ranap.rab_Parameters.allocationOrRetentionPriority.queuingAllowed",
4466 FT_UINT8, BASE_DEC, VALS(&ranap_queuingAllowed_values), 0x0,
4469 { &hf_ranap_sourceStatisticsDescriptor,
4470 { "sourceStatisticsDescriptor",
4471 "ranap.rab_Parameters.sourceStatisticsDescriptor",
4472 FT_UINT8, BASE_DEC, VALS(&ranap_sourceStatisticsDescriptor_values), 0x0,
4475 { &hf_ranap_relocationRequirement,
4476 { "relocationRequirement",
4477 "ranap.rab_Parameters.relocationRequirement",
4478 FT_UINT8, BASE_DEC, VALS(&ranap_relocationRequirement_values), 0x0,
4481 { &hf_ranap_userPlaneMode,
4483 "ranap.userPlaneMode",
4484 FT_UINT8, BASE_DEC, VALS(&ranap_userPlaneMode_values), 0x0,
4487 { &hf_ranap_uP_ModeVersions,
4488 { "uP_ModeVersions",
4489 "ranap.uP_ModeVersions",
4490 FT_BYTES, BASE_NONE, NULL, 0x0,
4493 { &hf_ranap_number_of_ProtocolExtensionFields,
4494 { "Number of ProtocolExtensionFields",
4495 "ranap.number_of_ProtocolExtensionFields",
4496 FT_UINT16, BASE_DEC, NULL, 0x0,
4499 { &hf_ranap_ext_field_number_of_octets,
4500 { "Number of octets",
4501 "ranap.ProtocolExtensionFields.octets",
4502 FT_UINT16, BASE_DEC, NULL, 0x0,
4505 { &hf_ranap_transportLayerAddress_length,
4506 { "bit length of transportLayerAddress",
4507 "ranap.transportLayerAddress_length",
4508 FT_UINT8, BASE_DEC, NULL, 0x0,
4511 { &hf_ranap_transportLayerAddress,
4512 { "transportLayerAddress",
4513 "ranap.transportLayerAddress",
4514 FT_BYTES, BASE_NONE, NULL, 0x0,
4517 { &hf_ranap_gTP_TEI,
4520 FT_BYTES, BASE_NONE, NULL, 0x0,
4523 { &hf_ranap_bindingID,
4526 FT_BYTES, BASE_NONE, NULL, 0x0,
4529 { &hf_ranap_pDP_TypeInformation_present,
4530 { "pDP_TypeInformation",
4531 "ranap.pDP_TypeInformation_present",
4532 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4535 { &hf_ranap_dataVolumeReportingIndication_present,
4536 { "dataVolumeReportingIndication",
4537 "ranap.dataVolumeReportingIndication_present",
4538 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4541 { &hf_ranap_dl_GTP_PDU_SequenceNumber_present,
4542 { "dl_GTP_PDU_SequenceNumber",
4543 "ranap.dl_GTP_PDU_SequenceNumber_present",
4544 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4547 { &hf_ranap_ul_GTP_PDU_SequenceNumber_present,
4548 { "ul_GTP_PDU_SequenceNumber",
4549 "ranap.ul_GTP_PDU_SequenceNumber_present",
4550 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4553 { &hf_ranap_dl_N_PDU_SequenceNumber_present,
4554 { "dl_N_PDU_SequenceNumber",
4555 "ranap.dl_N_PDU_SequenceNumber_present",
4556 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4559 { &hf_ranap_ul_N_PDU_SequenceNumber_present,
4560 { "ul_N_PDU_SequenceNumber",
4561 "ranap.ul_N_PDU_SequenceNumber_present",
4562 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4565 { &hf_ranap_PDP_Type,
4567 "ranap.RAB_SetupOrModifyItemSecond.PDP_Type",
4568 FT_UINT8, BASE_HEX, VALS(&ranap_PDP_Type_values), 0x0,
4571 { &hf_ranap_dataVolumeReportingIndication,
4572 { "dataVolumeReportingIndication",
4573 "ranap.RAB_SetupOrModifyItemSecond.dataVolumeReportingIndication",
4574 FT_UINT8, BASE_HEX, VALS(&ranap_dataVolumeReportingIndication_values), 0x0,
4577 { &hf_ranap_dl_GTP_PDU_SequenceNumber,
4578 { "dl_GTP_PDU_SequenceNumber",
4579 "ranap.RAB_SetupOrModifyItemSecond.dl_GTP_PDU_SequenceNumber",
4580 FT_UINT16, BASE_DEC, NULL, 0x0,
4583 { &hf_ranap_ul_GTP_PDU_SequenceNumber,
4584 { "ul_GTP_PDU_SequenceNumber",
4585 "ranap.RAB_SetupOrModifyItemSecond.ul_GTP_PDU_SequenceNumber",
4586 FT_UINT16, BASE_DEC, NULL, 0x0,
4589 { &hf_ranap_dl_N_PDU_SequenceNumber,
4590 { "ul_GTP_PDU_SequenceNumber",
4591 "ranap.RAB_SetupOrModifyItemSecond.ul_GTP_PDU_SequenceNumber",
4592 FT_UINT16, BASE_DEC, NULL, 0x0,
4595 { &hf_ranap_ul_N_PDU_SequenceNumber,
4596 { "ul_GTP_PDU_SequenceNumber",
4597 "ranap.RAB_SetupOrModifyItemSecond.ul_GTP_PDU_SequenceNumber",
4598 FT_UINT16, BASE_DEC, NULL, 0x0,
4601 { &hf_ranap_cause_choice,
4603 "ranap.cause_choice",
4604 FT_UINT8, BASE_HEX, VALS(&ranap_cause_choice_values), 0x0,
4607 { &hf_ranap_cause_value,
4609 "ranap.cause_value",
4610 FT_UINT8, BASE_DEC,VALS(&ranap_cause_value_str), 0x0,
4613 { &hf_ranap_transportLayerAddress_present,
4614 { "transportLayerAddress",
4615 "ranap.transportLayerAddress_present",
4616 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4619 { &hf_ranap_iuTransportAssociation_present,
4620 { "iuTransportAssociation",
4621 "ranap.iuTransportAssociation_present",
4622 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4625 { &hf_ranap_dl_dataVolumes_present,
4627 "ranap.dl_dataVolumes_present",
4628 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4631 { &hf_ranap_dataVolumeReference_present,
4632 { "dataVolumeReference",
4633 "ranap.dataVolumeReference_present",
4634 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4637 { &hf_ranap_dl_UnsuccessfullyTransmittedDataVolume,
4638 { "dl-UnsuccessfullyTransmittedDataVolume",
4639 "ranap.dl-UnsuccessfullyTransmittedDataVolume",
4640 FT_UINT32, BASE_DEC, NULL, 0x0,
4643 { &hf_ranap_dataVolumeReference,
4644 { "dataVolumeReference",
4645 "ranap.dataVolumeReference",
4646 FT_UINT8, BASE_DEC, NULL, 0x0,
4649 { &hf_ranap_procedureCode_present,
4651 "ranap.procedureCode_present",
4652 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4655 { &hf_ranap_triggeringMessage_present,
4656 { "triggeringMessage",
4657 "ranap.triggeringMessage_present",
4658 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4661 { &hf_ranap_procedureCriticality_present,
4662 { "procedureCriticality",
4663 "ranap.procedureCriticality_present",
4664 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4667 { &hf_ranap_iEsCriticalityDiagnostics_present,
4668 { "iEsCriticalityDiagnostics",
4669 "ranap.iEsCriticalityDiagnostics_present",
4670 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4673 { &hf_ranap_triggeringMessage,
4674 { "triggeringMessage",
4675 "ranap.triggeringMessage",
4676 FT_UINT8, BASE_HEX, VALS(&ranap_pdu_index_values), 0x0,
4679 { &hf_ranap_procedureCriticality,
4680 { "procedureCriticality",
4681 "ranap.procedureCriticality",
4682 FT_UINT8, BASE_HEX, VALS(&ranap_criticality_values), 0x0,
4685 { &hf_ranap_iECriticality,
4687 "ranap.iECriticality",
4688 FT_UINT8, BASE_HEX, VALS(&ranap_criticality_values), 0x0,
4691 { &hf_ranap_repetitionNumber,
4692 { "repetitionNumber",
4693 "ranap.repetitionNumber",
4694 FT_UINT16, BASE_DEC, NULL, 0x0,
4697 { &hf_ranap_num_of_CriticalityDiagnostics_IEs,
4698 { "Number of CriticalityDiagnostics-IEs",
4699 "ranap.num_of_CriticalityDiagnostics_IEs",
4700 FT_UINT16, BASE_DEC, NULL, 0x0,
4703 { &hf_ranap_repetitionNumber_present,
4704 { "repetitionNumber",
4705 "ranap.repetitionNumber_present",
4706 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4709 { &hf_ranap_dl_UnsuccessfullyTransmittedDataVolume_present,
4710 { "dl-UnsuccessfullyTransmittedDataVolume",
4711 "ranap.dl_UnsuccessfullyTransmittedDataVolume_present",
4712 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4715 { &hf_ranap_CN_DomainIndicator,
4716 { "CN-DomainIndicator",
4717 "ranap.CN_DomainIndicator",
4718 FT_UINT8, BASE_HEX, VALS(&ranap_CN_DomainIndicator_values), 0x0,
4721 { &hf_ranap_service_Handover,
4722 { "service-Handover",
4723 "ranap.service_Handover",
4724 FT_UINT8, BASE_HEX, VALS(&ranap_service_Handover_values), 0x0,
4727 { &hf_ranap_IuSigConId,
4730 FT_BYTES, BASE_NONE, NULL, 0x0,
4736 FT_UINT8, BASE_HEX, VALS(&ranap_SAPI_values), 0x0,
4739 { &hf_ranap_msg_extension_present,
4740 { "Message Extension",
4741 "ranap.msg_extension_present",
4742 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4745 { &hf_ranap_ProtocolExtensionContainer_present,
4746 { "ProtocolExtensionContainer",
4747 "ranap.ProtocolExtensionContainer_present",
4748 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4751 { &hf_ranap_nas_pdu_length,
4752 { "length of NAS-PDU",
4753 "ranap.nas_pdu_length",
4754 FT_UINT16, BASE_DEC, NULL, 0x0,
4759 /* Setup protocol subtree array */
4760 static gint *ett[] = {
4762 &ett_ranap_optionals,
4763 &ett_ranap_iE_Extension,
4767 &ett_ranap_ie_pair_first_value,
4768 &ett_ranap_ie_pair_second_value,
4770 &ett_ranap_rAB_Parameters,
4771 &ett_ranap_allocationOrRetentionPriority ,
4772 &ett_ranap_CriticalityDiagnostics_IE
4776 /* Register the protocol name and description */
4777 proto_ranap = proto_register_protocol("Radio Access Network Application Part",
4780 /* Register the header fields and subtrees */
4781 proto_register_field_array(proto_ranap, hf, array_length(hf));
4782 proto_register_subtree_array(ett, array_length(ett));
4788 proto_reg_handoff_ranap(void)
4790 dissector_handle_t ranap_handle;
4792 ranap_handle = create_dissector_handle(dissect_ranap, proto_ranap);
4793 dissector_add("sual.subsystem_number", SCCP_SSN_RANAP, ranap_handle);
4794 dissector_add("sual.subsystem_number", SCCP_SSN_RANAP_C, ranap_handle);
4795 dissector_add("sual.subsystem_number", SCCP_SSN_RANAP_D, ranap_handle);