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.18 2003/04/22 13:47:38 tuexen 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
45 /* description of PDU header */
46 #define PDU_NUMBER_OF_OCTETS_OFFSET 3
48 /* PDU Index Values */
49 #define InitiatingMessage 0
50 #define SuccessfulOutcome 1
51 #define UnsuccessfulOutcome 2
54 static const value_string ranap_pdu_index_values[] = {
55 {InitiatingMessage, "InitiatingMessage"},
56 {SuccessfulOutcome, "SuccessfulOutcome"},
57 {UnsuccessfulOutcome, "UnsuccessfulOutcome"},
63 /* Procedure Code Values */
64 #define PC_RAB_Assignment 0
65 #define PC_Iu_Release 1
66 #define PC_RelocationPreparation 2
67 #define PC_RelocationResourceAllocation 3
68 #define PC_RelocationCancel 4
69 #define PC_SRNS_ContextTransfer 5
70 #define PC_SecurityModeControl 6
71 #define PC_DataVolumeReport 7
72 #define PC_CN_InformationBroadcast 8
74 #define PC_RAB_ReleaseRequest 10
75 #define PC_Iu_ReleaseRequest 11
76 #define PC_RelocationDetect 12
77 #define PC_RelocationComplete 13
79 #define PC_CommonID 15
80 #define PC_CN_InvokeTrace 16
81 #define PC_LocationReportingControl 17
82 #define PC_LocationReport 18
83 #define PC_InitialUE_Message 19
84 #define PC_DirectTransfer 20
85 #define PC_OverloadControl 21
86 #define PC_ErrorIndication 22
87 #define PC_SRNS_DataForward 23
88 #define PC_ForwardSRNS_Context 24
89 #define PC_privateMessage 25
90 #define PC_CN_DeactivateTrace 26
91 #define PC_ResetResource 27
92 #define PC_RANAP_Relocation 28
95 static const value_string ranap_procedure_code_values[] = {
96 {PC_RAB_Assignment, "RAB-Assignment"},
97 {PC_Iu_Release, "IU-Release"},
98 {PC_RelocationPreparation, "RelocationPreparation"},
99 {PC_RelocationResourceAllocation, "RelocationResourceAllocation"},
100 {PC_RelocationCancel, "RelocationCancel"},
101 {PC_SRNS_ContextTransfer, "SRNS-ContextTransfer"},
102 {PC_SecurityModeControl, "SecurityModeControl"},
103 {PC_DataVolumeReport, "DataVolumeReport"},
104 {PC_CN_InformationBroadcast, "CN-InformationBroadcast"},
106 {PC_RAB_ReleaseRequest, "RAB-ReleaseRequest"},
107 {PC_Iu_ReleaseRequest, "Iu-ReleaseRequest"},
108 {PC_RelocationDetect, "RelocationDetect"},
109 {PC_RelocationComplete, "RelocationComplete"},
110 {PC_Paging, "Paging"},
111 {PC_CommonID, "CommonID"},
112 {PC_CN_InvokeTrace, "CN-InvokeTrace"},
113 {PC_LocationReportingControl, "LocationReportingControl"},
114 {PC_LocationReport, "LocationReport"},
115 {PC_InitialUE_Message, "InitialUE_Message"},
116 {PC_DirectTransfer, "DirectTransfer"},
117 {PC_OverloadControl, "OverloadControl"},
118 {PC_ErrorIndication, "ErrorIndication"},
119 {PC_SRNS_DataForward, "SRNS-DataForward"},
120 {PC_ForwardSRNS_Context, "ForwardSRNS-Context"},
121 {PC_privateMessage, "privateMessage"},
122 {PC_CN_DeactivateTrace, "CN-DeactivateTrace"},
123 {PC_ResetResource, "ResetResource"},
124 {PC_RANAP_Relocation, "RANAP-Relocation"},
129 static const value_string ranap_message_names[][5] = {
130 {/* PC_RAB_Assignment */
131 { InitiatingMessage, "RAB-AssignmentRequest"},
132 { SuccessfulOutcome, "undefined message"},
133 { UnsuccessfulOutcome, "undefined message"},
134 { Outcome, "RAB-AssignmentResponse"},
136 { /* PC_Iu_Release */
137 { InitiatingMessage, "Iu-ReleaseCommand"},
138 { SuccessfulOutcome, "Iu-ReleaseComplete"},
139 { UnsuccessfulOutcome, NULL},
142 { /* PC_RelocationPreparation */
143 { InitiatingMessage, "RelocationRequired"},
144 { SuccessfulOutcome, "RelocationCommand"},
145 { UnsuccessfulOutcome, "RelocationPreparationFailure"},
148 { /* PC_RelocationResourceAllocation */
149 { InitiatingMessage, "RelocationRequest"},
150 { SuccessfulOutcome, "RelocationRequestAcknowledge"},
151 { UnsuccessfulOutcome, "RelocationFailure"},
154 { /* PC_RelocationCancel */
155 { InitiatingMessage, "RelocationCancel"},
156 { SuccessfulOutcome, "RelocationCancelAcknowledge"},
157 { UnsuccessfulOutcome, NULL},
160 { /* PC_SRNS_ContextTransfer */
161 { InitiatingMessage, "SRNS-ContextRequest"},
162 { SuccessfulOutcome, "SRNS-ContextResponse"},
163 { UnsuccessfulOutcome, NULL},
166 { /* PC_SecurityModeControl */
167 { InitiatingMessage, "SecurityModeCommand"},
168 { SuccessfulOutcome, "SecurityModeComplete"},
169 { UnsuccessfulOutcome, "SecurityModeReject"},
172 { /* PC_DataVolumeReport */
173 { InitiatingMessage, "DataVolumeReportRequest"},
174 { SuccessfulOutcome, "DataVolumeReport"},
175 { UnsuccessfulOutcome, NULL},
178 { /* PC_CN_InformationBroadcast */
179 { InitiatingMessage, "CN-InformationBroadcastRequest"},
180 { SuccessfulOutcome, "CN-InformationBroadcastConfirm"},
181 { UnsuccessfulOutcome, "CN-InformationBroadcastReject"},
185 { InitiatingMessage, "Reset"},
186 { SuccessfulOutcome, "ResetAcknowledge"},
187 { UnsuccessfulOutcome, NULL},
190 { /* PC_RAB_ReleaseRequest */
191 { InitiatingMessage, "RAB-ReleaseRequest"},
192 { SuccessfulOutcome, NULL},
193 { UnsuccessfulOutcome, NULL},
196 { /* PC_Iu_ReleaseRequest */
197 { InitiatingMessage, "Iu-ReleaseRequest"},
198 { SuccessfulOutcome, NULL},
199 { UnsuccessfulOutcome, NULL},
202 { /* PC_RelocationDetect */
203 { InitiatingMessage, "RelocationDetect"},
204 { SuccessfulOutcome, NULL},
205 { UnsuccessfulOutcome, NULL},
208 { /* PC_RelocationComplete */
209 { InitiatingMessage, "RelocationComplete"},
210 { SuccessfulOutcome, NULL},
211 { UnsuccessfulOutcome, NULL},
215 { InitiatingMessage, "Paging"},
216 { SuccessfulOutcome, NULL},
217 { UnsuccessfulOutcome, NULL},
221 { InitiatingMessage, "CommonID"},
222 { SuccessfulOutcome, NULL},
223 { UnsuccessfulOutcome, NULL},
226 { /* PC_CN_InvokeTrace */
227 { InitiatingMessage, "CN-InvokeTrace"},
228 { SuccessfulOutcome, NULL},
229 { UnsuccessfulOutcome, NULL},
232 {/* PC_LocationReportingControl */
233 { InitiatingMessage, "LocationReportingControl"},
234 { SuccessfulOutcome, NULL},
235 { UnsuccessfulOutcome, NULL},
238 { /* PC_LocationReport */
239 { InitiatingMessage, "LocationReport"},
240 { SuccessfulOutcome, NULL},
241 { UnsuccessfulOutcome, NULL},
244 { /* PC_InitialUE_Message */
245 { InitiatingMessage, "InitialUE-Message"},
246 { SuccessfulOutcome, NULL},
247 { UnsuccessfulOutcome, NULL},
250 { /* PC_DirectTransfer */
251 { InitiatingMessage, "DirectTransfer"},
252 { SuccessfulOutcome, NULL},
253 { UnsuccessfulOutcome, NULL},
256 { /* PC_OverloadControl */
257 { InitiatingMessage, "Overload"},
258 { SuccessfulOutcome, NULL},
259 { UnsuccessfulOutcome, NULL},
262 { /* PC_ErrorIndication */
263 { InitiatingMessage, "ErrorIndication"},
264 { SuccessfulOutcome, NULL},
265 { UnsuccessfulOutcome, NULL},
268 { /* PC_SRNS_DataForward */
269 { InitiatingMessage, "SRNS-DataForwardCommand"},
270 { SuccessfulOutcome, NULL},
271 { UnsuccessfulOutcome, NULL},
274 { /* PC_ForwardSRNS_Context */
275 { InitiatingMessage, "ForwardSRNS-Context"},
276 { SuccessfulOutcome, NULL},
277 { UnsuccessfulOutcome, NULL},
280 { /* PC_privateMessage */
281 { InitiatingMessage, "PrivateMessage"},
282 { SuccessfulOutcome, NULL},
283 { UnsuccessfulOutcome, NULL},
286 { /* PC_CN_DeactivateTrace */
287 { InitiatingMessage, "CN-DeactivateTrace"},
288 { SuccessfulOutcome, NULL},
289 { UnsuccessfulOutcome, NULL},
292 { /* PC_ResetResource */
293 { InitiatingMessage, "ResetResource"},
294 { SuccessfulOutcome, "ResetResourceAcknowledge"},
295 { UnsuccessfulOutcome, NULL},
298 { /* PC_RANAP_Relocation */
299 { InitiatingMessage, "RANAP-RelocationInformation"},
300 { SuccessfulOutcome, NULL},
301 { UnsuccessfulOutcome, NULL},
307 /* Criticality Values */
312 static const value_string ranap_criticality_values[] = {
313 {CR_reject, "reject"},
314 {CR_ignore, "ignore"},
315 {CR_notify, "notify"},
319 /* presence values for optional components */
320 #define PR_not_present 0
323 static const value_string ranap_presence_values[] = {
324 {PR_not_present, "not present"},
325 {PR_present, "present"},
329 /* description of IE Header */
330 #define IE_ID_LENGTH 2
331 #define IE_CRITICALITY_LENGTH 1
334 /* description of IE-ID values */
335 #define IE_AreaIdentity 0
336 #define IE_CN_BroadcastInformationPiece 1
337 #define IE_CN_BroadcastInformationPieceList 2
338 #define IE_CN_DomainIndicator 3
340 #define IE_ChosenEncryptionAlgorithm 5
341 #define IE_ChosenIntegrityProtectionAlgorithm 6
342 #define IE_ClassmarkInformation2 7
343 #define IE_ClassmarkInformation3 8
344 #define IE_CriticalityDiagnostics 9
345 #define IE_DL_GTP_PDU_SequenceNumber 10
346 #define IE_EncryptionInformation 11
347 #define IE_IntegrityProtectionInformation 12
348 #define IE_IuTransportAssociation 13
349 #define IE_L3_Information 14
351 #define IE_NAS_PDU 16
352 #define IE_NonSearchingIndication 17
353 #define IE_NumberOfSteps 18
355 #define IE_OldBSS_ToNewBSS_Information 20
356 #define IE_PagingAreaID 21
357 #define IE_PagingCause 22
358 #define IE_PermanentNAS_UE_ID 23
359 #define IE_RAB_ContextItem 24
360 #define IE_RAB_ContextList 25
361 #define IE_RAB_DataForwardingItem 26
362 #define IE_RAB_DataForwardingItem_SRNS_CtxReq 27
363 #define IE_RAB_DataForwardingList 28
364 #define IE_RAB_DataForwardingList_SRNS_CtxReq 29
365 #define IE_RAB_DataVolumeReportItem 30
366 #define IE_RAB_DataVolumeReportList 31
367 #define IE_RAB_DataVolumeReportRequestItem 32
368 #define IE_RAB_DataVolumeReportRequestList 33
369 #define IE_RAB_FailedItem 34
370 #define IE_RAB_FailedList 35
372 #define IE_RAB_QueuedItem 37
373 #define IE_RAB_QueuedList 38
374 #define IE_RAB_ReleaseFailedList 39
375 #define IE_RAB_ReleaseItem 40
376 #define IE_RAB_ReleaseList 41
377 #define IE_RAB_ReleasedItem 42
378 #define IE_RAB_ReleasedList 43
379 #define IE_RAB_ReleasedList_IuRelComp 44
380 #define IE_RAB_RelocationReleaseItem 45
381 #define IE_RAB_RelocationReleaseList 46
382 #define IE_RAB_SetupItem_RelocReq 47
383 #define IE_RAB_SetupItem_RelocReqAck 48
384 #define IE_RAB_SetupList_RelocReq 49
385 #define IE_RAB_SetupList_RelocReqAck 50
386 #define IE_RAB_SetupOrModifiedItem 51
387 #define IE_RAB_SetupOrModifiedList 52
388 #define IE_RAB_SetupOrModifyItem 53
389 #define IE_RAB_SetupOrModifyList 54
391 #define IE_RelocationType 56
392 #define IE_RequestType 57
395 #define IE_SourceID 60
396 #define IE_SourceRNC_ToTargetRNC_TransparentContainer 61
397 #define IE_TargetID 62
398 #define IE_TargetRNC_ToSourceRNC_TransparentContainer 63
399 #define IE_TemporaryUE_ID 64
400 #define IE_TraceReference 65
401 #define IE_TraceType 66
402 #define IE_TransportLayerAddress 67
403 #define IE_TriggerID 68
405 #define IE_UL_GTP_PDU_SequenceNumber 70
406 #define IE_RAB_FailedtoReportItem 71
407 #define IE_RAB_FailedtoReportList 72
408 #define IE_KeyStatus 75
409 #define IE_DRX_CycleLengthCoefficient 76
410 #define IE_IuSigConIdList 77
411 #define IE_IuSigConIdItem 78
412 #define IE_IuSigConId 79
413 #define IE_DirectTransferInformationItem_RANAP_RelocInf 80
414 #define IE_DirectTransferInformationList_RANAP_RelocInf 81
415 #define IE_RAB_ContextItem_RANAP_RelocInf 82
416 #define IE_RAB_ContextList_RANAP_RelocInf 83
417 #define IE_RAB_ContextFailedtoTransferItem 84
418 #define IE_RAB_ContextFailedtoTransferList 85
419 #define IE_GlobalRNC_ID 86
420 #define IE_RAB_ReleasedItem_IuRelComp 87
422 static const value_string ranap_ie_id_values[] = {
423 {IE_AreaIdentity, "AreaIdentity"},
424 {IE_CN_BroadcastInformationPiece, "CN_BroadcastInformationPiece"},
425 {IE_CN_BroadcastInformationPieceList, "CN_BroadcastInformationPieceList"},
426 {IE_CN_DomainIndicator, "CN_DomainIndicator"},
428 {IE_ChosenEncryptionAlgorithm, "ChosenEncryptionAlgorithm"},
429 {IE_ChosenIntegrityProtectionAlgorithm, "ChosenIntegrityProtectionAlgorithm"},
430 {IE_ClassmarkInformation2, "ClassmarkInformation2"},
431 {IE_ClassmarkInformation3, "ClassmarkInformation3"},
432 {IE_CriticalityDiagnostics, "CriticalityDiagnostics"},
433 {IE_DL_GTP_PDU_SequenceNumber, "DL_GTP_PDU_SequenceNumber"},
434 {IE_EncryptionInformation, "EncryptionInformation"},
435 {IE_IntegrityProtectionInformation, "IntegrityProtectionInformation"},
436 {IE_IuTransportAssociation, "IuTransportAssociation"},
437 {IE_L3_Information, "L3_Information"},
439 {IE_NAS_PDU, "NAS_PDU"},
440 {IE_NonSearchingIndication, "NonSearchingIndication"},
441 {IE_NumberOfSteps, "NumberOfSteps"},
442 {IE_OMC_ID, "OMC_ID"},
443 {IE_OldBSS_ToNewBSS_Information, "OldBSS_ToNewBSS_Information"},
444 {IE_PagingAreaID, "PagingAreaID"},
445 {IE_PagingCause, "PagingCause"},
446 {IE_PermanentNAS_UE_ID, "PermanentNAS_UE_ID"},
447 {IE_RAB_ContextItem, "RAB_ContextItem"},
448 {IE_RAB_ContextList, "RAB_ContextList"},
449 {IE_RAB_DataForwardingItem, "RAB_DataForwardingItem"},
450 {IE_RAB_DataForwardingItem_SRNS_CtxReq, "RAB_DataForwardingItem_SRNS_CtxReq"},
451 {IE_RAB_DataForwardingList, "RAB_DataForwardingList"},
452 {IE_RAB_DataForwardingList_SRNS_CtxReq, "RAB_DataForwardingList_SRNS_CtxReq"},
453 {IE_RAB_DataVolumeReportItem, "RAB_DataVolumeReportItem"},
454 {IE_RAB_DataVolumeReportList, "RAB_DataVolumeReportList"},
455 {IE_RAB_DataVolumeReportRequestItem, "RAB_DataVolumeReportRequestItem"},
456 {IE_RAB_DataVolumeReportRequestList, "RAB_DataVolumeReportRequestList"},
457 {IE_RAB_FailedItem, "RAB_FailedItem"},
458 {IE_RAB_FailedList, "RAB_FailedList"},
459 {IE_RAB_ID, "RAB_ID"},
460 {IE_RAB_QueuedItem, "RAB_QueuedItem"},
461 {IE_RAB_QueuedList, "RAB_QueuedList"},
462 {IE_RAB_ReleaseFailedList, "RAB_ReleaseFailedList"},
463 {IE_RAB_ReleaseItem, "RAB_ReleaseItem"},
464 {IE_RAB_ReleaseList, "RAB_ReleaseList"},
465 {IE_RAB_ReleasedItem, "RAB_ReleasedItem"},
466 {IE_RAB_ReleasedList, "RAB_ReleasedList"},
467 {IE_RAB_ReleasedList_IuRelComp, "RAB_ReleasedList_IuRelComp"},
468 {IE_RAB_RelocationReleaseItem, "RAB_RelocationReleaseItem"},
469 {IE_RAB_RelocationReleaseList, "RAB_RelocationReleaseList"},
470 {IE_RAB_SetupItem_RelocReq, "RAB_SetupItem_RelocReq"},
471 {IE_RAB_SetupItem_RelocReqAck, "RAB_SetupItem_RelocReqAck"},
472 {IE_RAB_SetupList_RelocReq, "RAB_SetupList_RelocReq"},
473 {IE_RAB_SetupList_RelocReqAck, "RAB_SetupList_RelocReqAck"},
474 {IE_RAB_SetupOrModifiedItem, "RAB_SetupOrModifiedItem"},
475 {IE_RAB_SetupOrModifiedList, "RAB_SetupOrModifiedList"},
476 {IE_RAB_SetupOrModifyItem, "RAB_SetupOrModifyItem"},
477 {IE_RAB_SetupOrModifyList, "RAB_SetupOrModifyList"},
479 {IE_RelocationType, "RelocationType"},
480 {IE_RequestType, "RequestType"},
483 {IE_SourceID, "SourceID"},
484 {IE_SourceRNC_ToTargetRNC_TransparentContainer,
485 "SourceRNC_ToTargetRNC_TransparentContainer"},
486 {IE_TargetID, "TargetID"},
487 {IE_TargetRNC_ToSourceRNC_TransparentContainer,
488 "TargetRNC_ToSourceRNC_TransparentContainer"},
489 {IE_TemporaryUE_ID, "TemporaryUE_ID"},
490 {IE_TraceReference, "TraceReference"},
491 {IE_TraceType, "TraceType"},
492 {IE_TransportLayerAddress, "TransportLayerAddress"},
493 {IE_TriggerID, "TriggerID"},
495 {IE_UL_GTP_PDU_SequenceNumber, "UL_GTP_PDU_SequenceNumber"},
496 {IE_RAB_FailedtoReportItem, "RAB_FailedtoReportItem"},
497 {IE_RAB_FailedtoReportList, "RAB_FailedtoReportList"},
498 {IE_KeyStatus, "KeyStatus"},
499 {IE_DRX_CycleLengthCoefficient, "DRX_CycleLengthCoefficient"},
500 {IE_IuSigConIdList, "IuSigConIdList"},
501 {IE_IuSigConIdItem, "IuSigConIdItem"},
502 {IE_IuSigConId, "IuSigConId"},
503 {IE_DirectTransferInformationItem_RANAP_RelocInf,
504 "DirectTransferInformationItem_RANAP_RelocInf"},
505 {IE_DirectTransferInformationList_RANAP_RelocInf,
506 "DirectTransferInformationList_RANAP_RelocInf"},
507 {IE_RAB_ContextItem_RANAP_RelocInf, "RAB_ContextItem_RANAP_RelocInf"},
508 {IE_RAB_ContextList_RANAP_RelocInf, "RAB_ContextList_RANAP_RelocInf"},
509 {IE_RAB_ContextFailedtoTransferItem, "RAB_ContextFailedtoTransferItem"},
510 {IE_RAB_ContextFailedtoTransferList, "RAB_ContextFailedtoTransferList"},
511 {IE_GlobalRNC_ID, "GlobalRNC_ID"},
512 {IE_RAB_ReleasedItem_IuRelComp, "RAB_ReleasedItem_IuRelComp"},
517 /* Description of IE-Contents */
519 /* Length of fields within IEs */
520 #define RAB_ID_LENGTH 1
521 #define PLMN_ID_LENGTH 3
523 #define IE_PROTOCOL_EXTENSION_LENGTH 1
526 #define NUM_RABS_LENGTH 1
529 /* Traffic Class values */
530 #define TC_conversational 0
531 #define TC_streaming 1
532 #define TC_interactive 2
533 #define TC_background 3
535 static const value_string ranap_trafficClass_values[] = {
536 {TC_conversational, "conversational"},
537 {TC_streaming, "streaming"},
538 {TC_interactive, "interactive"},
539 {TC_background, "background"},
543 /* rAB-AsymmetryIndicator values */
544 #define AI_symmetric_bidirectional 0
545 #define AI_asymmetric_unidirectional_downlink 1
546 #define AI_asymmetric_unidirectional_uplink 2
547 #define AI_asymmetric_bidirectional 3
549 static const value_string ranap_rAB_AsymmetryIndicator_values[] = {
550 {AI_symmetric_bidirectional, "symmetric-bidirectional"},
551 {AI_asymmetric_unidirectional_downlink, "asymmetric-unidirectional-downlink"},
552 {AI_asymmetric_unidirectional_uplink, "asymmetric-unidirectional-uplink"},
553 {AI_asymmetric_bidirectional, "asymmetric-bidirectional"},
557 /* DeliveryOrder values */
558 #define DO_delivery_order_requested 0
559 #define DO_delivery_order_not_requested 1
561 static const value_string ranap_DeliveryOrder_values[] = {
562 {DO_delivery_order_requested, "delivery-order-requested"},
563 {DO_delivery_order_not_requested, "delivery-order-not-requested"},
566 #define maxSDU_Size_LENGTH 2
568 /* deliveryOfErroneousSDU values */
571 #define DOES_no_error_detection_consideration 2
573 static const value_string ranap_deliveryOfErroneousSDU_values[] = {
576 {DOES_no_error_detection_consideration, "no-error-detection-consideration"},
580 #define subflowSDU_Size_LENGTH 2
581 #define transferDelay_LENGTH 2
584 /* trafficHandlingPriority values */
585 static const value_string ranap_priority_values[] = {
601 { 15, "no-priority-used"},
605 /* pre-emptionCapability values */
606 static const value_string ranap_pre_emptionCapability_values[] = {
607 { 0, "shall-not-trigger-pre-emption"},
608 { 1, "may-trigger-pre-emption"},
611 /* pre-emptionVulnerability values */
612 static const value_string ranap_pre_emptionVulnerability_values[] = {
613 { 0, "not-pre-emptable"},
614 { 1, "pre-emptable"},
618 /* queuingAllowed values */
619 static const value_string ranap_queuingAllowed_values[] = {
620 { 0, "queueing-not-allowed"},
621 { 1, "queueing-allowed"},
625 /* sourceStatisticsDescriptor values */
626 static const value_string ranap_sourceStatisticsDescriptor_values[] = {
631 /* relocationRequirement values */
632 static const value_string ranap_relocationRequirement_values[] = {
637 /* userPlaneMode values */
638 static const value_string ranap_userPlaneMode_values[] = {
639 { 0, "transparent-mode"},
640 { 1, "support-mode-for-predefined-SDU-sizes"},
643 /* PDP_Type values */
644 static const value_string ranap_PDP_Type_values[] = {
652 /* dataVolumeReportingIndication values */
653 static const value_string ranap_dataVolumeReportingIndication_values[] = {
655 { 1, "do-not-report"},
659 /* cause_choice values */
660 #define CC_CauseRadioNetwork 0
661 #define CC_CauseTransmissionNetwork 1
662 #define CC_CauseNAS 2
663 #define CC_CauseProtocol 3
664 #define CC_CauseMisc 4
665 #define CC_CauseNon_Standard 5
667 static const value_string ranap_cause_choice_values[] = {
668 { CC_CauseRadioNetwork, "CauseRadioNetwork"},
669 { CC_CauseTransmissionNetwork, "CauseTransmissionNetwork"},
670 { CC_CauseNAS, "CauseNAS"},
671 { CC_CauseProtocol, "CauseProtocol"},
672 { CC_CauseMisc, "CauseMisc"},
673 { CC_CauseNon_Standard, "CauseNon-Standard"},
678 static const value_string ranap_cause_value_str[] = {
679 /* CauseRadioNetwork (1..64) */
680 { 1, "rab-pre-empted"},
681 { 2, "trelocoverall-expiry"},
682 { 3, "trelocprep-expiry"},
683 { 4, "treloccomplete-expiry"},
684 { 5, "tqueing-expiry"},
685 { 6, "relocation-triggered"},
686 { 7, "trellocalloc-expiry"},
687 { 8, "unable-to-establish-during-relocation"},
688 { 9, "unknown-target-rnc"},
689 { 10, "relocation-cancelled"},
690 { 11, "successful-relocation"},
691 { 12, "requested-ciphering-and-or-integrity-protection-algorithms-not-supported"},
692 { 13, "change-of-ciphering-and-or-integrity-protection-is-not-supported"},
693 { 14, "failure-in-the-radio-interface-procedure"},
694 { 15, "release-due-to-utran-generated-reason"},
695 { 16, "user-inactivity"},
696 { 17, "time-critical-relocation"},
697 { 18, "requested-traffic-class-not-available"},
698 { 19, "invalid-rab-parameters-value"},
699 { 20, "requested-maximum-bit-rate-not-available"},
700 { 21, "requested-guaranteed-bit-rate-not-available"},
701 { 22, "requested-transfer-delay-not-achievable"},
702 { 23, "invalid-rab-parameters-combination"},
703 { 24, "condition-violation-for-sdu-parameters"},
704 { 25, "condition-violation-for-traffic-handling-priority"},
705 { 26, "condition-violation-for-guaranteed-bit-rate"},
706 { 27, "user-plane-versions-not-supported"},
707 { 28, "iu-up-failure"},
708 { 29, "relocation-failure-in-target-CN-RNC-or-target-system"},
709 { 30, "invalid-RAB-ID"},
710 { 31, "no-remaining-rab"},
711 { 32, "interaction-with-other-procedure"},
712 { 33, "requested-maximum-bit-rate-for-dl-not-available"},
713 { 34, "requested-maximum-bit-rate-for-ul-not-available"},
714 { 35, "requested-guaranteed-bit-rate-for-dl-not-available"},
715 { 36, "requested-guaranteed-bit-rate-for-ul-not-available"},
716 { 37, "repeated-integrity-checking-failure"},
717 { 38, "requested-report-type-not-supported"},
718 { 39, "request-superseded"},
719 { 40, "release-due-to-UE-generated-signalling-connection-release"},
720 { 41, "resource-optimisation-relocation"},
721 { 42, "requested-information-not-available"},
722 { 43, "relocation-desirable-for-radio-reasons"},
723 { 44, "relocation-not-supported-in-target-RNC-or-target-system"},
724 { 45, "directed-retry"},
725 { 46, "radio-connection-with-UE-Lost"},
727 /* CauseTransmissionNetwork (65..80) */
728 { 65, "logical-error-unknown-iu-transport-association"},
729 { 66, "iu-transport-connection-failed-to-establish"},
731 /* CauseNAS (81..96) */
732 { 81, "user-restriction-start-indication"},
733 { 82, "user-restriction-end-indication"},
734 { 83, "normal-release"},
736 /* CauseProtocol (97..112) */
737 { 97, "transfer-syntax-error"},
738 { 98, "semantic-error"},
739 { 99, "message-not-compatible-with-receiver-state"},
740 {100, "abstract-syntax-error-reject"},
741 {101, "abstract-syntax-error-ignore-and-notify"},
742 {102, "abstract-syntax-error-falsely-constructed-message"},
744 /* CauseMisc (113..128) */
745 {113, "om-intervention"},
746 {114, "no-resource-available"},
747 {115, "unspecified-failure"},
748 {116, "network-optimisation"},
752 /* CN_DomainIndicator_values */
753 static const value_string ranap_CN_DomainIndicator_values[] = {
760 static const value_string ranap_SAPI_values[] = {
765 /* service_Handover_values */
766 static const value_string ranap_service_Handover_values[] = {
767 { 0, "handover-to-GSM-should-be-performed"},
768 { 1, "handover-to-GSM-should-not-be-performed"},
769 { 2, "handover-to-GSM-shall-not-be-performed"},
772 /* Initialize the protocol and registered fields */
774 static int proto_ranap = -1;
776 /* pdu header fields */
777 static int hf_ranap_pdu_number_of_octets = -1;
778 static int hf_ranap_pdu_index = -1;
779 static int hf_ranap_procedure_code = -1;
780 static int hf_ranap_pdu_criticality = -1;
781 static int hf_ranap_number_of_ies = -1;
783 /* ie header fields */
784 static int hf_ranap_ie_ie_id = -1;
785 static int hf_ranap_ie_criticality = -1;
786 static int hf_ranap_ie_number_of_octets = -1;
787 static int hf_ranap_ie_protocol_extension = -1;
789 /*ie contents fields */
790 static int hf_ranap_number_of_ies_in_list = -1;
791 static int hf_ranap_ie_pair_first_criticality = -1;
792 static int hf_ranap_ie_pair_second_criticality = -1;
793 static int hf_ranap_first_value_number_of_octets = -1;
794 static int hf_ranap_second_value_number_of_octets = -1;
795 static int hf_ranap_rab_id = -1;
796 static int hf_ranap_nas_pdu = -1;
797 static int hf_ranap_plmn_id = -1;
798 static int hf_ranap_lac = -1;
799 static int hf_ranap_sac = -1;
800 static int hf_ranap_rac = -1;
801 static int hf_ranap_nAS_SynchronisationIndicator = -1;
802 static int hf_ranap_trafficClass = -1;
803 static int hf_ranap_deliveryOrder = -1;
804 static int hf_ranap_iE_Extensions_present = -1;
805 static int hf_ranap_num_rabs = -1;
806 static int hf_ranap_nAS_SynchronisationIndicator_present = -1;
807 static int hf_ranap_rAB_Parameters_present = -1;
808 static int hf_ranap_userPlaneInformation_present = -1;
809 static int hf_ranap_transportLayerInformation_present = -1;
810 static int hf_ranap_service_Handover_present = -1;
811 static int hf_ranap_guaranteedBitRate_present = -1;
812 static int hf_ranap_transferDelay_present = -1;
813 static int hf_ranap_trafficHandlingPriority_present = -1;
814 static int hf_ranap_allocationOrRetentionPriority_present = -1;
815 static int hf_ranap_sourceStatisticsDescriptor_present = -1;
816 static int hf_ranap_relocationRequirement_present = -1;
817 static int hf_ranap_rAB_AsymmetryIndicator = -1;
818 static int hf_ranap_maxBitrate = -1;
819 static int hf_ranap_guaranteedBitrate = -1;
820 static int hf_ranap_maxSDU_Size = -1;
821 static int hf_ranap_sDU_ErrorRatio_mantissa = -1;
822 static int hf_ranap_sDU_ErrorRatio_exponent = -1;
823 static int hf_ranap_residualBitErrorRatio_mantissa = -1;
824 static int hf_ranap_residualBitErrorRatio_exponent = -1;
825 static int hf_ranap_deliveryOfErroneousSDU = -1;
826 static int hf_ranap_subflowSDU_Size = -1;
827 static int hf_ranap_rAB_SubflowCombinationBitRate = -1;
828 static int hf_ranap_sDU_ErrorRatio_present = -1;
829 static int hf_ranap_sDU_FormatInformationParameters_present = -1;
830 static int hf_ranap_subflowSDU_Size_present = -1;
831 static int hf_ranap_rAB_SubflowCombinationBitRate_present = -1;
832 static int hf_ranap_transferDelay = -1;
833 static int hf_ranap_trafficHandlingPriority = -1;
834 static int hf_ranap_priorityLevel = -1;
835 static int hf_ranap_pre_emptionCapability = -1;
836 static int hf_ranap_pre_emptionVulnerability = -1;
837 static int hf_ranap_queuingAllowed = -1;
838 static int hf_ranap_sourceStatisticsDescriptor = -1;
839 static int hf_ranap_userPlaneMode = -1;
840 static int hf_ranap_uP_ModeVersions = -1;
841 static int hf_ranap_number_of_ProtocolExtensionFields = -1;
842 static int hf_ranap_ext_field_id = -1;
843 static int hf_ranap_ext_field_criticality = -1;
844 static int hf_ranap_ext_field_number_of_octets = -1;
845 static int hf_ranap_transportLayerAddress = -1;
846 static int hf_ranap_transportLayerAddress_length = -1;
847 static int hf_ranap_gTP_TEI = -1;
848 static int hf_ranap_bindingID = -1;
849 static int hf_ranap_pDP_TypeInformation_present = -1;
850 static int hf_ranap_dataVolumeReportingIndication_present = -1;
851 static int hf_ranap_dl_GTP_PDU_SequenceNumber_present = -1;
852 static int hf_ranap_ul_GTP_PDU_SequenceNumber_present = -1;
853 static int hf_ranap_dl_N_PDU_SequenceNumber_present = -1;
854 static int hf_ranap_ul_N_PDU_SequenceNumber_present = -1;
855 static int hf_ranap_PDP_Type = -1;
856 static int hf_ranap_dataVolumeReportingIndication = -1;
857 static int hf_ranap_dl_GTP_PDU_SequenceNumber = -1;
858 static int hf_ranap_ul_GTP_PDU_SequenceNumber = -1;
859 static int hf_ranap_dl_N_PDU_SequenceNumber = -1;
860 static int hf_ranap_ul_N_PDU_SequenceNumber = -1;
861 static int hf_ranap_cause_choice = -1;
862 static int hf_ranap_cause_value = -1;
863 static int hf_ranap_transportLayerAddress_present = -1;
864 static int hf_ranap_iuTransportAssociation_present = -1;
865 static int hf_ranap_dl_dataVolumes_present = -1;
866 static int hf_ranap_dataVolumeReference_present = -1;
867 static int hf_ranap_dl_UnsuccessfullyTransmittedDataVolume = -1;
868 static int hf_ranap_dataVolumeReference = -1;
869 static int hf_ranap_procedureCode_present = -1;
870 static int hf_ranap_triggeringMessage_present = -1;
871 static int hf_ranap_procedureCriticality_present = -1;
872 static int hf_ranap_iEsCriticalityDiagnostics_present = -1;
873 static int hf_ranap_triggeringMessage = -1;
874 static int hf_ranap_iECriticality = -1;
875 static int hf_ranap_procedureCriticality = -1;
876 static int hf_ranap_repetitionNumber = -1;
877 static int hf_ranap_num_of_CriticalityDiagnostics_IEs = -1;
878 static int hf_ranap_repetitionNumber_present = -1;
879 static int hf_ranap_dl_UnsuccessfullyTransmittedDataVolume_present = -1;
880 static int hf_ranap_CN_DomainIndicator = -1;
881 static int hf_ranap_IuSigConId = -1;
882 static int hf_ranap_SAPI = -1;
883 static int hf_ranap_msg_extension_present = -1;
884 static int hf_ranap_ProtocolExtensionContainer_present = -1;
885 static int hf_ranap_nas_pdu_length = -1;
886 static int hf_ranap_relocationRequirement = -1;
887 static int hf_ranap_service_Handover = -1;
888 static int hf_ranap_extension_field = -1;
892 static gint ett_ranap = -1;
893 static gint ett_ranap_optionals = -1;
894 static gint ett_ranap_iE_Extension = -1;
895 static gint ett_ranap_ie = -1;
896 static gint ett_ranap_ie_pair = -1;
897 static gint ett_ranap_rab = -1;
898 static gint ett_ranap_ie_pair_first_value = -1;
899 static gint ett_ranap_ie_pair_second_value = -1;
900 static gint ett_ranap_rAB_Parameters = -1;
901 static gint ett_ranap_sDU = -1;
902 static gint ett_ranap_allocationOrRetentionPriority = -1;
903 static gint ett_ranap_CriticalityDiagnostics_IE = -1;
907 /*****************************************************************************/
909 /* Utility Functions */
911 /*****************************************************************************/
913 /* sets *offset and *bitoffset n bits further */
915 proceed_nbits(gint *offset, gint *bitoffset, gint n)
918 *offset += *bitoffset / 8;
922 /* sets *offset and *bitoffset to the next byte boundary */
923 static void allign(gint *offset, gint *bitoffset)
925 if ( *bitoffset != 0 )
932 /* sets *offset and *bitoffset behind the following integer */
934 proceed_perint32(gint *offset, gint *bitoffset, gint length)
936 proceed_nbits(offset, bitoffset, 2);
937 allign(offset, bitoffset);
942 /* extract length field found at offset */
943 /* if length field spans more than two bytes -1 is returned and the field is not decoded */
945 extract_length(tvbuff_t *tvb, gint offset, gint *length, gint *length_size)
948 guint16 tmp_length16;
950 tmp_length8 = tvb_get_guint8(tvb, offset);
951 if ((tmp_length8 & 0x80) == 0)
953 /* length coded in one byte */
954 *length = tmp_length8;
959 tmp_length16 = tvb_get_ntohs(tvb, offset);
960 if ( ((tmp_length16 & 0x8000) == 0x8000) && ((tmp_length16 & 0x4000) == 0) )
962 /* length coded in two bytes */
963 *length = tmp_length16 & 0x3FFF;
967 { /* length is coded in more than 2 bytes */
974 /* extract the next n bits and return them alligned to the LSB */
976 extract_nbits(tvbuff_t *tvb, gint offset, gint bitoffset, gint n)
982 if (bitoffset + n <= 8)
984 /* all bits contained in one byte */
985 uint_bits = tvb_get_guint8(tvb, offset);
986 uint_bits <<= bitoffset; /* remove bitoffset */
987 uint_bits >>= 8-n; /* allign to LSB */
991 /* bits contained within 2 bytes */
992 tmp_2bytes = tvb_get_ntohs(tvb, offset);
993 tmp_2bytes <<= bitoffset; /* remove bitoffset */
994 uint_bits = tmp_2bytes >> ( 8 + (8-n)); /* allign to LSB */
1001 /* extract an integer with 2bit length field and return the int value*/
1003 extract_int32(tvbuff_t *tvb, gint offset, gint bitoffset, gint *length)
1008 tmp_2byte = tvb_get_ntohs(tvb, offset);
1010 tmp_2byte <<= bitoffset; /* remove bitoffset */
1011 *length = tmp_2byte >> (6 + 8); /* allign 2bit length field to LSB */
1012 (*length)++; /* now we have the length of the int value */
1014 proceed_nbits(&offset, &bitoffset, 2);
1015 allign(&offset, &bitoffset);
1020 result = tvb_get_guint8(tvb, offset);
1023 result = tvb_get_ntohs(tvb, offset);
1026 result = tvb_get_ntoh24(tvb, offset);
1029 result = tvb_get_ntohl(tvb, offset);
1037 /* return bitmask string looking like "..01 0..." */
1039 bitmaskstr(guint bitoffset, guint bitlength, guint16 value, guint *length)
1041 static char maskstr[20];
1045 strcpy(maskstr, " ");
1047 for (i=0; i<16; i++)
1049 if ( i < bitoffset || i > bitoffset+bitlength-1 )
1051 /* i is outside extracted bitfield */
1052 maskstr[i + i/4] = '.';
1055 { /* i is inside extracted bitfield */
1056 if ( ((0x8000 >> i) & value) != 0x0000 )
1059 maskstr[i + i/4] = '1';
1063 /* bit is not set */
1064 maskstr[i + i/4] = '0';
1068 if (bitoffset + bitlength <= 8)
1070 /* bitfield is located within first byte only */
1076 /* bitfield is located within first & second byte */
1086 proto_tree_add_bitstring(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint offset,
1087 gint bitoffset, gint bitlength)
1089 guint16 read_2bytes;
1090 guint16 alligned_2bytes;
1093 char maskstr_buf[56] = "\0";
1097 char buf[256] = "\0";
1098 header_field_info *hf_info_p;
1100 gint initial_offset = offset;
1102 memset(bitstr, 0, 128);
1104 /* create bitmask string for first byte */
1105 read_2bytes = tvb_get_ntohs(tvb, offset);
1106 maskstr = bitmaskstr(bitoffset, (bitoffset+bitlength >8) ? 8-bitoffset : bitlength, read_2bytes, &length);
1107 if (bitoffset+bitlength > 8)
1109 sprintf(maskstr_buf, "%s + %d Bits = ", maskstr, bitlength - (8-bitoffset));
1113 sprintf(maskstr_buf, "%s = ", maskstr);
1117 /* print all but the last byte to buf */
1118 byte_span = (bitoffset + bitlength + 7) / 8;
1119 for (i=0; i < byte_span - 1; i++, offset++)
1121 read_2bytes = tvb_get_ntohs(tvb, offset);
1122 alligned_2bytes = read_2bytes << bitoffset; /* remove bitoffset */
1123 one_byte = alligned_2bytes >> 8; /* move to low byte */
1126 sprintf(&(buf[2*i]), "%02X", one_byte);
1129 /* add last byte if it contains bits which have not yet been shifted in */
1130 if ( ((bitlength + 7) / 8 ) == byte_span )
1132 read_2bytes = tvb_get_ntohs(tvb, offset);
1133 alligned_2bytes = read_2bytes << bitoffset; /* remove bitoffset */
1134 one_byte = alligned_2bytes >> 8; /* move to low byte */
1135 one_byte >>= (8 - (bitlength%8)); /*cut off surplus bits */
1136 one_byte <<= (8 - (bitlength%8)); /* allign to MSB in low byte*/
1139 sprintf(&(buf[2*i]), "%02X", one_byte);
1142 /* get header field info */
1143 hf_info_p = proto_registrar_get_nth(hfindex);
1146 return ( proto_tree_add_bytes_format(tree, hfindex, tvb, initial_offset,
1147 byte_span , bitstr, "%s %s: %s", maskstr_buf, hf_info_p->name, buf) );
1152 /* add unsigned int, 1-8 bits long */
1154 proto_tree_add_uint_bits(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint offset,
1155 gint bitoffset, gint bitlength, gint min)
1158 guint16 read_2bytes, alligned_2bytes;
1161 header_field_info *hf_info_p;
1165 if (bitoffset + bitlength <= 8)
1167 /* all bits contained in one byte */
1168 uint_bits = tvb_get_guint8(tvb, offset);
1169 read_2bytes = uint_bits;
1174 /* bits contained within 2 bytes */
1175 read_2bytes = tvb_get_ntohs(tvb, offset);
1177 alligned_2bytes = read_2bytes << bitoffset; /* remove bitoffset */
1178 uint_bits = alligned_2bytes >> ( 8 + (8-bitlength)); /* allign to LSB */
1182 /* create bitmask string */
1183 maskstr = bitmaskstr(bitoffset, bitlength, read_2bytes, &length);
1185 /* get header field info */
1186 hf_info_p = proto_registrar_get_nth(hfindex);
1188 if (hf_info_p->strings != NULL)
1190 /* string representation for decoded header field present */
1191 return ( proto_tree_add_uint_format(tree, hfindex, tvb, offset,
1192 length, uint_bits, "%s = %s: %s (%d)", maskstr, hf_info_p->name,
1193 val_to_str(uint_bits, hf_info_p->strings, "%d"), uint_bits) );
1197 /* no string representation */
1198 return ( proto_tree_add_uint_format(tree, hfindex, tvb, offset,
1199 length, uint_bits, "%s = %s: %d", maskstr, hf_info_p->name, uint_bits) );
1203 /* add PER encoded integer (maximum length of value: 4 bytes) */
1205 proto_tree_add_PERint32(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint offset,
1206 gint bitoffset, gint *length, gint min)
1212 header_field_info *hf_info_p;
1215 value = extract_int32(tvb, offset, bitoffset, length);
1218 /* create bitmask string for 2 bit length field */
1219 tmp_2bytes = tvb_get_ntohs(tvb, offset);
1220 maskstr = bitmaskstr(bitoffset, 2, tmp_2bytes, &length_size);
1222 /* get header field info */
1223 hf_info_p = proto_registrar_get_nth(hfindex);
1225 return ( proto_tree_add_uint_format(tree, hfindex, tvb, offset,
1226 (*length) + length_size, value,
1227 "%s + %d Bytes = %s: %d", maskstr, *length, hf_info_p->name, value) );
1232 /*****************************************************************************/
1234 /* Dissecting Functions for single parameters */
1236 /*****************************************************************************/
1238 dissect_iE_Extension(tvbuff_t *tvb, proto_tree *tree, gint *offset, gint *bitoffset, char *description)
1240 proto_item *ext_item = NULL;
1241 proto_tree *ext_tree = NULL;
1242 guint16 number_of_extFields;
1243 gint number_of_octets = 0;
1244 gint number_of_octets_size = 0;
1247 allign(offset, bitoffset);
1249 /* create subtree for iE_Extension */
1252 ext_item = proto_tree_add_text(tree, tvb, *offset, 0, "%s iE-Extensions", description);
1253 ext_tree = proto_item_add_subtree(ext_item, ett_ranap_iE_Extension);
1256 /* number of extension fields */
1257 number_of_extFields = tvb_get_ntohs(tvb, *offset) + 1;
1260 proto_tree_add_uint(ext_tree, hf_ranap_number_of_ProtocolExtensionFields,
1261 tvb, *offset, 2, number_of_extFields);
1266 /* for each extension field */
1267 for (i=1; i <= number_of_extFields; i++)
1269 /* add fields to ie subtee */
1270 /* Extension Field ID */
1273 proto_tree_add_item(ext_tree, hf_ranap_ext_field_id, tvb,
1274 *offset, IE_ID_LENGTH, FALSE);
1276 *offset += IE_ID_LENGTH;
1281 proto_tree_add_uint_bits(ext_tree, hf_ranap_ext_field_criticality, tvb,
1282 *offset, *bitoffset, 2, 0);
1284 proceed_nbits(offset, bitoffset, 2);
1286 /* number of octets in the IE */
1287 allign(offset, bitoffset);
1288 if (0 == extract_length(tvb, *offset, &number_of_octets, &number_of_octets_size))
1292 proto_tree_add_uint(ext_tree, hf_ranap_ext_field_number_of_octets, tvb,
1293 *offset, number_of_octets_size, number_of_octets);
1298 /* decoding is not supported */
1301 proto_tree_add_text(ext_tree, tvb, *offset, 0,
1302 "Number of Octets greater than 0x3FFF, dissection not supported");
1307 *offset += number_of_octets_size;
1310 proto_tree_add_item(ext_tree, hf_ranap_extension_field, tvb,
1311 *offset, number_of_octets, FALSE);
1315 *offset += number_of_octets;
1323 dissect_userPlaneInformation(tvbuff_t *tvb, proto_tree *tree, gint *offset, gint *bitoffset)
1325 int extension_present;
1326 int iE_Extensions_present;
1327 int tmp_extension_present;
1329 /* protocol_extension present ? */
1330 extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1331 proceed_nbits(offset, bitoffset, 1);
1333 /* iE_Extensions present ? */
1334 iE_Extensions_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1335 proceed_nbits(offset, bitoffset, 1);
1338 tmp_extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1339 proceed_nbits(offset, bitoffset, 1);
1341 proto_tree_add_uint_bits(tree, hf_ranap_userPlaneMode, tvb, *offset,
1343 proceed_nbits(offset, bitoffset, 1);
1345 /* uP-ModeVersions */
1346 proto_tree_add_bitstring(tree, hf_ranap_uP_ModeVersions, tvb, *offset,
1348 proceed_nbits(offset, bitoffset, 16);
1351 if (iE_Extensions_present)
1353 return(dissect_iE_Extension(tvb, tree, offset, bitoffset, "UserPlaneInformation"));
1361 dissect_sDU_Parameters(tvbuff_t *tvb, proto_tree *ie_tree, gint *offset, gint *bitoffset)
1363 proto_item *sDU_item = NULL;
1364 proto_tree *sDU_tree = NULL;
1365 proto_item *optionals_item = NULL;
1366 proto_tree *optionals_tree = NULL;
1368 int extension_present;
1369 int sDU_ErrorRatio_present;
1370 int sDU_FormatInformationParameters_present;
1371 int iE_Extensions_present;
1372 int sDU_ErrorRatio_iE_Extensions_present;
1373 int residualBitErrorRatio_iE_Extensions_present;
1375 gint number_of_sDU_FormatInformationParameters;
1376 int sDU_FormatInformationParameters_extension_present;
1377 int subflowSDU_Size_present;
1378 int rAB_SubflowCombinationBitRate_present;
1379 int sDU_FormatInformationParameters_iE_Extensions_present;
1382 /* create subtree for sDU_Parameters */
1383 sDU_item = proto_tree_add_text(ie_tree, tvb, *offset, 0,
1385 sDU_tree = proto_item_add_subtree(sDU_item, ett_ranap_sDU);
1387 /* create subtree for extension/optional/default bitmap */
1388 optionals_item = proto_tree_add_text(sDU_tree, tvb, *offset, 1,
1389 "sDU_Parameters Extension/Optional/Default bitmap");
1390 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
1392 /* protocol_extension present ? */
1393 extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1394 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
1395 *offset, *bitoffset, 1, 0);
1396 proceed_nbits(offset, bitoffset, 1);
1398 /* sDU_ErrorRatio present ? */
1399 sDU_ErrorRatio_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1400 proto_tree_add_uint_bits(optionals_tree, hf_ranap_sDU_ErrorRatio_present, tvb,
1401 *offset, *bitoffset, 1, 0);
1402 proceed_nbits(offset, bitoffset, 1);
1404 /* sDU_FormatInformationParameters present ? */
1405 sDU_FormatInformationParameters_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1406 proto_tree_add_uint_bits(optionals_tree, hf_ranap_sDU_FormatInformationParameters_present, tvb,
1407 *offset, *bitoffset, 1, 0);
1408 proceed_nbits(offset, bitoffset, 1);
1410 /* iE_Extensions present ? */
1411 iE_Extensions_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1412 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present, tvb,
1413 *offset, *bitoffset, 1, 0);
1414 proceed_nbits(offset, bitoffset, 1);
1417 /* sDU_ErrorRatio */
1418 if (sDU_ErrorRatio_present)
1420 sDU_ErrorRatio_iE_Extensions_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1421 proceed_nbits(offset, bitoffset, 1);
1423 proto_tree_add_uint_bits(sDU_tree, hf_ranap_sDU_ErrorRatio_mantissa, tvb, *offset,
1425 proceed_nbits(offset, bitoffset, 4);
1427 proto_tree_add_uint_bits(sDU_tree, hf_ranap_sDU_ErrorRatio_exponent, tvb, *offset,
1429 proceed_nbits(offset, bitoffset, 3);
1431 if (sDU_ErrorRatio_iE_Extensions_present)
1433 if ((ret=dissect_iE_Extension(tvb, sDU_tree, offset, bitoffset, "sDU_ErrorRatio")) != 0)
1438 /* residualBitErrorRatio */
1439 residualBitErrorRatio_iE_Extensions_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1440 proceed_nbits(offset, bitoffset, 1);
1442 proto_tree_add_uint_bits(sDU_tree, hf_ranap_residualBitErrorRatio_mantissa, tvb, *offset,
1444 proceed_nbits(offset, bitoffset, 4);
1446 proto_tree_add_uint_bits(sDU_tree, hf_ranap_sDU_ErrorRatio_exponent, tvb, *offset,
1448 proceed_nbits(offset, bitoffset, 3);
1451 if (residualBitErrorRatio_iE_Extensions_present)
1453 if ((ret=dissect_iE_Extension(tvb, sDU_tree, offset, bitoffset, "residualBitErrorRatio")) != 0)
1458 /* deliveryOfErroneousSDU */
1459 proto_tree_add_uint_bits(sDU_tree, hf_ranap_deliveryOfErroneousSDU, tvb, *offset,
1461 proceed_nbits(offset, bitoffset, 2);
1464 /* sDU_FormatInformationParameters */
1465 if (sDU_FormatInformationParameters_present)
1467 number_of_sDU_FormatInformationParameters = extract_nbits(tvb, *offset, *bitoffset, 6) + 1;
1468 proceed_nbits(offset, bitoffset, 6);
1470 for (i=1; i<= number_of_sDU_FormatInformationParameters; i++)
1472 /* create subtree for extension/optional/default bitmap */
1473 optionals_item = proto_tree_add_text(sDU_tree, tvb, *offset, 1,
1474 "sDU_FormatInformationParameters Extension/Optional/Default bitmap");
1475 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
1477 /* protocol extension present ? */
1478 sDU_FormatInformationParameters_extension_present =
1479 extract_nbits(tvb, *offset, *bitoffset, 1);
1480 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
1481 *offset, *bitoffset, 1, 0);
1482 proceed_nbits(offset, bitoffset, 1);
1484 /* subflowSDU_Size present ? */
1485 subflowSDU_Size_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1486 proto_tree_add_uint_bits(optionals_tree, hf_ranap_subflowSDU_Size_present, tvb,
1487 *offset, *bitoffset, 1, 0);
1488 proceed_nbits(offset, bitoffset, 1);
1490 /* rAB_SubflowCombinationBitRate present ? */
1491 rAB_SubflowCombinationBitRate_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1492 proto_tree_add_uint_bits(optionals_tree, hf_ranap_rAB_SubflowCombinationBitRate_present, tvb,
1493 *offset, *bitoffset, 1, 0);
1494 proceed_nbits(offset, bitoffset, 1);
1496 /* ie_Extension present ? */
1497 sDU_FormatInformationParameters_iE_Extensions_present =
1498 extract_nbits(tvb, *offset, *bitoffset, 1);
1499 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present, tvb,
1500 *offset, *bitoffset, 1, 0);
1501 proceed_nbits(offset, bitoffset, 1);
1503 if (subflowSDU_Size_present)
1505 allign(offset, bitoffset);
1506 proto_tree_add_item(sDU_tree, hf_ranap_subflowSDU_Size,
1507 tvb, *offset, subflowSDU_Size_LENGTH, FALSE);
1508 offset += subflowSDU_Size_LENGTH;
1511 if (rAB_SubflowCombinationBitRate_present)
1513 proto_tree_add_PERint32(sDU_tree, hf_ranap_rAB_SubflowCombinationBitRate,
1514 tvb, *offset, *bitoffset, &length, 0);
1515 proceed_perint32(offset, bitoffset, length);
1518 if (sDU_FormatInformationParameters_iE_Extensions_present)
1520 if ((ret=dissect_iE_Extension(tvb, sDU_tree, offset, bitoffset,
1521 "sDU_FormatInformationParameters" )) != 0)
1527 if (extension_present)
1529 /* extended sequence */
1530 /* decoding is not supported */
1531 proto_tree_add_text(ie_tree, tvb, *offset, IE_PROTOCOL_EXTENSION_LENGTH,
1532 "Protocol extension for sDU_FormatInformationParameters present, dissection not supported");
1542 dissect_rAB_Parameters(tvbuff_t *tvb, proto_tree *ie_tree, gint *offset, gint *bitoffset)
1545 proto_item *rab_item = NULL;
1546 proto_tree *rab_tree = NULL;
1547 proto_item *optionals_item = NULL;
1548 proto_tree *optionals_tree = NULL;
1549 proto_item *prio_item = NULL;
1550 proto_tree *prio_tree = NULL;
1552 int extension_present;
1553 int tmp_extension_present;
1554 int guaranteedBitRate_present;
1555 int transferDelay_present;
1556 int trafficHandlingPriority_present;
1557 int allocationOrRetentionPriority_present;
1558 int sourceStatisticsDescriptor_present;
1559 int relocationRequirement_present;
1560 int iE_Extensions_present;
1561 int tmp_iE_Extensions_present;
1565 /* create subtree for rAB_Parameters */
1566 rab_item = proto_tree_add_text(ie_tree, tvb, *offset, 0,
1568 rab_tree = proto_item_add_subtree(rab_item, ett_ranap_rAB_Parameters);
1570 /* create subtree for extension/optional/default bitmap */
1571 optionals_item = proto_tree_add_text(rab_tree, tvb, *offset, IE_PROTOCOL_EXTENSION_LENGTH,
1572 "rAB_Parameters Extension/Optional/Default bitmap");
1573 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
1575 /* protocol extension present ? */
1576 extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1577 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
1578 *offset, *bitoffset, 1, 0);
1579 proceed_nbits(offset, bitoffset, 1);
1581 /* guaranteedBitRate present ? */
1582 guaranteedBitRate_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1583 proto_tree_add_uint_bits(optionals_tree, hf_ranap_guaranteedBitRate_present,
1584 tvb, *offset, *bitoffset, 1, 0);
1585 proceed_nbits(offset, bitoffset, 1);
1587 /* transferDelay present ? */
1588 transferDelay_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1589 proto_tree_add_uint_bits(optionals_tree, hf_ranap_transferDelay_present,
1590 tvb, *offset, *bitoffset, 1, 0);
1591 proceed_nbits(offset, bitoffset, 1);
1593 /* trafficHandlingPriority present ? */
1594 trafficHandlingPriority_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1595 proto_tree_add_uint_bits(optionals_tree, hf_ranap_trafficHandlingPriority_present,
1596 tvb, *offset, *bitoffset, 1, 0);
1597 proceed_nbits(offset, bitoffset, 1);
1599 /* allocationOrRetentionPriority present ? */
1600 allocationOrRetentionPriority_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1601 proto_tree_add_uint_bits(optionals_tree, hf_ranap_allocationOrRetentionPriority_present,
1602 tvb, *offset, *bitoffset, 1, 0);
1603 proceed_nbits(offset, bitoffset, 1);
1605 /* sourceStatisticsDescriptor present ? */
1606 sourceStatisticsDescriptor_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1607 proto_tree_add_uint_bits(optionals_tree, hf_ranap_sourceStatisticsDescriptor_present,
1608 tvb, *offset, *bitoffset, 1, 0);
1609 proceed_nbits(offset, bitoffset, 1);
1611 /* relocationRequirement present ? */
1612 relocationRequirement_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1613 proto_tree_add_uint_bits(optionals_tree, hf_ranap_relocationRequirement_present,
1614 tvb, *offset, *bitoffset, 1, 0);
1615 proceed_nbits(offset, bitoffset, 1);
1617 /* iE-Extensions present ? */
1618 iE_Extensions_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1619 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present,
1620 tvb, *offset, *bitoffset, 1, 0);
1621 proceed_nbits(offset, bitoffset, 1);
1625 tmp_extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1626 proceed_nbits(offset, bitoffset, 1);
1628 proto_tree_add_uint_bits(rab_tree, hf_ranap_trafficClass,
1629 tvb, *offset, *bitoffset, 2, 0);
1630 proceed_nbits(offset, bitoffset, 2);
1632 if (tmp_extension_present)
1634 /* decoding is not supported */
1635 proto_tree_add_text(rab_tree, tvb, *offset, IE_PROTOCOL_EXTENSION_LENGTH,
1636 "Protocol extension for trafficClass present, dissection not supported");
1641 /* rAB-AsymmetryIndicator */
1642 tmp_extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1643 proceed_nbits(offset, bitoffset, 1);
1645 proto_tree_add_uint_bits(rab_tree, hf_ranap_rAB_AsymmetryIndicator,
1646 tvb, *offset, *bitoffset, 2, 0);
1647 proceed_nbits(offset, bitoffset, 2);
1649 if (tmp_extension_present)
1651 /* decoding is not supported */
1652 proto_tree_add_text(rab_tree, tvb, *offset, IE_PROTOCOL_EXTENSION_LENGTH,
1653 "Protocol extension for rAB-AsymmetryIndicator present, dissection not supported");
1659 tmp_byte = extract_nbits(tvb, *offset, *bitoffset, 1) +1 ; /*sequence 1..2 */
1660 proceed_nbits(offset, bitoffset, 1);
1662 for (i=1; i<= tmp_byte; i++)
1664 proto_tree_add_PERint32(rab_tree, hf_ranap_maxBitrate,
1665 tvb, *offset, *bitoffset, &length, 1);
1666 proceed_perint32(offset, bitoffset, length);
1670 /* guaranteedBitRate */
1671 if (guaranteedBitRate_present)
1673 tmp_byte = extract_nbits(tvb, *offset, *bitoffset, 1) +1 ; /*sequence 1..2 */
1674 proceed_nbits(offset, bitoffset, 1);
1676 for (i=1; i<= tmp_byte; i++)
1678 proto_tree_add_PERint32(rab_tree, hf_ranap_guaranteedBitrate,
1679 tvb, *offset, *bitoffset, &length, 0);
1680 proceed_perint32(offset, bitoffset, length);
1685 proto_tree_add_uint_bits(rab_tree, hf_ranap_deliveryOrder, tvb, *offset,
1687 proceed_nbits(offset, bitoffset, 1);
1691 allign(offset, bitoffset);
1692 proto_tree_add_item(rab_tree, hf_ranap_maxSDU_Size,
1693 tvb, *offset, maxSDU_Size_LENGTH, FALSE);
1694 *offset += maxSDU_Size_LENGTH;
1696 /* sDU-Parameters */
1697 tmp_byte = extract_nbits(tvb, *offset, *bitoffset, 3) + 1; /*sequence 1..7 */
1698 proceed_nbits(offset, bitoffset, 3);
1699 for (i=1; i<= tmp_byte; i++)
1701 if ((ret=dissect_sDU_Parameters(tvb, rab_tree, offset, bitoffset))!=0) return(ret);
1705 if (transferDelay_present)
1707 allign(offset, bitoffset);
1708 proto_tree_add_item(rab_tree, hf_ranap_transferDelay,
1709 tvb, *offset, transferDelay_LENGTH, FALSE);
1710 *offset += transferDelay_LENGTH;
1714 /* trafficHandlingPriority */
1715 if (trafficHandlingPriority_present)
1717 proto_tree_add_uint_bits(rab_tree, hf_ranap_trafficHandlingPriority, tvb, *offset,
1719 proceed_nbits(offset, bitoffset, 4);
1722 /* allocationOrRetentionPriority */
1723 if (allocationOrRetentionPriority_present)
1725 /* create subtree for */
1726 prio_item = proto_tree_add_text(rab_tree, tvb, *offset, 0,
1727 "allocationOrRetentionPriority");
1728 prio_tree = proto_item_add_subtree(prio_item, ett_ranap_allocationOrRetentionPriority);
1730 /* protocol extension present ? */
1731 tmp_extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1732 proceed_nbits(offset, bitoffset, 1);
1734 /* iE Extension present ? */
1735 tmp_iE_Extensions_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1736 proceed_nbits(offset, bitoffset, 1);
1738 /* allocationOrRetentionPriority */
1739 proto_tree_add_uint_bits(prio_tree, hf_ranap_priorityLevel, tvb, *offset,
1741 proceed_nbits(offset, bitoffset, 4);
1743 /* pre-emptionCapability */
1744 proto_tree_add_uint_bits(prio_tree, hf_ranap_pre_emptionCapability, tvb, *offset,
1746 proceed_nbits(offset, bitoffset, 1);
1748 /* pre-emptionVulnerability */
1749 proto_tree_add_uint_bits(prio_tree, hf_ranap_pre_emptionVulnerability, tvb, *offset,
1751 proceed_nbits(offset, bitoffset, 1);
1753 /* queuingAllowed */
1754 proto_tree_add_uint_bits(prio_tree, hf_ranap_queuingAllowed, tvb, *offset,
1756 proceed_nbits(offset, bitoffset, 1);
1758 if (tmp_iE_Extensions_present)
1760 if ((ret=dissect_iE_Extension(tvb, prio_tree, offset, bitoffset,
1761 "AllocationOrRetentionPriority")) != 0)
1765 if (tmp_extension_present)
1767 /* decoding is not supported */
1768 proto_tree_add_text(prio_tree, tvb, *offset, IE_PROTOCOL_EXTENSION_LENGTH,
1769 "Protocol extension for rAB-allocationOrRetentionPriority present, dissection not supported");
1774 /* sourceStatisticsDescriptor */
1775 if (sourceStatisticsDescriptor_present)
1777 /* protocol extension */
1778 tmp_extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1779 proceed_nbits(offset, bitoffset, 1);
1781 if (tmp_extension_present)
1783 /* decoding is not supported */
1784 proto_tree_add_text(prio_tree, tvb, *offset, IE_PROTOCOL_EXTENSION_LENGTH,
1785 "Protocol extension for sourceStatisticsDescriptor present, dissection not supported");
1789 proto_tree_add_uint_bits(rab_tree, hf_ranap_sourceStatisticsDescriptor, tvb, *offset,
1791 proceed_nbits(offset, bitoffset, 1);
1794 /* relocationRequirement */
1795 if (relocationRequirement_present)
1797 /* protocol extension */
1798 tmp_extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1799 proceed_nbits(offset, bitoffset, 1);
1801 if (tmp_extension_present)
1803 /* decoding is not supported */
1804 proto_tree_add_text(prio_tree, tvb, *offset, IE_PROTOCOL_EXTENSION_LENGTH,
1805 "Protocol extension for relocationRequirement present, dissection not supported");
1809 proto_tree_add_uint_bits(rab_tree, hf_ranap_relocationRequirement, tvb, *offset,
1811 proceed_nbits(offset, bitoffset, 1);
1816 if (iE_Extensions_present)
1818 if ((ret=dissect_iE_Extension(tvb, rab_tree, offset, bitoffset, "rAB_Parameters" )) != 0 )
1823 if (extension_present)
1825 /* decoding is not supported */
1826 proto_tree_add_text(rab_tree, tvb, *offset, IE_PROTOCOL_EXTENSION_LENGTH,
1827 "Protocol extension for rAB_Parameters present, dissection not supported");
1837 dissect_TransportLayerAddress(tvbuff_t *tvb, proto_tree *ie_tree, gint *offset, gint *bitoffset)
1839 gint extension_present;
1842 extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1843 proceed_nbits(offset, bitoffset, 1);
1844 if (extension_present)
1846 /* extended integer */
1847 proto_tree_add_text(ie_tree, tvb, *offset, 0,
1848 "extension present for TransportLayerAddress, dissection not supported");
1852 /* extract and add length of transportLayerAddress bitstring */
1853 str_length = extract_nbits(tvb, *offset, *bitoffset, 8) + 1;
1854 proto_tree_add_uint_bits(ie_tree, hf_ranap_transportLayerAddress_length,
1855 tvb, *offset, *bitoffset, 8, 1);
1856 proceed_nbits(offset, bitoffset, 8);
1857 allign(offset, bitoffset);
1859 /* add transportLayerAddress */
1860 proto_tree_add_bitstring(ie_tree, hf_ranap_transportLayerAddress, tvb, *offset,
1861 *bitoffset, str_length);
1862 proceed_nbits(offset, bitoffset, str_length);
1870 dissect_iuTransportAssociation(tvbuff_t *tvb, proto_tree *ie_tree, gint *offset, gint *bitoffset)
1872 guint extension_present;
1875 /* extension present ? */
1876 extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1877 if (extension_present)
1879 /* extended choice */
1880 proto_tree_add_text(ie_tree, tvb, *offset, 0,
1881 "extension present for IuTransportAssociation, dissection not supported");
1884 proceed_nbits(offset, bitoffset, 1);
1887 choice_value = extract_nbits(tvb, *offset, *bitoffset, 1);
1888 proceed_nbits(offset, bitoffset, 1);
1889 allign(offset, bitoffset);
1890 if (choice_value == 0)
1893 proto_tree_add_item(ie_tree, hf_ranap_gTP_TEI, tvb, *offset, 4, FALSE);
1899 proto_tree_add_item(ie_tree, hf_ranap_bindingID, tvb, *offset, 4, FALSE);
1908 dissect_transportLayerInformation(tvbuff_t *tvb, proto_tree *ie_tree, gint *offset, gint *bitoffset)
1910 proto_item *optionals_item = NULL;
1911 proto_tree *optionals_tree = NULL;
1912 int extension_present;
1913 int iE_Extensions_present;
1916 /* create subtree for extension/optional/default bitmap */
1917 optionals_item = proto_tree_add_text(ie_tree, tvb, *offset, IE_PROTOCOL_EXTENSION_LENGTH,
1918 "TransportLayerInformation Extension/Optional/Default bitmap");
1919 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
1922 /* protocol extension present ? */
1923 extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1924 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
1925 *offset, *bitoffset, 1, 0);
1926 proceed_nbits(offset, bitoffset, 1);
1928 /* iE-Extensions present ? */
1929 iE_Extensions_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1930 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present,
1931 tvb, *offset, *bitoffset, 1, 0);
1932 proceed_nbits(offset, bitoffset, 1);
1935 /* transportLayerAddress */
1936 if ((ret=dissect_TransportLayerAddress(tvb, ie_tree, offset, bitoffset)) != 0)
1939 /* iuTransportAssociation */
1940 if ((ret=dissect_iuTransportAssociation(tvb, ie_tree, offset, bitoffset)) != 0)
1944 if (iE_Extensions_present)
1946 if ((ret=dissect_iE_Extension(tvb, ie_tree, offset, bitoffset, "TransportLayerInformation" )) != 0 )
1950 /* protocol extension */
1951 if (extension_present)
1953 /* extended sequence */
1954 proto_tree_add_text(ie_tree, tvb, *offset, 0,
1955 "extension present for TransportLayerInformation, dissection not supported");
1964 dissect_dataVolumeList (tvbuff_t *tvb, proto_tree *ie_tree, gint *offset, gint *bitoffset, char *parname)
1966 proto_item *optionals_item = NULL;
1967 proto_tree *optionals_tree = NULL;
1968 gint extension_present;
1969 gint dataVolumeReference_present;
1970 gint iE_Extensions_present;
1976 /* number of volumes */
1977 number_vol = extract_nbits(tvb, *offset, *bitoffset, 1) + 1;
1978 proceed_nbits(offset, bitoffset, 1);
1980 for (i=1; i<=number_vol; i++)
1982 /* create subtree for extension/optional/default bitmap */
1983 optionals_item = proto_tree_add_text(ie_tree, tvb, *offset, 1,
1984 "%d. %s Extension/Optional/Default bitmap",
1986 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
1988 /* protocol_extension present ? */
1989 extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1990 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
1991 *offset, *bitoffset, 1, 0);
1992 proceed_nbits(offset, bitoffset, 1);
1994 /* dataVolumeReference present ? */
1995 dataVolumeReference_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1996 proto_tree_add_uint_bits(optionals_tree, hf_ranap_dataVolumeReference_present, tvb,
1997 *offset, *bitoffset, 1, 0);
1998 proceed_nbits(offset, bitoffset, 1);
2000 /* iE_Extensions present ? */
2001 iE_Extensions_present = extract_nbits(tvb, *offset, *bitoffset, 1);
2002 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present, tvb,
2003 *offset, *bitoffset, 1, 0);
2004 proceed_nbits(offset, bitoffset, 1);
2007 /* UnsuccessfullyTransmittedDataVolume */
2008 proto_tree_add_PERint32(ie_tree, hf_ranap_dl_UnsuccessfullyTransmittedDataVolume,
2009 tvb, *offset, *bitoffset, &length, 0);
2010 proceed_perint32(offset, bitoffset, length);
2012 /* DataVolumeReference */
2013 if (dataVolumeReference_present)
2015 proto_tree_add_uint_bits(ie_tree, hf_ranap_dataVolumeReference, tvb,
2016 *offset, *bitoffset, 8, 0);
2017 proceed_nbits(offset, bitoffset, 8);
2021 if (iE_Extensions_present)
2023 if ((ret=dissect_iE_Extension(tvb, ie_tree, offset, bitoffset, "dl-dataVolumes" )) != 0)
2027 /* protocol extended */
2028 if (extension_present)
2030 /* extended sequence */
2031 /* decoding is not supported */
2032 proto_tree_add_text(ie_tree, tvb, *offset, IE_PROTOCOL_EXTENSION_LENGTH,
2033 "Protocol extension for dl-dataVolumes present, dissection not supported");
2043 dissect_cause(tvbuff_t *tvb, proto_tree *ie_tree, gint *offset, gint *bitoffset)
2045 gint extension_present;
2048 /* protocol extension present ? */
2049 extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
2050 proceed_nbits(offset, bitoffset, 1);
2051 if (extension_present)
2053 /* choice extension present */
2054 proto_tree_add_text(ie_tree, tvb, *offset, 0,
2055 "extension present for cause, dissection not supported");
2058 cause_choice = extract_nbits(tvb, *offset, *bitoffset, 3);
2059 proto_tree_add_uint_bits(ie_tree, hf_ranap_cause_choice,
2060 tvb, *offset, *bitoffset, 3, 0);
2061 proceed_nbits(offset, bitoffset, 3);
2063 switch (cause_choice)
2065 case CC_CauseRadioNetwork:
2066 proto_tree_add_uint_bits(ie_tree, hf_ranap_cause_value,
2067 tvb, *offset, *bitoffset, 6, 1);
2068 proceed_nbits(offset, bitoffset, 6);
2070 case CC_CauseTransmissionNetwork:
2071 proto_tree_add_uint_bits(ie_tree, hf_ranap_cause_value,
2072 tvb, *offset, *bitoffset, 4, 65);
2073 proceed_nbits(offset, bitoffset, 4);
2076 proto_tree_add_uint_bits(ie_tree, hf_ranap_cause_value,
2077 tvb, *offset, *bitoffset, 4, 81);
2078 proceed_nbits(offset, bitoffset, 4);
2080 case CC_CauseProtocol:
2081 proto_tree_add_uint_bits(ie_tree, hf_ranap_cause_value,
2082 tvb, *offset, *bitoffset, 4, 97);
2083 proceed_nbits(offset, bitoffset, 4);
2085 proto_tree_add_uint_bits(ie_tree, hf_ranap_cause_value,
2086 tvb, *offset, *bitoffset, 4, 113);
2087 proceed_nbits(offset, bitoffset, 4);
2089 case CC_CauseNon_Standard:
2090 proto_tree_add_uint_bits(ie_tree, hf_ranap_cause_value,
2091 tvb, *offset, *bitoffset, 7, 129);
2092 proceed_nbits(offset, bitoffset, 7);
2095 proto_tree_add_text(ie_tree, tvb, *offset, 0,
2096 "unexpected cause choice value, dissection not supported");
2104 dissect_iEsCriticalityDiagnostics(tvbuff_t *tvb, proto_tree *ie_tree, gint *offset, gint *bitoffset)
2106 proto_item *diag_item = NULL;
2107 proto_tree *diag_tree = NULL;
2108 proto_item *optionals_item = NULL;
2109 proto_tree *optionals_tree = NULL;
2110 int extension_present;
2111 int repetitionNumber_present;
2112 int iE_Extensions_present;
2116 allign(offset, bitoffset);
2117 num_of_errors = extract_nbits(tvb, *offset, *bitoffset, 8) + 1;
2118 proto_tree_add_uint_bits(ie_tree, hf_ranap_num_of_CriticalityDiagnostics_IEs, tvb,
2119 *offset, *bitoffset, 8, 1);
2120 proceed_nbits(offset, bitoffset, 8);
2122 for ( i= 1; i <= num_of_errors; i++)
2124 /* add subtree for CriticalityDiagnostics-IE */
2125 diag_item = proto_tree_add_text(ie_tree, tvb, *offset, 0,
2126 "%d. CriticalityDiagnostics-IE", i);
2127 diag_tree = proto_item_add_subtree(diag_item, ett_ranap_CriticalityDiagnostics_IE);
2129 /* create subtree for extension/optional/default bitmap */
2130 optionals_item = proto_tree_add_text(diag_tree, tvb, *offset, 1,
2131 "CriticalityDiagnostics-IE Extension/Optional/Default bitmap");
2132 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
2134 /* protocol_extension present ? */
2135 extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
2136 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
2137 *offset, *bitoffset, 1, 0);
2138 proceed_nbits(offset, bitoffset, 1);
2140 /* repetitionNumber present ? */
2141 repetitionNumber_present = extract_nbits(tvb, *offset, *bitoffset, 1);
2142 proto_tree_add_uint_bits(optionals_tree, hf_ranap_repetitionNumber_present, tvb,
2143 *offset, *bitoffset, 1, 0);
2144 proceed_nbits(offset, bitoffset, 1);
2146 /* iE_Extensions present ? */
2147 iE_Extensions_present = extract_nbits(tvb, *offset, *bitoffset, 1);
2148 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present,
2149 tvb, *offset, *bitoffset, 1, 0);
2150 proceed_nbits(offset, bitoffset, 1);
2153 proto_tree_add_uint_bits(diag_tree, hf_ranap_iECriticality,
2154 tvb, *offset, *bitoffset, 2, 0);
2155 proceed_nbits(offset, bitoffset, 2);
2158 allign(offset, bitoffset);
2159 proto_tree_add_item(diag_tree, hf_ranap_ie_ie_id, tvb,
2160 *offset, IE_ID_LENGTH, FALSE);
2161 *offset += IE_ID_LENGTH;
2163 /* repetitionNumber */
2164 if (repetitionNumber_present)
2166 allign(offset, bitoffset);
2167 proto_tree_add_uint_bits(diag_tree, hf_ranap_repetitionNumber,
2168 tvb, *offset, *bitoffset, 8, 1);
2169 proceed_nbits(offset, bitoffset, 8);
2173 if (iE_Extensions_present)
2175 return(dissect_iE_Extension(tvb, diag_tree, offset, bitoffset, "CriticalityDiagnostics-IE"));
2179 /* protocol extended */
2180 if (extension_present)
2182 /* extended sequence */
2183 /* decoding is not supported */
2184 proto_tree_add_text(diag_tree, tvb, *offset, IE_PROTOCOL_EXTENSION_LENGTH,
2185 "Protocol extension for CriticalityDiagnostics-IE present, dissection not supported");
2195 /*****************************************************************************/
2197 /* Dissecting Functions for IEs */
2199 /*****************************************************************************/
2202 dissect_IE_RAB_ID(tvbuff_t *tvb, proto_tree *ie_tree)
2206 proto_tree_add_item(ie_tree, hf_ranap_rab_id, tvb,
2207 0, RAB_ID_LENGTH, FALSE);
2214 dissect_IE_RAC(tvbuff_t *tvb, proto_tree *ie_tree)
2218 proto_tree_add_item(ie_tree, hf_ranap_rac, tvb,
2219 0, RAC_LENGTH, FALSE);
2226 dissect_IE_LAI(tvbuff_t *tvb, proto_tree *ie_tree)
2228 proto_item *optionals_item = NULL;
2229 proto_tree *optionals_tree = NULL;
2230 int iE_Extensions_present;
2237 /* create subtree for extension/optional/default bitmap */
2238 optionals_item = proto_tree_add_text(ie_tree, tvb, offset, 1,
2239 "LAI Extension/Optional/Default bitmap");
2240 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
2242 /* iE_Extensions_present present ? */
2243 iE_Extensions_present = extract_nbits(tvb, offset, bitoffset, 1);
2244 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present, tvb,
2245 offset, bitoffset, 1, 0);
2246 proceed_nbits(&offset, &bitoffset, 1);
2249 allign(&offset, &bitoffset);
2250 proto_tree_add_item(ie_tree, hf_ranap_plmn_id, tvb,
2251 offset, PLMN_ID_LENGTH, FALSE);
2252 offset += PLMN_ID_LENGTH;
2255 proto_tree_add_item(ie_tree, hf_ranap_lac, tvb,
2256 offset, LAC_LENGTH, FALSE);
2257 offset += LAC_LENGTH;
2260 if (iE_Extensions_present)
2262 if ((ret=dissect_iE_Extension(tvb, ie_tree, &offset, &bitoffset, "LAI")) != 0)
2271 dissect_IE_SAI(tvbuff_t *tvb, proto_tree *ie_tree)
2273 proto_item *optionals_item = NULL;
2274 proto_tree *optionals_tree = NULL;
2275 int iE_Extensions_present;
2282 /* create subtree for extension/optional/default bitmap */
2283 optionals_item = proto_tree_add_text(ie_tree, tvb, offset, 1,
2284 "SAI Extension/Optional/Default bitmap");
2285 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
2287 /* iE_Extensions_present present ? */
2288 iE_Extensions_present = extract_nbits(tvb, offset, bitoffset, 1);
2289 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present, tvb,
2290 offset, bitoffset, 1, 0);
2291 proceed_nbits(&offset, &bitoffset, 1);
2294 proto_tree_add_item(ie_tree, hf_ranap_plmn_id, tvb,
2295 offset, PLMN_ID_LENGTH, FALSE);
2296 offset += PLMN_ID_LENGTH;
2299 proto_tree_add_item(ie_tree, hf_ranap_lac, tvb,
2300 offset, LAC_LENGTH, FALSE);
2301 offset += LAC_LENGTH;
2304 proto_tree_add_item(ie_tree, hf_ranap_sac, tvb,
2305 offset, SAC_LENGTH, FALSE);
2306 offset += SAC_LENGTH;
2309 if (iE_Extensions_present)
2311 if ((ret=dissect_iE_Extension(tvb, ie_tree, &offset, &bitoffset, "LAI")) != 0)
2320 dissect_IE_NAS_PDU(tvbuff_t *tvb, proto_tree *ie_tree)
2325 if (extract_length(tvb, 0, &length, &length_size) != 0)
2329 /* decoding is not supported */
2330 proto_tree_add_text(ie_tree, tvb, 0,
2331 2, "Number of Octets greater than 0x3FFF, dissection not supported");
2338 /* NAS - PDU length */
2339 proto_tree_add_item(ie_tree, hf_ranap_nas_pdu_length, tvb,
2340 0, length_size, FALSE);
2343 /* call NAS dissector (not implemented yet) */
2346 /* meanwhile display in hex */
2350 proto_tree_add_item(ie_tree, hf_ranap_nas_pdu, tvb,
2351 length_size, length, FALSE);
2358 dissect_IE_CN_DomainIndicator(tvbuff_t *tvb, proto_tree *ie_tree)
2365 proto_tree_add_uint_bits(ie_tree, hf_ranap_CN_DomainIndicator, tvb,
2366 offset, bitoffset, 1, 0);
2373 dissect_IE_IuSigConId(tvbuff_t *tvb, proto_tree *ie_tree)
2377 proto_tree_add_bitstring(ie_tree, hf_ranap_IuSigConId, tvb, 0, 0, 24);
2384 dissect_IE_SAPI(tvbuff_t *tvb, proto_tree *ie_tree)
2388 int extension_present;
2392 /* protocol_extension present ? */
2393 extension_present = extract_nbits(tvb, offset, bitoffset, 1);
2394 proceed_nbits(&offset, &bitoffset, 1);
2396 if (extension_present)
2399 /* decoding is not supported */
2400 proto_tree_add_text(ie_tree, tvb, offset, IE_PROTOCOL_EXTENSION_LENGTH,
2401 "Protocol extension for IE_SAPI present, dissection not supported");
2406 proto_tree_add_uint_bits(ie_tree, hf_ranap_SAPI, tvb,
2407 offset, bitoffset, 1, 0);
2414 dissect_IE_TransportLayerAddress(tvbuff_t *tvb, proto_tree *ie_tree)
2421 return(dissect_TransportLayerAddress(tvb, ie_tree, &offset, &bitoffset));
2428 dissect_IE_IuTransportAssociation(tvbuff_t *tvb, proto_tree *ie_tree)
2435 return(dissect_iuTransportAssociation(tvb, ie_tree, &offset, &bitoffset));
2442 dissect_IE_Cause(tvbuff_t *tvb, proto_tree *ie_tree)
2449 return(dissect_cause(tvb, ie_tree, &offset, &bitoffset));
2456 dissect_IE_RAB_ReleasedItem_IuRelComp(tvbuff_t *tvb, proto_tree *ie_tree)
2458 proto_item *optionals_item = NULL;
2459 proto_tree *optionals_tree = NULL;
2460 int extension_present;
2461 int dl_GTP_PDU_SequenceNumber_present;
2462 int ul_GTP_PDU_SequenceNumber_present;
2463 int iE_Extensions_present;
2470 /* create subtree for extension/optional/default bitmap */
2471 optionals_item = proto_tree_add_text(ie_tree, tvb, offset, 1,
2472 "RAB_ReleasedItem_IuRelComp Extension/Optional/Default bitmap");
2473 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
2475 /* protocol_extension present ? */
2476 extension_present = extract_nbits(tvb, offset, bitoffset, 1);
2477 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
2478 offset, bitoffset, 1, 0);
2479 proceed_nbits(&offset, &bitoffset, 1);
2481 /* dl_GTP_PDU_SequenceNumber present ? */
2482 dl_GTP_PDU_SequenceNumber_present = extract_nbits(tvb, offset, bitoffset, 1);
2483 proto_tree_add_uint_bits(optionals_tree, hf_ranap_dl_GTP_PDU_SequenceNumber_present, tvb,
2484 offset, bitoffset, 1, 0);
2485 proceed_nbits(&offset, &bitoffset, 1);
2487 /* ul_GTP_PDU_SequenceNumber present ? */
2488 ul_GTP_PDU_SequenceNumber_present = extract_nbits(tvb, offset, bitoffset, 1);
2489 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ul_GTP_PDU_SequenceNumber_present, tvb,
2490 offset, bitoffset, 1, 0);
2491 proceed_nbits(&offset, &bitoffset, 1);
2493 /* iE_Extensions_present present ? */
2494 iE_Extensions_present = extract_nbits(tvb, offset, bitoffset, 1);
2495 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present, tvb,
2496 offset, bitoffset, 1, 0);
2497 proceed_nbits(&offset, &bitoffset, 1);
2501 proto_tree_add_uint_bits(ie_tree, hf_ranap_rab_id,
2502 tvb, offset, bitoffset, 8, 0);
2503 proceed_nbits(&offset, &bitoffset, 8);
2505 /* dl-GTP-PDU-SequenceNumber */
2506 if (dl_GTP_PDU_SequenceNumber_present)
2508 allign(&offset, &bitoffset);
2509 proto_tree_add_item(ie_tree, hf_ranap_dl_GTP_PDU_SequenceNumber, tvb, offset, 2, FALSE);
2513 /* ul-GTP-PDU-SequenceNumber */
2514 if (ul_GTP_PDU_SequenceNumber_present)
2516 allign(&offset, &bitoffset);
2517 proto_tree_add_item(ie_tree, hf_ranap_ul_GTP_PDU_SequenceNumber, tvb, offset, 2, FALSE);
2522 if (iE_Extensions_present)
2524 if ((ret=dissect_iE_Extension(tvb, ie_tree, &offset, &bitoffset, "RAB_ReleasedItem_IuRelComp")) != 0)
2528 /* protocol extended */
2529 if (extension_present)
2531 /* extended sequence */
2532 /* decoding is not supported */
2533 proto_tree_add_text(ie_tree, tvb, offset, IE_PROTOCOL_EXTENSION_LENGTH,
2534 "Protocol extension for RAB_ReleasedItem_IuRelComp present, dissection not supported");
2543 dissect_IE_RAB_DataVolumeReportItem(tvbuff_t *tvb, proto_tree *ie_tree)
2545 proto_item *optionals_item = NULL;
2546 proto_tree *optionals_tree = NULL;
2547 int extension_present;
2548 int dl_UnsuccessfullyTransmittedDataVolume_present;
2549 int iE_Extensions_present;
2556 /* create subtree for extension/optional/default bitmap */
2557 optionals_item = proto_tree_add_text(ie_tree, tvb, offset, 1,
2558 "RAB_DataVolumeReportItem Extension/Optional/Default bitmap");
2559 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
2561 /* protocol_extension present ? */
2562 extension_present = extract_nbits(tvb, offset, bitoffset, 1);
2563 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
2564 offset, bitoffset, 1, 0);
2565 proceed_nbits(&offset, &bitoffset, 1);
2567 /* dl_UnsuccessfullyTransmittedDataVolume present ? */
2568 dl_UnsuccessfullyTransmittedDataVolume_present = extract_nbits(tvb, offset, bitoffset, 1);
2569 proto_tree_add_uint_bits(optionals_tree, hf_ranap_dl_UnsuccessfullyTransmittedDataVolume_present, tvb,
2570 offset, bitoffset, 1, 0);
2571 proceed_nbits(&offset, &bitoffset, 1);
2573 /* iE_Extensions_present present ? */
2574 iE_Extensions_present = extract_nbits(tvb, offset, bitoffset, 1);
2575 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present, tvb,
2576 offset, bitoffset, 1, 0);
2577 proceed_nbits(&offset, &bitoffset, 1);
2581 proto_tree_add_uint_bits(ie_tree, hf_ranap_rab_id,
2582 tvb, offset, bitoffset, 8, 0);
2583 proceed_nbits(&offset, &bitoffset, 8);
2585 /* dl_UnsuccessfullyTransmittedDataVolume */
2586 if (dl_UnsuccessfullyTransmittedDataVolume_present)
2589 if ((ret = dissect_dataVolumeList(tvb, ie_tree, &offset, &bitoffset,
2590 "dl_UnsuccessfullyTransmittedDataVolume")) != 0)
2595 if (iE_Extensions_present)
2597 if ((ret=dissect_iE_Extension(tvb, ie_tree, &offset, &bitoffset, "IE_RAB_DataVolumeReportItem")) != 0)
2601 /* protocol extended */
2602 if (extension_present)
2605 /* decoding is not supported */
2606 proto_tree_add_text(ie_tree, tvb, offset, IE_PROTOCOL_EXTENSION_LENGTH,
2607 "Protocol extension for IE_RAB_DataVolumeReportItem present, dissection not supported");
2616 dissect_IE_RAB_SetupOrModifyItemSecond(tvbuff_t *tvb, proto_tree *ie_tree)
2618 proto_item *optionals_item = NULL;
2619 proto_tree *optionals_tree = NULL;
2620 int extension_present;
2622 int pDP_TypeInformation_present;
2623 int dataVolumeReportingIndication_present;
2624 int dl_GTP_PDU_SequenceNumber_present;
2625 int ul_GTP_PDU_SequenceNumber_present;
2626 int dl_N_PDU_SequenceNumber_present;
2627 int ul_N_PDU_SequenceNumber_present;
2628 int iE_Extensions_present;
2637 /* create subtree for extension/optional/default bitmap */
2638 optionals_item = proto_tree_add_text(ie_tree, tvb, offset, 1,
2639 "SetupOrModifyItemSecond Extension/Optional/Default bitmap");
2640 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
2642 /* protocol_extension present ? */
2643 extension_present = extract_nbits(tvb, offset, bitoffset, 1);
2644 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
2645 offset, bitoffset, 1, 0);
2646 proceed_nbits(&offset, &bitoffset, 1);
2648 /* pDP_TypeInformation present ? */
2649 pDP_TypeInformation_present = extract_nbits(tvb, offset, bitoffset, 1);
2650 proto_tree_add_uint_bits(optionals_tree, hf_ranap_pDP_TypeInformation_present, tvb,
2651 offset, bitoffset, 1, 0);
2652 proceed_nbits(&offset, &bitoffset, 1);
2654 /* dataVolumeReportingIndication present ? */
2655 dataVolumeReportingIndication_present = extract_nbits(tvb, offset, bitoffset, 1);
2656 proto_tree_add_uint_bits(optionals_tree, hf_ranap_dataVolumeReportingIndication_present, tvb,
2657 offset, bitoffset, 1, 0);
2658 proceed_nbits(&offset, &bitoffset, 1);
2660 /* dl_GTP_PDU_SequenceNumber present present ? */
2661 dl_GTP_PDU_SequenceNumber_present = extract_nbits(tvb, offset, bitoffset, 1);
2662 proto_tree_add_uint_bits(optionals_tree, hf_ranap_dl_GTP_PDU_SequenceNumber_present, tvb,
2663 offset, bitoffset, 1, 0);
2664 proceed_nbits(&offset, &bitoffset, 1);
2667 /* ul_GTP_PDU_SequenceNumber present ? */
2668 ul_GTP_PDU_SequenceNumber_present = extract_nbits(tvb, offset, bitoffset, 1);
2669 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ul_GTP_PDU_SequenceNumber_present, tvb,
2670 offset, bitoffset, 1, 0);
2671 proceed_nbits(&offset, &bitoffset, 1);
2673 /* dl_N_PDU_SequenceNumber present ? */
2674 dl_N_PDU_SequenceNumber_present = extract_nbits(tvb, offset, bitoffset, 1);
2675 proto_tree_add_uint_bits(optionals_tree, hf_ranap_dl_N_PDU_SequenceNumber_present, tvb,
2676 offset, bitoffset, 1, 0);
2677 proceed_nbits(&offset, &bitoffset, 1);
2679 /* ul_N_PDU_SequenceNumber present ? */
2680 ul_N_PDU_SequenceNumber_present = extract_nbits(tvb, offset, bitoffset, 1);
2681 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ul_N_PDU_SequenceNumber_present, tvb,
2682 offset, bitoffset, 1, 0);
2683 proceed_nbits(&offset, &bitoffset, 1);
2685 /* iE_Extensions present ? */
2686 iE_Extensions_present = extract_nbits(tvb, offset, bitoffset, 1);
2687 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present, tvb,
2688 offset, bitoffset, 1, 0);
2689 proceed_nbits(&offset, &bitoffset, 1);
2691 /* pDP-TypeInformation */
2692 if (pDP_TypeInformation_present)
2694 tmp_byte = extract_nbits(tvb, offset, bitoffset, 1) + 1; /* Sequence 1..2 */
2695 proceed_nbits(&offset, &bitoffset, 1);
2696 for (i=1; i<=tmp_byte; i++)
2698 tmp_extension = extract_nbits(tvb, offset, bitoffset, 1);
2699 proceed_nbits(&offset, &bitoffset, 1);
2700 if (tmp_extension != 0)
2703 /* decoding is not supported */
2704 proto_tree_add_text(ie_tree, tvb, offset, IE_PROTOCOL_EXTENSION_LENGTH,
2705 "Protocol extension for PDP-Type present, dissection not supported");
2709 proto_tree_add_uint_bits(ie_tree, hf_ranap_PDP_Type, tvb,
2710 offset, bitoffset, 3, 0);
2711 proceed_nbits(&offset, &bitoffset, 3);
2715 /* dataVolumeReportingIndication */
2716 if (dataVolumeReportingIndication_present)
2718 proto_tree_add_uint_bits(ie_tree, hf_ranap_dataVolumeReportingIndication, tvb,
2719 offset, bitoffset, 1, 0);
2720 proceed_nbits(&offset, &bitoffset, 1);
2723 /* dl-GTP-PDU-SequenceNumber */
2724 if (dl_GTP_PDU_SequenceNumber_present)
2726 allign(&offset, &bitoffset);
2727 proto_tree_add_item(ie_tree, hf_ranap_dl_GTP_PDU_SequenceNumber, tvb, offset, 2, FALSE);
2731 /* ul-GTP-PDU-SequenceNumber */
2732 if (ul_GTP_PDU_SequenceNumber_present)
2734 allign(&offset, &bitoffset);
2735 proto_tree_add_item(ie_tree, hf_ranap_ul_GTP_PDU_SequenceNumber, tvb, offset, 2, FALSE);
2739 /* dl-N-PDU-SequenceNumber */
2740 if (dl_N_PDU_SequenceNumber_present)
2742 allign(&offset, &bitoffset);
2743 proto_tree_add_item(ie_tree, hf_ranap_dl_N_PDU_SequenceNumber, tvb, offset, 2, FALSE);
2747 /* ul-N-PDU-SequenceNumber */
2748 if (ul_N_PDU_SequenceNumber_present)
2750 allign(&offset, &bitoffset);
2751 proto_tree_add_item(ie_tree, hf_ranap_ul_N_PDU_SequenceNumber, tvb, offset, 2, FALSE);
2756 if (iE_Extensions_present)
2758 if ((ret=dissect_iE_Extension(tvb, ie_tree, &offset, &bitoffset, "SetupOrModifyItemSecond")) != 0)
2762 /* protocol extended */
2763 if (extension_present)
2766 /* decoding is not supported */
2767 proto_tree_add_text(ie_tree, tvb, offset, IE_PROTOCOL_EXTENSION_LENGTH,
2768 "Protocol extension for SetupOrModifyItemSecond present, dissection not supported");
2777 dissect_IE_RAB_SetupOrModifiedItem (tvbuff_t *tvb, proto_tree *ie_tree)
2779 proto_item *optionals_item = NULL;
2780 proto_tree *optionals_tree = NULL;
2782 int extension_present;
2783 int transportLayerAddress_present;
2784 int iuTransportAssociation_present;
2785 int dl_dataVolumes_present;
2786 int iE_Extensions_present;
2793 /* create subtree for extension/optional/default bitmap */
2794 optionals_item = proto_tree_add_text(ie_tree, tvb, offset, 1,
2795 "RAB-SetupOrModifiedItem Extension/Optional/Default bitmap");
2796 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
2798 /* protocol_extension present ? */
2799 extension_present = extract_nbits(tvb, offset, bitoffset, 1);
2800 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
2801 offset, bitoffset, 1, 0);
2802 proceed_nbits(&offset, &bitoffset, 1);
2804 /* transportLayerAddress present ? */
2805 transportLayerAddress_present = extract_nbits(tvb, offset, bitoffset, 1);
2806 proto_tree_add_uint_bits(optionals_tree, hf_ranap_transportLayerAddress_present, tvb,
2807 offset, bitoffset, 1, 0);
2808 proceed_nbits(&offset, &bitoffset, 1);
2810 /* iuTransportAssociation present ? */
2811 iuTransportAssociation_present = extract_nbits(tvb, offset, bitoffset, 1);
2812 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iuTransportAssociation_present, tvb,
2813 offset, bitoffset, 1, 0);
2814 proceed_nbits(&offset, &bitoffset, 1);
2816 /* dl_dataVolumes present ? */
2817 dl_dataVolumes_present = extract_nbits(tvb, offset, bitoffset, 1);
2818 proto_tree_add_uint_bits(optionals_tree, hf_ranap_dl_dataVolumes_present, tvb,
2819 offset, bitoffset, 1, 0);
2820 proceed_nbits(&offset, &bitoffset, 1);
2822 /* iE_Extensions present ? */
2823 iE_Extensions_present = extract_nbits(tvb, offset, bitoffset, 1);
2824 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present, tvb,
2825 offset, bitoffset, 1, 0);
2826 proceed_nbits(&offset, &bitoffset, 1);
2830 proto_tree_add_uint_bits(ie_tree, hf_ranap_rab_id,
2831 tvb, offset, bitoffset, 8, 0);
2832 proceed_nbits(&offset, &bitoffset, 8);
2834 /* transportLayerAddress */
2835 if (transportLayerAddress_present)
2837 if ((ret=dissect_TransportLayerAddress(tvb, ie_tree, &offset, &bitoffset)) != 0)
2841 /* iuTransportAssociation */
2842 if (iuTransportAssociation_present)
2844 if ((ret=dissect_iuTransportAssociation(tvb, ie_tree, &offset, &bitoffset)) != 0)
2848 /* dl-dataVolumes */
2849 if (dl_dataVolumes_present)
2851 if ((ret = dissect_dataVolumeList(tvb, ie_tree, &offset, &bitoffset,
2852 "dl-dataVolumes")) != 0)
2857 if (iE_Extensions_present)
2859 if ((ret=dissect_iE_Extension(tvb, ie_tree, &offset, &bitoffset, "RAB_SetupOrModifiedItem")) != 0)
2863 /* protocol extended */
2864 if (extension_present)
2866 /* extended sequence */
2867 /* decoding is not supported */
2868 proto_tree_add_text(ie_tree, tvb, offset, IE_PROTOCOL_EXTENSION_LENGTH,
2869 "Protocol extension for RAB_SetupOrModifiedItem present, dissection not supported");
2879 dissect_IE_RAB_SetupOrModifyItemFirst (tvbuff_t *tvb, proto_tree *ie_tree)
2883 proto_item *optionals_item = NULL;
2884 proto_tree *optionals_tree = NULL;
2885 int extension_present;
2886 int nAS_SynchronisationIndicator_present;
2887 int rAB_Parameters_present;
2888 int userPlaneInformation_present;
2889 int transportLayerInformation_present;
2890 int service_Handover_present;
2891 int iE_Extensions_present;
2892 int tmp_extension_present;
2897 offset = 0; bitoffset = 0;
2899 /* create subtree for extension/optional/default bitmap */
2900 optionals_item = proto_tree_add_text(ie_tree, tvb, offset,IE_PROTOCOL_EXTENSION_LENGTH,
2901 "RAB_SetupOrModifyItemFirst Extension/Optional/Default bitmap");
2902 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
2904 /* protocol extension present ? */
2905 extension_present = extract_nbits(tvb, offset, bitoffset, 1);
2906 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension,
2907 tvb, offset, bitoffset, 1, 0);
2908 proceed_nbits(&offset, &bitoffset, 1);
2910 /* nAS_SynchronisationIndicator present ? */
2911 nAS_SynchronisationIndicator_present = extract_nbits(tvb, offset, bitoffset, 1);
2912 proto_tree_add_uint_bits(optionals_tree, hf_ranap_nAS_SynchronisationIndicator_present,
2913 tvb, offset, bitoffset, 1, 0);
2914 proceed_nbits(&offset, &bitoffset, 1);
2916 /* rAB_Parameters present ? */
2917 rAB_Parameters_present = extract_nbits(tvb, offset, bitoffset, 1);
2918 proto_tree_add_uint_bits(optionals_tree, hf_ranap_rAB_Parameters_present,
2919 tvb, offset, bitoffset, 1, 0);
2920 proceed_nbits(&offset, &bitoffset, 1);
2922 /* userPlaneInformation present ? */
2923 userPlaneInformation_present = extract_nbits(tvb, offset, bitoffset, 1);
2924 proto_tree_add_uint_bits(optionals_tree, hf_ranap_userPlaneInformation_present,
2925 tvb, offset, bitoffset, 1, 0);
2926 proceed_nbits(&offset, &bitoffset, 1);
2928 /* transportLayerInformation present ? */
2929 transportLayerInformation_present = extract_nbits(tvb, offset, bitoffset, 1);
2930 proto_tree_add_uint_bits(optionals_tree, hf_ranap_transportLayerInformation_present,
2931 tvb, offset, bitoffset, 1, 0);
2932 proceed_nbits(&offset, &bitoffset, 1);
2934 /* service_Handover present ? */
2935 service_Handover_present = extract_nbits(tvb, offset, bitoffset, 1);
2936 proto_tree_add_uint_bits(optionals_tree, hf_ranap_service_Handover_present,
2937 tvb, offset, bitoffset, 1, 0);
2938 proceed_nbits(&offset, &bitoffset, 1);
2940 /* iE_Extensions present ? */
2941 iE_Extensions_present = extract_nbits(tvb, offset, bitoffset, 1);
2942 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present,
2943 tvb, offset, bitoffset, 1, 0);
2944 proceed_nbits(&offset, &bitoffset, 1);
2948 proto_tree_add_uint_bits(ie_tree, hf_ranap_rab_id,
2949 tvb, offset, bitoffset, 8, 0);
2950 proceed_nbits(&offset, &bitoffset, 8);
2952 /* nAS-SynchronisationIndicator */
2953 if (nAS_SynchronisationIndicator_present)
2955 proto_tree_add_uint_bits(ie_tree, hf_ranap_nAS_SynchronisationIndicator,
2956 tvb, offset, bitoffset, 4, 0);
2957 proceed_nbits(&offset, &bitoffset, 4);
2960 /* rAB-Parameters */
2961 if (rAB_Parameters_present)
2963 if ((ret=dissect_rAB_Parameters(tvb, ie_tree, &offset, &bitoffset)) != 0)
2967 /* userPlaneInformation */
2968 if (userPlaneInformation_present)
2970 if ((ret=dissect_userPlaneInformation(tvb, ie_tree, &offset, &bitoffset)) != 0)
2974 /* transportLayerInformation */
2975 if (transportLayerInformation_present)
2977 if ((ret=dissect_transportLayerInformation(tvb, ie_tree, &offset, &bitoffset)) != 0)
2981 /* service_Handover */
2982 if (service_Handover_present)
2984 tmp_extension_present = extract_nbits(tvb, offset, bitoffset, 1);
2985 proceed_nbits(&offset, &bitoffset, 1);
2987 if (tmp_extension_present)
2990 /* decoding is not supported */
2991 proto_tree_add_text(ie_tree, tvb, offset, IE_PROTOCOL_EXTENSION_LENGTH,
2992 "Protocol extension for service_Handover present, dissection not supported");
2996 proto_tree_add_uint_bits(ie_tree, hf_ranap_service_Handover,
2997 tvb, offset, bitoffset, 2, 0);
2998 proceed_nbits(&offset, &bitoffset, 2);
3002 if (iE_Extensions_present)
3004 if ((ret=dissect_iE_Extension(tvb, ie_tree, &offset, &bitoffset, "SetupOrModifyItemFirst" )) != 0)
3014 dissect_IE_RAB_ReleaseItem(tvbuff_t *tvb, proto_tree *ie_tree)
3016 proto_item *optionals_item = NULL;
3017 proto_tree *optionals_tree = NULL;
3020 int extension_present;
3021 int iE_Extensions_present;
3025 /* create subtree for extension/optional/default bitmap */
3026 optionals_item = proto_tree_add_text(ie_tree, tvb, offset,IE_PROTOCOL_EXTENSION_LENGTH,
3027 "RAB_ReleaseItem Extension/Optional/Default bitmap");
3028 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
3030 /* protocol extension present ? */
3031 extension_present = extract_nbits(tvb, offset, bitoffset, 1);
3032 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension,
3033 tvb, offset, bitoffset, 1, 0);
3034 proceed_nbits(&offset, &bitoffset, 1);
3037 /* iE_Extensions present ? */
3038 iE_Extensions_present = extract_nbits(tvb, offset, bitoffset, 1);
3039 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present,
3040 tvb, offset, bitoffset, 1, 0);
3041 proceed_nbits(&offset, &bitoffset, 1);
3045 proto_tree_add_uint_bits(ie_tree, hf_ranap_rab_id,
3046 tvb, offset, bitoffset, 8, 0);
3047 proceed_nbits(&offset, &bitoffset, 8);
3051 if ((ret=dissect_cause(tvb, ie_tree, &offset, &bitoffset)) != 0)
3055 if (iE_Extensions_present)
3057 if ((ret=dissect_iE_Extension(tvb, ie_tree, &offset, &bitoffset, "RAB_ReleasedItem")) != 0)
3061 /* protocol extended */
3062 if (extension_present)
3064 /* extended sequence */
3065 /* decoding is not supported */
3066 proto_tree_add_text(ie_tree, tvb, offset, IE_PROTOCOL_EXTENSION_LENGTH,
3067 "Protocol extension for RAB_ReleasedItem present, dissection not supported");
3076 dissect_IE_RAB_ReleasedItem (tvbuff_t *tvb, proto_tree *ie_tree)
3078 proto_item *optionals_item = NULL;
3079 proto_tree *optionals_tree = NULL;
3081 int extension_present;
3082 int dl_dataVolumes_present;
3083 int dl_GTP_PDU_SequenceNumber_present;
3084 int ul_GTP_PDU_SequenceNumber_present;
3085 int iE_Extensions_present;
3091 /* create subtree for extension/optional/default bitmap */
3092 optionals_item = proto_tree_add_text(ie_tree, tvb, offset, 1,
3093 "RAB-ReleasedItem Extension/Optional/Default bitmap");
3094 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
3096 /* protocol_extension present ? */
3097 extension_present = extract_nbits(tvb, offset, bitoffset, 1);
3098 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
3099 offset, bitoffset, 1, 0);
3100 proceed_nbits(&offset, &bitoffset, 1);
3102 /* dl_dataVolumes present ? */
3103 dl_dataVolumes_present = extract_nbits(tvb, offset, bitoffset, 1);
3104 proto_tree_add_uint_bits(optionals_tree, hf_ranap_dl_dataVolumes_present, tvb,
3105 offset, bitoffset, 1, 0);
3106 proceed_nbits(&offset, &bitoffset, 1);
3108 /* dL_GTP_PDU_SequenceNumber present ? */
3109 dl_GTP_PDU_SequenceNumber_present = extract_nbits(tvb, offset, bitoffset, 1);
3110 proto_tree_add_uint_bits(optionals_tree, hf_ranap_dl_GTP_PDU_SequenceNumber_present,
3111 tvb, offset, bitoffset, 1, 0);
3112 proceed_nbits(&offset, &bitoffset, 1);
3114 /* uL_GTP_PDU_SequenceNumber present ? */
3115 ul_GTP_PDU_SequenceNumber_present = extract_nbits(tvb, offset, bitoffset, 1);
3116 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ul_GTP_PDU_SequenceNumber_present,
3117 tvb, offset, bitoffset, 1, 0);
3118 proceed_nbits(&offset, &bitoffset, 1);
3120 /* iE_Extensions present ? */
3121 iE_Extensions_present = extract_nbits(tvb, offset, bitoffset, 1);
3122 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present,
3123 tvb, offset, bitoffset, 1, 0);
3124 proceed_nbits(&offset, &bitoffset, 1);
3127 proto_tree_add_uint_bits(ie_tree, hf_ranap_rab_id,
3128 tvb, offset, bitoffset, 8, 0);
3129 proceed_nbits(&offset, &bitoffset, 8);
3131 /* dl-dataVolumes */
3132 if (dl_dataVolumes_present)
3134 if ((ret=dissect_dataVolumeList(tvb, ie_tree, &offset, &bitoffset,
3135 "dl-dataVolumes")) != 0)
3139 /* dL-GTP-PDU-SequenceNumber */
3140 if (dl_GTP_PDU_SequenceNumber_present)
3142 allign(&offset, &bitoffset);
3143 proto_tree_add_item(ie_tree, hf_ranap_dl_GTP_PDU_SequenceNumber, tvb, offset, 2, FALSE);
3147 /* uL-GTP-PDU-SequenceNumber */
3148 if (ul_GTP_PDU_SequenceNumber_present)
3150 allign(&offset, &bitoffset);
3151 proto_tree_add_item(ie_tree, hf_ranap_ul_GTP_PDU_SequenceNumber, tvb, offset, 2, FALSE);
3156 if (iE_Extensions_present)
3158 if ((ret=dissect_iE_Extension(tvb, ie_tree, &offset, &bitoffset, "UserPlaneInformation")) != 0)
3162 /* protocol extended */
3163 if (extension_present)
3165 /* extended sequence */
3166 /* decoding is not supported */
3167 proto_tree_add_text(ie_tree, tvb, offset, IE_PROTOCOL_EXTENSION_LENGTH,
3168 "Protocol extension for RAB_ReleasedItem present, dissection not supported");
3178 dissect_IE_RAB_QueuedItem (tvbuff_t *tvb, proto_tree *ie_tree)
3180 proto_item *optionals_item = NULL;
3181 proto_tree *optionals_tree = NULL;
3183 int extension_present;
3184 int iE_Extensions_present;
3191 /* create subtree for extension/optional/default bitmap */
3192 optionals_item = proto_tree_add_text(ie_tree, tvb, offset, 1,
3193 "RAB-QueuedItem Extension/Optional/Default bitmap");
3194 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
3196 /* protocol_extension present ? */
3197 extension_present = extract_nbits(tvb, offset, bitoffset, 1);
3198 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
3199 offset, bitoffset, 1, 0);
3200 proceed_nbits(&offset, &bitoffset, 1);
3202 /* iE_Extensions present ? */
3203 iE_Extensions_present = extract_nbits(tvb, offset, bitoffset, 1);
3204 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present,
3205 tvb, offset, bitoffset, 1, 0);
3206 proceed_nbits(&offset, &bitoffset, 1);
3209 proto_tree_add_uint_bits(ie_tree, hf_ranap_rab_id,
3210 tvb, offset, bitoffset, 8, 0);
3211 proceed_nbits(&offset, &bitoffset, 8);
3214 if (iE_Extensions_present)
3216 if ((ret=dissect_iE_Extension(tvb, ie_tree, &offset, &bitoffset, "RAB_QueuedItem" )) != 0 )
3220 /* protocol extended */
3221 if (extension_present)
3223 /* extended sequence */
3224 /* decoding is not supported */
3225 proto_tree_add_text(ie_tree, tvb, offset, IE_PROTOCOL_EXTENSION_LENGTH,
3226 "Protocol extension for RAB_QueuedItem present, dissection not supported");
3236 dissect_IE_RAB_FailedItem(tvbuff_t *tvb, proto_tree *ie_tree)
3238 proto_item *optionals_item = NULL;
3239 proto_tree *optionals_tree = NULL;
3241 int extension_present;
3242 int iE_Extensions_present;
3248 /* create subtree for extension/optional/default bitmap */
3249 optionals_item = proto_tree_add_text(ie_tree, tvb, offset, 1,
3250 "RAB-FailedItem Extension/Optional/Default bitmap");
3251 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
3253 /* protocol_extension present ? */
3254 extension_present = extract_nbits(tvb, offset, bitoffset, 1);
3255 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
3256 offset, bitoffset, 1, 0);
3257 proceed_nbits(&offset, &bitoffset, 1);
3259 /* iE_Extensions present ? */
3260 iE_Extensions_present = extract_nbits(tvb, offset, bitoffset, 1);
3261 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present,
3262 tvb, offset, bitoffset, 1, 0);
3263 proceed_nbits(&offset, &bitoffset, 1);
3266 proto_tree_add_uint_bits(ie_tree, hf_ranap_rab_id,
3267 tvb, offset, bitoffset, 8, 0);
3268 proceed_nbits(&offset, &bitoffset, 8);
3271 if ((ret=dissect_cause(tvb, ie_tree, &offset, &bitoffset)) != 0)
3275 if (iE_Extensions_present)
3277 if ((ret=dissect_iE_Extension(tvb, ie_tree, &offset, &bitoffset, "RAB-FailedItem")) != 0)
3282 /* protocol extended */
3283 if (extension_present)
3285 /* extended sequence */
3286 /* decoding is not supported */
3287 proto_tree_add_text(ie_tree, tvb, offset, IE_PROTOCOL_EXTENSION_LENGTH,
3288 "Protocol extension for RAB-FailedItem present, dissection not supported");
3297 dissect_IE_CriticalityDiagnostics(tvbuff_t *tvb, proto_tree *ie_tree)
3300 proto_item *optionals_item = NULL;
3301 proto_tree *optionals_tree = NULL;
3303 int extension_present;
3304 int procedureCode_present;
3305 int triggeringMessage_present;
3306 int procedureCriticality_present;
3307 int iEsCriticalityDiagnostics_present;
3308 int iE_Extensions_present;
3315 /* create subtree for extension/optional/default bitmap */
3316 optionals_item = proto_tree_add_text(ie_tree, tvb, offset, 1,
3317 "IE-CriticalityDiagnostics Extension/Optional/Default bitmap");
3318 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
3320 /* protocol_extension present ? */
3321 extension_present = extract_nbits(tvb, offset, bitoffset, 1);
3322 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
3323 offset, bitoffset, 1, 0);
3324 proceed_nbits(&offset, &bitoffset, 1);
3326 /* procedureCode present ? */
3327 procedureCode_present = extract_nbits(tvb, offset, bitoffset, 1);
3328 proto_tree_add_uint_bits(optionals_tree, hf_ranap_procedureCode_present,
3329 tvb, offset, bitoffset, 1, 0);
3330 proceed_nbits(&offset, &bitoffset, 1);
3332 /* triggeringMessage present ? */
3333 triggeringMessage_present = extract_nbits(tvb, offset, bitoffset, 1);
3334 proto_tree_add_uint_bits(optionals_tree, hf_ranap_triggeringMessage_present,
3335 tvb, offset, bitoffset, 1, 0);
3336 proceed_nbits(&offset, &bitoffset, 1);
3338 /* procedureCriticality present ? */
3339 procedureCriticality_present = extract_nbits(tvb, offset, bitoffset, 1);
3340 proto_tree_add_uint_bits(optionals_tree, hf_ranap_procedureCriticality_present,
3341 tvb, offset, bitoffset, 1, 0);
3342 proceed_nbits(&offset, &bitoffset, 1);
3344 /* iEsCriticalityDiagnostics present ? */
3345 iEsCriticalityDiagnostics_present = extract_nbits(tvb, offset, bitoffset, 1);
3346 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iEsCriticalityDiagnostics_present,
3347 tvb, offset, bitoffset, 1, 0);
3348 proceed_nbits(&offset, &bitoffset, 1);
3350 /* iE_Extensions present ? */
3351 iE_Extensions_present = extract_nbits(tvb, offset, bitoffset, 1);
3352 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present,
3353 tvb, offset, bitoffset, 1, 0);
3354 proceed_nbits(&offset, &bitoffset, 1);
3358 if (procedureCode_present)
3360 allign (&offset, &bitoffset);
3361 proto_tree_add_item(ie_tree, hf_ranap_procedure_code, tvb, offset, 1, FALSE);
3365 /* triggeringMessage */
3366 if (triggeringMessage_present)
3368 proto_tree_add_uint_bits(ie_tree, hf_ranap_triggeringMessage,
3369 tvb, offset, bitoffset, 2, 0);
3370 proceed_nbits(&offset, &bitoffset, 2);
3373 /* procedureCriticality */
3374 if (procedureCriticality_present)
3376 proto_tree_add_uint_bits(ie_tree, hf_ranap_procedureCriticality,
3377 tvb, offset, bitoffset, 2, 0);
3378 proceed_nbits(&offset, &bitoffset, 2);
3381 /* iEsCriticalityDiagnostics */
3382 if (iEsCriticalityDiagnostics_present)
3384 if ((ret=dissect_iEsCriticalityDiagnostics(tvb, ie_tree, &offset, &bitoffset)) != 0)
3389 if (iE_Extensions_present)
3391 if ((ret=dissect_iE_Extension(tvb, ie_tree, &offset, &bitoffset, "IE_CriticalityDiagnostics")) != 0)
3396 /* protocol extended */
3397 if (extension_present)
3399 /* extended sequence */
3400 /* decoding is not supported */
3401 proto_tree_add_text(ie_tree, tvb, offset, IE_PROTOCOL_EXTENSION_LENGTH,
3402 "Protocol extension for IE CriticalityDiagnostics present, dissection not supported");
3411 dissect_unknown_IE(tvbuff_t *tvb, proto_tree *ie_tree)
3415 proto_tree_add_text(ie_tree, tvb, 0, -1,
3416 "IE Contents (dissection not implemented)");
3423 /*****************************************************************************/
3425 /* Dissecting Functions for IE Lists / Containers */
3427 /*****************************************************************************/
3430 dissect_RAB_IE_ContainerPairList(tvbuff_t *tvb, proto_tree *ie_tree)
3432 proto_item *rab_item = NULL;
3433 proto_tree *rab_tree = NULL;
3434 proto_item *ie_pair_item = NULL;
3435 proto_tree *ie_pair_tree = NULL;
3436 proto_item *first_value_item = NULL;
3437 proto_tree *first_value_tree = NULL;
3438 proto_item *second_value_item = NULL;
3439 proto_tree *second_value_tree = NULL;
3440 guint number_of_RABs, currentRAB;
3441 guint number_of_IEs, currentIE;
3442 gint number_of_octets_first, number_of_octets_second;
3443 gint number_of_octets_first_size, number_of_octets_second_size ;
3448 tvbuff_t *first_value_tvb;
3449 tvbuff_t *second_value_tvb;
3453 /* number of RABs in the list */
3454 number_of_RABs = 1 + tvb_get_guint8(tvb, offset);
3455 proto_tree_add_uint(ie_tree, hf_ranap_num_rabs,
3457 NUM_RABS_LENGTH, number_of_RABs);
3459 offset += NUM_RABS_LENGTH;
3461 /* do for each RAB */
3462 for (currentRAB=1; currentRAB<=number_of_RABs; currentRAB++)
3464 /* create subtree for RAB */
3465 rab_item = proto_tree_add_text(ie_tree, tvb, offset, 0, "%d. RAB", currentRAB);
3466 rab_tree = proto_item_add_subtree(rab_item, ett_ranap_rab);
3468 /* number of IE pairs for this RAB */
3469 number_of_IEs = tvb_get_ntohs(tvb, offset);
3470 proto_tree_add_uint(rab_tree, hf_ranap_number_of_ies_in_list,
3471 tvb, offset, 2, number_of_IEs);
3473 offset += 2; /*points now to beginning of first IE pair */
3475 /* do for each IE pair */
3476 for (currentIE=1; currentIE<=number_of_IEs; currentIE++)
3478 /* use tmp_offset to point to current field */
3479 tmp_offset = offset;
3481 ie_id = tvb_get_ntohs(tvb, tmp_offset);
3482 tmp_offset += IE_ID_LENGTH;
3484 tmp_offset += 1; /* skip first criticality byte */
3485 /* number of octets in first value */
3486 extract_length(tvb, tmp_offset, &number_of_octets_first, &number_of_octets_first_size);
3487 tmp_offset += number_of_octets_first_size + number_of_octets_first;
3489 tmp_offset += 1; /* skip second criticality byte */
3490 /* number of octets in second value */
3491 extract_length(tvb, tmp_offset, &number_of_octets_second, &number_of_octets_second_size);
3492 tmp_offset += number_of_octets_second_size + number_of_octets_second;
3494 /* create subtree for ie_pair */
3495 ie_pair_item = proto_tree_add_text(rab_tree, tvb, offset,
3496 tmp_offset - offset,
3498 val_to_str(ie_id, ranap_ie_id_values, "Unknown"),
3500 ie_pair_tree = proto_item_add_subtree(ie_pair_item, ett_ranap_ie_pair);
3502 /* add fields to ie pair subtee */
3503 /* use offset to point to current field */
3505 proto_tree_add_item(ie_pair_tree, hf_ranap_ie_ie_id, tvb, offset, IE_ID_LENGTH, FALSE);
3506 offset += IE_ID_LENGTH;
3508 /* first criticality */
3509 proto_tree_add_uint_bits(ie_pair_tree, hf_ranap_ie_pair_first_criticality, tvb,
3510 offset, bitoffset, 2, 0);
3511 proceed_nbits(&offset, &bitoffset, 2);
3513 /* number of octets in first value */
3514 allign(&offset, &bitoffset);
3515 if (number_of_octets_first != 0)
3517 proto_tree_add_uint(ie_pair_tree, hf_ranap_first_value_number_of_octets,
3519 number_of_octets_first_size,
3520 number_of_octets_first);
3524 /* decoding is not supported */
3525 proto_tree_add_text(ie_pair_tree, tvb, offset,
3526 2, "Number of Octets greater than 0x3FFF, dissection not supported");
3529 offset += number_of_octets_first_size;
3531 /* add subtree for first value */
3532 first_value_item = proto_tree_add_text(ie_pair_tree, tvb, offset,
3533 number_of_octets_first,
3535 val_to_str(ie_id, ranap_ie_id_values, "Unknown"));
3536 first_value_tree = proto_item_add_subtree(first_value_item, ett_ranap_ie_pair_first_value);
3538 /* create tvb containing first value */
3539 first_value_tvb = tvb_new_subset(tvb, offset, number_of_octets_first, number_of_octets_first);
3541 /* add fields of first value */
3544 case IE_RAB_SetupOrModifyItem:
3545 dissect_IE_RAB_SetupOrModifyItemFirst (first_value_tvb, first_value_tree);
3549 dissect_unknown_IE(first_value_tvb, first_value_tree);
3553 offset += number_of_octets_first;
3556 /* second criticality */
3557 proto_tree_add_uint_bits(ie_pair_tree, hf_ranap_ie_pair_second_criticality, tvb,
3558 offset, bitoffset, 2, 0);
3559 proceed_nbits(&offset, &bitoffset, 2);
3561 /* number of octets of second value */
3562 allign(&offset, &bitoffset);
3563 if (number_of_octets_second != 0)
3565 proto_tree_add_uint(ie_pair_tree, hf_ranap_second_value_number_of_octets,
3567 number_of_octets_second_size,
3568 number_of_octets_second);
3572 /* decoding is not supported */
3573 proto_tree_add_text(ie_pair_tree, tvb, offset,
3574 2, "Number of Octets greater than 0x3FFF, dissection not supported");
3577 offset += number_of_octets_second_size;
3579 /* add subtree for second value */
3580 second_value_item = proto_tree_add_text(ie_pair_tree, tvb, offset,
3581 number_of_octets_second,
3583 val_to_str(ie_id, ranap_ie_id_values, "Unknown"));
3584 second_value_tree = proto_item_add_subtree(second_value_item, ett_ranap_ie_pair_second_value);
3586 /* create tvb containing first value */
3587 second_value_tvb = tvb_new_subset(tvb, offset, number_of_octets_second, number_of_octets_second);
3589 /* add fields of second value */
3592 case IE_RAB_SetupOrModifyItem:
3593 dissect_IE_RAB_SetupOrModifyItemSecond (second_value_tvb, second_value_tree);
3597 dissect_unknown_IE(second_value_tvb, second_value_tree);
3601 offset += number_of_octets_second;
3603 }/* for each IE ... */
3604 }/* for each RAB ... */
3611 dissect_RAB_IE_ContainerList(tvbuff_t *tvb, proto_tree *list_tree)
3613 proto_item *rab_item = NULL;
3614 proto_tree *rab_tree = NULL;
3615 proto_item *ie_item = NULL;
3616 proto_tree *ie_tree = NULL;
3618 guint number_of_RABs, currentRAB;
3619 guint number_of_IEs, currentIE;
3620 gint ie_number_of_octets = 0;
3621 gint ie_number_of_octets_size = 0;
3625 gint ie_header_length;
3632 /* number of RABs in the list */
3633 number_of_RABs = 1 + tvb_get_guint8(tvb, offset);
3634 proto_tree_add_uint(list_tree, hf_ranap_num_rabs,
3636 NUM_RABS_LENGTH, number_of_RABs);
3638 offset += NUM_RABS_LENGTH;
3640 /* do for each RAB */
3641 for (currentRAB=1; currentRAB<=number_of_RABs; currentRAB++)
3643 /* create subtree for RAB */
3644 rab_item = proto_tree_add_text(list_tree, tvb, offset, 0, "%d. RAB", currentRAB);
3645 rab_tree = proto_item_add_subtree(rab_item, ett_ranap_rab);
3647 /* number of IEs for this RAB */
3648 number_of_IEs = tvb_get_ntohs(tvb, offset);
3649 proto_tree_add_uint(rab_tree, hf_ranap_number_of_ies_in_list,
3650 tvb, offset, 2, number_of_IEs);
3652 offset += 2; /*points now to beginning of first IE in list */
3655 /* do for each IE */
3656 for (currentIE=1; currentIE<=number_of_IEs; currentIE++)
3659 ie_id = tvb_get_ntohs(tvb, offset);
3660 offset += IE_ID_LENGTH;
3662 offset += IE_CRITICALITY_LENGTH; /* skip criticality byte */
3664 /* number of octets */
3665 extract_length(tvb, offset, &ie_number_of_octets, &ie_number_of_octets_size);
3666 ie_header_length = IE_ID_LENGTH + IE_CRITICALITY_LENGTH + ie_number_of_octets_size;
3668 /* reset offset to beginning of ie */
3671 /* create subtree for ie */
3672 ie_item = proto_tree_add_text(rab_tree, tvb, offset,
3673 ie_header_length + ie_number_of_octets,
3675 val_to_str(ie_id, ranap_ie_id_values, "Unknown"),
3677 ie_tree = proto_item_add_subtree(ie_item, ett_ranap_ie);
3680 proto_tree_add_item(ie_tree, hf_ranap_ie_ie_id, tvb,
3681 offset, IE_ID_LENGTH, FALSE);
3682 offset += IE_ID_LENGTH;
3685 proto_tree_add_uint_bits(ie_tree, hf_ranap_ie_criticality, tvb,
3686 offset, bitoffset, 2, 0);
3687 proceed_nbits(&offset, &bitoffset, 2);
3689 allign(&offset, &bitoffset);
3690 if (ie_number_of_octets != 0)
3692 proto_tree_add_uint(ie_tree, hf_ranap_ie_number_of_octets, tvb,
3693 offset, ie_number_of_octets_size, ie_number_of_octets);
3697 /* decoding is not supported */
3698 proto_tree_add_text(ie_tree, tvb, offset,
3699 0, "Number of Octets greater than 0x3FFF, dissection not supported");
3702 offset += ie_number_of_octets_size;
3705 /* create tvb containing ie */
3706 ie_tvb = tvb_new_subset(tvb, offset, ie_number_of_octets, ie_number_of_octets);
3708 /* add fields of ie */
3711 case IE_RAB_SetupOrModifiedItem:
3712 dissect_IE_RAB_SetupOrModifiedItem(ie_tvb, ie_tree);
3714 case IE_RAB_ReleaseItem:
3715 dissect_IE_RAB_ReleaseItem(ie_tvb, ie_tree);
3717 case IE_RAB_ReleasedItem:
3718 dissect_IE_RAB_ReleasedItem(ie_tvb, ie_tree);
3720 case IE_RAB_ReleasedItem_IuRelComp:
3721 dissect_IE_RAB_ReleasedItem_IuRelComp(ie_tvb, ie_tree);
3723 case IE_RAB_QueuedItem:
3724 dissect_IE_RAB_QueuedItem(ie_tvb, ie_tree);
3726 case IE_RAB_FailedItem:
3727 dissect_IE_RAB_FailedItem(ie_tvb, ie_tree);
3729 case IE_RAB_DataVolumeReportItem:
3730 dissect_IE_RAB_DataVolumeReportItem(ie_tvb, ie_tree);
3733 dissect_unknown_IE(ie_tvb, ie_tree);
3737 ie_offset += (ie_header_length + ie_number_of_octets);
3740 } /* for each RAB */
3747 dissect_ranap_ie(guint16 ie_id, tvbuff_t *ie_contents_tvb, proto_tree *ie_tree)
3749 /* call specific dissection function for ie contents */
3753 return(dissect_IE_RAB_ID(ie_contents_tvb, ie_tree));
3756 return(dissect_IE_NAS_PDU(ie_contents_tvb, ie_tree));
3759 return(dissect_IE_LAI(ie_contents_tvb, ie_tree));
3762 return(dissect_IE_RAC(ie_contents_tvb, ie_tree));
3765 return(dissect_IE_SAI(ie_contents_tvb, ie_tree));
3767 case IE_CN_DomainIndicator:
3768 return(dissect_IE_CN_DomainIndicator(ie_contents_tvb, ie_tree));
3771 return(dissect_IE_IuSigConId(ie_contents_tvb, ie_tree));
3774 return(dissect_IE_SAPI(ie_contents_tvb, ie_tree));
3776 case IE_TransportLayerAddress:
3777 return(dissect_IE_TransportLayerAddress(ie_contents_tvb, ie_tree));
3779 case IE_IuTransportAssociation:
3780 return(dissect_IE_IuTransportAssociation(ie_contents_tvb, ie_tree));
3782 case IE_RAB_SetupOrModifyList:
3783 return(dissect_RAB_IE_ContainerPairList(ie_contents_tvb, ie_tree));
3785 case IE_RAB_SetupOrModifiedList:
3786 case IE_RAB_ReleaseList:
3787 case IE_RAB_ReleasedList:
3788 case IE_RAB_QueuedList:
3789 case IE_RAB_FailedList:
3790 case IE_RAB_ReleaseFailedList:
3791 case IE_RAB_DataVolumeReportList:
3792 case IE_RAB_ReleasedList_IuRelComp:
3793 case IE_RAB_RelocationReleaseList:
3794 case IE_RAB_DataForwardingList:
3795 case IE_RAB_SetupList_RelocReq:
3796 case IE_RAB_SetupList_RelocReqAck:
3797 case IE_RAB_DataForwardingList_SRNS_CtxReq:
3798 case IE_RAB_ContextList:
3799 case IE_RAB_ContextFailedtoTransferList:
3800 case IE_RAB_DataVolumeReportRequestList:
3801 case IE_RAB_FailedtoReportList:
3802 case IE_RAB_ContextList_RANAP_RelocInf:
3803 return(dissect_RAB_IE_ContainerList(ie_contents_tvb, ie_tree));
3805 case IE_CriticalityDiagnostics:
3806 return(dissect_IE_CriticalityDiagnostics(ie_contents_tvb, ie_tree));
3809 return(dissect_IE_Cause(ie_contents_tvb, ie_tree));
3812 return(dissect_unknown_IE(ie_contents_tvb, ie_tree));
3819 dissect_ranap_ie_container(tvbuff_t *tvb, proto_tree *ranap_tree)
3821 proto_item *ie_item = NULL;
3822 proto_tree *ie_tree = NULL;
3823 proto_item *optionals_item = NULL;
3824 proto_tree *optionals_tree = NULL;
3826 int msg_extension_present;
3827 int ProtocolExtensionContainer_present;
3829 guint16 number_of_ies;
3831 gint ie_number_of_octets = 0;
3832 gint ie_number_of_octets_size = 0;
3833 guint16 ie_header_length;
3837 tvbuff_t *ie_contents_tvb;
3841 /* create subtree for extension/optional bitmap of message */
3842 optionals_item = proto_tree_add_text(ranap_tree, tvb, offset, 1,
3843 "Message Extension/Optional/Default bitmap");
3844 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
3847 /* msg_extension present ? */
3848 msg_extension_present = extract_nbits(tvb, offset, bitoffset, 1);
3852 proto_tree_add_uint_bits(optionals_tree, hf_ranap_msg_extension_present, tvb,
3853 offset, bitoffset, 1, 0);
3855 proceed_nbits(&offset, &bitoffset, 1);
3857 /* ProtocolExtensionContainer present ? */
3858 ProtocolExtensionContainer_present = extract_nbits(tvb, offset, bitoffset, 1);
3861 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ProtocolExtensionContainer_present,
3862 tvb, offset, bitoffset, 1, 0);
3864 proceed_nbits(&offset, &bitoffset, 1);
3867 /* extract ie container data */
3869 allign(&offset, &bitoffset);
3870 number_of_ies = tvb_get_ntohs(tvb, offset);
3873 proto_tree_add_uint(ranap_tree, hf_ranap_number_of_ies,
3874 tvb, offset, 2, number_of_ies);
3878 ie_offset = offset; /* ie_offset marks beginning of IE-Header */
3880 /* do the following for each IE in the PDU */
3881 for (i=1; i <= number_of_ies; i++)
3883 /* extract IE header fields which are needed even if no ranap tree exists*/
3885 ie_id = tvb_get_ntohs(tvb, offset);
3886 offset += IE_ID_LENGTH;
3888 /* number of octets in the IE */
3889 offset += IE_CRITICALITY_LENGTH; /* skip criticality byte */
3890 ie_number_of_octets = 0;
3891 extract_length(tvb, offset, &ie_number_of_octets, &ie_number_of_octets_size);
3892 ie_header_length = IE_ID_LENGTH + IE_CRITICALITY_LENGTH + ie_number_of_octets_size;
3896 offset = ie_offset; /* start from beginning of IE */
3897 /* create subtree for ie */
3898 ie_item = proto_tree_add_text(ranap_tree, tvb, offset,
3899 ie_header_length + ie_number_of_octets,
3901 val_to_str(ie_id, ranap_ie_id_values, "Unknown"),
3903 ie_tree = proto_item_add_subtree(ie_item, ett_ranap_ie);
3905 /* add fields to ie subtee */
3907 proto_tree_add_item(ie_tree, hf_ranap_ie_ie_id, tvb,
3908 offset, IE_ID_LENGTH, FALSE);
3909 offset += IE_ID_LENGTH;
3912 proto_tree_add_uint_bits(ie_tree, hf_ranap_ie_criticality, tvb,
3913 offset, bitoffset, 2, 0);
3914 proceed_nbits(&offset, &bitoffset, 2);
3916 /* number of octets */
3917 allign(&offset, &bitoffset);
3918 if (ie_number_of_octets != 0)
3920 proto_tree_add_uint(ie_tree, hf_ranap_ie_number_of_octets, tvb,
3921 offset, ie_number_of_octets_size, ie_number_of_octets);
3922 offset += ie_number_of_octets_size;
3926 /* decoding is not supported */
3927 proto_tree_add_text(ranap_tree, tvb, offset,
3928 2, "Number of Octets greater than 0x3FFF, dissection not supported");
3933 /* check if number_of_octets could be decoded */
3934 /* in case we skipped if (ranap_tree) {....} */
3935 if (ie_number_of_octets == 0) return (-1);
3937 /* create tvb containing the ie contents */
3938 ie_contents_tvb = tvb_new_subset(tvb, ie_offset + ie_header_length,
3939 ie_number_of_octets, ie_number_of_octets);
3941 /* call specific dissection function for ie contents */
3942 dissect_ranap_ie(ie_id, ie_contents_tvb, ie_tree);
3944 /* set ie_offset to beginning of next ie */
3945 ie_offset += (ie_header_length + ie_number_of_octets);
3949 /* protocol Extensions */
3950 if (ProtocolExtensionContainer_present)
3952 return(dissect_iE_Extension(tvb, ranap_tree, &offset, &bitoffset, "PDU"));
3961 dissect_ranap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
3963 proto_item *ranap_item = NULL;
3964 proto_tree *ranap_tree = NULL;
3966 guint procedure_code;
3968 gint number_of_octets = 0;
3969 gint number_of_octets_size = 0;
3971 gint tmp_offset = 0;
3973 gint tmp_bitoffset = 0;
3974 guint extension_present;
3979 /* make entry in the Protocol column on summary display */
3980 if (check_col(pinfo->cinfo, COL_PROTOCOL))
3981 col_set_str(pinfo->cinfo, COL_PROTOCOL, "RANAP");
3983 /* extract header fields which are needed even if no tree exists */
3985 /* protocol_extension present ? */
3986 extension_present = extract_nbits(tvb, tmp_offset, tmp_bitoffset, 1);
3987 proceed_nbits(&tmp_offset, &tmp_bitoffset, 1);
3988 if (extension_present)
3990 /* extended choice */
3991 /* decoding is not supported */
3992 col_append_str(pinfo->cinfo, COL_INFO, "RANAP-PDU Protocol extension present, dissection not supported");
3996 /* pdu_index choice 0..3 */
3997 pdu_index = extract_nbits(tvb, tmp_offset, tmp_bitoffset, 2);
3998 proceed_nbits(&tmp_offset, &tmp_bitoffset, 2);
4000 /* procedure code */
4001 allign(&tmp_offset, &tmp_bitoffset);
4002 procedure_code = tvb_get_guint8(tvb, tmp_offset);
4005 /* add Procedure Code to Info Column */
4006 if (check_col(pinfo->cinfo, COL_INFO))
4008 if (procedure_code <= PC_max)
4010 col_add_fstr(pinfo->cinfo, COL_INFO, "%s ",
4011 val_to_str(pdu_index, ranap_message_names[procedure_code],
4012 "unknown message"));
4016 /* extract number of octets */
4017 tmp_offset += 1; /* leave out criticality byte */
4018 extract_length(tvb, tmp_offset, &number_of_octets, &number_of_octets_size);
4020 /* In the interest of speed, if "tree" is NULL, don't do any work not
4021 necessary to generate protocol tree items. */
4024 /* create the ranap protocol tree */
4025 ranap_item = proto_tree_add_item(tree, proto_ranap, tvb, 0, -1, FALSE);
4026 ranap_tree = proto_item_add_subtree(ranap_item, ett_ranap);
4028 /* Add fields to ranap protocol tree */
4030 proceed_nbits(&offset, &bitoffset, 1); /* leave out extension bit, checked above */
4031 proto_tree_add_uint_bits(ranap_tree, hf_ranap_pdu_index, tvb,
4032 offset, bitoffset, 2, 0);
4033 proceed_nbits(&offset, &bitoffset, 2);
4036 /* Procedure Code */
4037 allign(&offset, &bitoffset);
4038 proto_tree_add_item(ranap_tree, hf_ranap_procedure_code, tvb, offset, 1, FALSE);
4041 /* PDU Criticality */
4042 proto_tree_add_uint_bits(ranap_tree, hf_ranap_pdu_criticality, tvb,
4043 offset, bitoffset, 2, 0);
4044 proceed_nbits(&offset, &bitoffset, 2);
4046 /* number of octets */
4047 allign(&offset, &bitoffset);
4048 if (number_of_octets != 0)
4050 proto_tree_add_uint(ranap_tree, hf_ranap_pdu_number_of_octets,
4052 number_of_octets_size, number_of_octets);
4053 offset += number_of_octets_size;
4057 /* decoding is not supported */
4058 proto_tree_add_text(ranap_tree, tvb, offset,
4059 2, "Number of Octets greater than 0x3FFF, dissection not supported");
4064 /* set offset to the beginning of ProtocolIE-Container */
4065 /* in case we skipped "if(tree){...}" above */
4066 offset = PDU_NUMBER_OF_OCTETS_OFFSET + number_of_octets_size;
4068 /* create a tvb containing the remainder of the PDU */
4069 ie_tvb = tvb_new_subset(tvb, offset, -1, -1);
4071 /* dissect the ies */
4072 dissect_ranap_ie_container(ie_tvb, ranap_tree);
4077 /*****************************************************************************/
4079 /* Protocol Registration Functions */
4081 /*****************************************************************************/
4084 proto_register_ranap(void)
4086 /* Setup list of header fields */
4087 static hf_register_info hf[] = {
4088 { &hf_ranap_pdu_index,
4089 { "RANAP-PDU Index",
4090 "ranap.ranap_pdu_index",
4091 FT_UINT8, BASE_HEX, VALS(&ranap_pdu_index_values), 0x0,
4094 { &hf_ranap_procedure_code,
4096 "ranap.procedure_code",
4097 FT_UINT8, BASE_DEC, VALS(&ranap_procedure_code_values), 0x0,
4100 { &hf_ranap_pdu_criticality,
4101 { "Criticality of PDU",
4102 "ranap.pdu.criticality",
4103 FT_UINT8, BASE_HEX, VALS(&ranap_criticality_values), 0x0,
4106 { &hf_ranap_pdu_number_of_octets,
4107 { "Number of Octets in PDU",
4108 "ranap.pdu.num_of_octets",
4109 FT_UINT16, BASE_DEC, NULL, 0x0,
4112 { &hf_ranap_ie_protocol_extension,
4113 { "Protocol Extension",
4114 "ranap.ie.protocol_extension_present",
4115 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4118 { &hf_ranap_number_of_ies,
4119 { "Number of IEs in PDU",
4120 "ranap.pdu.number_of_ies",
4121 FT_UINT16, BASE_DEC, NULL, 0x0,
4124 { &hf_ranap_number_of_ProtocolExtensionFields,
4125 { "Number of Protocol Extension Fields",
4126 "ranap.ie.number_of_ProtocolExtensionFields",
4127 FT_UINT16, BASE_DEC, NULL, 0x0,
4130 { &hf_ranap_number_of_ies_in_list,
4131 { "Number of IEs in list",
4132 "ranap.number_of_ies",
4133 FT_UINT16, BASE_DEC, NULL, 0x0,
4136 { &hf_ranap_ie_ie_id,
4139 FT_UINT16, BASE_DEC, VALS(&ranap_ie_id_values), 0x0,
4142 { &hf_ranap_ext_field_id,
4143 { "ProtocolExtensionField ID",
4144 "ranap.ie.ProtocolExtensionFields.Id",
4145 FT_UINT16, BASE_DEC, NULL, 0x0,
4148 { &hf_ranap_ie_criticality,
4149 { "Criticality of IE",
4150 "ranap.ie.criticality",
4151 FT_UINT8, BASE_HEX, VALS(&ranap_criticality_values), 0x0,
4154 { &hf_ranap_ext_field_criticality,
4155 { "Criticality of ProtocolExtensionField",
4156 "ranap.ie.ProtocolExtensionFields.criticality",
4157 FT_UINT8, BASE_HEX, VALS(&ranap_criticality_values), 0x0,
4160 { &hf_ranap_ie_pair_first_criticality,
4161 { "First Criticality",
4162 "ranap.ie_pair.first_criticality",
4163 FT_UINT8, BASE_HEX, VALS(&ranap_criticality_values), 0x0,
4166 { &hf_ranap_ie_pair_second_criticality,
4167 { "Second Criticality",
4168 "ranap.ie_pair.second_criticality",
4169 FT_UINT8, BASE_HEX, VALS(&ranap_criticality_values), 0x0,
4172 { &hf_ranap_ie_number_of_octets,
4173 { "Number of Octets in IE",
4174 "ranap.ie.number_of_octets",
4175 FT_UINT16, BASE_DEC, NULL, 0x0,
4178 { &hf_ranap_first_value_number_of_octets,
4179 { "Number of Octets in first value",
4180 "ranap.ie_pair.first_value.number_of_octets",
4181 FT_UINT16, BASE_DEC, NULL, 0x0,
4184 { &hf_ranap_second_value_number_of_octets,
4185 { "Number of Octets in second value",
4186 "ranap.ie_pair.second_value.number_of_octets",
4187 FT_UINT16, BASE_DEC, NULL, 0x0,
4193 FT_UINT8, BASE_HEX, NULL, 0x0,
4196 { &hf_ranap_nas_pdu,
4199 FT_BYTES, BASE_NONE, NULL, 0x0,
4202 { &hf_ranap_extension_field,
4203 { "Extension Field Value",
4204 "ranap.Extension_Field_Value",
4205 FT_BYTES, BASE_NONE, NULL, 0x0,
4208 { &hf_ranap_plmn_id,
4211 FT_BYTES, BASE_NONE, NULL, 0x0,
4217 FT_BYTES, BASE_NONE, NULL, 0x0,
4220 { &hf_ranap_plmn_id,
4223 FT_BYTES, BASE_NONE, NULL, 0x0,
4229 FT_BYTES, BASE_NONE, NULL, 0x0,
4235 FT_BYTES, BASE_NONE, NULL, 0x0,
4241 FT_BYTES, BASE_NONE, NULL, 0x0,
4244 { &hf_ranap_num_rabs,
4246 "ranap.number_of_RABs",
4247 FT_UINT8, BASE_DEC, NULL, 0x0,
4250 { &hf_ranap_nAS_SynchronisationIndicator_present,
4251 { "nAS-SynchronisationIndicator",
4252 "ranap.nAS-SynchronisationIndicator_present",
4253 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4256 { &hf_ranap_rAB_Parameters_present,
4258 "ranap.rAB_Parameters_present",
4259 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4262 { &hf_ranap_userPlaneInformation_present,
4263 { "userPlaneInformation",
4264 "ranap.userPlaneInformation_present",
4265 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4268 { &hf_ranap_transportLayerInformation_present,
4269 { "transportLayerInformation",
4270 "ranap.transportLayerInformation_present",
4271 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4274 { &hf_ranap_service_Handover_present,
4275 { "service-Handover",
4276 "ranap.service_Handover_present",
4277 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4280 { &hf_ranap_iE_Extensions_present,
4282 "ranap.ie.iE-Extensions_present",
4283 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4286 { &hf_ranap_nAS_SynchronisationIndicator,
4287 { "nAS-SynchronisationIndicator",
4288 "ranap.nAS-SynchronisationIndicator",
4289 FT_UINT8, BASE_HEX, NULL, 0x0,
4292 { &hf_ranap_guaranteedBitRate_present,
4293 { "guaranteedBitRate",
4294 "ranap.guaranteedBitRate_present",
4295 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4298 { &hf_ranap_transferDelay_present,
4300 "ranap.transferDelay_present",
4301 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4304 { &hf_ranap_trafficHandlingPriority_present,
4305 { "trafficHandlingPriority",
4306 "ranap.trafficHandlingPriority_present",
4307 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4310 { &hf_ranap_allocationOrRetentionPriority_present,
4311 { "allocationOrRetentionPriority",
4312 "ranap.allocationOrRetentionPriority_present",
4313 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4316 { &hf_ranap_sourceStatisticsDescriptor_present,
4317 { "sourceStatisticsDescriptor",
4318 "ranap.sourceStatisticsDescriptor_present",
4319 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4322 { &hf_ranap_relocationRequirement_present,
4323 { "relocationRequirement",
4324 "ranap.relocationRequirement_present",
4325 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4328 { &hf_ranap_trafficClass,
4330 "ranap.rab_Parameters.trafficClass",
4331 FT_UINT8, BASE_DEC, VALS(&ranap_trafficClass_values), 0x0,
4334 { &hf_ranap_rAB_AsymmetryIndicator,
4335 { "rAB_AsymmetryIndicator",
4336 "ranap.rab_Parameters.rAB_AsymmetryIndicator",
4337 FT_UINT8, BASE_DEC, VALS(&ranap_rAB_AsymmetryIndicator_values), 0x0,
4340 { &hf_ranap_maxBitrate,
4342 "ranap.rab_Parameters.maxBitrate",
4343 FT_UINT32, BASE_DEC, NULL, 0x0,
4346 { &hf_ranap_guaranteedBitrate,
4347 { "guaranteedBitrate",
4348 "ranap.rab_Parameters.guaranteedBitrate",
4349 FT_UINT32, BASE_DEC, NULL, 0x0,
4352 { &hf_ranap_deliveryOrder,
4354 "ranap.rab_Parameters.deliveryOrder",
4355 FT_UINT8, BASE_DEC, VALS(&ranap_DeliveryOrder_values), 0x0,
4358 { &hf_ranap_maxSDU_Size,
4360 "ranap.rab_Parameters.maxSDU_Size",
4361 FT_UINT16, BASE_DEC, NULL, 0x0,
4364 { &hf_ranap_sDU_ErrorRatio_mantissa,
4365 { "sDU_ErrorRatio: mantissa",
4366 "ranap.rab_Parameters.sDU_ErrorRatio.mantissa",
4367 FT_UINT8, BASE_DEC, NULL, 0x0,
4370 { &hf_ranap_sDU_ErrorRatio_exponent,
4371 { "sDU_ErrorRatio: exponent",
4372 "ranap.rab_Parameters.sDU_ErrorRatio.exponent",
4373 FT_UINT8, BASE_DEC, NULL, 0x0,
4376 { &hf_ranap_residualBitErrorRatio_mantissa,
4377 { "residualBitErrorRatio: mantissa",
4378 "ranap.rab_Parameters.residualBitErrorRatio.mantissa",
4379 FT_UINT8, BASE_DEC, NULL, 0x0,
4382 { &hf_ranap_residualBitErrorRatio_exponent,
4383 { "residualBitErrorRatio: exponent",
4384 "ranap.rab_Parameters.residualBitErrorRatio.exponent",
4385 FT_UINT8, BASE_DEC, NULL, 0x0,
4388 { &hf_ranap_deliveryOfErroneousSDU,
4389 { "deliveryOfErroneousSDU",
4390 "ranap.rab_Parameters.ranap_deliveryOfErroneousSDU",
4391 FT_UINT8, BASE_DEC, VALS(&ranap_deliveryOfErroneousSDU_values), 0x0,
4394 { &hf_ranap_subflowSDU_Size,
4395 { "subflowSDU_Size",
4396 "ranap.rab_Parameters.subflowSDU_Size",
4397 FT_UINT8, BASE_DEC, NULL, 0x0,
4400 { &hf_ranap_rAB_SubflowCombinationBitRate,
4401 { "rAB_SubflowCombinationBitRate",
4402 "ranap.rab_Parameters.rAB_SubflowCombinationBitRate",
4403 FT_UINT32, BASE_DEC, NULL, 0x0,
4406 { &hf_ranap_sDU_ErrorRatio_present,
4408 "ranap.sDU_ErrorRatio_present",
4409 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4412 { &hf_ranap_sDU_FormatInformationParameters_present,
4413 { "sDU_FormatInformationParameters",
4414 "ranap.sDU_FormatInformationParameters_present",
4415 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4418 { &hf_ranap_subflowSDU_Size_present,
4419 { "subflowSDU_Size",
4420 "ranap.subflowSDU_Size_present",
4421 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4424 { &hf_ranap_rAB_SubflowCombinationBitRate_present,
4425 { "subflowSDU_Size",
4426 "ranap.rAB_SubflowCombinationBitRate_present",
4427 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4430 { &hf_ranap_transferDelay,
4432 "ranap.rab_Parameters.transferDelay",
4433 FT_UINT16, BASE_DEC, NULL, 0x0,
4436 { &hf_ranap_trafficHandlingPriority,
4437 { "trafficHandlingPriority",
4438 "ranap.rab_Parameters.trafficHandlingPriority",
4439 FT_UINT8, BASE_DEC, VALS(&ranap_priority_values), 0x0,
4442 { &hf_ranap_priorityLevel,
4444 "ranap.rab_Parameters.allocationOrRetentionPriority.priorityLevel",
4445 FT_UINT8, BASE_DEC, VALS(&ranap_priority_values), 0x0,
4448 { &hf_ranap_pre_emptionCapability,
4449 { "pre-emptionCapability",
4450 "ranap.rab_Parameters.allocationOrRetentionPriority.pre_emptionCapability",
4451 FT_UINT8, BASE_DEC, VALS(&ranap_pre_emptionCapability_values), 0x0,
4454 { &hf_ranap_pre_emptionVulnerability,
4455 { "pre-emptionVulnerability",
4456 "ranap.rab_Parameters.allocationOrRetentionPriority.pre_emptionVulnerability",
4457 FT_UINT8, BASE_DEC, VALS(&ranap_pre_emptionVulnerability_values), 0x0,
4460 { &hf_ranap_queuingAllowed,
4462 "ranap.rab_Parameters.allocationOrRetentionPriority.queuingAllowed",
4463 FT_UINT8, BASE_DEC, VALS(&ranap_queuingAllowed_values), 0x0,
4466 { &hf_ranap_sourceStatisticsDescriptor,
4467 { "sourceStatisticsDescriptor",
4468 "ranap.rab_Parameters.sourceStatisticsDescriptor",
4469 FT_UINT8, BASE_DEC, VALS(&ranap_sourceStatisticsDescriptor_values), 0x0,
4472 { &hf_ranap_relocationRequirement,
4473 { "relocationRequirement",
4474 "ranap.rab_Parameters.relocationRequirement",
4475 FT_UINT8, BASE_DEC, VALS(&ranap_relocationRequirement_values), 0x0,
4478 { &hf_ranap_userPlaneMode,
4480 "ranap.userPlaneMode",
4481 FT_UINT8, BASE_DEC, VALS(&ranap_userPlaneMode_values), 0x0,
4484 { &hf_ranap_uP_ModeVersions,
4485 { "uP_ModeVersions",
4486 "ranap.uP_ModeVersions",
4487 FT_BYTES, BASE_NONE, NULL, 0x0,
4490 { &hf_ranap_number_of_ProtocolExtensionFields,
4491 { "Number of ProtocolExtensionFields",
4492 "ranap.number_of_ProtocolExtensionFields",
4493 FT_UINT16, BASE_DEC, NULL, 0x0,
4496 { &hf_ranap_ext_field_number_of_octets,
4497 { "Number of octets",
4498 "ranap.ProtocolExtensionFields.octets",
4499 FT_UINT16, BASE_DEC, NULL, 0x0,
4502 { &hf_ranap_transportLayerAddress_length,
4503 { "bit length of transportLayerAddress",
4504 "ranap.transportLayerAddress_length",
4505 FT_UINT8, BASE_DEC, NULL, 0x0,
4508 { &hf_ranap_transportLayerAddress,
4509 { "transportLayerAddress",
4510 "ranap.transportLayerAddress",
4511 FT_BYTES, BASE_NONE, NULL, 0x0,
4514 { &hf_ranap_gTP_TEI,
4517 FT_BYTES, BASE_NONE, NULL, 0x0,
4520 { &hf_ranap_bindingID,
4523 FT_BYTES, BASE_NONE, NULL, 0x0,
4526 { &hf_ranap_pDP_TypeInformation_present,
4527 { "pDP_TypeInformation",
4528 "ranap.pDP_TypeInformation_present",
4529 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4532 { &hf_ranap_dataVolumeReportingIndication_present,
4533 { "dataVolumeReportingIndication",
4534 "ranap.dataVolumeReportingIndication_present",
4535 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4538 { &hf_ranap_dl_GTP_PDU_SequenceNumber_present,
4539 { "dl_GTP_PDU_SequenceNumber",
4540 "ranap.dl_GTP_PDU_SequenceNumber_present",
4541 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4544 { &hf_ranap_ul_GTP_PDU_SequenceNumber_present,
4545 { "ul_GTP_PDU_SequenceNumber",
4546 "ranap.ul_GTP_PDU_SequenceNumber_present",
4547 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4550 { &hf_ranap_dl_N_PDU_SequenceNumber_present,
4551 { "dl_N_PDU_SequenceNumber",
4552 "ranap.dl_N_PDU_SequenceNumber_present",
4553 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4556 { &hf_ranap_ul_N_PDU_SequenceNumber_present,
4557 { "ul_N_PDU_SequenceNumber",
4558 "ranap.ul_N_PDU_SequenceNumber_present",
4559 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4562 { &hf_ranap_PDP_Type,
4564 "ranap.RAB_SetupOrModifyItemSecond.PDP_Type",
4565 FT_UINT8, BASE_HEX, VALS(&ranap_PDP_Type_values), 0x0,
4568 { &hf_ranap_dataVolumeReportingIndication,
4569 { "dataVolumeReportingIndication",
4570 "ranap.RAB_SetupOrModifyItemSecond.dataVolumeReportingIndication",
4571 FT_UINT8, BASE_HEX, VALS(&ranap_dataVolumeReportingIndication_values), 0x0,
4574 { &hf_ranap_dl_GTP_PDU_SequenceNumber,
4575 { "dl_GTP_PDU_SequenceNumber",
4576 "ranap.RAB_SetupOrModifyItemSecond.dl_GTP_PDU_SequenceNumber",
4577 FT_UINT16, BASE_DEC, NULL, 0x0,
4580 { &hf_ranap_ul_GTP_PDU_SequenceNumber,
4581 { "ul_GTP_PDU_SequenceNumber",
4582 "ranap.RAB_SetupOrModifyItemSecond.ul_GTP_PDU_SequenceNumber",
4583 FT_UINT16, BASE_DEC, NULL, 0x0,
4586 { &hf_ranap_dl_N_PDU_SequenceNumber,
4587 { "ul_GTP_PDU_SequenceNumber",
4588 "ranap.RAB_SetupOrModifyItemSecond.ul_GTP_PDU_SequenceNumber",
4589 FT_UINT16, BASE_DEC, NULL, 0x0,
4592 { &hf_ranap_ul_N_PDU_SequenceNumber,
4593 { "ul_GTP_PDU_SequenceNumber",
4594 "ranap.RAB_SetupOrModifyItemSecond.ul_GTP_PDU_SequenceNumber",
4595 FT_UINT16, BASE_DEC, NULL, 0x0,
4598 { &hf_ranap_cause_choice,
4600 "ranap.cause_choice",
4601 FT_UINT8, BASE_HEX, VALS(&ranap_cause_choice_values), 0x0,
4604 { &hf_ranap_cause_value,
4606 "ranap.cause_value",
4607 FT_UINT8, BASE_DEC,VALS(&ranap_cause_value_str), 0x0,
4610 { &hf_ranap_transportLayerAddress_present,
4611 { "transportLayerAddress",
4612 "ranap.transportLayerAddress_present",
4613 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4616 { &hf_ranap_iuTransportAssociation_present,
4617 { "iuTransportAssociation",
4618 "ranap.iuTransportAssociation_present",
4619 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4622 { &hf_ranap_dl_dataVolumes_present,
4624 "ranap.dl_dataVolumes_present",
4625 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4628 { &hf_ranap_dataVolumeReference_present,
4629 { "dataVolumeReference",
4630 "ranap.dataVolumeReference_present",
4631 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4634 { &hf_ranap_dl_UnsuccessfullyTransmittedDataVolume,
4635 { "dl-UnsuccessfullyTransmittedDataVolume",
4636 "ranap.dl-UnsuccessfullyTransmittedDataVolume",
4637 FT_UINT32, BASE_DEC, NULL, 0x0,
4640 { &hf_ranap_dataVolumeReference,
4641 { "dataVolumeReference",
4642 "ranap.dataVolumeReference",
4643 FT_UINT8, BASE_DEC, NULL, 0x0,
4646 { &hf_ranap_procedureCode_present,
4648 "ranap.procedureCode_present",
4649 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4652 { &hf_ranap_triggeringMessage_present,
4653 { "triggeringMessage",
4654 "ranap.triggeringMessage_present",
4655 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4658 { &hf_ranap_procedureCriticality_present,
4659 { "procedureCriticality",
4660 "ranap.procedureCriticality_present",
4661 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4664 { &hf_ranap_iEsCriticalityDiagnostics_present,
4665 { "iEsCriticalityDiagnostics",
4666 "ranap.iEsCriticalityDiagnostics_present",
4667 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4670 { &hf_ranap_triggeringMessage,
4671 { "triggeringMessage",
4672 "ranap.triggeringMessage",
4673 FT_UINT8, BASE_HEX, VALS(&ranap_pdu_index_values), 0x0,
4676 { &hf_ranap_procedureCriticality,
4677 { "procedureCriticality",
4678 "ranap.procedureCriticality",
4679 FT_UINT8, BASE_HEX, VALS(&ranap_criticality_values), 0x0,
4682 { &hf_ranap_iECriticality,
4684 "ranap.iECriticality",
4685 FT_UINT8, BASE_HEX, VALS(&ranap_criticality_values), 0x0,
4688 { &hf_ranap_repetitionNumber,
4689 { "repetitionNumber",
4690 "ranap.repetitionNumber",
4691 FT_UINT16, BASE_DEC, NULL, 0x0,
4694 { &hf_ranap_num_of_CriticalityDiagnostics_IEs,
4695 { "Number of CriticalityDiagnostics-IEs",
4696 "ranap.num_of_CriticalityDiagnostics_IEs",
4697 FT_UINT16, BASE_DEC, NULL, 0x0,
4700 { &hf_ranap_repetitionNumber_present,
4701 { "repetitionNumber",
4702 "ranap.repetitionNumber_present",
4703 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4706 { &hf_ranap_dl_UnsuccessfullyTransmittedDataVolume_present,
4707 { "dl-UnsuccessfullyTransmittedDataVolume",
4708 "ranap.dl_UnsuccessfullyTransmittedDataVolume_present",
4709 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4712 { &hf_ranap_CN_DomainIndicator,
4713 { "CN-DomainIndicator",
4714 "ranap.CN_DomainIndicator",
4715 FT_UINT8, BASE_HEX, VALS(&ranap_CN_DomainIndicator_values), 0x0,
4718 { &hf_ranap_service_Handover,
4719 { "service-Handover",
4720 "ranap.service_Handover",
4721 FT_UINT8, BASE_HEX, VALS(&ranap_service_Handover_values), 0x0,
4724 { &hf_ranap_IuSigConId,
4727 FT_BYTES, BASE_NONE, NULL, 0x0,
4733 FT_UINT8, BASE_HEX, VALS(&ranap_SAPI_values), 0x0,
4736 { &hf_ranap_msg_extension_present,
4737 { "Message Extension",
4738 "ranap.msg_extension_present",
4739 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4742 { &hf_ranap_ProtocolExtensionContainer_present,
4743 { "ProtocolExtensionContainer",
4744 "ranap.ProtocolExtensionContainer_present",
4745 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4748 { &hf_ranap_nas_pdu_length,
4749 { "length of NAS-PDU",
4750 "ranap.nas_pdu_length",
4751 FT_UINT16, BASE_DEC, NULL, 0x0,
4756 /* Setup protocol subtree array */
4757 static gint *ett[] = {
4759 &ett_ranap_optionals,
4760 &ett_ranap_iE_Extension,
4764 &ett_ranap_ie_pair_first_value,
4765 &ett_ranap_ie_pair_second_value,
4767 &ett_ranap_rAB_Parameters,
4768 &ett_ranap_allocationOrRetentionPriority ,
4769 &ett_ranap_CriticalityDiagnostics_IE
4773 /* Register the protocol name and description */
4774 proto_ranap = proto_register_protocol("Radio Access Network Application Part",
4777 /* Register the header fields and subtrees */
4778 proto_register_field_array(proto_ranap, hf, array_length(hf));
4779 proto_register_subtree_array(ett, array_length(ett));
4785 proto_reg_handoff_ranap(void)
4787 dissector_handle_t ranap_handle;
4789 ranap_handle = create_dissector_handle(dissect_ranap, proto_ranap);
4791 dissector_add("sua.ssn", SCCP_SSN_RANAP, ranap_handle);
4793 dissector_add("sccp.ssn", SCCP_SSN_RANAP, ranap_handle);