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.2 2001/04/25 05:32:15 guy Exp $
8 * Ethereal - Network traffic analyzer
9 * By Gerald Combs <gerald@unicom.net>
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.
37 #ifdef HAVE_SYS_TYPES_H
38 # include <sys/types.h>
41 #ifdef HAVE_NETINET_IN_H
42 # include <netinet/in.h>
48 #ifdef NEED_SNPRINTF_H
49 # include "snprintf.h"
55 #define SCCP_SSN_RANAP 0x8E
57 /* description of PDU header */
58 #define PDU_NUMBER_OF_OCTETS_OFFSET 3
60 /* PDU Index Values */
61 #define InitiatingMessage 0
62 #define SuccessfulOutcome 1
63 #define UnsuccessfulOutcome 2
66 static const value_string ranap_pdu_index_values[] = {
67 {InitiatingMessage, "InitiatingMessage"},
68 {SuccessfulOutcome, "SuccessfulOutcome"},
69 {UnsuccessfulOutcome, "UnsuccessfulOutcome"},
75 /* Procedure Code Values */
76 #define PC_RAB_Assignment 0
77 #define PC_Iu_Release 1
78 #define PC_RelocationPreparation 2
79 #define PC_RelocationResourceAllocation 3
80 #define PC_RelocationCancel 4
81 #define PC_SRNS_ContextTransfer 5
82 #define PC_SecurityModeControl 6
83 #define PC_DataVolumeReport 7
84 #define PC_CN_InformationBroadcast 8
86 #define PC_RAB_ReleaseRequest 10
87 #define PC_Iu_ReleaseRequest 11
88 #define PC_RelocationDetect 12
89 #define PC_RelocationComplete 13
91 #define PC_CommonID 15
92 #define PC_CN_InvokeTrace 16
93 #define PC_LocationReportingControl 17
94 #define PC_LocationReport 18
95 #define PC_InitialUE_Message 19
96 #define PC_DirectTransfer 20
97 #define PC_OverloadControl 21
98 #define PC_ErrorIndication 22
99 #define PC_SRNS_DataForward 23
100 #define PC_ForwardSRNS_Context 24
101 #define PC_privateMessage 25
102 #define PC_CN_DeactivateTrace 26
103 #define PC_ResetResource 27
104 #define PC_RANAP_Relocation 28
107 static const value_string ranap_procedure_code_values[] = {
108 {PC_RAB_Assignment, "RAB-Assignment"},
109 {PC_Iu_Release, "IU-Release"},
110 {PC_RelocationPreparation, "RelocationPreparation"},
111 {PC_RelocationResourceAllocation, "RelocationResourceAllocation"},
112 {PC_RelocationCancel, "RelocationCancel"},
113 {PC_SRNS_ContextTransfer, "SRNS-ContextTransfer"},
114 {PC_SecurityModeControl, "SecurityModeControl"},
115 {PC_DataVolumeReport, "DataVolumeReport"},
116 {PC_CN_InformationBroadcast, "CN-InformationBroadcast"},
118 {PC_RAB_ReleaseRequest, "RAB-ReleaseRequest"},
119 {PC_Iu_ReleaseRequest, "Iu-ReleaseRequest"},
120 {PC_RelocationDetect, "RelocationDetect"},
121 {PC_RelocationComplete, "RelocationComplete"},
122 {PC_Paging, "Paging"},
123 {PC_CommonID, "CommonID"},
124 {PC_CN_InvokeTrace, "CN-InvokeTrace"},
125 {PC_LocationReportingControl, "LocationReportingControl"},
126 {PC_LocationReport, "LocationReport"},
127 {PC_InitialUE_Message, "InitialUE_Message"},
128 {PC_DirectTransfer, "DirectTransfer"},
129 {PC_OverloadControl, "OverloadControl"},
130 {PC_ErrorIndication, "ErrorIndication"},
131 {PC_SRNS_DataForward, "SRNS-DataForward"},
132 {PC_ForwardSRNS_Context, "ForwardSRNS-Context"},
133 {PC_privateMessage, "privateMessage"},
134 {PC_CN_DeactivateTrace, "CN-DeactivateTrace"},
135 {PC_ResetResource, "ResetResource"},
136 {PC_RANAP_Relocation, "RANAP-Relocation"},
141 static const value_string ranap_message_names[][5] = {
142 {/* PC_RAB_Assignment */
143 { InitiatingMessage, "RAB-AssignmentRequest"},
144 { SuccessfulOutcome, "undefined message"},
145 { UnsuccessfulOutcome, "undefined message"},
146 { Outcome, "RAB-AssignmentResponse"},
148 { /* PC_Iu_Release */
149 { InitiatingMessage, "Iu-ReleaseCommand"},
150 { SuccessfulOutcome, "Iu-ReleaseComplete"},
151 { UnsuccessfulOutcome, NULL},
154 { /* PC_RelocationPreparation */
155 { InitiatingMessage, "RelocationRequired"},
156 { SuccessfulOutcome, "RelocationCommand"},
157 { UnsuccessfulOutcome, "RelocationPreparationFailure"},
160 { /* PC_RelocationResourceAllocation */
161 { InitiatingMessage, "RelocationRequest"},
162 { SuccessfulOutcome, "RelocationRequestAcknowledge"},
163 { UnsuccessfulOutcome, "RelocationFailure"},
166 { /* PC_RelocationCancel */
167 { InitiatingMessage, "RelocationCancel"},
168 { SuccessfulOutcome, "RelocationCancelAcknowledge"},
169 { UnsuccessfulOutcome, NULL},
172 { /* PC_SRNS_ContextTransfer */
173 { InitiatingMessage, "SRNS-ContextRequest"},
174 { SuccessfulOutcome, "SRNS-ContextResponse"},
175 { UnsuccessfulOutcome, NULL},
178 { /* PC_SecurityModeControl */
179 { InitiatingMessage, "SecurityModeCommand"},
180 { SuccessfulOutcome, "SecurityModeComplete"},
181 { UnsuccessfulOutcome, "SecurityModeReject"},
184 { /* PC_DataVolumeReport */
185 { InitiatingMessage, "DataVolumeReportRequest"},
186 { SuccessfulOutcome, "DataVolumeReport"},
187 { UnsuccessfulOutcome, NULL},
190 { /* PC_CN_InformationBroadcast */
191 { InitiatingMessage, "CN-InformationBroadcastRequest"},
192 { SuccessfulOutcome, "CN-InformationBroadcastConfirm"},
193 { UnsuccessfulOutcome, "CN-InformationBroadcastReject"},
197 { InitiatingMessage, "Reset"},
198 { SuccessfulOutcome, "ResetAcknowledge"},
199 { UnsuccessfulOutcome, NULL},
202 { /* PC_RAB_ReleaseRequest */
203 { InitiatingMessage, "RAB-ReleaseRequest"},
204 { SuccessfulOutcome, NULL},
205 { UnsuccessfulOutcome, NULL},
208 { /* PC_Iu_ReleaseRequest */
209 { InitiatingMessage, "Iu-ReleaseRequest"},
210 { SuccessfulOutcome, NULL},
211 { UnsuccessfulOutcome, NULL},
214 { /* PC_RelocationDetect */
215 { InitiatingMessage, "RelocationDetect"},
216 { SuccessfulOutcome, NULL},
217 { UnsuccessfulOutcome, NULL},
220 { /* PC_RelocationComplete */
221 { InitiatingMessage, "RelocationComplete"},
222 { SuccessfulOutcome, NULL},
223 { UnsuccessfulOutcome, NULL},
227 { InitiatingMessage, "Paging"},
228 { SuccessfulOutcome, NULL},
229 { UnsuccessfulOutcome, NULL},
233 { InitiatingMessage, "CommonID"},
234 { SuccessfulOutcome, NULL},
235 { UnsuccessfulOutcome, NULL},
238 { /* PC_CN_InvokeTrace */
239 { InitiatingMessage, "CN-InvokeTrace"},
240 { SuccessfulOutcome, NULL},
241 { UnsuccessfulOutcome, NULL},
244 {/* PC_LocationReportingControl */
245 { InitiatingMessage, "LocationReportingControl"},
246 { SuccessfulOutcome, NULL},
247 { UnsuccessfulOutcome, NULL},
250 { /* PC_LocationReport */
251 { InitiatingMessage, "LocationReport"},
252 { SuccessfulOutcome, NULL},
253 { UnsuccessfulOutcome, NULL},
256 { /* PC_InitialUE_Message */
257 { InitiatingMessage, "InitialUE-Message"},
258 { SuccessfulOutcome, NULL},
259 { UnsuccessfulOutcome, NULL},
262 { /* PC_DirectTransfer */
263 { InitiatingMessage, "DirectTransfer"},
264 { SuccessfulOutcome, NULL},
265 { UnsuccessfulOutcome, NULL},
268 { /* PC_OverloadControl */
269 { InitiatingMessage, "Overload"},
270 { SuccessfulOutcome, NULL},
271 { UnsuccessfulOutcome, NULL},
274 { /* PC_ErrorIndication */
275 { InitiatingMessage, "ErrorIndication"},
276 { SuccessfulOutcome, NULL},
277 { UnsuccessfulOutcome, NULL},
280 { /* PC_SRNS_DataForward */
281 { InitiatingMessage, "SRNS-DataForwardCommand"},
282 { SuccessfulOutcome, NULL},
283 { UnsuccessfulOutcome, NULL},
286 { /* PC_ForwardSRNS_Context */
287 { InitiatingMessage, "ForwardSRNS-Context"},
288 { SuccessfulOutcome, NULL},
289 { UnsuccessfulOutcome, NULL},
292 { /* PC_privateMessage */
293 { InitiatingMessage, "PrivateMessage"},
294 { SuccessfulOutcome, NULL},
295 { UnsuccessfulOutcome, NULL},
298 { /* PC_CN_DeactivateTrace */
299 { InitiatingMessage, "CN-DeactivateTrace"},
300 { SuccessfulOutcome, NULL},
301 { UnsuccessfulOutcome, NULL},
304 { /* PC_ResetResource */
305 { InitiatingMessage, "ResetResource"},
306 { SuccessfulOutcome, "ResetResourceAcknowledge"},
307 { UnsuccessfulOutcome, NULL},
310 { /* PC_RANAP_Relocation */
311 { InitiatingMessage, "RANAP-RelocationInformation"},
312 { SuccessfulOutcome, NULL},
313 { UnsuccessfulOutcome, NULL},
319 /* Criticality Values */
324 static const value_string ranap_criticality_values[] = {
325 {CR_reject, "reject"},
326 {CR_ignore, "ignore"},
327 {CR_notify, "notify"},
331 /* presence values for optional components */
332 #define PR_not_present 0
335 static const value_string ranap_presence_values[] = {
336 {PR_not_present, "not present"},
337 {PR_present, "present"},
341 /* description of IE Header */
342 #define IE_ID_LENGTH 2
343 #define IE_CRITICALITY_LENGTH 1
346 /* description of IE-ID values */
347 #define IE_AreaIdentity 0
348 #define IE_CN_BroadcastInformationPiece 1
349 #define IE_CN_BroadcastInformationPieceList 2
350 #define IE_CN_DomainIndicator 3
352 #define IE_ChosenEncryptionAlgorithm 5
353 #define IE_ChosenIntegrityProtectionAlgorithm 6
354 #define IE_ClassmarkInformation2 7
355 #define IE_ClassmarkInformation3 8
356 #define IE_CriticalityDiagnostics 9
357 #define IE_DL_GTP_PDU_SequenceNumber 10
358 #define IE_EncryptionInformation 11
359 #define IE_IntegrityProtectionInformation 12
360 #define IE_IuTransportAssociation 13
361 #define IE_L3_Information 14
363 #define IE_NAS_PDU 16
364 #define IE_NonSearchingIndication 17
365 #define IE_NumberOfSteps 18
367 #define IE_OldBSS_ToNewBSS_Information 20
368 #define IE_PagingAreaID 21
369 #define IE_PagingCause 22
370 #define IE_PermanentNAS_UE_ID 23
371 #define IE_RAB_ContextItem 24
372 #define IE_RAB_ContextList 25
373 #define IE_RAB_DataForwardingItem 26
374 #define IE_RAB_DataForwardingItem_SRNS_CtxReq 27
375 #define IE_RAB_DataForwardingList 28
376 #define IE_RAB_DataForwardingList_SRNS_CtxReq 29
377 #define IE_RAB_DataVolumeReportItem 30
378 #define IE_RAB_DataVolumeReportList 31
379 #define IE_RAB_DataVolumeReportRequestItem 32
380 #define IE_RAB_DataVolumeReportRequestList 33
381 #define IE_RAB_FailedItem 34
382 #define IE_RAB_FailedList 35
384 #define IE_RAB_QueuedItem 37
385 #define IE_RAB_QueuedList 38
386 #define IE_RAB_ReleaseFailedList 39
387 #define IE_RAB_ReleaseItem 40
388 #define IE_RAB_ReleaseList 41
389 #define IE_RAB_ReleasedItem 42
390 #define IE_RAB_ReleasedList 43
391 #define IE_RAB_ReleasedList_IuRelComp 44
392 #define IE_RAB_RelocationReleaseItem 45
393 #define IE_RAB_RelocationReleaseList 46
394 #define IE_RAB_SetupItem_RelocReq 47
395 #define IE_RAB_SetupItem_RelocReqAck 48
396 #define IE_RAB_SetupList_RelocReq 49
397 #define IE_RAB_SetupList_RelocReqAck 50
398 #define IE_RAB_SetupOrModifiedItem 51
399 #define IE_RAB_SetupOrModifiedList 52
400 #define IE_RAB_SetupOrModifyItem 53
401 #define IE_RAB_SetupOrModifyList 54
403 #define IE_RelocationType 56
404 #define IE_RequestType 57
407 #define IE_SourceID 60
408 #define IE_SourceRNC_ToTargetRNC_TransparentContainer 61
409 #define IE_TargetID 62
410 #define IE_TargetRNC_ToSourceRNC_TransparentContainer 63
411 #define IE_TemporaryUE_ID 64
412 #define IE_TraceReference 65
413 #define IE_TraceType 66
414 #define IE_TransportLayerAddress 67
415 #define IE_TriggerID 68
417 #define IE_UL_GTP_PDU_SequenceNumber 70
418 #define IE_RAB_FailedtoReportItem 71
419 #define IE_RAB_FailedtoReportList 72
420 #define IE_KeyStatus 75
421 #define IE_DRX_CycleLengthCoefficient 76
422 #define IE_IuSigConIdList 77
423 #define IE_IuSigConIdItem 78
424 #define IE_IuSigConId 79
425 #define IE_DirectTransferInformationItem_RANAP_RelocInf 80
426 #define IE_DirectTransferInformationList_RANAP_RelocInf 81
427 #define IE_RAB_ContextItem_RANAP_RelocInf 82
428 #define IE_RAB_ContextList_RANAP_RelocInf 83
429 #define IE_RAB_ContextFailedtoTransferItem 84
430 #define IE_RAB_ContextFailedtoTransferList 85
431 #define IE_GlobalRNC_ID 86
432 #define IE_RAB_ReleasedItem_IuRelComp 87
434 static const value_string ranap_ie_id_values[] = {
435 {IE_AreaIdentity, "AreaIdentity"},
436 {IE_CN_BroadcastInformationPiece, "CN_BroadcastInformationPiece"},
437 {IE_CN_BroadcastInformationPieceList, "CN_BroadcastInformationPieceList"},
438 {IE_CN_DomainIndicator, "CN_DomainIndicator"},
440 {IE_ChosenEncryptionAlgorithm, "ChosenEncryptionAlgorithm"},
441 {IE_ChosenIntegrityProtectionAlgorithm, "ChosenIntegrityProtectionAlgorithm"},
442 {IE_ClassmarkInformation2, "ClassmarkInformation2"},
443 {IE_ClassmarkInformation3, "ClassmarkInformation3"},
444 {IE_CriticalityDiagnostics, "CriticalityDiagnostics"},
445 {IE_DL_GTP_PDU_SequenceNumber, "DL_GTP_PDU_SequenceNumber"},
446 {IE_EncryptionInformation, "EncryptionInformation"},
447 {IE_IntegrityProtectionInformation, "IntegrityProtectionInformation"},
448 {IE_IuTransportAssociation, "IuTransportAssociation"},
449 {IE_L3_Information, "L3_Information"},
451 {IE_NAS_PDU, "NAS_PDU"},
452 {IE_NonSearchingIndication, "NonSearchingIndication"},
453 {IE_NumberOfSteps, "NumberOfSteps"},
454 {IE_OMC_ID, "OMC_ID"},
455 {IE_OldBSS_ToNewBSS_Information, "OldBSS_ToNewBSS_Information"},
456 {IE_PagingAreaID, "PagingAreaID"},
457 {IE_PagingCause, "PagingCause"},
458 {IE_PermanentNAS_UE_ID, "PermanentNAS_UE_ID"},
459 {IE_RAB_ContextItem, "RAB_ContextItem"},
460 {IE_RAB_ContextList, "RAB_ContextList"},
461 {IE_RAB_DataForwardingItem, "RAB_DataForwardingItem"},
462 {IE_RAB_DataForwardingItem_SRNS_CtxReq, "RAB_DataForwardingItem_SRNS_CtxReq"},
463 {IE_RAB_DataForwardingList, "RAB_DataForwardingList"},
464 {IE_RAB_DataForwardingList_SRNS_CtxReq, "RAB_DataForwardingList_SRNS_CtxReq"},
465 {IE_RAB_DataVolumeReportItem, "RAB_DataVolumeReportItem"},
466 {IE_RAB_DataVolumeReportList, "RAB_DataVolumeReportList"},
467 {IE_RAB_DataVolumeReportRequestItem, "RAB_DataVolumeReportRequestItem"},
468 {IE_RAB_DataVolumeReportRequestList, "RAB_DataVolumeReportRequestList"},
469 {IE_RAB_FailedItem, "RAB_FailedItem"},
470 {IE_RAB_FailedList, "RAB_FailedList"},
471 {IE_RAB_ID, "RAB_ID"},
472 {IE_RAB_QueuedItem, "RAB_QueuedItem"},
473 {IE_RAB_QueuedList, "RAB_QueuedList"},
474 {IE_RAB_ReleaseFailedList, "RAB_ReleaseFailedList"},
475 {IE_RAB_ReleaseItem, "RAB_ReleaseItem"},
476 {IE_RAB_ReleaseList, "RAB_ReleaseList"},
477 {IE_RAB_ReleasedItem, "RAB_ReleasedItem"},
478 {IE_RAB_ReleasedList, "RAB_ReleasedList"},
479 {IE_RAB_ReleasedList_IuRelComp, "RAB_ReleasedList_IuRelComp"},
480 {IE_RAB_RelocationReleaseItem, "RAB_RelocationReleaseItem"},
481 {IE_RAB_RelocationReleaseList, "RAB_RelocationReleaseList"},
482 {IE_RAB_SetupItem_RelocReq, "RAB_SetupItem_RelocReq"},
483 {IE_RAB_SetupItem_RelocReqAck, "RAB_SetupItem_RelocReqAck"},
484 {IE_RAB_SetupList_RelocReq, "RAB_SetupList_RelocReq"},
485 {IE_RAB_SetupList_RelocReqAck, "RAB_SetupList_RelocReqAck"},
486 {IE_RAB_SetupOrModifiedItem, "RAB_SetupOrModifiedItem"},
487 {IE_RAB_SetupOrModifiedList, "RAB_SetupOrModifiedList"},
488 {IE_RAB_SetupOrModifyItem, "RAB_SetupOrModifyItem"},
489 {IE_RAB_SetupOrModifyList, "RAB_SetupOrModifyList"},
491 {IE_RelocationType, "RelocationType"},
492 {IE_RequestType, "RequestType"},
495 {IE_SourceID, "SourceID"},
496 {IE_SourceRNC_ToTargetRNC_TransparentContainer,
497 "SourceRNC_ToTargetRNC_TransparentContainer"},
498 {IE_TargetID, "TargetID"},
499 {IE_TargetRNC_ToSourceRNC_TransparentContainer,
500 "TargetRNC_ToSourceRNC_TransparentContainer"},
501 {IE_TemporaryUE_ID, "TemporaryUE_ID"},
502 {IE_TraceReference, "TraceReference"},
503 {IE_TraceType, "TraceType"},
504 {IE_TransportLayerAddress, "TransportLayerAddress"},
505 {IE_TriggerID, "TriggerID"},
507 {IE_UL_GTP_PDU_SequenceNumber, "UL_GTP_PDU_SequenceNumber"},
508 {IE_RAB_FailedtoReportItem, "RAB_FailedtoReportItem"},
509 {IE_RAB_FailedtoReportList, "RAB_FailedtoReportList"},
510 {IE_KeyStatus, "KeyStatus"},
511 {IE_DRX_CycleLengthCoefficient, "DRX_CycleLengthCoefficient"},
512 {IE_IuSigConIdList, "IuSigConIdList"},
513 {IE_IuSigConIdItem, "IuSigConIdItem"},
514 {IE_IuSigConId, "IuSigConId"},
515 {IE_DirectTransferInformationItem_RANAP_RelocInf,
516 "DirectTransferInformationItem_RANAP_RelocInf"},
517 {IE_DirectTransferInformationList_RANAP_RelocInf,
518 "DirectTransferInformationList_RANAP_RelocInf"},
519 {IE_RAB_ContextItem_RANAP_RelocInf, "RAB_ContextItem_RANAP_RelocInf"},
520 {IE_RAB_ContextList_RANAP_RelocInf, "RAB_ContextList_RANAP_RelocInf"},
521 {IE_RAB_ContextFailedtoTransferItem, "RAB_ContextFailedtoTransferItem"},
522 {IE_RAB_ContextFailedtoTransferList, "RAB_ContextFailedtoTransferList"},
523 {IE_GlobalRNC_ID, "GlobalRNC_ID"},
524 {IE_RAB_ReleasedItem_IuRelComp, "RAB_ReleasedItem_IuRelComp"},
529 /* Description of IE-Contents */
531 /* Length of fields within IEs */
532 #define RAB_ID_LENGTH 1
533 #define PLMN_ID_LENGTH 3
535 #define IE_PROTOCOL_EXTENSION_LENGTH 1
538 #define NUM_RABS_LENGTH 1
541 /* Traffic Class values */
542 #define TC_conversational 0
543 #define TC_streaming 1
544 #define TC_interactive 2
545 #define TC_background 3
547 static const value_string ranap_trafficClass_values[] = {
548 {TC_conversational, "conversational"},
549 {TC_streaming, "streaming"},
550 {TC_interactive, "interactive"},
551 {TC_background, "background"},
555 /* rAB-AsymmetryIndicator values */
556 #define AI_symmetric_bidirectional 0
557 #define AI_asymmetric_unidirectional_downlink 1
558 #define AI_asymmetric_unidirectional_uplink 2
559 #define AI_asymmetric_bidirectional 3
561 static const value_string ranap_rAB_AsymmetryIndicator_values[] = {
562 {AI_symmetric_bidirectional, "symmetric-bidirectional"},
563 {AI_asymmetric_unidirectional_downlink, "asymmetric-unidirectional-downlink"},
564 {AI_asymmetric_unidirectional_uplink, "asymmetric-unidirectional-uplink"},
565 {AI_asymmetric_bidirectional, "asymmetric-bidirectional"},
569 /* DeliveryOrder values */
570 #define DO_delivery_order_requested 0
571 #define DO_delivery_order_not_requested 1
573 static const value_string ranap_DeliveryOrder_values[] = {
574 {DO_delivery_order_requested, "delivery-order-requested"},
575 {DO_delivery_order_not_requested, "delivery-order-not-requested"},
578 #define maxSDU_Size_LENGTH 2
580 /* deliveryOfErroneousSDU values */
583 #define DOES_no_error_detection_consideration 2
585 static const value_string ranap_deliveryOfErroneousSDU_values[] = {
588 {DOES_no_error_detection_consideration, "no-error-detection-consideration"},
592 #define subflowSDU_Size_LENGTH 2
593 #define transferDelay_LENGTH 2
596 /* trafficHandlingPriority values */
597 static const value_string ranap_priority_values[] = {
613 { 15, "no-priority-used"},
617 /* pre-emptionCapability values */
618 static const value_string ranap_pre_emptionCapability_values[] = {
619 { 0, "shall-not-trigger-pre-emption"},
620 { 1, "may-trigger-pre-emption"},
623 /* pre-emptionVulnerability values */
624 static const value_string ranap_pre_emptionVulnerability_values[] = {
625 { 0, "not-pre-emptable"},
626 { 1, "pre-emptable"},
630 /* queuingAllowed values */
631 static const value_string ranap_queuingAllowed_values[] = {
632 { 0, "queueing-not-allowed"},
633 { 1, "queueing-allowed"},
637 /* sourceStatisticsDescriptor values */
638 static const value_string ranap_sourceStatisticsDescriptor_values[] = {
643 /* relocationRequirement values */
644 static const value_string ranap_relocationRequirement_values[] = {
649 /* userPlaneMode values */
650 static const value_string ranap_userPlaneMode_values[] = {
651 { 0, "transparent-mode"},
652 { 1, "support-mode-for-predefined-SDU-sizes"},
655 /* PDP_Type values */
656 static const value_string ranap_PDP_Type_values[] = {
664 /* dataVolumeReportingIndication values */
665 static const value_string ranap_dataVolumeReportingIndication_values[] = {
667 { 1, "do-not-report"},
671 /* cause_choice values */
672 #define CC_CauseRadioNetwork 0
673 #define CC_CauseTransmissionNetwork 1
674 #define CC_CauseNAS 2
675 #define CC_CauseProtocol 3
676 #define CC_CauseMisc 4
677 #define CC_CauseNon_Standard 5
679 static const value_string ranap_cause_choice_values[] = {
680 { CC_CauseRadioNetwork, "CauseRadioNetwork"},
681 { CC_CauseTransmissionNetwork, "CauseTransmissionNetwork"},
682 { CC_CauseNAS, "CauseNAS"},
683 { CC_CauseProtocol, "CauseProtocol"},
684 { CC_CauseMisc, "CauseMisc"},
685 { CC_CauseNon_Standard, "CauseNon-Standard"},
690 static const value_string ranap_cause_value_str[] = {
691 /* CauseRadioNetwork (1..64) */
692 { 1, "rab-pre-empted"},
693 { 2, "trelocoverall-expiry"},
694 { 3, "trelocprep-expiry"},
695 { 4, "treloccomplete-expiry"},
696 { 5, "tqueing-expiry"},
697 { 6, "relocation-triggered"},
698 { 7, "trellocalloc-expiry"},
699 { 8, "unable-to-establish-during-relocation"},
700 { 9, "unknown-target-rnc"},
701 { 10, "relocation-cancelled"},
702 { 11, "successful-relocation"},
703 { 12, "requested-ciphering-and-or-integrity-protection-algorithms-not-supported"},
704 { 13, "change-of-ciphering-and-or-integrity-protection-is-not-supported"},
705 { 14, "failure-in-the-radio-interface-procedure"},
706 { 15, "release-due-to-utran-generated-reason"},
707 { 16, "user-inactivity"},
708 { 17, "time-critical-relocation"},
709 { 18, "requested-traffic-class-not-available"},
710 { 19, "invalid-rab-parameters-value"},
711 { 20, "requested-maximum-bit-rate-not-available"},
712 { 21, "requested-guaranteed-bit-rate-not-available"},
713 { 22, "requested-transfer-delay-not-achievable"},
714 { 23, "invalid-rab-parameters-combination"},
715 { 24, "condition-violation-for-sdu-parameters"},
716 { 25, "condition-violation-for-traffic-handling-priority"},
717 { 26, "condition-violation-for-guaranteed-bit-rate"},
718 { 27, "user-plane-versions-not-supported"},
719 { 28, "iu-up-failure"},
720 { 29, "relocation-failure-in-target-CN-RNC-or-target-system"},
721 { 30, "invalid-RAB-ID"},
722 { 31, "no-remaining-rab"},
723 { 32, "interaction-with-other-procedure"},
724 { 33, "requested-maximum-bit-rate-for-dl-not-available"},
725 { 34, "requested-maximum-bit-rate-for-ul-not-available"},
726 { 35, "requested-guaranteed-bit-rate-for-dl-not-available"},
727 { 36, "requested-guaranteed-bit-rate-for-ul-not-available"},
728 { 37, "repeated-integrity-checking-failure"},
729 { 38, "requested-report-type-not-supported"},
730 { 39, "request-superseded"},
731 { 40, "release-due-to-UE-generated-signalling-connection-release"},
732 { 41, "resource-optimisation-relocation"},
733 { 42, "requested-information-not-available"},
734 { 43, "relocation-desirable-for-radio-reasons"},
735 { 44, "relocation-not-supported-in-target-RNC-or-target-system"},
736 { 45, "directed-retry"},
737 { 46, "radio-connection-with-UE-Lost"},
739 /* CauseTransmissionNetwork (65..80) */
740 { 65, "logical-error-unknown-iu-transport-association"},
741 { 66, "iu-transport-connection-failed-to-establish"},
743 /* CauseNAS (81..96) */
744 { 81, "user-restriction-start-indication"},
745 { 82, "user-restriction-end-indication"},
746 { 83, "normal-release"},
748 /* CauseProtocol (97..112) */
749 { 97, "transfer-syntax-error"},
750 { 98, "semantic-error"},
751 { 99, "message-not-compatible-with-receiver-state"},
752 {100, "abstract-syntax-error-reject"},
753 {101, "abstract-syntax-error-ignore-and-notify"},
754 {102, "abstract-syntax-error-falsely-constructed-message"},
756 /* CauseMisc (113..128) */
757 {113, "om-intervention"},
758 {114, "no-resource-available"},
759 {115, "unspecified-failure"},
760 {116, "network-optimisation"},
764 /* CN_DomainIndicator_values */
765 static const value_string ranap_CN_DomainIndicator_values[] = {
772 static const value_string ranap_SAPI_values[] = {
777 /* service_Handover_values */
778 static const value_string ranap_service_Handover_values[] = {
779 { 0, "handover-to-GSM-should-be-performed"},
780 { 1, "handover-to-GSM-should-not-be-performed"},
781 { 2, "handover-to-GSM-shall-not-be-performed"},
784 /* Initialize the protocol and registered fields */
786 static int proto_ranap = -1;
788 /* pdu header fields */
789 static int hf_ranap_pdu_number_of_octets = -1;
790 static int hf_ranap_pdu_index = -1;
791 static int hf_ranap_procedure_code = -1;
792 static int hf_ranap_pdu_criticality = -1;
793 static int hf_ranap_number_of_ies = -1;
795 /* ie header fields */
796 static int hf_ranap_ie_ie_id = -1;
797 static int hf_ranap_ie_criticality = -1;
798 static int hf_ranap_ie_number_of_octets = -1;
799 static int hf_ranap_ie_protocol_extension = -1;
801 /*ie contents fields */
802 static int hf_ranap_number_of_ies_in_list = -1;
803 static int hf_ranap_ie_pair_first_criticality = -1;
804 static int hf_ranap_ie_pair_second_criticality = -1;
805 static int hf_ranap_first_value_number_of_octets = -1;
806 static int hf_ranap_second_value_number_of_octets = -1;
807 static int hf_ranap_rab_id = -1;
808 static int hf_ranap_nas_pdu = -1;
809 static int hf_ranap_plmn_id = -1;
810 static int hf_ranap_lac = -1;
811 static int hf_ranap_sac = -1;
812 static int hf_ranap_rac = -1;
813 static int hf_ranap_nAS_SynchronisationIndicator = -1;
814 static int hf_ranap_trafficClass = -1;
815 static int hf_ranap_deliveryOrder = -1;
816 static int hf_ranap_iE_Extensions_present = -1;
817 static int hf_ranap_num_rabs = -1;
818 static int hf_ranap_nAS_SynchronisationIndicator_present = -1;
819 static int hf_ranap_rAB_Parameters_present = -1;
820 static int hf_ranap_userPlaneInformation_present = -1;
821 static int hf_ranap_transportLayerInformation_present = -1;
822 static int hf_ranap_service_Handover_present = -1;
823 static int hf_ranap_guaranteedBitRate_present = -1;
824 static int hf_ranap_transferDelay_present = -1;
825 static int hf_ranap_trafficHandlingPriority_present = -1;
826 static int hf_ranap_allocationOrRetentionPriority_present = -1;
827 static int hf_ranap_sourceStatisticsDescriptor_present = -1;
828 static int hf_ranap_relocationRequirement_present = -1;
829 static int hf_ranap_rAB_AsymmetryIndicator = -1;
830 static int hf_ranap_maxBitrate = -1;
831 static int hf_ranap_guaranteedBitrate = -1;
832 static int hf_ranap_maxSDU_Size = -1;
833 static int hf_ranap_sDU_ErrorRatio_mantissa = -1;
834 static int hf_ranap_sDU_ErrorRatio_exponent = -1;
835 static int hf_ranap_residualBitErrorRatio_mantissa = -1;
836 static int hf_ranap_residualBitErrorRatio_exponent = -1;
837 static int hf_ranap_deliveryOfErroneousSDU = -1;
838 static int hf_ranap_subflowSDU_Size = -1;
839 static int hf_ranap_rAB_SubflowCombinationBitRate = -1;
840 static int hf_ranap_sDU_ErrorRatio_present = -1;
841 static int hf_ranap_sDU_FormatInformationParameters_present = -1;
842 static int hf_ranap_subflowSDU_Size_present = -1;
843 static int hf_ranap_rAB_SubflowCombinationBitRate_present = -1;
844 static int hf_ranap_transferDelay = -1;
845 static int hf_ranap_trafficHandlingPriority = -1;
846 static int hf_ranap_priorityLevel = -1;
847 static int hf_ranap_pre_emptionCapability = -1;
848 static int hf_ranap_pre_emptionVulnerability = -1;
849 static int hf_ranap_queuingAllowed = -1;
850 static int hf_ranap_sourceStatisticsDescriptor = -1;
851 static int hf_ranap_userPlaneMode = -1;
852 static int hf_ranap_uP_ModeVersions = -1;
853 static int hf_ranap_number_of_ProtocolExtensionFields = -1;
854 static int hf_ranap_ext_field_id = -1;
855 static int hf_ranap_ext_field_criticality = -1;
856 static int hf_ranap_ext_field_number_of_octets = -1;
857 static int hf_ranap_transportLayerAddress = -1;
858 static int hf_ranap_transportLayerAddress_length = -1;
859 static int hf_ranap_gTP_TEI = -1;
860 static int hf_ranap_bindingID = -1;
861 static int hf_ranap_pDP_TypeInformation_present = -1;
862 static int hf_ranap_dataVolumeReportingIndication_present = -1;
863 static int hf_ranap_dl_GTP_PDU_SequenceNumber_present = -1;
864 static int hf_ranap_ul_GTP_PDU_SequenceNumber_present = -1;
865 static int hf_ranap_dl_N_PDU_SequenceNumber_present = -1;
866 static int hf_ranap_ul_N_PDU_SequenceNumber_present = -1;
867 static int hf_ranap_PDP_Type = -1;
868 static int hf_ranap_dataVolumeReportingIndication = -1;
869 static int hf_ranap_dl_GTP_PDU_SequenceNumber = -1;
870 static int hf_ranap_ul_GTP_PDU_SequenceNumber = -1;
871 static int hf_ranap_dl_N_PDU_SequenceNumber = -1;
872 static int hf_ranap_ul_N_PDU_SequenceNumber = -1;
873 static int hf_ranap_cause_choice = -1;
874 static int hf_ranap_cause_value = -1;
875 static int hf_ranap_transportLayerAddress_present = -1;
876 static int hf_ranap_iuTransportAssociation_present = -1;
877 static int hf_ranap_dl_dataVolumes_present = -1;
878 static int hf_ranap_dataVolumeReference_present = -1;
879 static int hf_ranap_dl_UnsuccessfullyTransmittedDataVolume = -1;
880 static int hf_ranap_dataVolumeReference = -1;
881 static int hf_ranap_procedureCode_present = -1;
882 static int hf_ranap_triggeringMessage_present = -1;
883 static int hf_ranap_procedureCriticality_present = -1;
884 static int hf_ranap_iEsCriticalityDiagnostics_present = -1;
885 static int hf_ranap_triggeringMessage = -1;
886 static int hf_ranap_iECriticality = -1;
887 static int hf_ranap_procedureCriticality = -1;
888 static int hf_ranap_repetitionNumber = -1;
889 static int hf_ranap_num_of_CriticalityDiagnostics_IEs = -1;
890 static int hf_ranap_repetitionNumber_present = -1;
891 static int hf_ranap_dl_UnsuccessfullyTransmittedDataVolume_present = -1;
892 static int hf_ranap_CN_DomainIndicator = -1;
893 static int hf_ranap_IuSigConId = -1;
894 static int hf_ranap_SAPI = -1;
895 static int hf_ranap_msg_extension_present = -1;
896 static int hf_ranap_ProtocolExtensionContainer_present = -1;
897 static int hf_ranap_nas_pdu_length = -1;
898 static int hf_ranap_relocationRequirement = -1;
899 static int hf_ranap_service_Handover = -1;
903 static gint ett_ranap = -1;
904 static gint ett_ranap_optionals = -1;
905 static gint ett_ranap_iE_Extension = -1;
906 static gint ett_ranap_ie = -1;
907 static gint ett_ranap_ie_pair = -1;
908 static gint ett_ranap_rab = -1;
909 static gint ett_ranap_ie_pair_first_value = -1;
910 static gint ett_ranap_ie_pair_second_value = -1;
911 static gint ett_ranap_rAB_Parameters = -1;
912 static gint ett_ranap_sDU = -1;
913 static gint ett_ranap_allocationOrRetentionPriority = -1;
914 static gint ett_ranap_CriticalityDiagnostics_IE = -1;
918 /*****************************************************************************/
920 /* Utility Functions */
922 /*****************************************************************************/
924 /* sets *offset and *bitoffset n bits further */
926 proceed_nbits(gint *offset, gint *bitoffset, gint n)
929 *offset += *bitoffset / 8;
933 /* sets *offset and *bitoffset to the next byte boundary */
934 static void allign(gint *offset, gint *bitoffset)
936 if ( *bitoffset != 0 )
943 /* sets *offset and *bitoffset behind the following integer */
945 proceed_perint32(gint *offset, gint *bitoffset, gint length)
947 proceed_nbits(offset, bitoffset, 2);
948 allign(offset, bitoffset);
953 /* extract length field found at offset */
954 /* if length field spans more than two bytes -1 is returned and the field is not decoded */
956 extract_length(tvbuff_t *tvb, gint offset, gint *length, gint *length_size)
959 guint16 tmp_length16;
961 tmp_length8 = tvb_get_guint8(tvb, offset);
962 if ((tmp_length8 & 0x80) == 0)
964 /* length coded in one byte */
965 *length = tmp_length8;
970 tmp_length16 = tvb_get_ntohs(tvb, offset);
971 if ( ((tmp_length16 & 0x8000) == 0x8000) && ((tmp_length16 & 0x4000) == 0) )
973 /* length coded in two bytes */
974 *length = tmp_length16 & 0x3FFF;
978 { /* length is coded in more than 2 bytes */
985 /* extract the next n bits and return them alligned to the LSB */
987 extract_nbits(tvbuff_t *tvb, gint offset, gint bitoffset, gint n)
993 if (bitoffset + n <= 8)
995 /* all bits contained in one byte */
996 uint_bits = tvb_get_guint8(tvb, offset);
997 uint_bits <<= bitoffset; /* remove bitoffset */
998 uint_bits >>= 8-n; /* allign to LSB */
1002 /* bits contained within 2 bytes */
1003 tmp_2bytes = tvb_get_ntohs(tvb, offset);
1004 tmp_2bytes <<= bitoffset; /* remove bitoffset */
1005 uint_bits = tmp_2bytes >> ( 8 + (8-n)); /* allign to LSB */
1012 /* extract an integer with 2bit length field and return the int value*/
1014 extract_int32(tvbuff_t *tvb, gint offset, gint bitoffset, gint *length)
1019 tmp_2byte = tvb_get_ntohs(tvb, offset);
1021 tmp_2byte <<= bitoffset; /* remove bitoffset */
1022 *length = tmp_2byte >> (6 + 8); /* allign 2bit length field to LSB */
1023 (*length)++; /* now we have the length of the int value */
1025 proceed_nbits(&offset, &bitoffset, 2);
1026 allign(&offset, &bitoffset);
1031 result = tvb_get_guint8(tvb, offset);
1034 result = tvb_get_ntohs(tvb, offset);
1037 result = tvb_get_ntoh24(tvb, offset);
1040 result = tvb_get_ntohl(tvb, offset);
1048 /* return bitmask string looking like "..01 0..." */
1050 bitmaskstr(guint bitoffset, guint bitlength, guint16 value, guint *length)
1052 static char maskstr[20];
1056 strcpy(maskstr, " ");
1058 for (i=0; i<16; i++)
1060 if ( i < bitoffset || i > bitoffset+bitlength-1 )
1062 /* i is outside extracted bitfield */
1063 maskstr[i + i/4] = '.';
1066 { /* i is inside extracted bitfield */
1067 if ( ((0x8000 >> i) & value) != 0x0000 )
1070 maskstr[i + i/4] = '1';
1074 /* bit is not set */
1075 maskstr[i + i/4] = '0';
1079 if (bitoffset + bitlength <= 8)
1081 /* bitfield is located within first byte only */
1087 /* bitfield is located within first & second byte */
1097 proto_tree_add_bitstring(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint offset,
1098 gint bitoffset, gint bitlength)
1100 guint16 read_2bytes;
1101 guint16 alligned_2bytes;
1104 char maskstr_buf[56] = "\0";
1108 char buf[256] = "\0";
1109 header_field_info *hf_info_p;
1111 gint initial_offset = offset;
1113 memset(bitstr, 0, 128);
1115 /* create bitmask string for first byte */
1116 read_2bytes = tvb_get_ntohs(tvb, offset);
1117 maskstr = bitmaskstr(bitoffset, (bitoffset+bitlength >8) ? 8-bitoffset : bitlength, read_2bytes, &length);
1118 if (bitoffset+bitlength > 8)
1120 sprintf(maskstr_buf, "%s + %d Bits = ", maskstr, bitlength - (8-bitoffset));
1124 sprintf(maskstr_buf, "%s = ", maskstr);
1128 /* print all but the last byte to buf */
1129 byte_span = (bitoffset + bitlength + 7) / 8;
1130 for (i=0; i < byte_span - 1; i++, offset++)
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 */
1137 sprintf(&(buf[2*i]), "%02X", one_byte);
1140 /* add last byte if it contains bits which have not yet been shifted in */
1141 if ( ((bitlength + 7) / 8 ) == byte_span )
1143 read_2bytes = tvb_get_ntohs(tvb, offset);
1144 alligned_2bytes = read_2bytes << bitoffset; /* remove bitoffset */
1145 one_byte = alligned_2bytes >> 8; /* move to low byte */
1146 one_byte >>= (8 - (bitlength%8)); /*cut off surplus bits */
1147 one_byte <<= (8 - (bitlength%8)); /* allign to MSB in low byte*/
1150 sprintf(&(buf[2*i]), "%02X", one_byte);
1153 /* get header field info */
1154 hf_info_p = proto_registrar_get_nth(hfindex);
1157 return ( proto_tree_add_bytes_format(tree, hfindex, tvb, initial_offset,
1158 byte_span , bitstr, "%s %s: %s", maskstr_buf, hf_info_p->name, buf) );
1163 /* add unsigned int, 1-8 bits long */
1165 proto_tree_add_uint_bits(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint offset,
1166 gint bitoffset, gint bitlength, gint min)
1169 guint16 read_2bytes, alligned_2bytes;
1172 header_field_info *hf_info_p;
1176 if (bitoffset + bitlength <= 8)
1178 /* all bits contained in one byte */
1179 uint_bits = tvb_get_guint8(tvb, offset);
1180 read_2bytes = uint_bits;
1185 /* bits contained within 2 bytes */
1186 read_2bytes = tvb_get_ntohs(tvb, offset);
1188 alligned_2bytes = read_2bytes << bitoffset; /* remove bitoffset */
1189 uint_bits = alligned_2bytes >> ( 8 + (8-bitlength)); /* allign to LSB */
1193 /* create bitmask string */
1194 maskstr = bitmaskstr(bitoffset, bitlength, read_2bytes, &length);
1196 /* get header field info */
1197 hf_info_p = proto_registrar_get_nth(hfindex);
1199 if (hf_info_p->strings != NULL)
1201 /* string representation for decoded header field present */
1202 return ( proto_tree_add_uint_format(tree, hfindex, tvb, offset,
1203 length, uint_bits, "%s = %s: %s (%d)", maskstr, hf_info_p->name,
1204 val_to_str(uint_bits, hf_info_p->strings, "%d"), uint_bits) );
1208 /* no string representation */
1209 return ( proto_tree_add_uint_format(tree, hfindex, tvb, offset,
1210 length, uint_bits, "%s = %s: %d", maskstr, hf_info_p->name, uint_bits) );
1214 /* add PER encoded integer (maximum length of value: 4 bytes) */
1216 proto_tree_add_PERint32(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint offset,
1217 gint bitoffset, gint *length, gint min)
1223 header_field_info *hf_info_p;
1226 value = extract_int32(tvb, offset, bitoffset, length);
1229 /* create bitmask string for 2 bit length field */
1230 tmp_2bytes = tvb_get_ntohs(tvb, offset);
1231 maskstr = bitmaskstr(bitoffset, 2, tmp_2bytes, &length_size);
1233 /* get header field info */
1234 hf_info_p = proto_registrar_get_nth(hfindex);
1236 return ( proto_tree_add_uint_format(tree, hfindex, tvb, offset,
1237 (*length) + length_size, value,
1238 "%s + %d Bytes = %s: %d", maskstr, *length, hf_info_p->name, value) );
1243 /*****************************************************************************/
1245 /* Dissecting Functions for single parameters */
1247 /*****************************************************************************/
1249 dissect_iE_Extension(tvbuff_t *tvb, proto_tree *tree, gint *offset, gint *bitoffset, char *description)
1251 proto_item *ext_item = NULL;
1252 proto_tree *ext_tree = NULL;
1253 guint16 number_of_extFields;
1254 gint number_of_octets = 0;
1255 gint number_of_octets_size = 0;
1258 allign(offset, bitoffset);
1260 /* create subtree for iE_Extension */
1261 ext_item = proto_tree_add_text(tree, tvb, *offset, 0, "%s iE-Extensions", description);
1262 ext_tree = proto_item_add_subtree(ext_item, ett_ranap_iE_Extension);
1264 /* number of extension fields */
1265 number_of_extFields = tvb_get_ntohs(tvb, *offset) + 1;
1266 proto_tree_add_uint(ext_tree, hf_ranap_number_of_ProtocolExtensionFields,
1267 tvb, *offset, 2, number_of_extFields);
1271 /* for each extension field */
1272 for (i=1; i <= number_of_extFields; i++)
1274 /* add fields to ie subtee */
1275 /* Extension Field ID */
1276 proto_tree_add_item(ext_tree, hf_ranap_ext_field_id, tvb,
1277 *offset, IE_ID_LENGTH, FALSE);
1278 *offset += IE_ID_LENGTH;
1281 proto_tree_add_uint_bits(ext_tree, hf_ranap_ext_field_criticality, tvb,
1282 *offset, *bitoffset, 2, 0);
1283 proceed_nbits(offset, bitoffset, 2);
1285 /* number of octets in the IE */
1286 allign(offset, bitoffset);
1287 if (0 == extract_length(tvb, *offset, &number_of_octets, &number_of_octets_size))
1289 proto_tree_add_uint(ext_tree, hf_ranap_ext_field_number_of_octets, tvb,
1290 *offset, number_of_octets_size, number_of_octets);
1294 /* decoding is not supported */
1295 proto_tree_add_text(ext_tree, tvb, *offset, 0,
1296 "Number of Octets greater than 0x3FFF, dissection not supported");
1300 *offset += number_of_octets_size;
1301 proto_tree_add_text(ext_tree, tvb, *offset, number_of_octets, "Extension Field Value: see below");
1303 *offset += number_of_octets;
1311 dissect_userPlaneInformation(tvbuff_t *tvb, proto_tree *tree, gint *offset, gint *bitoffset)
1313 int extension_present;
1314 int iE_Extensions_present;
1315 int tmp_extension_present;
1317 /* protocol_extension present ? */
1318 extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1319 proceed_nbits(offset, bitoffset, 1);
1321 /* iE_Extensions present ? */
1322 iE_Extensions_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1323 proceed_nbits(offset, bitoffset, 1);
1326 tmp_extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1327 proceed_nbits(offset, bitoffset, 1);
1329 proto_tree_add_uint_bits(tree, hf_ranap_userPlaneMode, tvb, *offset,
1331 proceed_nbits(offset, bitoffset, 1);
1333 /* uP-ModeVersions */
1334 proto_tree_add_bitstring(tree, hf_ranap_uP_ModeVersions, tvb, *offset,
1336 proceed_nbits(offset, bitoffset, 16);
1339 if (iE_Extensions_present)
1341 return(dissect_iE_Extension(tvb, tree, offset, bitoffset, "UserPlaneInformation"));
1349 dissect_sDU_Parameters(tvbuff_t *tvb, proto_tree *ie_tree, gint *offset, gint *bitoffset)
1351 proto_item *sDU_item = NULL;
1352 proto_tree *sDU_tree = NULL;
1353 proto_item *optionals_item = NULL;
1354 proto_tree *optionals_tree = NULL;
1356 int extension_present;
1357 int sDU_ErrorRatio_present;
1358 int sDU_FormatInformationParameters_present;
1359 int iE_Extensions_present;
1360 int sDU_ErrorRatio_iE_Extensions_present;
1361 int residualBitErrorRatio_iE_Extensions_present;
1363 gint number_of_sDU_FormatInformationParameters;
1364 int sDU_FormatInformationParameters_extension_present;
1365 int subflowSDU_Size_present;
1366 int rAB_SubflowCombinationBitRate_present;
1367 int sDU_FormatInformationParameters_iE_Extensions_present;
1370 /* create subtree for sDU_Parameters */
1371 sDU_item = proto_tree_add_text(ie_tree, tvb, *offset, 0,
1373 sDU_tree = proto_item_add_subtree(sDU_item, ett_ranap_sDU);
1375 /* create subtree for extension/optional/default bitmap */
1376 optionals_item = proto_tree_add_text(sDU_tree, tvb, *offset, 1,
1377 "sDU_Parameters Extension/Optional/Default bitmap");
1378 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
1380 /* protocol_extension present ? */
1381 extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1382 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
1383 *offset, *bitoffset, 1, 0);
1384 proceed_nbits(offset, bitoffset, 1);
1386 /* sDU_ErrorRatio present ? */
1387 sDU_ErrorRatio_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1388 proto_tree_add_uint_bits(optionals_tree, hf_ranap_sDU_ErrorRatio_present, tvb,
1389 *offset, *bitoffset, 1, 0);
1390 proceed_nbits(offset, bitoffset, 1);
1392 /* sDU_FormatInformationParameters present ? */
1393 sDU_FormatInformationParameters_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1394 proto_tree_add_uint_bits(optionals_tree, hf_ranap_sDU_FormatInformationParameters_present, tvb,
1395 *offset, *bitoffset, 1, 0);
1396 proceed_nbits(offset, bitoffset, 1);
1398 /* iE_Extensions present ? */
1399 iE_Extensions_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1400 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present, tvb,
1401 *offset, *bitoffset, 1, 0);
1402 proceed_nbits(offset, bitoffset, 1);
1405 /* sDU_ErrorRatio */
1406 if (sDU_ErrorRatio_present)
1408 sDU_ErrorRatio_iE_Extensions_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1409 proceed_nbits(offset, bitoffset, 1);
1411 proto_tree_add_uint_bits(sDU_tree, hf_ranap_sDU_ErrorRatio_mantissa, tvb, *offset,
1413 proceed_nbits(offset, bitoffset, 4);
1415 proto_tree_add_uint_bits(sDU_tree, hf_ranap_sDU_ErrorRatio_exponent, tvb, *offset,
1417 proceed_nbits(offset, bitoffset, 3);
1419 if (sDU_ErrorRatio_iE_Extensions_present)
1421 if ((ret=dissect_iE_Extension(tvb, sDU_tree, offset, bitoffset, "sDU_ErrorRatio")) != 0)
1426 /* residualBitErrorRatio */
1427 residualBitErrorRatio_iE_Extensions_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1428 proceed_nbits(offset, bitoffset, 1);
1430 proto_tree_add_uint_bits(sDU_tree, hf_ranap_residualBitErrorRatio_mantissa, tvb, *offset,
1432 proceed_nbits(offset, bitoffset, 4);
1434 proto_tree_add_uint_bits(sDU_tree, hf_ranap_sDU_ErrorRatio_exponent, tvb, *offset,
1436 proceed_nbits(offset, bitoffset, 3);
1439 if (residualBitErrorRatio_iE_Extensions_present)
1441 if ((ret=dissect_iE_Extension(tvb, sDU_tree, offset, bitoffset, "residualBitErrorRatio")) != 0)
1446 /* deliveryOfErroneousSDU */
1447 proto_tree_add_uint_bits(sDU_tree, hf_ranap_deliveryOfErroneousSDU, tvb, *offset,
1449 proceed_nbits(offset, bitoffset, 2);
1452 /* sDU_FormatInformationParameters */
1453 if (sDU_FormatInformationParameters_present)
1455 number_of_sDU_FormatInformationParameters = extract_nbits(tvb, *offset, *bitoffset, 6) + 1;
1456 proceed_nbits(offset, bitoffset, 6);
1458 for (i=1; i<= number_of_sDU_FormatInformationParameters; i++)
1460 /* create subtree for extension/optional/default bitmap */
1461 optionals_item = proto_tree_add_text(sDU_tree, tvb, *offset, 1,
1462 "sDU_FormatInformationParameters Extension/Optional/Default bitmap");
1463 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
1465 /* protocol extension present ? */
1466 sDU_FormatInformationParameters_extension_present =
1467 extract_nbits(tvb, *offset, *bitoffset, 1);
1468 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
1469 *offset, *bitoffset, 1, 0);
1470 proceed_nbits(offset, bitoffset, 1);
1472 /* subflowSDU_Size present ? */
1473 subflowSDU_Size_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1474 proto_tree_add_uint_bits(optionals_tree, hf_ranap_subflowSDU_Size_present, tvb,
1475 *offset, *bitoffset, 1, 0);
1476 proceed_nbits(offset, bitoffset, 1);
1478 /* rAB_SubflowCombinationBitRate present ? */
1479 rAB_SubflowCombinationBitRate_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1480 proto_tree_add_uint_bits(optionals_tree, hf_ranap_rAB_SubflowCombinationBitRate_present, tvb,
1481 *offset, *bitoffset, 1, 0);
1482 proceed_nbits(offset, bitoffset, 1);
1484 /* ie_Extension present ? */
1485 sDU_FormatInformationParameters_iE_Extensions_present =
1486 extract_nbits(tvb, *offset, *bitoffset, 1);
1487 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present, tvb,
1488 *offset, *bitoffset, 1, 0);
1489 proceed_nbits(offset, bitoffset, 1);
1491 if (subflowSDU_Size_present)
1493 allign(offset, bitoffset);
1494 proto_tree_add_item(sDU_tree, hf_ranap_subflowSDU_Size,
1495 tvb, *offset, subflowSDU_Size_LENGTH, FALSE);
1496 offset += subflowSDU_Size_LENGTH;
1499 if (rAB_SubflowCombinationBitRate_present)
1501 proto_tree_add_PERint32(sDU_tree, hf_ranap_rAB_SubflowCombinationBitRate,
1502 tvb, *offset, *bitoffset, &length, 0);
1503 proceed_perint32(offset, bitoffset, length);
1506 if (sDU_FormatInformationParameters_iE_Extensions_present)
1508 if ((ret=dissect_iE_Extension(tvb, sDU_tree, offset, bitoffset,
1509 "sDU_FormatInformationParameters" )) != 0)
1515 if (extension_present)
1517 /* extended sequence */
1518 /* decoding is not supported */
1519 proto_tree_add_text(ie_tree, tvb, *offset, IE_PROTOCOL_EXTENSION_LENGTH,
1520 "Protocol extension for sDU_FormatInformationParameters present, dissection not supported");
1530 dissect_rAB_Parameters(tvbuff_t *tvb, proto_tree *ie_tree, gint *offset, gint *bitoffset)
1533 proto_item *rab_item = NULL;
1534 proto_tree *rab_tree = NULL;
1535 proto_item *optionals_item = NULL;
1536 proto_tree *optionals_tree = NULL;
1537 proto_item *prio_item = NULL;
1538 proto_tree *prio_tree = NULL;
1540 int extension_present;
1541 int tmp_extension_present;
1542 int guaranteedBitRate_present;
1543 int transferDelay_present;
1544 int trafficHandlingPriority_present;
1545 int allocationOrRetentionPriority_present;
1546 int sourceStatisticsDescriptor_present;
1547 int relocationRequirement_present;
1548 int iE_Extensions_present;
1549 int tmp_iE_Extensions_present;
1553 /* create subtree for rAB_Parameters */
1554 rab_item = proto_tree_add_text(ie_tree, tvb, *offset, 0,
1556 rab_tree = proto_item_add_subtree(rab_item, ett_ranap_rAB_Parameters);
1558 /* create subtree for extension/optional/default bitmap */
1559 optionals_item = proto_tree_add_text(rab_tree, tvb, *offset, IE_PROTOCOL_EXTENSION_LENGTH,
1560 "rAB_Parameters Extension/Optional/Default bitmap");
1561 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
1563 /* protocol extension present ? */
1564 extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1565 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
1566 *offset, *bitoffset, 1, 0);
1567 proceed_nbits(offset, bitoffset, 1);
1569 /* guaranteedBitRate present ? */
1570 guaranteedBitRate_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1571 proto_tree_add_uint_bits(optionals_tree, hf_ranap_guaranteedBitRate_present,
1572 tvb, *offset, *bitoffset, 1, 0);
1573 proceed_nbits(offset, bitoffset, 1);
1575 /* transferDelay present ? */
1576 transferDelay_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1577 proto_tree_add_uint_bits(optionals_tree, hf_ranap_transferDelay_present,
1578 tvb, *offset, *bitoffset, 1, 0);
1579 proceed_nbits(offset, bitoffset, 1);
1581 /* trafficHandlingPriority present ? */
1582 trafficHandlingPriority_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1583 proto_tree_add_uint_bits(optionals_tree, hf_ranap_trafficHandlingPriority_present,
1584 tvb, *offset, *bitoffset, 1, 0);
1585 proceed_nbits(offset, bitoffset, 1);
1587 /* allocationOrRetentionPriority present ? */
1588 allocationOrRetentionPriority_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1589 proto_tree_add_uint_bits(optionals_tree, hf_ranap_allocationOrRetentionPriority_present,
1590 tvb, *offset, *bitoffset, 1, 0);
1591 proceed_nbits(offset, bitoffset, 1);
1593 /* sourceStatisticsDescriptor present ? */
1594 sourceStatisticsDescriptor_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1595 proto_tree_add_uint_bits(optionals_tree, hf_ranap_sourceStatisticsDescriptor_present,
1596 tvb, *offset, *bitoffset, 1, 0);
1597 proceed_nbits(offset, bitoffset, 1);
1599 /* relocationRequirement present ? */
1600 relocationRequirement_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1601 proto_tree_add_uint_bits(optionals_tree, hf_ranap_relocationRequirement_present,
1602 tvb, *offset, *bitoffset, 1, 0);
1603 proceed_nbits(offset, bitoffset, 1);
1605 /* iE-Extensions present ? */
1606 iE_Extensions_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1607 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present,
1608 tvb, *offset, *bitoffset, 1, 0);
1609 proceed_nbits(offset, bitoffset, 1);
1613 tmp_extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1614 proceed_nbits(offset, bitoffset, 1);
1616 proto_tree_add_uint_bits(rab_tree, hf_ranap_trafficClass,
1617 tvb, *offset, *bitoffset, 2, 0);
1618 proceed_nbits(offset, bitoffset, 2);
1620 if (tmp_extension_present)
1622 /* decoding is not supported */
1623 proto_tree_add_text(rab_tree, tvb, *offset, IE_PROTOCOL_EXTENSION_LENGTH,
1624 "Protocol extension for trafficClass present, dissection not supported");
1629 /* rAB-AsymmetryIndicator */
1630 tmp_extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1631 proceed_nbits(offset, bitoffset, 1);
1633 proto_tree_add_uint_bits(rab_tree, hf_ranap_rAB_AsymmetryIndicator,
1634 tvb, *offset, *bitoffset, 2, 0);
1635 proceed_nbits(offset, bitoffset, 2);
1637 if (tmp_extension_present)
1639 /* decoding is not supported */
1640 proto_tree_add_text(rab_tree, tvb, *offset, IE_PROTOCOL_EXTENSION_LENGTH,
1641 "Protocol extension for rAB-AsymmetryIndicator present, dissection not supported");
1647 tmp_byte = extract_nbits(tvb, *offset, *bitoffset, 1) +1 ; /*sequence 1..2 */
1648 proceed_nbits(offset, bitoffset, 1);
1650 for (i=1; i<= tmp_byte; i++)
1652 proto_tree_add_PERint32(rab_tree, hf_ranap_maxBitrate,
1653 tvb, *offset, *bitoffset, &length, 1);
1654 proceed_perint32(offset, bitoffset, length);
1658 /* guaranteedBitRate */
1659 if (guaranteedBitRate_present)
1661 tmp_byte = extract_nbits(tvb, *offset, *bitoffset, 1) +1 ; /*sequence 1..2 */
1662 proceed_nbits(offset, bitoffset, 1);
1664 for (i=1; i<= tmp_byte; i++)
1666 proto_tree_add_PERint32(rab_tree, hf_ranap_guaranteedBitrate,
1667 tvb, *offset, *bitoffset, &length, 0);
1668 proceed_perint32(offset, bitoffset, length);
1673 proto_tree_add_uint_bits(rab_tree, hf_ranap_deliveryOrder, tvb, *offset,
1675 proceed_nbits(offset, bitoffset, 1);
1679 allign(offset, bitoffset);
1680 proto_tree_add_item(rab_tree, hf_ranap_maxSDU_Size,
1681 tvb, *offset, maxSDU_Size_LENGTH, FALSE);
1682 *offset += maxSDU_Size_LENGTH;
1684 /* sDU-Parameters */
1685 tmp_byte = extract_nbits(tvb, *offset, *bitoffset, 3) + 1; /*sequence 1..7 */
1686 proceed_nbits(offset, bitoffset, 3);
1687 for (i=1; i<= tmp_byte; i++)
1689 if ((ret=dissect_sDU_Parameters(tvb, rab_tree, offset, bitoffset))!=0) return(ret);
1693 if (transferDelay_present)
1695 allign(offset, bitoffset);
1696 proto_tree_add_item(rab_tree, hf_ranap_transferDelay,
1697 tvb, *offset, transferDelay_LENGTH, FALSE);
1698 *offset += transferDelay_LENGTH;
1702 /* trafficHandlingPriority */
1703 if (trafficHandlingPriority_present)
1705 proto_tree_add_uint_bits(rab_tree, hf_ranap_trafficHandlingPriority, tvb, *offset,
1707 proceed_nbits(offset, bitoffset, 4);
1710 /* allocationOrRetentionPriority */
1711 if (allocationOrRetentionPriority_present)
1713 /* create subtree for */
1714 prio_item = proto_tree_add_text(rab_tree, tvb, *offset, 0,
1715 "allocationOrRetentionPriority");
1716 prio_tree = proto_item_add_subtree(prio_item, ett_ranap_allocationOrRetentionPriority);
1718 /* protocol extension present ? */
1719 tmp_extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1720 proceed_nbits(offset, bitoffset, 1);
1722 /* iE Extension present ? */
1723 tmp_iE_Extensions_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1724 proceed_nbits(offset, bitoffset, 1);
1726 /* allocationOrRetentionPriority */
1727 proto_tree_add_uint_bits(prio_tree, hf_ranap_priorityLevel, tvb, *offset,
1729 proceed_nbits(offset, bitoffset, 4);
1731 /* pre-emptionCapability */
1732 proto_tree_add_uint_bits(prio_tree, hf_ranap_pre_emptionCapability, tvb, *offset,
1734 proceed_nbits(offset, bitoffset, 1);
1736 /* pre-emptionVulnerability */
1737 proto_tree_add_uint_bits(prio_tree, hf_ranap_pre_emptionVulnerability, tvb, *offset,
1739 proceed_nbits(offset, bitoffset, 1);
1741 /* queuingAllowed */
1742 proto_tree_add_uint_bits(prio_tree, hf_ranap_queuingAllowed, tvb, *offset,
1744 proceed_nbits(offset, bitoffset, 1);
1746 if (tmp_iE_Extensions_present)
1748 if ((ret=dissect_iE_Extension(tvb, prio_tree, offset, bitoffset,
1749 "AllocationOrRetentionPriority")) != 0)
1753 if (tmp_extension_present)
1755 /* decoding is not supported */
1756 proto_tree_add_text(prio_tree, tvb, *offset, IE_PROTOCOL_EXTENSION_LENGTH,
1757 "Protocol extension for rAB-allocationOrRetentionPriority present, dissection not supported");
1762 /* sourceStatisticsDescriptor */
1763 if (sourceStatisticsDescriptor_present)
1765 /* protocol extension */
1766 tmp_extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1767 proceed_nbits(offset, bitoffset, 1);
1769 if (tmp_extension_present)
1771 /* decoding is not supported */
1772 proto_tree_add_text(prio_tree, tvb, *offset, IE_PROTOCOL_EXTENSION_LENGTH,
1773 "Protocol extension for sourceStatisticsDescriptor present, dissection not supported");
1777 proto_tree_add_uint_bits(rab_tree, hf_ranap_sourceStatisticsDescriptor, tvb, *offset,
1779 proceed_nbits(offset, bitoffset, 1);
1782 /* relocationRequirement */
1783 if (relocationRequirement_present)
1785 /* protocol extension */
1786 tmp_extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1787 proceed_nbits(offset, bitoffset, 1);
1789 if (tmp_extension_present)
1791 /* decoding is not supported */
1792 proto_tree_add_text(prio_tree, tvb, *offset, IE_PROTOCOL_EXTENSION_LENGTH,
1793 "Protocol extension for relocationRequirement present, dissection not supported");
1797 proto_tree_add_uint_bits(rab_tree, hf_ranap_relocationRequirement, tvb, *offset,
1799 proceed_nbits(offset, bitoffset, 1);
1804 if (iE_Extensions_present)
1806 if ((ret=dissect_iE_Extension(tvb, rab_tree, offset, bitoffset, "rAB_Parameters" )) != 0 )
1811 if (extension_present)
1813 /* decoding is not supported */
1814 proto_tree_add_text(rab_tree, tvb, *offset, IE_PROTOCOL_EXTENSION_LENGTH,
1815 "Protocol extension for rAB_Parameters present, dissection not supported");
1825 dissect_TransportLayerAddress(tvbuff_t *tvb, proto_tree *ie_tree, gint *offset, gint *bitoffset)
1827 gint extension_present;
1830 extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1831 proceed_nbits(offset, bitoffset, 1);
1832 if (extension_present)
1834 /* extended integer */
1835 proto_tree_add_text(ie_tree, tvb, *offset, 0,
1836 "extension present for TransportLayerAddress, dissection not supported");
1840 /* extract and add length of transportLayerAddress bitstring */
1841 str_length = extract_nbits(tvb, *offset, *bitoffset, 8) + 1;
1842 proto_tree_add_uint_bits(ie_tree, hf_ranap_transportLayerAddress_length,
1843 tvb, *offset, *bitoffset, 8, 1);
1844 proceed_nbits(offset, bitoffset, 8);
1845 allign(offset, bitoffset);
1847 /* add transportLayerAddress */
1848 proto_tree_add_bitstring(ie_tree, hf_ranap_transportLayerAddress, tvb, *offset,
1849 *bitoffset, str_length);
1850 proceed_nbits(offset, bitoffset, str_length);
1858 dissect_iuTransportAssociation(tvbuff_t *tvb, proto_tree *ie_tree, gint *offset, gint *bitoffset)
1860 guint extension_present;
1863 /* extension present ? */
1864 extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1865 if (extension_present)
1867 /* extended choice */
1868 proto_tree_add_text(ie_tree, tvb, *offset, 0,
1869 "extension present for IuTransportAssociation, dissection not supported");
1872 proceed_nbits(offset, bitoffset, 1);
1875 choice_value = extract_nbits(tvb, *offset, *bitoffset, 1);
1876 proceed_nbits(offset, bitoffset, 1);
1877 allign(offset, bitoffset);
1878 if (choice_value == 0)
1881 proto_tree_add_item(ie_tree, hf_ranap_gTP_TEI, tvb, *offset, 4, FALSE);
1887 proto_tree_add_item(ie_tree, hf_ranap_bindingID, tvb, *offset, 4, FALSE);
1896 dissect_transportLayerInformation(tvbuff_t *tvb, proto_tree *ie_tree, gint *offset, gint *bitoffset)
1898 proto_item *optionals_item = NULL;
1899 proto_tree *optionals_tree = NULL;
1900 int extension_present;
1901 int iE_Extensions_present;
1904 /* create subtree for extension/optional/default bitmap */
1905 optionals_item = proto_tree_add_text(ie_tree, tvb, *offset, IE_PROTOCOL_EXTENSION_LENGTH,
1906 "TransportLayerInformation Extension/Optional/Default bitmap");
1907 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
1910 /* protocol extension present ? */
1911 extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1912 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
1913 *offset, *bitoffset, 1, 0);
1914 proceed_nbits(offset, bitoffset, 1);
1916 /* iE-Extensions present ? */
1917 iE_Extensions_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1918 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present,
1919 tvb, *offset, *bitoffset, 1, 0);
1920 proceed_nbits(offset, bitoffset, 1);
1923 /* transportLayerAddress */
1924 if ((ret=dissect_TransportLayerAddress(tvb, ie_tree, offset, bitoffset)) != 0)
1927 /* iuTransportAssociation */
1928 if ((ret=dissect_iuTransportAssociation(tvb, ie_tree, offset, bitoffset)) != 0)
1932 if (iE_Extensions_present)
1934 if ((ret=dissect_iE_Extension(tvb, ie_tree, offset, bitoffset, "TransportLayerInformation" )) != 0 )
1938 /* protocol extension */
1939 if (extension_present)
1941 /* extended sequence */
1942 proto_tree_add_text(ie_tree, tvb, *offset, 0,
1943 "extension present for TransportLayerInformation, dissection not supported");
1952 dissect_dataVolumeList (tvbuff_t *tvb, proto_tree *ie_tree, gint *offset, gint *bitoffset, char *parname)
1954 proto_item *optionals_item = NULL;
1955 proto_tree *optionals_tree = NULL;
1956 gint extension_present;
1957 gint dataVolumeReference_present;
1958 gint iE_Extensions_present;
1964 /* number of volumes */
1965 number_vol = extract_nbits(tvb, *offset, *bitoffset, 1) + 1;
1966 proceed_nbits(offset, bitoffset, 1);
1968 for (i=1; i<=number_vol; i++)
1970 /* create subtree for extension/optional/default bitmap */
1971 optionals_item = proto_tree_add_text(ie_tree, tvb, *offset, 1,
1972 "%d. %s Extension/Optional/Default bitmap",
1974 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
1976 /* protocol_extension present ? */
1977 extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1978 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
1979 *offset, *bitoffset, 1, 0);
1980 proceed_nbits(offset, bitoffset, 1);
1982 /* dataVolumeReference present ? */
1983 dataVolumeReference_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1984 proto_tree_add_uint_bits(optionals_tree, hf_ranap_dataVolumeReference_present, tvb,
1985 *offset, *bitoffset, 1, 0);
1986 proceed_nbits(offset, bitoffset, 1);
1988 /* iE_Extensions present ? */
1989 iE_Extensions_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1990 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present, tvb,
1991 *offset, *bitoffset, 1, 0);
1992 proceed_nbits(offset, bitoffset, 1);
1995 /* UnsuccessfullyTransmittedDataVolume */
1996 proto_tree_add_PERint32(ie_tree, hf_ranap_dl_UnsuccessfullyTransmittedDataVolume,
1997 tvb, *offset, *bitoffset, &length, 0);
1998 proceed_perint32(offset, bitoffset, length);
2000 /* DataVolumeReference */
2001 if (dataVolumeReference_present)
2003 proto_tree_add_uint_bits(ie_tree, hf_ranap_dataVolumeReference, tvb,
2004 *offset, *bitoffset, 8, 0);
2005 proceed_nbits(offset, bitoffset, 8);
2009 if (iE_Extensions_present)
2011 if ((ret=dissect_iE_Extension(tvb, ie_tree, offset, bitoffset, "dl-dataVolumes" )) != 0)
2015 /* protocol extended */
2016 if (extension_present)
2018 /* extended sequence */
2019 /* decoding is not supported */
2020 proto_tree_add_text(ie_tree, tvb, *offset, IE_PROTOCOL_EXTENSION_LENGTH,
2021 "Protocol extension for dl-dataVolumes present, dissection not supported");
2031 dissect_cause(tvbuff_t *tvb, proto_tree *ie_tree, gint *offset, gint *bitoffset)
2033 gint extension_present;
2036 /* protocol extension present ? */
2037 extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
2038 proceed_nbits(offset, bitoffset, 1);
2039 if (extension_present)
2041 /* choice extension present */
2042 proto_tree_add_text(ie_tree, tvb, *offset, 0,
2043 "extension present for cause, dissection not supported");
2046 cause_choice = extract_nbits(tvb, *offset, *bitoffset, 3);
2047 proto_tree_add_uint_bits(ie_tree, hf_ranap_cause_choice,
2048 tvb, *offset, *bitoffset, 3, 0);
2049 proceed_nbits(offset, bitoffset, 3);
2051 switch (cause_choice)
2053 case CC_CauseRadioNetwork:
2054 proto_tree_add_uint_bits(ie_tree, hf_ranap_cause_value,
2055 tvb, *offset, *bitoffset, 6, 1);
2056 proceed_nbits(offset, bitoffset, 6);
2058 case CC_CauseTransmissionNetwork:
2059 proto_tree_add_uint_bits(ie_tree, hf_ranap_cause_value,
2060 tvb, *offset, *bitoffset, 4, 65);
2061 proceed_nbits(offset, bitoffset, 4);
2064 proto_tree_add_uint_bits(ie_tree, hf_ranap_cause_value,
2065 tvb, *offset, *bitoffset, 4, 81);
2066 proceed_nbits(offset, bitoffset, 4);
2068 case CC_CauseProtocol:
2069 proto_tree_add_uint_bits(ie_tree, hf_ranap_cause_value,
2070 tvb, *offset, *bitoffset, 4, 97);
2071 proceed_nbits(offset, bitoffset, 4);
2073 proto_tree_add_uint_bits(ie_tree, hf_ranap_cause_value,
2074 tvb, *offset, *bitoffset, 4, 113);
2075 proceed_nbits(offset, bitoffset, 4);
2077 case CC_CauseNon_Standard:
2078 proto_tree_add_uint_bits(ie_tree, hf_ranap_cause_value,
2079 tvb, *offset, *bitoffset, 7, 129);
2080 proceed_nbits(offset, bitoffset, 7);
2083 proto_tree_add_text(ie_tree, tvb, *offset, 0,
2084 "unexpected cause choice value, dissection not supported");
2092 dissect_iEsCriticalityDiagnostics(tvbuff_t *tvb, proto_tree *ie_tree, gint *offset, gint *bitoffset)
2094 proto_item *diag_item = NULL;
2095 proto_tree *diag_tree = NULL;
2096 proto_item *optionals_item = NULL;
2097 proto_tree *optionals_tree = NULL;
2098 int extension_present;
2099 int repetitionNumber_present;
2100 int iE_Extensions_present;
2104 allign(offset, bitoffset);
2105 num_of_errors = extract_nbits(tvb, *offset, *bitoffset, 8) + 1;
2106 proto_tree_add_uint_bits(ie_tree, hf_ranap_num_of_CriticalityDiagnostics_IEs, tvb,
2107 *offset, *bitoffset, 8, 1);
2108 proceed_nbits(offset, bitoffset, 8);
2110 for ( i= 1; i <= num_of_errors; i++)
2112 /* add subtree for CriticalityDiagnostics-IE */
2113 diag_item = proto_tree_add_text(ie_tree, tvb, *offset, 0,
2114 "%d. CriticalityDiagnostics-IE", i);
2115 diag_tree = proto_item_add_subtree(diag_item, ett_ranap_CriticalityDiagnostics_IE);
2117 /* create subtree for extension/optional/default bitmap */
2118 optionals_item = proto_tree_add_text(diag_tree, tvb, *offset, 1,
2119 "CriticalityDiagnostics-IE Extension/Optional/Default bitmap");
2120 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
2122 /* protocol_extension present ? */
2123 extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
2124 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
2125 *offset, *bitoffset, 1, 0);
2126 proceed_nbits(offset, bitoffset, 1);
2128 /* repetitionNumber present ? */
2129 repetitionNumber_present = extract_nbits(tvb, *offset, *bitoffset, 1);
2130 proto_tree_add_uint_bits(optionals_tree, hf_ranap_repetitionNumber_present, tvb,
2131 *offset, *bitoffset, 1, 0);
2132 proceed_nbits(offset, bitoffset, 1);
2134 /* iE_Extensions present ? */
2135 iE_Extensions_present = extract_nbits(tvb, *offset, *bitoffset, 1);
2136 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present,
2137 tvb, *offset, *bitoffset, 1, 0);
2138 proceed_nbits(offset, bitoffset, 1);
2141 proto_tree_add_uint_bits(diag_tree, hf_ranap_iECriticality,
2142 tvb, *offset, *bitoffset, 2, 0);
2143 proceed_nbits(offset, bitoffset, 2);
2146 allign(offset, bitoffset);
2147 proto_tree_add_item(diag_tree, hf_ranap_ie_ie_id, tvb,
2148 *offset, IE_ID_LENGTH, FALSE);
2149 *offset += IE_ID_LENGTH;
2151 /* repetitionNumber */
2152 if (repetitionNumber_present)
2154 allign(offset, bitoffset);
2155 proto_tree_add_uint_bits(diag_tree, hf_ranap_repetitionNumber,
2156 tvb, *offset, *bitoffset, 8, 1);
2157 proceed_nbits(offset, bitoffset, 8);
2161 if (iE_Extensions_present)
2163 return(dissect_iE_Extension(tvb, diag_tree, offset, bitoffset, "CriticalityDiagnostics-IE"));
2167 /* protocol extended */
2168 if (extension_present)
2170 /* extended sequence */
2171 /* decoding is not supported */
2172 proto_tree_add_text(diag_tree, tvb, *offset, IE_PROTOCOL_EXTENSION_LENGTH,
2173 "Protocol extension for CriticalityDiagnostics-IE present, dissection not supported");
2183 /*****************************************************************************/
2185 /* Dissecting Functions for IEs */
2187 /*****************************************************************************/
2190 dissect_IE_RAB_ID(tvbuff_t *tvb, proto_tree *ie_tree)
2194 proto_tree_add_item(ie_tree, hf_ranap_rab_id, tvb,
2195 0, RAB_ID_LENGTH, FALSE);
2202 dissect_IE_RAC(tvbuff_t *tvb, proto_tree *ie_tree)
2206 proto_tree_add_item(ie_tree, hf_ranap_rac, tvb,
2207 0, RAC_LENGTH, FALSE);
2214 dissect_IE_LAI(tvbuff_t *tvb, proto_tree *ie_tree)
2216 proto_item *optionals_item = NULL;
2217 proto_tree *optionals_tree = NULL;
2218 int iE_Extensions_present;
2225 /* create subtree for extension/optional/default bitmap */
2226 optionals_item = proto_tree_add_text(ie_tree, tvb, offset, 1,
2227 "LAI Extension/Optional/Default bitmap");
2228 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
2230 /* iE_Extensions_present present ? */
2231 iE_Extensions_present = extract_nbits(tvb, offset, bitoffset, 1);
2232 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present, tvb,
2233 offset, bitoffset, 1, 0);
2234 proceed_nbits(&offset, &bitoffset, 1);
2237 allign(&offset, &bitoffset);
2238 proto_tree_add_item(ie_tree, hf_ranap_plmn_id, tvb,
2239 offset, PLMN_ID_LENGTH, FALSE);
2240 offset += PLMN_ID_LENGTH;
2243 proto_tree_add_item(ie_tree, hf_ranap_lac, tvb,
2244 offset, LAC_LENGTH, FALSE);
2245 offset += LAC_LENGTH;
2248 if (iE_Extensions_present)
2250 if ((ret=dissect_iE_Extension(tvb, ie_tree, &offset, &bitoffset, "LAI")) != 0)
2259 dissect_IE_SAI(tvbuff_t *tvb, proto_tree *ie_tree)
2261 proto_item *optionals_item = NULL;
2262 proto_tree *optionals_tree = NULL;
2263 int iE_Extensions_present;
2270 /* create subtree for extension/optional/default bitmap */
2271 optionals_item = proto_tree_add_text(ie_tree, tvb, offset, 1,
2272 "SAI Extension/Optional/Default bitmap");
2273 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
2275 /* iE_Extensions_present present ? */
2276 iE_Extensions_present = extract_nbits(tvb, offset, bitoffset, 1);
2277 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present, tvb,
2278 offset, bitoffset, 1, 0);
2279 proceed_nbits(&offset, &bitoffset, 1);
2282 proto_tree_add_item(ie_tree, hf_ranap_plmn_id, tvb,
2283 offset, PLMN_ID_LENGTH, FALSE);
2284 offset += PLMN_ID_LENGTH;
2287 proto_tree_add_item(ie_tree, hf_ranap_lac, tvb,
2288 offset, LAC_LENGTH, FALSE);
2289 offset += LAC_LENGTH;
2292 proto_tree_add_item(ie_tree, hf_ranap_sac, tvb,
2293 offset, SAC_LENGTH, FALSE);
2294 offset += SAC_LENGTH;
2297 if (iE_Extensions_present)
2299 if ((ret=dissect_iE_Extension(tvb, ie_tree, &offset, &bitoffset, "LAI")) != 0)
2308 dissect_IE_NAS_PDU(tvbuff_t *tvb, proto_tree *ie_tree)
2313 if (extract_length(tvb, 0, &length, &length_size) != 0)
2317 /* decoding is not supported */
2318 proto_tree_add_text(ie_tree, tvb, 0,
2319 2, "Number of Octets greater than 0x3FFF, dissection not supported");
2326 /* NAS - PDU length */
2327 proto_tree_add_item(ie_tree, hf_ranap_nas_pdu_length, tvb,
2328 0, length_size, FALSE);
2331 /* call NAS dissector (not implemented yet) */
2334 /* meanwhile display in hex */
2338 proto_tree_add_item(ie_tree, hf_ranap_nas_pdu, tvb,
2339 length_size, length, FALSE);
2346 dissect_IE_CN_DomainIndicator(tvbuff_t *tvb, proto_tree *ie_tree)
2353 proto_tree_add_uint_bits(ie_tree, hf_ranap_CN_DomainIndicator, tvb,
2354 offset, bitoffset, 1, 0);
2361 dissect_IE_IuSigConId(tvbuff_t *tvb, proto_tree *ie_tree)
2365 proto_tree_add_bitstring(ie_tree, hf_ranap_IuSigConId, tvb, 0, 0, 24);
2372 dissect_IE_SAPI(tvbuff_t *tvb, proto_tree *ie_tree)
2376 int extension_present;
2380 /* protocol_extension present ? */
2381 extension_present = extract_nbits(tvb, offset, bitoffset, 1);
2382 proceed_nbits(&offset, &bitoffset, 1);
2384 if (extension_present)
2387 /* decoding is not supported */
2388 proto_tree_add_text(ie_tree, tvb, offset, IE_PROTOCOL_EXTENSION_LENGTH,
2389 "Protocol extension for IE_SAPI present, dissection not supported");
2394 proto_tree_add_uint_bits(ie_tree, hf_ranap_SAPI, tvb,
2395 offset, bitoffset, 1, 0);
2402 dissect_IE_TransportLayerAddress(tvbuff_t *tvb, proto_tree *ie_tree)
2409 return(dissect_TransportLayerAddress(tvb, ie_tree, &offset, &bitoffset));
2416 dissect_IE_IuTransportAssociation(tvbuff_t *tvb, proto_tree *ie_tree)
2423 return(dissect_iuTransportAssociation(tvb, ie_tree, &offset, &bitoffset));
2430 dissect_IE_Cause(tvbuff_t *tvb, proto_tree *ie_tree)
2437 return(dissect_cause(tvb, ie_tree, &offset, &bitoffset));
2444 dissect_IE_RAB_ReleasedItem_IuRelComp(tvbuff_t *tvb, proto_tree *ie_tree)
2446 proto_item *optionals_item = NULL;
2447 proto_tree *optionals_tree = NULL;
2448 int extension_present;
2449 int dl_GTP_PDU_SequenceNumber_present;
2450 int ul_GTP_PDU_SequenceNumber_present;
2451 int iE_Extensions_present;
2458 /* create subtree for extension/optional/default bitmap */
2459 optionals_item = proto_tree_add_text(ie_tree, tvb, offset, 1,
2460 "RAB_ReleasedItem_IuRelComp Extension/Optional/Default bitmap");
2461 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
2463 /* protocol_extension present ? */
2464 extension_present = extract_nbits(tvb, offset, bitoffset, 1);
2465 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
2466 offset, bitoffset, 1, 0);
2467 proceed_nbits(&offset, &bitoffset, 1);
2469 /* dl_GTP_PDU_SequenceNumber present ? */
2470 dl_GTP_PDU_SequenceNumber_present = extract_nbits(tvb, offset, bitoffset, 1);
2471 proto_tree_add_uint_bits(optionals_tree, hf_ranap_dl_GTP_PDU_SequenceNumber_present, tvb,
2472 offset, bitoffset, 1, 0);
2473 proceed_nbits(&offset, &bitoffset, 1);
2475 /* ul_GTP_PDU_SequenceNumber present ? */
2476 ul_GTP_PDU_SequenceNumber_present = extract_nbits(tvb, offset, bitoffset, 1);
2477 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ul_GTP_PDU_SequenceNumber_present, tvb,
2478 offset, bitoffset, 1, 0);
2479 proceed_nbits(&offset, &bitoffset, 1);
2481 /* iE_Extensions_present present ? */
2482 iE_Extensions_present = extract_nbits(tvb, offset, bitoffset, 1);
2483 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present, tvb,
2484 offset, bitoffset, 1, 0);
2485 proceed_nbits(&offset, &bitoffset, 1);
2489 proto_tree_add_uint_bits(ie_tree, hf_ranap_rab_id,
2490 tvb, offset, bitoffset, 8, 0);
2491 proceed_nbits(&offset, &bitoffset, 8);
2493 /* dl-GTP-PDU-SequenceNumber */
2494 if (dl_GTP_PDU_SequenceNumber_present)
2496 allign(&offset, &bitoffset);
2497 proto_tree_add_item(ie_tree, hf_ranap_dl_GTP_PDU_SequenceNumber, tvb, offset, 2, FALSE);
2501 /* ul-GTP-PDU-SequenceNumber */
2502 if (ul_GTP_PDU_SequenceNumber_present)
2504 allign(&offset, &bitoffset);
2505 proto_tree_add_item(ie_tree, hf_ranap_ul_GTP_PDU_SequenceNumber, tvb, offset, 2, FALSE);
2510 if (iE_Extensions_present)
2512 if ((ret=dissect_iE_Extension(tvb, ie_tree, &offset, &bitoffset, "RAB_ReleasedItem_IuRelComp")) != 0)
2516 /* protocol extended */
2517 if (extension_present)
2519 /* extended sequence */
2520 /* decoding is not supported */
2521 proto_tree_add_text(ie_tree, tvb, offset, IE_PROTOCOL_EXTENSION_LENGTH,
2522 "Protocol extension for RAB_ReleasedItem_IuRelComp present, dissection not supported");
2531 dissect_IE_RAB_DataVolumeReportItem(tvbuff_t *tvb, proto_tree *ie_tree)
2533 proto_item *optionals_item = NULL;
2534 proto_tree *optionals_tree = NULL;
2535 int extension_present;
2536 int dl_UnsuccessfullyTransmittedDataVolume_present;
2537 int iE_Extensions_present;
2544 /* create subtree for extension/optional/default bitmap */
2545 optionals_item = proto_tree_add_text(ie_tree, tvb, offset, 1,
2546 "RAB_DataVolumeReportItem Extension/Optional/Default bitmap");
2547 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
2549 /* protocol_extension present ? */
2550 extension_present = extract_nbits(tvb, offset, bitoffset, 1);
2551 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
2552 offset, bitoffset, 1, 0);
2553 proceed_nbits(&offset, &bitoffset, 1);
2555 /* dl_UnsuccessfullyTransmittedDataVolume present ? */
2556 dl_UnsuccessfullyTransmittedDataVolume_present = extract_nbits(tvb, offset, bitoffset, 1);
2557 proto_tree_add_uint_bits(optionals_tree, hf_ranap_dl_UnsuccessfullyTransmittedDataVolume_present, tvb,
2558 offset, bitoffset, 1, 0);
2559 proceed_nbits(&offset, &bitoffset, 1);
2561 /* iE_Extensions_present present ? */
2562 iE_Extensions_present = extract_nbits(tvb, offset, bitoffset, 1);
2563 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present, tvb,
2564 offset, bitoffset, 1, 0);
2565 proceed_nbits(&offset, &bitoffset, 1);
2569 proto_tree_add_uint_bits(ie_tree, hf_ranap_rab_id,
2570 tvb, offset, bitoffset, 8, 0);
2571 proceed_nbits(&offset, &bitoffset, 8);
2573 /* dl_UnsuccessfullyTransmittedDataVolume */
2574 if (dl_UnsuccessfullyTransmittedDataVolume_present)
2577 if ((ret = dissect_dataVolumeList(tvb, ie_tree, &offset, &bitoffset,
2578 "dl_UnsuccessfullyTransmittedDataVolume")) != 0)
2583 if (iE_Extensions_present)
2585 if ((ret=dissect_iE_Extension(tvb, ie_tree, &offset, &bitoffset, "IE_RAB_DataVolumeReportItem")) != 0)
2589 /* protocol extended */
2590 if (extension_present)
2593 /* decoding is not supported */
2594 proto_tree_add_text(ie_tree, tvb, offset, IE_PROTOCOL_EXTENSION_LENGTH,
2595 "Protocol extension for IE_RAB_DataVolumeReportItem present, dissection not supported");
2604 dissect_IE_RAB_SetupOrModifyItemSecond(tvbuff_t *tvb, proto_tree *ie_tree)
2606 proto_item *optionals_item = NULL;
2607 proto_tree *optionals_tree = NULL;
2608 int extension_present;
2610 int pDP_TypeInformation_present;
2611 int dataVolumeReportingIndication_present;
2612 int dl_GTP_PDU_SequenceNumber_present;
2613 int ul_GTP_PDU_SequenceNumber_present;
2614 int dl_N_PDU_SequenceNumber_present;
2615 int ul_N_PDU_SequenceNumber_present;
2616 int iE_Extensions_present;
2625 /* create subtree for extension/optional/default bitmap */
2626 optionals_item = proto_tree_add_text(ie_tree, tvb, offset, 1,
2627 "SetupOrModifyItemSecond Extension/Optional/Default bitmap");
2628 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
2630 /* protocol_extension present ? */
2631 extension_present = extract_nbits(tvb, offset, bitoffset, 1);
2632 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
2633 offset, bitoffset, 1, 0);
2634 proceed_nbits(&offset, &bitoffset, 1);
2636 /* pDP_TypeInformation present ? */
2637 pDP_TypeInformation_present = extract_nbits(tvb, offset, bitoffset, 1);
2638 proto_tree_add_uint_bits(optionals_tree, hf_ranap_pDP_TypeInformation_present, tvb,
2639 offset, bitoffset, 1, 0);
2640 proceed_nbits(&offset, &bitoffset, 1);
2642 /* dataVolumeReportingIndication present ? */
2643 dataVolumeReportingIndication_present = extract_nbits(tvb, offset, bitoffset, 1);
2644 proto_tree_add_uint_bits(optionals_tree, hf_ranap_dataVolumeReportingIndication_present, tvb,
2645 offset, bitoffset, 1, 0);
2646 proceed_nbits(&offset, &bitoffset, 1);
2648 /* dl_GTP_PDU_SequenceNumber present present ? */
2649 dl_GTP_PDU_SequenceNumber_present = extract_nbits(tvb, offset, bitoffset, 1);
2650 proto_tree_add_uint_bits(optionals_tree, hf_ranap_dl_GTP_PDU_SequenceNumber_present, tvb,
2651 offset, bitoffset, 1, 0);
2652 proceed_nbits(&offset, &bitoffset, 1);
2655 /* ul_GTP_PDU_SequenceNumber present ? */
2656 ul_GTP_PDU_SequenceNumber_present = extract_nbits(tvb, offset, bitoffset, 1);
2657 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ul_GTP_PDU_SequenceNumber_present, tvb,
2658 offset, bitoffset, 1, 0);
2659 proceed_nbits(&offset, &bitoffset, 1);
2661 /* dl_N_PDU_SequenceNumber present ? */
2662 dl_N_PDU_SequenceNumber_present = extract_nbits(tvb, offset, bitoffset, 1);
2663 proto_tree_add_uint_bits(optionals_tree, hf_ranap_dl_N_PDU_SequenceNumber_present, tvb,
2664 offset, bitoffset, 1, 0);
2665 proceed_nbits(&offset, &bitoffset, 1);
2667 /* ul_N_PDU_SequenceNumber present ? */
2668 ul_N_PDU_SequenceNumber_present = extract_nbits(tvb, offset, bitoffset, 1);
2669 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ul_N_PDU_SequenceNumber_present, tvb,
2670 offset, bitoffset, 1, 0);
2671 proceed_nbits(&offset, &bitoffset, 1);
2673 /* iE_Extensions present ? */
2674 iE_Extensions_present = extract_nbits(tvb, offset, bitoffset, 1);
2675 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present, tvb,
2676 offset, bitoffset, 1, 0);
2677 proceed_nbits(&offset, &bitoffset, 1);
2679 /* pDP-TypeInformation */
2680 if (pDP_TypeInformation_present)
2682 tmp_byte = extract_nbits(tvb, offset, bitoffset, 1) + 1; /* Sequence 1..2 */
2683 proceed_nbits(&offset, &bitoffset, 1);
2684 for (i=1; i<=tmp_byte; i++)
2686 tmp_extension = extract_nbits(tvb, offset, bitoffset, 1);
2687 proceed_nbits(&offset, &bitoffset, 1);
2688 if (tmp_extension != 0)
2691 /* decoding is not supported */
2692 proto_tree_add_text(ie_tree, tvb, offset, IE_PROTOCOL_EXTENSION_LENGTH,
2693 "Protocol extension for PDP-Type present, dissection not supported");
2697 proto_tree_add_uint_bits(ie_tree, hf_ranap_PDP_Type, tvb,
2698 offset, bitoffset, 3, 0);
2699 proceed_nbits(&offset, &bitoffset, 3);
2703 /* dataVolumeReportingIndication */
2704 if (dataVolumeReportingIndication_present)
2706 proto_tree_add_uint_bits(ie_tree, hf_ranap_dataVolumeReportingIndication, tvb,
2707 offset, bitoffset, 1, 0);
2708 proceed_nbits(&offset, &bitoffset, 1);
2711 /* dl-GTP-PDU-SequenceNumber */
2712 if (dl_GTP_PDU_SequenceNumber_present)
2714 allign(&offset, &bitoffset);
2715 proto_tree_add_item(ie_tree, hf_ranap_dl_GTP_PDU_SequenceNumber, tvb, offset, 2, FALSE);
2719 /* ul-GTP-PDU-SequenceNumber */
2720 if (ul_GTP_PDU_SequenceNumber_present)
2722 allign(&offset, &bitoffset);
2723 proto_tree_add_item(ie_tree, hf_ranap_ul_GTP_PDU_SequenceNumber, tvb, offset, 2, FALSE);
2727 /* dl-N-PDU-SequenceNumber */
2728 if (dl_N_PDU_SequenceNumber_present)
2730 allign(&offset, &bitoffset);
2731 proto_tree_add_item(ie_tree, hf_ranap_dl_N_PDU_SequenceNumber, tvb, offset, 2, FALSE);
2735 /* ul-N-PDU-SequenceNumber */
2736 if (ul_N_PDU_SequenceNumber_present)
2738 allign(&offset, &bitoffset);
2739 proto_tree_add_item(ie_tree, hf_ranap_ul_N_PDU_SequenceNumber, tvb, offset, 2, FALSE);
2744 if (iE_Extensions_present)
2746 if ((ret=dissect_iE_Extension(tvb, ie_tree, &offset, &bitoffset, "SetupOrModifyItemSecond")) != 0)
2750 /* protocol extended */
2751 if (extension_present)
2754 /* decoding is not supported */
2755 proto_tree_add_text(ie_tree, tvb, offset, IE_PROTOCOL_EXTENSION_LENGTH,
2756 "Protocol extension for SetupOrModifyItemSecond present, dissection not supported");
2765 dissect_IE_RAB_SetupOrModifiedItem (tvbuff_t *tvb, proto_tree *ie_tree)
2767 proto_item *optionals_item = NULL;
2768 proto_tree *optionals_tree = NULL;
2770 int extension_present;
2771 int transportLayerAddress_present;
2772 int iuTransportAssociation_present;
2773 int dl_dataVolumes_present;
2774 int iE_Extensions_present;
2781 /* create subtree for extension/optional/default bitmap */
2782 optionals_item = proto_tree_add_text(ie_tree, tvb, offset, 1,
2783 "RAB-SetupOrModifiedItem Extension/Optional/Default bitmap");
2784 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
2786 /* protocol_extension present ? */
2787 extension_present = extract_nbits(tvb, offset, bitoffset, 1);
2788 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
2789 offset, bitoffset, 1, 0);
2790 proceed_nbits(&offset, &bitoffset, 1);
2792 /* transportLayerAddress present ? */
2793 transportLayerAddress_present = extract_nbits(tvb, offset, bitoffset, 1);
2794 proto_tree_add_uint_bits(optionals_tree, hf_ranap_transportLayerAddress_present, tvb,
2795 offset, bitoffset, 1, 0);
2796 proceed_nbits(&offset, &bitoffset, 1);
2798 /* iuTransportAssociation present ? */
2799 iuTransportAssociation_present = extract_nbits(tvb, offset, bitoffset, 1);
2800 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iuTransportAssociation_present, tvb,
2801 offset, bitoffset, 1, 0);
2802 proceed_nbits(&offset, &bitoffset, 1);
2804 /* dl_dataVolumes present ? */
2805 dl_dataVolumes_present = extract_nbits(tvb, offset, bitoffset, 1);
2806 proto_tree_add_uint_bits(optionals_tree, hf_ranap_dl_dataVolumes_present, tvb,
2807 offset, bitoffset, 1, 0);
2808 proceed_nbits(&offset, &bitoffset, 1);
2810 /* iE_Extensions present ? */
2811 iE_Extensions_present = extract_nbits(tvb, offset, bitoffset, 1);
2812 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present, tvb,
2813 offset, bitoffset, 1, 0);
2814 proceed_nbits(&offset, &bitoffset, 1);
2818 proto_tree_add_uint_bits(ie_tree, hf_ranap_rab_id,
2819 tvb, offset, bitoffset, 8, 0);
2820 proceed_nbits(&offset, &bitoffset, 8);
2822 /* transportLayerAddress */
2823 if (transportLayerAddress_present)
2825 if ((ret=dissect_TransportLayerAddress(tvb, ie_tree, &offset, &bitoffset)) != 0)
2829 /* iuTransportAssociation */
2830 if (iuTransportAssociation_present)
2832 if ((ret=dissect_iuTransportAssociation(tvb, ie_tree, &offset, &bitoffset)) != 0)
2836 /* dl-dataVolumes */
2837 if (dl_dataVolumes_present)
2839 if ((ret = dissect_dataVolumeList(tvb, ie_tree, &offset, &bitoffset,
2840 "dl-dataVolumes")) != 0)
2845 if (iE_Extensions_present)
2847 if ((ret=dissect_iE_Extension(tvb, ie_tree, &offset, &bitoffset, "RAB_SetupOrModifiedItem")) != 0)
2851 /* protocol extended */
2852 if (extension_present)
2854 /* extended sequence */
2855 /* decoding is not supported */
2856 proto_tree_add_text(ie_tree, tvb, offset, IE_PROTOCOL_EXTENSION_LENGTH,
2857 "Protocol extension for RAB_SetupOrModifiedItem present, dissection not supported");
2867 dissect_IE_RAB_SetupOrModifyItemFirst (tvbuff_t *tvb, proto_tree *ie_tree)
2871 proto_item *optionals_item = NULL;
2872 proto_tree *optionals_tree = NULL;
2873 int extension_present;
2874 int nAS_SynchronisationIndicator_present;
2875 int rAB_Parameters_present;
2876 int userPlaneInformation_present;
2877 int transportLayerInformation_present;
2878 int service_Handover_present;
2879 int iE_Extensions_present;
2880 int tmp_extension_present;
2885 offset = 0; bitoffset = 0;
2887 /* create subtree for extension/optional/default bitmap */
2888 optionals_item = proto_tree_add_text(ie_tree, tvb, offset,IE_PROTOCOL_EXTENSION_LENGTH,
2889 "RAB_SetupOrModifyItemFirst Extension/Optional/Default bitmap");
2890 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
2892 /* protocol extension present ? */
2893 extension_present = extract_nbits(tvb, offset, bitoffset, 1);
2894 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension,
2895 tvb, offset, bitoffset, 1, 0);
2896 proceed_nbits(&offset, &bitoffset, 1);
2898 /* nAS_SynchronisationIndicator present ? */
2899 nAS_SynchronisationIndicator_present = extract_nbits(tvb, offset, bitoffset, 1);
2900 proto_tree_add_uint_bits(optionals_tree, hf_ranap_nAS_SynchronisationIndicator_present,
2901 tvb, offset, bitoffset, 1, 0);
2902 proceed_nbits(&offset, &bitoffset, 1);
2904 /* rAB_Parameters present ? */
2905 rAB_Parameters_present = extract_nbits(tvb, offset, bitoffset, 1);
2906 proto_tree_add_uint_bits(optionals_tree, hf_ranap_rAB_Parameters_present,
2907 tvb, offset, bitoffset, 1, 0);
2908 proceed_nbits(&offset, &bitoffset, 1);
2910 /* userPlaneInformation present ? */
2911 userPlaneInformation_present = extract_nbits(tvb, offset, bitoffset, 1);
2912 proto_tree_add_uint_bits(optionals_tree, hf_ranap_userPlaneInformation_present,
2913 tvb, offset, bitoffset, 1, 0);
2914 proceed_nbits(&offset, &bitoffset, 1);
2916 /* transportLayerInformation present ? */
2917 transportLayerInformation_present = extract_nbits(tvb, offset, bitoffset, 1);
2918 proto_tree_add_uint_bits(optionals_tree, hf_ranap_transportLayerInformation_present,
2919 tvb, offset, bitoffset, 1, 0);
2920 proceed_nbits(&offset, &bitoffset, 1);
2922 /* service_Handover present ? */
2923 service_Handover_present = extract_nbits(tvb, offset, bitoffset, 1);
2924 proto_tree_add_uint_bits(optionals_tree, hf_ranap_service_Handover_present,
2925 tvb, offset, bitoffset, 1, 0);
2926 proceed_nbits(&offset, &bitoffset, 1);
2928 /* iE_Extensions present ? */
2929 iE_Extensions_present = extract_nbits(tvb, offset, bitoffset, 1);
2930 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present,
2931 tvb, offset, bitoffset, 1, 0);
2932 proceed_nbits(&offset, &bitoffset, 1);
2936 proto_tree_add_uint_bits(ie_tree, hf_ranap_rab_id,
2937 tvb, offset, bitoffset, 8, 0);
2938 proceed_nbits(&offset, &bitoffset, 8);
2940 /* nAS-SynchronisationIndicator */
2941 if (nAS_SynchronisationIndicator_present)
2943 proto_tree_add_uint_bits(ie_tree, hf_ranap_nAS_SynchronisationIndicator,
2944 tvb, offset, bitoffset, 4, 0);
2945 proceed_nbits(&offset, &bitoffset, 4);
2948 /* rAB-Parameters */
2949 if (rAB_Parameters_present)
2951 if ((ret=dissect_rAB_Parameters(tvb, ie_tree, &offset, &bitoffset)) != 0)
2955 /* userPlaneInformation */
2956 if (userPlaneInformation_present)
2958 if ((ret=dissect_userPlaneInformation(tvb, ie_tree, &offset, &bitoffset)) != 0)
2962 /* transportLayerInformation */
2963 if (transportLayerInformation_present)
2965 if ((ret=dissect_transportLayerInformation(tvb, ie_tree, &offset, &bitoffset)) != 0)
2969 /* service_Handover */
2970 if (service_Handover_present)
2972 tmp_extension_present = extract_nbits(tvb, offset, bitoffset, 1);
2973 proceed_nbits(&offset, &bitoffset, 1);
2975 if (tmp_extension_present)
2978 /* decoding is not supported */
2979 proto_tree_add_text(ie_tree, tvb, offset, IE_PROTOCOL_EXTENSION_LENGTH,
2980 "Protocol extension for service_Handover present, dissection not supported");
2984 proto_tree_add_uint_bits(ie_tree, hf_ranap_service_Handover,
2985 tvb, offset, bitoffset, 2, 0);
2986 proceed_nbits(&offset, &bitoffset, 2);
2990 if (iE_Extensions_present)
2992 if ((ret=dissect_iE_Extension(tvb, ie_tree, &offset, &bitoffset, "SetupOrModifyItemFirst" )) != 0)
3002 dissect_IE_RAB_ReleaseItem(tvbuff_t *tvb, proto_tree *ie_tree)
3004 proto_item *optionals_item = NULL;
3005 proto_tree *optionals_tree = NULL;
3008 int extension_present;
3009 int iE_Extensions_present;
3013 /* create subtree for extension/optional/default bitmap */
3014 optionals_item = proto_tree_add_text(ie_tree, tvb, offset,IE_PROTOCOL_EXTENSION_LENGTH,
3015 "RAB_ReleaseItem Extension/Optional/Default bitmap");
3016 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
3018 /* protocol extension present ? */
3019 extension_present = extract_nbits(tvb, offset, bitoffset, 1);
3020 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension,
3021 tvb, offset, bitoffset, 1, 0);
3022 proceed_nbits(&offset, &bitoffset, 1);
3025 /* iE_Extensions present ? */
3026 iE_Extensions_present = extract_nbits(tvb, offset, bitoffset, 1);
3027 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present,
3028 tvb, offset, bitoffset, 1, 0);
3029 proceed_nbits(&offset, &bitoffset, 1);
3033 proto_tree_add_uint_bits(ie_tree, hf_ranap_rab_id,
3034 tvb, offset, bitoffset, 8, 0);
3035 proceed_nbits(&offset, &bitoffset, 8);
3039 if ((ret=dissect_cause(tvb, ie_tree, &offset, &bitoffset)) != 0)
3043 if (iE_Extensions_present)
3045 if ((ret=dissect_iE_Extension(tvb, ie_tree, &offset, &bitoffset, "RAB_ReleasedItem")) != 0)
3049 /* protocol extended */
3050 if (extension_present)
3052 /* extended sequence */
3053 /* decoding is not supported */
3054 proto_tree_add_text(ie_tree, tvb, offset, IE_PROTOCOL_EXTENSION_LENGTH,
3055 "Protocol extension for RAB_ReleasedItem present, dissection not supported");
3064 dissect_IE_RAB_ReleasedItem (tvbuff_t *tvb, proto_tree *ie_tree)
3066 proto_item *optionals_item = NULL;
3067 proto_tree *optionals_tree = NULL;
3069 int extension_present;
3070 int dl_dataVolumes_present;
3071 int dl_GTP_PDU_SequenceNumber_present;
3072 int ul_GTP_PDU_SequenceNumber_present;
3073 int iE_Extensions_present;
3079 /* create subtree for extension/optional/default bitmap */
3080 optionals_item = proto_tree_add_text(ie_tree, tvb, offset, 1,
3081 "RAB-ReleasedItem Extension/Optional/Default bitmap");
3082 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
3084 /* protocol_extension present ? */
3085 extension_present = extract_nbits(tvb, offset, bitoffset, 1);
3086 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
3087 offset, bitoffset, 1, 0);
3088 proceed_nbits(&offset, &bitoffset, 1);
3090 /* dl_dataVolumes present ? */
3091 dl_dataVolumes_present = extract_nbits(tvb, offset, bitoffset, 1);
3092 proto_tree_add_uint_bits(optionals_tree, hf_ranap_dl_dataVolumes_present, tvb,
3093 offset, bitoffset, 1, 0);
3094 proceed_nbits(&offset, &bitoffset, 1);
3096 /* dL_GTP_PDU_SequenceNumber present ? */
3097 dl_GTP_PDU_SequenceNumber_present = extract_nbits(tvb, offset, bitoffset, 1);
3098 proto_tree_add_uint_bits(optionals_tree, hf_ranap_dl_GTP_PDU_SequenceNumber_present,
3099 tvb, offset, bitoffset, 1, 0);
3100 proceed_nbits(&offset, &bitoffset, 1);
3102 /* uL_GTP_PDU_SequenceNumber present ? */
3103 ul_GTP_PDU_SequenceNumber_present = extract_nbits(tvb, offset, bitoffset, 1);
3104 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ul_GTP_PDU_SequenceNumber_present,
3105 tvb, offset, bitoffset, 1, 0);
3106 proceed_nbits(&offset, &bitoffset, 1);
3108 /* iE_Extensions present ? */
3109 iE_Extensions_present = extract_nbits(tvb, offset, bitoffset, 1);
3110 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present,
3111 tvb, offset, bitoffset, 1, 0);
3112 proceed_nbits(&offset, &bitoffset, 1);
3115 proto_tree_add_uint_bits(ie_tree, hf_ranap_rab_id,
3116 tvb, offset, bitoffset, 8, 0);
3117 proceed_nbits(&offset, &bitoffset, 8);
3119 /* dl-dataVolumes */
3120 if (dl_dataVolumes_present)
3122 if ((ret=dissect_dataVolumeList(tvb, ie_tree, &offset, &bitoffset,
3123 "dl-dataVolumes")) != 0)
3127 /* dL-GTP-PDU-SequenceNumber */
3128 if (dl_GTP_PDU_SequenceNumber_present)
3130 allign(&offset, &bitoffset);
3131 proto_tree_add_item(ie_tree, hf_ranap_dl_GTP_PDU_SequenceNumber, tvb, offset, 2, FALSE);
3135 /* uL-GTP-PDU-SequenceNumber */
3136 if (ul_GTP_PDU_SequenceNumber_present)
3138 allign(&offset, &bitoffset);
3139 proto_tree_add_item(ie_tree, hf_ranap_ul_GTP_PDU_SequenceNumber, tvb, offset, 2, FALSE);
3144 if (iE_Extensions_present)
3146 if ((ret=dissect_iE_Extension(tvb, ie_tree, &offset, &bitoffset, "UserPlaneInformation")) != 0)
3150 /* protocol extended */
3151 if (extension_present)
3153 /* extended sequence */
3154 /* decoding is not supported */
3155 proto_tree_add_text(ie_tree, tvb, offset, IE_PROTOCOL_EXTENSION_LENGTH,
3156 "Protocol extension for RAB_ReleasedItem present, dissection not supported");
3166 dissect_IE_RAB_QueuedItem (tvbuff_t *tvb, proto_tree *ie_tree)
3168 proto_item *optionals_item = NULL;
3169 proto_tree *optionals_tree = NULL;
3171 int extension_present;
3172 int iE_Extensions_present;
3179 /* create subtree for extension/optional/default bitmap */
3180 optionals_item = proto_tree_add_text(ie_tree, tvb, offset, 1,
3181 "RAB-QueuedItem Extension/Optional/Default bitmap");
3182 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
3184 /* protocol_extension present ? */
3185 extension_present = extract_nbits(tvb, offset, bitoffset, 1);
3186 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
3187 offset, bitoffset, 1, 0);
3188 proceed_nbits(&offset, &bitoffset, 1);
3190 /* iE_Extensions present ? */
3191 iE_Extensions_present = extract_nbits(tvb, offset, bitoffset, 1);
3192 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present,
3193 tvb, offset, bitoffset, 1, 0);
3194 proceed_nbits(&offset, &bitoffset, 1);
3197 proto_tree_add_uint_bits(ie_tree, hf_ranap_rab_id,
3198 tvb, offset, bitoffset, 8, 0);
3199 proceed_nbits(&offset, &bitoffset, 8);
3202 if (iE_Extensions_present)
3204 if ((ret=dissect_iE_Extension(tvb, ie_tree, &offset, &bitoffset, "RAB_QueuedItem" )) != 0 )
3208 /* protocol extended */
3209 if (extension_present)
3211 /* extended sequence */
3212 /* decoding is not supported */
3213 proto_tree_add_text(ie_tree, tvb, offset, IE_PROTOCOL_EXTENSION_LENGTH,
3214 "Protocol extension for RAB_QueuedItem present, dissection not supported");
3224 dissect_IE_RAB_FailedItem(tvbuff_t *tvb, proto_tree *ie_tree)
3226 proto_item *optionals_item = NULL;
3227 proto_tree *optionals_tree = NULL;
3229 int extension_present;
3230 int iE_Extensions_present;
3236 /* create subtree for extension/optional/default bitmap */
3237 optionals_item = proto_tree_add_text(ie_tree, tvb, offset, 1,
3238 "RAB-FailedItem Extension/Optional/Default bitmap");
3239 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
3241 /* protocol_extension present ? */
3242 extension_present = extract_nbits(tvb, offset, bitoffset, 1);
3243 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
3244 offset, bitoffset, 1, 0);
3245 proceed_nbits(&offset, &bitoffset, 1);
3247 /* iE_Extensions present ? */
3248 iE_Extensions_present = extract_nbits(tvb, offset, bitoffset, 1);
3249 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present,
3250 tvb, offset, bitoffset, 1, 0);
3251 proceed_nbits(&offset, &bitoffset, 1);
3254 proto_tree_add_uint_bits(ie_tree, hf_ranap_rab_id,
3255 tvb, offset, bitoffset, 8, 0);
3256 proceed_nbits(&offset, &bitoffset, 8);
3259 if ((ret=dissect_cause(tvb, ie_tree, &offset, &bitoffset)) != 0)
3263 if (iE_Extensions_present)
3265 if ((ret=dissect_iE_Extension(tvb, ie_tree, &offset, &bitoffset, "RAB-FailedItem")) != 0)
3270 /* protocol extended */
3271 if (extension_present)
3273 /* extended sequence */
3274 /* decoding is not supported */
3275 proto_tree_add_text(ie_tree, tvb, offset, IE_PROTOCOL_EXTENSION_LENGTH,
3276 "Protocol extension for RAB-FailedItem present, dissection not supported");
3285 dissect_IE_CriticalityDiagnostics(tvbuff_t *tvb, proto_tree *ie_tree)
3288 proto_item *optionals_item = NULL;
3289 proto_tree *optionals_tree = NULL;
3291 int extension_present;
3292 int procedureCode_present;
3293 int triggeringMessage_present;
3294 int procedureCriticality_present;
3295 int iEsCriticalityDiagnostics_present;
3296 int iE_Extensions_present;
3303 /* create subtree for extension/optional/default bitmap */
3304 optionals_item = proto_tree_add_text(ie_tree, tvb, offset, 1,
3305 "IE-CriticalityDiagnostics Extension/Optional/Default bitmap");
3306 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
3308 /* protocol_extension present ? */
3309 extension_present = extract_nbits(tvb, offset, bitoffset, 1);
3310 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
3311 offset, bitoffset, 1, 0);
3312 proceed_nbits(&offset, &bitoffset, 1);
3314 /* procedureCode present ? */
3315 procedureCode_present = extract_nbits(tvb, offset, bitoffset, 1);
3316 proto_tree_add_uint_bits(optionals_tree, hf_ranap_procedureCode_present,
3317 tvb, offset, bitoffset, 1, 0);
3318 proceed_nbits(&offset, &bitoffset, 1);
3320 /* triggeringMessage present ? */
3321 triggeringMessage_present = extract_nbits(tvb, offset, bitoffset, 1);
3322 proto_tree_add_uint_bits(optionals_tree, hf_ranap_triggeringMessage_present,
3323 tvb, offset, bitoffset, 1, 0);
3324 proceed_nbits(&offset, &bitoffset, 1);
3326 /* procedureCriticality present ? */
3327 procedureCriticality_present = extract_nbits(tvb, offset, bitoffset, 1);
3328 proto_tree_add_uint_bits(optionals_tree, hf_ranap_procedureCriticality_present,
3329 tvb, offset, bitoffset, 1, 0);
3330 proceed_nbits(&offset, &bitoffset, 1);
3332 /* iEsCriticalityDiagnostics present ? */
3333 iEsCriticalityDiagnostics_present = extract_nbits(tvb, offset, bitoffset, 1);
3334 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iEsCriticalityDiagnostics_present,
3335 tvb, offset, bitoffset, 1, 0);
3336 proceed_nbits(&offset, &bitoffset, 1);
3338 /* iE_Extensions present ? */
3339 iE_Extensions_present = extract_nbits(tvb, offset, bitoffset, 1);
3340 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present,
3341 tvb, offset, bitoffset, 1, 0);
3342 proceed_nbits(&offset, &bitoffset, 1);
3346 if (procedureCode_present)
3348 allign (&offset, &bitoffset);
3349 proto_tree_add_item(ie_tree, hf_ranap_procedure_code, tvb, offset, 1, FALSE);
3353 /* triggeringMessage */
3354 if (triggeringMessage_present)
3356 proto_tree_add_uint_bits(ie_tree, hf_ranap_triggeringMessage,
3357 tvb, offset, bitoffset, 2, 0);
3358 proceed_nbits(&offset, &bitoffset, 2);
3361 /* procedureCriticality */
3362 if (procedureCriticality_present)
3364 proto_tree_add_uint_bits(ie_tree, hf_ranap_procedureCriticality,
3365 tvb, offset, bitoffset, 2, 0);
3366 proceed_nbits(&offset, &bitoffset, 2);
3369 /* iEsCriticalityDiagnostics */
3370 if (iEsCriticalityDiagnostics_present)
3372 if ((ret=dissect_iEsCriticalityDiagnostics(tvb, ie_tree, &offset, &bitoffset)) != 0)
3377 if (iE_Extensions_present)
3379 if ((ret=dissect_iE_Extension(tvb, ie_tree, &offset, &bitoffset, "IE_CriticalityDiagnostics")) != 0)
3384 /* protocol extended */
3385 if (extension_present)
3387 /* extended sequence */
3388 /* decoding is not supported */
3389 proto_tree_add_text(ie_tree, tvb, offset, IE_PROTOCOL_EXTENSION_LENGTH,
3390 "Protocol extension for IE CriticalityDiagnostics present, dissection not supported");
3399 dissect_unknown_IE(tvbuff_t *tvb, proto_tree *ie_tree)
3405 length = tvb_length(tvb);
3407 proto_tree_add_text(ie_tree, tvb, 0, length,
3408 "IE Contents (dissection not implemented)");
3415 /*****************************************************************************/
3417 /* Dissecting Functions for IE Lists / Containers */
3419 /*****************************************************************************/
3422 dissect_RAB_IE_ContainerPairList(tvbuff_t *tvb, proto_tree *ie_tree)
3424 proto_item *rab_item = NULL;
3425 proto_tree *rab_tree = NULL;
3426 proto_item *ie_pair_item = NULL;
3427 proto_tree *ie_pair_tree = NULL;
3428 proto_item *first_value_item = NULL;
3429 proto_tree *first_value_tree = NULL;
3430 proto_item *second_value_item = NULL;
3431 proto_tree *second_value_tree = NULL;
3432 guint number_of_RABs, currentRAB;
3433 guint number_of_IEs, currentIE;
3434 gint number_of_octets_first, number_of_octets_second;
3435 gint number_of_octets_first_size, number_of_octets_second_size ;
3440 tvbuff_t *first_value_tvb;
3441 tvbuff_t *second_value_tvb;
3445 /* number of RABs in the list */
3446 number_of_RABs = 1 + tvb_get_guint8(tvb, offset);
3447 proto_tree_add_uint(ie_tree, hf_ranap_num_rabs,
3449 NUM_RABS_LENGTH, number_of_RABs);
3451 offset += NUM_RABS_LENGTH;
3453 /* do for each RAB */
3454 for (currentRAB=1; currentRAB<=number_of_RABs; currentRAB++)
3456 /* create subtree for RAB */
3457 rab_item = proto_tree_add_text(ie_tree, tvb, offset, 0, "%d. RAB", currentRAB);
3458 rab_tree = proto_item_add_subtree(rab_item, ett_ranap_rab);
3460 /* number of IE pairs for this RAB */
3461 number_of_IEs = tvb_get_ntohs(tvb, offset);
3462 proto_tree_add_uint(rab_tree, hf_ranap_number_of_ies_in_list,
3463 tvb, offset, 2, number_of_IEs);
3465 offset += 2; /*points now to beginning of first IE pair */
3467 /* do for each IE pair */
3468 for (currentIE=1; currentIE<=number_of_IEs; currentIE++)
3470 /* use tmp_offset to point to current field */
3471 tmp_offset = offset;
3473 ie_id = tvb_get_ntohs(tvb, tmp_offset);
3474 tmp_offset += IE_ID_LENGTH;
3476 tmp_offset += 1; /* skip first criticality byte */
3477 /* number of octets in first value */
3478 extract_length(tvb, tmp_offset, &number_of_octets_first, &number_of_octets_first_size);
3479 tmp_offset += number_of_octets_first_size + number_of_octets_first;
3481 tmp_offset += 1; /* skip second criticality byte */
3482 /* number of octets in second value */
3483 extract_length(tvb, tmp_offset, &number_of_octets_second, &number_of_octets_second_size);
3484 tmp_offset += number_of_octets_second_size + number_of_octets_second;
3486 /* create subtree for ie_pair */
3487 ie_pair_item = proto_tree_add_text(rab_tree, tvb, offset,
3488 tmp_offset - offset,
3490 val_to_str(ie_id, ranap_ie_id_values, "Unknown"),
3492 ie_pair_tree = proto_item_add_subtree(ie_pair_item, ett_ranap_ie_pair);
3494 /* add fields to ie pair subtee */
3495 /* use offset to point to current field */
3497 proto_tree_add_item(ie_pair_tree, hf_ranap_ie_ie_id, tvb, offset, IE_ID_LENGTH, FALSE);
3498 offset += IE_ID_LENGTH;
3500 /* first criticality */
3501 proto_tree_add_uint_bits(ie_pair_tree, hf_ranap_ie_pair_first_criticality, tvb,
3502 offset, bitoffset, 2, 0);
3503 proceed_nbits(&offset, &bitoffset, 2);
3505 /* number of octets in first value */
3506 allign(&offset, &bitoffset);
3507 if (number_of_octets_first != 0)
3509 proto_tree_add_uint(ie_pair_tree, hf_ranap_first_value_number_of_octets,
3511 number_of_octets_first_size,
3512 number_of_octets_first);
3516 /* decoding is not supported */
3517 proto_tree_add_text(ie_pair_tree, tvb, offset,
3518 2, "Number of Octets greater than 0x3FFF, dissection not supported");
3521 offset += number_of_octets_first_size;
3523 /* add subtree for first value */
3524 first_value_item = proto_tree_add_text(ie_pair_tree, tvb, offset,
3525 number_of_octets_first,
3527 val_to_str(ie_id, ranap_ie_id_values, "Unknown"));
3528 first_value_tree = proto_item_add_subtree(first_value_item, ett_ranap_ie_pair_first_value);
3530 /* create tvb containing first value */
3531 first_value_tvb = tvb_new_subset(tvb, offset, number_of_octets_first, number_of_octets_first);
3533 /* add fields of first value */
3536 case IE_RAB_SetupOrModifyItem:
3537 dissect_IE_RAB_SetupOrModifyItemFirst (first_value_tvb, first_value_tree);
3541 dissect_unknown_IE(first_value_tvb, first_value_tree);
3545 offset += number_of_octets_first;
3548 /* second criticality */
3549 proto_tree_add_uint_bits(ie_pair_tree, hf_ranap_ie_pair_second_criticality, tvb,
3550 offset, bitoffset, 2, 0);
3551 proceed_nbits(&offset, &bitoffset, 2);
3553 /* number of octets of second value */
3554 allign(&offset, &bitoffset);
3555 if (number_of_octets_second != 0)
3557 proto_tree_add_uint(ie_pair_tree, hf_ranap_second_value_number_of_octets,
3559 number_of_octets_second_size,
3560 number_of_octets_second);
3564 /* decoding is not supported */
3565 proto_tree_add_text(ie_pair_tree, tvb, offset,
3566 2, "Number of Octets greater than 0x3FFF, dissection not supported");
3569 offset += number_of_octets_second_size;
3571 /* add subtree for second value */
3572 second_value_item = proto_tree_add_text(ie_pair_tree, tvb, offset,
3573 number_of_octets_second,
3575 val_to_str(ie_id, ranap_ie_id_values, "Unknown"));
3576 second_value_tree = proto_item_add_subtree(second_value_item, ett_ranap_ie_pair_second_value);
3578 /* create tvb containing first value */
3579 second_value_tvb = tvb_new_subset(tvb, offset, number_of_octets_second, number_of_octets_second);
3581 /* add fields of second value */
3584 case IE_RAB_SetupOrModifyItem:
3585 dissect_IE_RAB_SetupOrModifyItemSecond (second_value_tvb, second_value_tree);
3589 dissect_unknown_IE(second_value_tvb, second_value_tree);
3593 offset += number_of_octets_second;
3595 }/* for each IE ... */
3596 }/* for each RAB ... */
3603 dissect_RAB_IE_ContainerList(tvbuff_t *tvb, proto_tree *list_tree)
3605 proto_item *rab_item = NULL;
3606 proto_tree *rab_tree = NULL;
3607 proto_item *ie_item = NULL;
3608 proto_tree *ie_tree = NULL;
3610 guint number_of_RABs, currentRAB;
3611 guint number_of_IEs, currentIE;
3612 gint ie_number_of_octets = 0;
3613 gint ie_number_of_octets_size = 0;
3617 gint ie_header_length;
3624 /* number of RABs in the list */
3625 number_of_RABs = 1 + tvb_get_guint8(tvb, offset);
3626 proto_tree_add_uint(list_tree, hf_ranap_num_rabs,
3628 NUM_RABS_LENGTH, number_of_RABs);
3630 offset += NUM_RABS_LENGTH;
3632 /* do for each RAB */
3633 for (currentRAB=1; currentRAB<=number_of_RABs; currentRAB++)
3635 /* create subtree for RAB */
3636 rab_item = proto_tree_add_text(list_tree, tvb, offset, 0, "%d. RAB", currentRAB);
3637 rab_tree = proto_item_add_subtree(rab_item, ett_ranap_rab);
3639 /* number of IEs for this RAB */
3640 number_of_IEs = tvb_get_ntohs(tvb, offset);
3641 proto_tree_add_uint(rab_tree, hf_ranap_number_of_ies_in_list,
3642 tvb, offset, 2, number_of_IEs);
3644 offset += 2; /*points now to beginning of first IE in list */
3647 /* do for each IE */
3648 for (currentIE=1; currentIE<=number_of_IEs; currentIE++)
3651 ie_id = tvb_get_ntohs(tvb, offset);
3652 offset += IE_ID_LENGTH;
3654 offset += IE_CRITICALITY_LENGTH; /* skip criticality byte */
3656 /* number of octets */
3657 extract_length(tvb, offset, &ie_number_of_octets, &ie_number_of_octets_size);
3658 ie_header_length = IE_ID_LENGTH + IE_CRITICALITY_LENGTH + ie_number_of_octets_size;
3660 /* reset offset to beginning of ie */
3663 /* create subtree for ie */
3664 ie_item = proto_tree_add_text(rab_tree, tvb, offset,
3665 ie_header_length + ie_number_of_octets,
3667 val_to_str(ie_id, ranap_ie_id_values, "Unknown"),
3669 ie_tree = proto_item_add_subtree(ie_item, ett_ranap_ie);
3672 proto_tree_add_item(ie_tree, hf_ranap_ie_ie_id, tvb,
3673 offset, IE_ID_LENGTH, FALSE);
3674 offset += IE_ID_LENGTH;
3677 proto_tree_add_uint_bits(ie_tree, hf_ranap_ie_criticality, tvb,
3678 offset, bitoffset, 2, 0);
3679 proceed_nbits(&offset, &bitoffset, 2);
3681 allign(&offset, &bitoffset);
3682 if (ie_number_of_octets != 0)
3684 proto_tree_add_uint(ie_tree, hf_ranap_ie_number_of_octets, tvb,
3685 offset, ie_number_of_octets_size, ie_number_of_octets);
3689 /* decoding is not supported */
3690 proto_tree_add_text(ie_tree, tvb, offset,
3691 0, "Number of Octets greater than 0x3FFF, dissection not supported");
3694 offset += ie_number_of_octets_size;
3697 /* create tvb containing ie */
3698 ie_tvb = tvb_new_subset(tvb, offset, ie_number_of_octets, ie_number_of_octets);
3700 /* add fields of ie */
3703 case IE_RAB_SetupOrModifiedItem:
3704 dissect_IE_RAB_SetupOrModifiedItem(ie_tvb, ie_tree);
3706 case IE_RAB_ReleaseItem:
3707 dissect_IE_RAB_ReleaseItem(ie_tvb, ie_tree);
3709 case IE_RAB_ReleasedItem:
3710 dissect_IE_RAB_ReleasedItem(ie_tvb, ie_tree);
3712 case IE_RAB_ReleasedItem_IuRelComp:
3713 dissect_IE_RAB_ReleasedItem_IuRelComp(ie_tvb, ie_tree);
3715 case IE_RAB_QueuedItem:
3716 dissect_IE_RAB_QueuedItem(ie_tvb, ie_tree);
3718 case IE_RAB_FailedItem:
3719 dissect_IE_RAB_FailedItem(ie_tvb, ie_tree);
3721 case IE_RAB_DataVolumeReportItem:
3722 dissect_IE_RAB_DataVolumeReportItem(ie_tvb, ie_tree);
3725 dissect_unknown_IE(ie_tvb, ie_tree);
3729 ie_offset += (ie_header_length + ie_number_of_octets);
3732 } /* for each RAB */
3739 dissect_ranap_ie(guint16 ie_id, tvbuff_t *ie_contents_tvb, proto_tree *ie_tree)
3741 /* call specific dissection function for ie contents */
3745 return(dissect_IE_RAB_ID(ie_contents_tvb, ie_tree));
3748 return(dissect_IE_NAS_PDU(ie_contents_tvb, ie_tree));
3751 return(dissect_IE_LAI(ie_contents_tvb, ie_tree));
3754 return(dissect_IE_RAC(ie_contents_tvb, ie_tree));
3757 return(dissect_IE_SAI(ie_contents_tvb, ie_tree));
3759 case IE_CN_DomainIndicator:
3760 return(dissect_IE_CN_DomainIndicator(ie_contents_tvb, ie_tree));
3763 return(dissect_IE_IuSigConId(ie_contents_tvb, ie_tree));
3766 return(dissect_IE_SAPI(ie_contents_tvb, ie_tree));
3768 case IE_TransportLayerAddress:
3769 return(dissect_IE_TransportLayerAddress(ie_contents_tvb, ie_tree));
3771 case IE_IuTransportAssociation:
3772 return(dissect_IE_IuTransportAssociation(ie_contents_tvb, ie_tree));
3774 case IE_RAB_SetupOrModifyList:
3775 return(dissect_RAB_IE_ContainerPairList(ie_contents_tvb, ie_tree));
3777 case IE_RAB_SetupOrModifiedList:
3778 case IE_RAB_ReleaseList:
3779 case IE_RAB_ReleasedList:
3780 case IE_RAB_QueuedList:
3781 case IE_RAB_FailedList:
3782 case IE_RAB_ReleaseFailedList:
3783 case IE_RAB_DataVolumeReportList:
3784 case IE_RAB_ReleasedList_IuRelComp:
3785 case IE_RAB_RelocationReleaseList:
3786 case IE_RAB_DataForwardingList:
3787 case IE_RAB_SetupList_RelocReq:
3788 case IE_RAB_SetupList_RelocReqAck:
3789 case IE_RAB_DataForwardingList_SRNS_CtxReq:
3790 case IE_RAB_ContextList:
3791 case IE_RAB_ContextFailedtoTransferList:
3792 case IE_RAB_DataVolumeReportRequestList:
3793 case IE_RAB_FailedtoReportList:
3794 case IE_RAB_ContextList_RANAP_RelocInf:
3795 return(dissect_RAB_IE_ContainerList(ie_contents_tvb, ie_tree));
3797 case IE_CriticalityDiagnostics:
3798 return(dissect_IE_CriticalityDiagnostics(ie_contents_tvb, ie_tree));
3801 return(dissect_IE_Cause(ie_contents_tvb, ie_tree));
3804 return(dissect_unknown_IE(ie_contents_tvb, ie_tree));
3811 dissect_ranap_ie_container(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_tree *ranap_tree)
3813 proto_item *ie_item = NULL;
3814 proto_tree *ie_tree = NULL;
3815 proto_item *optionals_item = NULL;
3816 proto_tree *optionals_tree = NULL;
3818 int msg_extension_present;
3819 int ProtocolExtensionContainer_present;
3821 guint16 number_of_ies;
3823 gint ie_number_of_octets = 0;
3824 gint ie_number_of_octets_size = 0;
3825 guint16 ie_header_length;
3829 tvbuff_t *ie_contents_tvb;
3833 /* create subtree for extension/optional bitmap of message */
3834 optionals_item = proto_tree_add_text(ranap_tree, tvb, offset, 1,
3835 "Message Extension/Optional/Default bitmap");
3836 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
3839 /* msg_extension present ? */
3840 msg_extension_present = extract_nbits(tvb, offset, bitoffset, 1);
3844 proto_tree_add_uint_bits(optionals_tree, hf_ranap_msg_extension_present, tvb,
3845 offset, bitoffset, 1, 0);
3847 proceed_nbits(&offset, &bitoffset, 1);
3849 /* ProtocolExtensionContainer present ? */
3850 ProtocolExtensionContainer_present = extract_nbits(tvb, offset, bitoffset, 1);
3853 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ProtocolExtensionContainer_present,
3854 tvb, offset, bitoffset, 1, 0);
3856 proceed_nbits(&offset, &bitoffset, 1);
3859 /* extract ie container data */
3861 allign(&offset, &bitoffset);
3862 number_of_ies = tvb_get_ntohs(tvb, offset);
3865 proto_tree_add_uint(ranap_tree, hf_ranap_number_of_ies,
3866 tvb, offset, 2, number_of_ies);
3870 ie_offset = offset; /* ie_offset marks beginning of IE-Header */
3872 /* do the following for each IE in the PDU */
3873 for (i=1; i <= number_of_ies; i++)
3875 /* extract IE header fields which are needed even if no ranap tree exists*/
3877 ie_id = tvb_get_ntohs(tvb, offset);
3878 offset += IE_ID_LENGTH;
3880 /* number of octets in the IE */
3881 offset += IE_CRITICALITY_LENGTH; /* skip criticality byte */
3882 ie_number_of_octets = 0;
3883 extract_length(tvb, offset, &ie_number_of_octets, &ie_number_of_octets_size);
3884 ie_header_length = IE_ID_LENGTH + IE_CRITICALITY_LENGTH + ie_number_of_octets_size;
3888 offset = ie_offset; /* start from beginning of IE */
3889 /* create subtree for ie */
3890 ie_item = proto_tree_add_text(ranap_tree, tvb, offset,
3891 ie_header_length + ie_number_of_octets,
3893 val_to_str(ie_id, ranap_ie_id_values, "Unknown"),
3895 ie_tree = proto_item_add_subtree(ie_item, ett_ranap_ie);
3897 /* add fields to ie subtee */
3899 proto_tree_add_item(ie_tree, hf_ranap_ie_ie_id, tvb,
3900 offset, IE_ID_LENGTH, FALSE);
3901 offset += IE_ID_LENGTH;
3904 proto_tree_add_uint_bits(ie_tree, hf_ranap_ie_criticality, tvb,
3905 offset, bitoffset, 2, 0);
3906 proceed_nbits(&offset, &bitoffset, 2);
3908 /* number of octets */
3909 allign(&offset, &bitoffset);
3910 if (ie_number_of_octets != 0)
3912 proto_tree_add_uint(ie_tree, hf_ranap_ie_number_of_octets, tvb,
3913 offset, ie_number_of_octets_size, ie_number_of_octets);
3914 offset += ie_number_of_octets_size;
3918 /* decoding is not supported */
3919 proto_tree_add_text(ranap_tree, tvb, offset,
3920 2, "Number of Octets greater than 0x3FFF, dissection not supported");
3925 /* check if number_of_octets could be decoded */
3926 /* in case we skipped if (ranap_tree) {....} */
3927 if (ie_number_of_octets == 0) return (-1);
3929 /* create tvb containing the ie contents */
3930 ie_contents_tvb = tvb_new_subset(tvb, ie_offset + ie_header_length,
3931 ie_number_of_octets, ie_number_of_octets);
3933 /* call specific dissection function for ie contents */
3934 dissect_ranap_ie(ie_id, ie_contents_tvb, ie_tree);
3936 /* set ie_offset to beginning of next ie */
3937 ie_offset += (ie_header_length + ie_number_of_octets);
3947 dissect_ranap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
3949 proto_item *ranap_item = NULL;
3950 proto_tree *ranap_tree = NULL;
3952 guint procedure_code;
3954 gint number_of_octets = 0;
3955 gint number_of_octets_size = 0;
3957 gint tmp_offset = 0;
3959 gint tmp_bitoffset = 0;
3960 guint extension_present;
3966 /* make entry in the Protocol column on summary display */
3967 if (check_col(pinfo->fd, COL_PROTOCOL))
3968 col_set_str(pinfo->fd, COL_PROTOCOL, "RANAP");
3970 /* extract header fields which are needed even if no tree exists */
3972 /* protocol_extension present ? */
3973 extension_present = extract_nbits(tvb, tmp_offset, tmp_bitoffset, 1);
3974 proceed_nbits(&tmp_offset, &tmp_bitoffset, 1);
3975 if (extension_present)
3977 /* extended choice */
3978 /* decoding is not supported */
3979 col_append_str(pinfo->fd, COL_INFO, "RANAP-PDU Protocol extension present, dissection not supported");
3983 /* pdu_index choice 0..3 */
3984 pdu_index = extract_nbits(tvb, tmp_offset, tmp_bitoffset, 2);
3985 proceed_nbits(&tmp_offset, &tmp_bitoffset, 2);
3987 /* procedure code */
3988 allign(&tmp_offset, &tmp_bitoffset);
3989 procedure_code = tvb_get_guint8(tvb, tmp_offset);
3992 /* add Procedure Code to Info Column */
3993 if (check_col(pinfo->fd, COL_INFO))
3995 if (procedure_code <= PC_max)
3997 col_append_str(pinfo->fd, COL_INFO,
3998 val_to_str(pdu_index, ranap_message_names[procedure_code],
3999 "unknown message"));
4000 col_append_str(pinfo->fd, COL_INFO, " ");
4004 /* extract number of octets */
4005 tmp_offset += 1; /* leave out criticality byte */
4006 extract_length(tvb, tmp_offset, &number_of_octets, &number_of_octets_size);
4008 /* In the interest of speed, if "tree" is NULL, don't do any work not
4009 necessary to generate protocol tree items. */
4012 /* create the ranap protocol tree */
4013 ranap_item = proto_tree_add_item(tree, proto_ranap, tvb, 0, tvb_length(tvb), FALSE);
4014 ranap_tree = proto_item_add_subtree(ranap_item, ett_ranap);
4016 /* Add fields to ranap protocol tree */
4018 proceed_nbits(&offset, &bitoffset, 1); /* leave out extension bit, checked above */
4019 proto_tree_add_uint_bits(ranap_tree, hf_ranap_pdu_index, tvb,
4020 offset, bitoffset, 2, 0);
4021 proceed_nbits(&offset, &bitoffset, 2);
4024 /* Procedure Code */
4025 allign(&offset, &bitoffset);
4026 proto_tree_add_item(ranap_tree, hf_ranap_procedure_code, tvb, offset, 1, FALSE);
4029 /* PDU Criticality */
4030 proto_tree_add_uint_bits(ranap_tree, hf_ranap_pdu_criticality, tvb,
4031 offset, bitoffset, 2, 0);
4032 proceed_nbits(&offset, &bitoffset, 2);
4034 /* number of octets */
4035 allign(&offset, &bitoffset);
4036 if (number_of_octets != 0)
4038 proto_tree_add_uint(ranap_tree, hf_ranap_pdu_number_of_octets,
4040 number_of_octets_size, number_of_octets);
4041 offset += number_of_octets_size;
4045 /* decoding is not supported */
4046 proto_tree_add_text(ranap_tree, tvb, offset,
4047 2, "Number of Octets greater than 0x3FFF, dissection not supported");
4052 /* set offset to the beginning of ProtocolIE-Container */
4053 /* in case we skipped "if(tree){...}" above */
4054 offset = PDU_NUMBER_OF_OCTETS_OFFSET + number_of_octets_size;
4056 /* create a tvb containing the remainder of the PDU */
4057 ie_tvb_length = tvb_length(tvb)- offset;
4058 ie_tvb = tvb_new_subset(tvb, offset, ie_tvb_length, ie_tvb_length);
4060 /* dissect the ies */
4061 dissect_ranap_ie_container(ie_tvb, pinfo, tree, ranap_tree);
4066 /*****************************************************************************/
4068 /* Protocol Registration Functions */
4070 /*****************************************************************************/
4073 proto_register_ranap(void)
4075 /* Setup list of header fields */
4076 static hf_register_info hf[] = {
4077 { &hf_ranap_pdu_index,
4078 { "RANAP-PDU Index",
4079 "ranap.ranap_pdu_index",
4080 FT_UINT8, BASE_HEX, VALS(&ranap_pdu_index_values), 0x0,
4083 { &hf_ranap_procedure_code,
4085 "ranap.procedure_code",
4086 FT_UINT8, BASE_DEC, VALS(&ranap_procedure_code_values), 0x0,
4089 { &hf_ranap_pdu_criticality,
4090 { "Criticality of PDU",
4091 "ranap.pdu.criticality",
4092 FT_UINT8, BASE_HEX, VALS(&ranap_criticality_values), 0x0,
4095 { &hf_ranap_pdu_number_of_octets,
4096 { "Number of Octets in PDU",
4097 "ranap.pdu.num_of_octets",
4098 FT_UINT16, BASE_DEC, NULL, 0x0,
4101 { &hf_ranap_ie_protocol_extension,
4102 { "Protocol Extension",
4103 "ranap.ie.protocol_extension_present",
4104 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4107 { &hf_ranap_number_of_ies,
4108 { "Number of IEs in PDU",
4109 "ranap.pdu.number_of_ies",
4110 FT_UINT16, BASE_DEC, NULL, 0x0,
4113 { &hf_ranap_number_of_ProtocolExtensionFields,
4114 { "Number of Protocol Extension Fields",
4115 "ranap.ie.number_of_ProtocolExtensionFields",
4116 FT_UINT16, BASE_DEC, NULL, 0x0,
4119 { &hf_ranap_number_of_ies_in_list,
4120 { "Number of IEs in list",
4121 "ranap.number_of_ies",
4122 FT_UINT16, BASE_DEC, NULL, 0x0,
4125 { &hf_ranap_ie_ie_id,
4128 FT_UINT16, BASE_DEC, VALS(&ranap_ie_id_values), 0x0,
4131 { &hf_ranap_ext_field_id,
4132 { "ProtocolExtensionField ID",
4133 "ranap.ie.ProtocolExtensionFields.Id",
4134 FT_UINT16, BASE_DEC, NULL, 0x0,
4137 { &hf_ranap_ie_criticality,
4138 { "Criticality of IE",
4139 "ranap.ie.criticality",
4140 FT_UINT8, BASE_HEX, VALS(&ranap_criticality_values), 0x0,
4143 { &hf_ranap_ext_field_criticality,
4144 { "Criticality of ProtocolExtensionField",
4145 "ranap.ie.ProtocolExtensionFields.criticality",
4146 FT_UINT8, BASE_HEX, VALS(&ranap_criticality_values), 0x0,
4149 { &hf_ranap_ie_pair_first_criticality,
4150 { "First Criticality",
4151 "ranap.ie_pair.first_criticality",
4152 FT_UINT8, BASE_HEX, VALS(&ranap_criticality_values), 0x0,
4155 { &hf_ranap_ie_pair_second_criticality,
4156 { "Second Criticality",
4157 "ranap.ie_pair.second_criticality",
4158 FT_UINT8, BASE_HEX, VALS(&ranap_criticality_values), 0x0,
4161 { &hf_ranap_ie_number_of_octets,
4162 { "Number of Octets in IE",
4163 "ranap.ie.number_of_octets",
4164 FT_UINT16, BASE_DEC, NULL, 0x0,
4167 { &hf_ranap_first_value_number_of_octets,
4168 { "Number of Octets in first value",
4169 "ranap.ie_pair.first_value.number_of_octets",
4170 FT_UINT16, BASE_DEC, NULL, 0x0,
4173 { &hf_ranap_second_value_number_of_octets,
4174 { "Number of Octets in second value",
4175 "ranap.ie_pair.second_value.number_of_octets",
4176 FT_UINT16, BASE_DEC, NULL, 0x0,
4182 FT_UINT8, BASE_HEX, NULL, 0x0,
4185 { &hf_ranap_nas_pdu,
4188 FT_BYTES, BASE_NONE, NULL, 0x0,
4191 { &hf_ranap_plmn_id,
4194 FT_BYTES, BASE_NONE, NULL, 0x0,
4200 FT_BYTES, BASE_NONE, NULL, 0x0,
4203 { &hf_ranap_plmn_id,
4206 FT_BYTES, BASE_NONE, NULL, 0x0,
4212 FT_BYTES, BASE_NONE, NULL, 0x0,
4218 FT_BYTES, BASE_NONE, NULL, 0x0,
4224 FT_BYTES, BASE_NONE, NULL, 0x0,
4227 { &hf_ranap_num_rabs,
4229 "ranap.number_of_RABs",
4230 FT_UINT8, BASE_DEC, NULL, 0x0,
4233 { &hf_ranap_nAS_SynchronisationIndicator_present,
4234 { "nAS-SynchronisationIndicator",
4235 "ranap.nAS-SynchronisationIndicator_present",
4236 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4239 { &hf_ranap_rAB_Parameters_present,
4241 "ranap.rAB_Parameters_present",
4242 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4245 { &hf_ranap_userPlaneInformation_present,
4246 { "userPlaneInformation",
4247 "ranap.userPlaneInformation_present",
4248 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4251 { &hf_ranap_transportLayerInformation_present,
4252 { "transportLayerInformation",
4253 "ranap.transportLayerInformation_present",
4254 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4257 { &hf_ranap_service_Handover_present,
4258 { "service-Handover",
4259 "ranap.service_Handover_present",
4260 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4263 { &hf_ranap_iE_Extensions_present,
4265 "ranap.ie.iE-Extensions_present",
4266 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4269 { &hf_ranap_nAS_SynchronisationIndicator,
4270 { "nAS-SynchronisationIndicator",
4271 "ranap.nAS-SynchronisationIndicator",
4272 FT_UINT8, BASE_HEX, NULL, 0x0,
4275 { &hf_ranap_guaranteedBitRate_present,
4276 { "guaranteedBitRate",
4277 "ranap.guaranteedBitRate_present",
4278 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4281 { &hf_ranap_transferDelay_present,
4283 "ranap.transferDelay_present",
4284 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4287 { &hf_ranap_trafficHandlingPriority_present,
4288 { "trafficHandlingPriority",
4289 "ranap.trafficHandlingPriority_present",
4290 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4293 { &hf_ranap_allocationOrRetentionPriority_present,
4294 { "allocationOrRetentionPriority",
4295 "ranap.allocationOrRetentionPriority_present",
4296 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4299 { &hf_ranap_sourceStatisticsDescriptor_present,
4300 { "sourceStatisticsDescriptor",
4301 "ranap.sourceStatisticsDescriptor_present",
4302 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4305 { &hf_ranap_relocationRequirement_present,
4306 { "relocationRequirement",
4307 "ranap.relocationRequirement_present",
4308 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4311 { &hf_ranap_trafficClass,
4313 "ranap.rab_Parameters.trafficClass",
4314 FT_UINT8, BASE_DEC, VALS(&ranap_trafficClass_values), 0x0,
4317 { &hf_ranap_rAB_AsymmetryIndicator,
4318 { "rAB_AsymmetryIndicator",
4319 "ranap.rab_Parameters.rAB_AsymmetryIndicator",
4320 FT_UINT8, BASE_DEC, VALS(&ranap_rAB_AsymmetryIndicator_values), 0x0,
4323 { &hf_ranap_maxBitrate,
4325 "ranap.rab_Parameters.maxBitrate",
4326 FT_UINT32, BASE_DEC, NULL, 0x0,
4329 { &hf_ranap_guaranteedBitrate,
4330 { "guaranteedBitrate",
4331 "ranap.rab_Parameters.guaranteedBitrate",
4332 FT_UINT32, BASE_DEC, NULL, 0x0,
4335 { &hf_ranap_deliveryOrder,
4337 "ranap.rab_Parameters.deliveryOrder",
4338 FT_UINT8, BASE_DEC, VALS(&ranap_DeliveryOrder_values), 0x0,
4341 { &hf_ranap_maxSDU_Size,
4343 "ranap.rab_Parameters.maxSDU_Size",
4344 FT_UINT16, BASE_DEC, NULL, 0x0,
4347 { &hf_ranap_sDU_ErrorRatio_mantissa,
4348 { "sDU_ErrorRatio: mantissa",
4349 "ranap.rab_Parameters.sDU_ErrorRatio.mantissa",
4350 FT_UINT8, BASE_DEC, NULL, 0x0,
4353 { &hf_ranap_sDU_ErrorRatio_exponent,
4354 { "sDU_ErrorRatio: exponent",
4355 "ranap.rab_Parameters.sDU_ErrorRatio.exponent",
4356 FT_UINT8, BASE_DEC, NULL, 0x0,
4359 { &hf_ranap_residualBitErrorRatio_mantissa,
4360 { "residualBitErrorRatio: mantissa",
4361 "ranap.rab_Parameters.residualBitErrorRatio.mantissa",
4362 FT_UINT8, BASE_DEC, NULL, 0x0,
4365 { &hf_ranap_residualBitErrorRatio_exponent,
4366 { "residualBitErrorRatio: exponent",
4367 "ranap.rab_Parameters.residualBitErrorRatio.exponent",
4368 FT_UINT8, BASE_DEC, NULL, 0x0,
4371 { &hf_ranap_deliveryOfErroneousSDU,
4372 { "deliveryOfErroneousSDU",
4373 "ranap.rab_Parameters.ranap_deliveryOfErroneousSDU",
4374 FT_UINT8, BASE_DEC, VALS(&ranap_deliveryOfErroneousSDU_values), 0x0,
4377 { &hf_ranap_subflowSDU_Size,
4378 { "subflowSDU_Size",
4379 "ranap.rab_Parameters.subflowSDU_Size",
4380 FT_UINT8, BASE_DEC, NULL, 0x0,
4383 { &hf_ranap_rAB_SubflowCombinationBitRate,
4384 { "rAB_SubflowCombinationBitRate",
4385 "ranap.rab_Parameters.rAB_SubflowCombinationBitRate",
4386 FT_UINT32, BASE_DEC, NULL, 0x0,
4389 { &hf_ranap_sDU_ErrorRatio_present,
4391 "ranap.sDU_ErrorRatio_present",
4392 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4395 { &hf_ranap_sDU_FormatInformationParameters_present,
4396 { "sDU_FormatInformationParameters",
4397 "ranap.sDU_FormatInformationParameters_present",
4398 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4401 { &hf_ranap_subflowSDU_Size_present,
4402 { "subflowSDU_Size",
4403 "ranap.subflowSDU_Size_present",
4404 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4407 { &hf_ranap_rAB_SubflowCombinationBitRate_present,
4408 { "subflowSDU_Size",
4409 "ranap.rAB_SubflowCombinationBitRate_present",
4410 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4413 { &hf_ranap_transferDelay,
4415 "ranap.rab_Parameters.transferDelay",
4416 FT_UINT16, BASE_DEC, NULL, 0x0,
4419 { &hf_ranap_trafficHandlingPriority,
4420 { "trafficHandlingPriority",
4421 "ranap.rab_Parameters.trafficHandlingPriority",
4422 FT_UINT8, BASE_DEC, VALS(&ranap_priority_values), 0x0,
4425 { &hf_ranap_priorityLevel,
4427 "ranap.rab_Parameters.allocationOrRetentionPriority.priorityLevel",
4428 FT_UINT8, BASE_DEC, VALS(&ranap_priority_values), 0x0,
4431 { &hf_ranap_pre_emptionCapability,
4432 { "pre-emptionCapability",
4433 "ranap.rab_Parameters.allocationOrRetentionPriority.pre_emptionCapability",
4434 FT_UINT8, BASE_DEC, VALS(&ranap_pre_emptionCapability_values), 0x0,
4437 { &hf_ranap_pre_emptionVulnerability,
4438 { "pre-emptionVulnerability",
4439 "ranap.rab_Parameters.allocationOrRetentionPriority.pre_emptionVulnerability",
4440 FT_UINT8, BASE_DEC, VALS(&ranap_pre_emptionVulnerability_values), 0x0,
4443 { &hf_ranap_queuingAllowed,
4445 "ranap.rab_Parameters.allocationOrRetentionPriority.queuingAllowed",
4446 FT_UINT8, BASE_DEC, VALS(&ranap_queuingAllowed_values), 0x0,
4449 { &hf_ranap_sourceStatisticsDescriptor,
4450 { "sourceStatisticsDescriptor",
4451 "ranap.rab_Parameters.sourceStatisticsDescriptor",
4452 FT_UINT8, BASE_DEC, VALS(&ranap_sourceStatisticsDescriptor_values), 0x0,
4455 { &hf_ranap_relocationRequirement,
4456 { "relocationRequirement",
4457 "ranap.rab_Parameters.relocationRequirement",
4458 FT_UINT8, BASE_DEC, VALS(&ranap_relocationRequirement_values), 0x0,
4461 { &hf_ranap_userPlaneMode,
4463 "ranap.userPlaneMode",
4464 FT_UINT8, BASE_DEC, VALS(&ranap_userPlaneMode_values), 0x0,
4467 { &hf_ranap_uP_ModeVersions,
4468 { "uP_ModeVersions",
4469 "ranap.uP_ModeVersions",
4470 FT_BYTES, BASE_NONE, NULL, 0x0,
4473 { &hf_ranap_number_of_ProtocolExtensionFields,
4474 { "Number of ProtocolExtensionFields",
4475 "ranap.number_of_ProtocolExtensionFields",
4476 FT_UINT16, BASE_DEC, NULL, 0x0,
4479 { &hf_ranap_ext_field_number_of_octets,
4480 { "Number of octets",
4481 "ranap.ProtocolExtensionFields.octets",
4482 FT_UINT16, BASE_DEC, NULL, 0x0,
4485 { &hf_ranap_transportLayerAddress_length,
4486 { "bit length of transportLayerAddress",
4487 "ranap.transportLayerAddress_length",
4488 FT_UINT8, BASE_DEC, NULL, 0x0,
4491 { &hf_ranap_transportLayerAddress,
4492 { "transportLayerAddress",
4493 "ranap.transportLayerAddress",
4494 FT_BYTES, BASE_NONE, NULL, 0x0,
4497 { &hf_ranap_gTP_TEI,
4500 FT_BYTES, BASE_NONE, NULL, 0x0,
4503 { &hf_ranap_bindingID,
4506 FT_BYTES, BASE_NONE, NULL, 0x0,
4509 { &hf_ranap_pDP_TypeInformation_present,
4510 { "pDP_TypeInformation",
4511 "ranap.pDP_TypeInformation_present",
4512 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4515 { &hf_ranap_dataVolumeReportingIndication_present,
4516 { "dataVolumeReportingIndication",
4517 "ranap.dataVolumeReportingIndication_present",
4518 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4521 { &hf_ranap_dl_GTP_PDU_SequenceNumber_present,
4522 { "dl_GTP_PDU_SequenceNumber",
4523 "ranap.dl_GTP_PDU_SequenceNumber_present",
4524 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4527 { &hf_ranap_ul_GTP_PDU_SequenceNumber_present,
4528 { "ul_GTP_PDU_SequenceNumber",
4529 "ranap.ul_GTP_PDU_SequenceNumber_present",
4530 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4533 { &hf_ranap_dl_N_PDU_SequenceNumber_present,
4534 { "dl_N_PDU_SequenceNumber",
4535 "ranap.dl_N_PDU_SequenceNumber_present",
4536 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4539 { &hf_ranap_ul_N_PDU_SequenceNumber_present,
4540 { "ul_N_PDU_SequenceNumber",
4541 "ranap.ul_N_PDU_SequenceNumber_present",
4542 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4545 { &hf_ranap_PDP_Type,
4547 "ranap.RAB_SetupOrModifyItemSecond.PDP_Type",
4548 FT_UINT8, BASE_HEX, VALS(&ranap_PDP_Type_values), 0x0,
4551 { &hf_ranap_dataVolumeReportingIndication,
4552 { "dataVolumeReportingIndication",
4553 "ranap.RAB_SetupOrModifyItemSecond.dataVolumeReportingIndication",
4554 FT_UINT8, BASE_HEX, VALS(&ranap_dataVolumeReportingIndication_values), 0x0,
4557 { &hf_ranap_dl_GTP_PDU_SequenceNumber,
4558 { "dl_GTP_PDU_SequenceNumber",
4559 "ranap.RAB_SetupOrModifyItemSecond.dl_GTP_PDU_SequenceNumber",
4560 FT_UINT16, BASE_DEC, NULL, 0x0,
4563 { &hf_ranap_ul_GTP_PDU_SequenceNumber,
4564 { "ul_GTP_PDU_SequenceNumber",
4565 "ranap.RAB_SetupOrModifyItemSecond.ul_GTP_PDU_SequenceNumber",
4566 FT_UINT16, BASE_DEC, NULL, 0x0,
4569 { &hf_ranap_dl_N_PDU_SequenceNumber,
4570 { "ul_GTP_PDU_SequenceNumber",
4571 "ranap.RAB_SetupOrModifyItemSecond.ul_GTP_PDU_SequenceNumber",
4572 FT_UINT16, BASE_DEC, NULL, 0x0,
4575 { &hf_ranap_ul_N_PDU_SequenceNumber,
4576 { "ul_GTP_PDU_SequenceNumber",
4577 "ranap.RAB_SetupOrModifyItemSecond.ul_GTP_PDU_SequenceNumber",
4578 FT_UINT16, BASE_DEC, NULL, 0x0,
4581 { &hf_ranap_cause_choice,
4583 "ranap.cause_choice",
4584 FT_UINT8, BASE_HEX, VALS(&ranap_cause_choice_values), 0x0,
4587 { &hf_ranap_cause_value,
4589 "ranap.cause_value",
4590 FT_UINT8, BASE_DEC,VALS(&ranap_cause_value_str), 0x0,
4593 { &hf_ranap_transportLayerAddress_present,
4594 { "transportLayerAddress",
4595 "ranap.transportLayerAddress_present",
4596 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4599 { &hf_ranap_iuTransportAssociation_present,
4600 { "iuTransportAssociation",
4601 "ranap.iuTransportAssociation_present",
4602 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4605 { &hf_ranap_dl_dataVolumes_present,
4607 "ranap.dl_dataVolumes_present",
4608 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4611 { &hf_ranap_dataVolumeReference_present,
4612 { "dataVolumeReference",
4613 "ranap.dataVolumeReference_present",
4614 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4617 { &hf_ranap_dl_UnsuccessfullyTransmittedDataVolume,
4618 { "dl-UnsuccessfullyTransmittedDataVolume",
4619 "ranap.dl-UnsuccessfullyTransmittedDataVolume",
4620 FT_UINT32, BASE_DEC, NULL, 0x0,
4623 { &hf_ranap_dataVolumeReference,
4624 { "dataVolumeReference",
4625 "ranap.dataVolumeReference",
4626 FT_UINT8, BASE_DEC, NULL, 0x0,
4629 { &hf_ranap_procedureCode_present,
4631 "ranap.procedureCode_present",
4632 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4635 { &hf_ranap_triggeringMessage_present,
4636 { "triggeringMessage",
4637 "ranap.triggeringMessage_present",
4638 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4641 { &hf_ranap_procedureCriticality_present,
4642 { "procedureCriticality",
4643 "ranap.procedureCriticality_present",
4644 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4647 { &hf_ranap_iEsCriticalityDiagnostics_present,
4648 { "iEsCriticalityDiagnostics",
4649 "ranap.iEsCriticalityDiagnostics_present",
4650 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4653 { &hf_ranap_triggeringMessage,
4654 { "triggeringMessage",
4655 "ranap.triggeringMessage",
4656 FT_UINT8, BASE_HEX, VALS(&ranap_pdu_index_values), 0x0,
4659 { &hf_ranap_procedureCriticality,
4660 { "procedureCriticality",
4661 "ranap.procedureCriticality",
4662 FT_UINT8, BASE_HEX, VALS(&ranap_criticality_values), 0x0,
4665 { &hf_ranap_iECriticality,
4667 "ranap.iECriticality",
4668 FT_UINT8, BASE_HEX, VALS(&ranap_criticality_values), 0x0,
4671 { &hf_ranap_repetitionNumber,
4672 { "repetitionNumber",
4673 "ranap.repetitionNumber",
4674 FT_UINT16, BASE_DEC, NULL, 0x0,
4677 { &hf_ranap_num_of_CriticalityDiagnostics_IEs,
4678 { "Number of CriticalityDiagnostics-IEs",
4679 "ranap.num_of_CriticalityDiagnostics_IEs",
4680 FT_UINT16, BASE_DEC, NULL, 0x0,
4683 { &hf_ranap_repetitionNumber_present,
4684 { "repetitionNumber",
4685 "ranap.repetitionNumber_present",
4686 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4689 { &hf_ranap_dl_UnsuccessfullyTransmittedDataVolume_present,
4690 { "dl-UnsuccessfullyTransmittedDataVolume",
4691 "ranap.dl_UnsuccessfullyTransmittedDataVolume_present",
4692 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4695 { &hf_ranap_CN_DomainIndicator,
4696 { "CN-DomainIndicator",
4697 "ranap.CN_DomainIndicator",
4698 FT_UINT8, BASE_HEX, VALS(&ranap_CN_DomainIndicator_values), 0x0,
4701 { &hf_ranap_service_Handover,
4702 { "service-Handover",
4703 "ranap.service_Handover",
4704 FT_UINT8, BASE_HEX, VALS(&ranap_service_Handover_values), 0x0,
4707 { &hf_ranap_IuSigConId,
4710 FT_BYTES, BASE_NONE, NULL, 0x0,
4716 FT_UINT8, BASE_HEX, VALS(&ranap_SAPI_values), 0x0,
4719 { &hf_ranap_msg_extension_present,
4720 { "Message Extension",
4721 "ranap.msg_extension_present",
4722 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4725 { &hf_ranap_ProtocolExtensionContainer_present,
4726 { "ProtocolExtensionContainer",
4727 "ranap.ProtocolExtensionContainer_present",
4728 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4731 { &hf_ranap_nas_pdu_length,
4732 { "length of NAS-PDU",
4733 "ranap.nas_pdu_length",
4734 FT_UINT16, BASE_DEC, NULL, 0x0,
4739 /* Setup protocol subtree array */
4740 static gint *ett[] = {
4742 &ett_ranap_optionals,
4743 &ett_ranap_iE_Extension,
4747 &ett_ranap_ie_pair_first_value,
4748 &ett_ranap_ie_pair_second_value,
4750 &ett_ranap_rAB_Parameters,
4751 &ett_ranap_allocationOrRetentionPriority ,
4752 &ett_ranap_CriticalityDiagnostics_IE
4756 /* Register the protocol name and description */
4757 proto_ranap = proto_register_protocol("Radio Access Network Application Part",
4760 /* Register the header fields and subtrees */
4761 proto_register_field_array(proto_ranap, hf, array_length(hf));
4762 proto_register_subtree_array(ett, array_length(ett));
4768 proto_reg_handoff_ranap(void)
4770 dissector_add("sual.subsystem_number", SCCP_SSN_RANAP, dissect_ranap, proto_ranap);