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>
8 * Ethereal - Network traffic analyzer
9 * By Gerald Combs <gerald@ethereal.com>
10 * Copyright 1998 Gerald Combs
12 * Copied from README.developer
14 * This program is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU General Public License
16 * as published by the Free Software Foundation; either version 2
17 * of the License, or (at your option) any later version.
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, write to the Free Software
26 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
40 #include <epan/packet.h>
43 #define SCCP_SSN_RANAP 0x8E
45 /* description of PDU header */
46 #define PDU_NUMBER_OF_OCTETS_OFFSET 3
48 /* PDU Index Values */
49 #define InitiatingMessage 0
50 #define SuccessfulOutcome 1
51 #define UnsuccessfulOutcome 2
54 static const value_string ranap_pdu_index_values[] = {
55 {InitiatingMessage, "InitiatingMessage"},
56 {SuccessfulOutcome, "SuccessfulOutcome"},
57 {UnsuccessfulOutcome, "UnsuccessfulOutcome"},
63 /* Procedure Code Values */
64 #define PC_RAB_Assignment 0
65 #define PC_Iu_Release 1
66 #define PC_RelocationPreparation 2
67 #define PC_RelocationResourceAllocation 3
68 #define PC_RelocationCancel 4
69 #define PC_SRNS_ContextTransfer 5
70 #define PC_SecurityModeControl 6
71 #define PC_DataVolumeReport 7
72 #define PC_CN_InformationBroadcast 8
74 #define PC_RAB_ReleaseRequest 10
75 #define PC_Iu_ReleaseRequest 11
76 #define PC_RelocationDetect 12
77 #define PC_RelocationComplete 13
79 #define PC_CommonID 15
80 #define PC_CN_InvokeTrace 16
81 #define PC_LocationReportingControl 17
82 #define PC_LocationReport 18
83 #define PC_InitialUE_Message 19
84 #define PC_DirectTransfer 20
85 #define PC_OverloadControl 21
86 #define PC_ErrorIndication 22
87 #define PC_SRNS_DataForward 23
88 #define PC_ForwardSRNS_Context 24
89 #define PC_privateMessage 25
90 #define PC_CN_DeactivateTrace 26
91 #define PC_ResetResource 27
92 #define PC_RANAP_Relocation 28
95 static const value_string ranap_procedure_code_values[] = {
96 {PC_RAB_Assignment, "RAB-Assignment"},
97 {PC_Iu_Release, "IU-Release"},
98 {PC_RelocationPreparation, "RelocationPreparation"},
99 {PC_RelocationResourceAllocation, "RelocationResourceAllocation"},
100 {PC_RelocationCancel, "RelocationCancel"},
101 {PC_SRNS_ContextTransfer, "SRNS-ContextTransfer"},
102 {PC_SecurityModeControl, "SecurityModeControl"},
103 {PC_DataVolumeReport, "DataVolumeReport"},
104 {PC_CN_InformationBroadcast, "CN-InformationBroadcast"},
106 {PC_RAB_ReleaseRequest, "RAB-ReleaseRequest"},
107 {PC_Iu_ReleaseRequest, "Iu-ReleaseRequest"},
108 {PC_RelocationDetect, "RelocationDetect"},
109 {PC_RelocationComplete, "RelocationComplete"},
110 {PC_Paging, "Paging"},
111 {PC_CommonID, "CommonID"},
112 {PC_CN_InvokeTrace, "CN-InvokeTrace"},
113 {PC_LocationReportingControl, "LocationReportingControl"},
114 {PC_LocationReport, "LocationReport"},
115 {PC_InitialUE_Message, "InitialUE_Message"},
116 {PC_DirectTransfer, "DirectTransfer"},
117 {PC_OverloadControl, "OverloadControl"},
118 {PC_ErrorIndication, "ErrorIndication"},
119 {PC_SRNS_DataForward, "SRNS-DataForward"},
120 {PC_ForwardSRNS_Context, "ForwardSRNS-Context"},
121 {PC_privateMessage, "privateMessage"},
122 {PC_CN_DeactivateTrace, "CN-DeactivateTrace"},
123 {PC_ResetResource, "ResetResource"},
124 {PC_RANAP_Relocation, "RANAP-Relocation"},
129 static const value_string ranap_message_names[][5] = {
130 {/* PC_RAB_Assignment */
131 { InitiatingMessage, "RAB-AssignmentRequest"},
132 { SuccessfulOutcome, "undefined message"},
133 { UnsuccessfulOutcome, "undefined message"},
134 { Outcome, "RAB-AssignmentResponse"},
136 { /* PC_Iu_Release */
137 { InitiatingMessage, "Iu-ReleaseCommand"},
138 { SuccessfulOutcome, "Iu-ReleaseComplete"},
139 { UnsuccessfulOutcome, NULL},
142 { /* PC_RelocationPreparation */
143 { InitiatingMessage, "RelocationRequired"},
144 { SuccessfulOutcome, "RelocationCommand"},
145 { UnsuccessfulOutcome, "RelocationPreparationFailure"},
148 { /* PC_RelocationResourceAllocation */
149 { InitiatingMessage, "RelocationRequest"},
150 { SuccessfulOutcome, "RelocationRequestAcknowledge"},
151 { UnsuccessfulOutcome, "RelocationFailure"},
154 { /* PC_RelocationCancel */
155 { InitiatingMessage, "RelocationCancel"},
156 { SuccessfulOutcome, "RelocationCancelAcknowledge"},
157 { UnsuccessfulOutcome, NULL},
160 { /* PC_SRNS_ContextTransfer */
161 { InitiatingMessage, "SRNS-ContextRequest"},
162 { SuccessfulOutcome, "SRNS-ContextResponse"},
163 { UnsuccessfulOutcome, NULL},
166 { /* PC_SecurityModeControl */
167 { InitiatingMessage, "SecurityModeCommand"},
168 { SuccessfulOutcome, "SecurityModeComplete"},
169 { UnsuccessfulOutcome, "SecurityModeReject"},
172 { /* PC_DataVolumeReport */
173 { InitiatingMessage, "DataVolumeReportRequest"},
174 { SuccessfulOutcome, "DataVolumeReport"},
175 { UnsuccessfulOutcome, NULL},
178 { /* PC_CN_InformationBroadcast */
179 { InitiatingMessage, "CN-InformationBroadcastRequest"},
180 { SuccessfulOutcome, "CN-InformationBroadcastConfirm"},
181 { UnsuccessfulOutcome, "CN-InformationBroadcastReject"},
185 { InitiatingMessage, "Reset"},
186 { SuccessfulOutcome, "ResetAcknowledge"},
187 { UnsuccessfulOutcome, NULL},
190 { /* PC_RAB_ReleaseRequest */
191 { InitiatingMessage, "RAB-ReleaseRequest"},
192 { SuccessfulOutcome, NULL},
193 { UnsuccessfulOutcome, NULL},
196 { /* PC_Iu_ReleaseRequest */
197 { InitiatingMessage, "Iu-ReleaseRequest"},
198 { SuccessfulOutcome, NULL},
199 { UnsuccessfulOutcome, NULL},
202 { /* PC_RelocationDetect */
203 { InitiatingMessage, "RelocationDetect"},
204 { SuccessfulOutcome, NULL},
205 { UnsuccessfulOutcome, NULL},
208 { /* PC_RelocationComplete */
209 { InitiatingMessage, "RelocationComplete"},
210 { SuccessfulOutcome, NULL},
211 { UnsuccessfulOutcome, NULL},
215 { InitiatingMessage, "Paging"},
216 { SuccessfulOutcome, NULL},
217 { UnsuccessfulOutcome, NULL},
221 { InitiatingMessage, "CommonID"},
222 { SuccessfulOutcome, NULL},
223 { UnsuccessfulOutcome, NULL},
226 { /* PC_CN_InvokeTrace */
227 { InitiatingMessage, "CN-InvokeTrace"},
228 { SuccessfulOutcome, NULL},
229 { UnsuccessfulOutcome, NULL},
232 {/* PC_LocationReportingControl */
233 { InitiatingMessage, "LocationReportingControl"},
234 { SuccessfulOutcome, NULL},
235 { UnsuccessfulOutcome, NULL},
238 { /* PC_LocationReport */
239 { InitiatingMessage, "LocationReport"},
240 { SuccessfulOutcome, NULL},
241 { UnsuccessfulOutcome, NULL},
244 { /* PC_InitialUE_Message */
245 { InitiatingMessage, "InitialUE-Message"},
246 { SuccessfulOutcome, NULL},
247 { UnsuccessfulOutcome, NULL},
250 { /* PC_DirectTransfer */
251 { InitiatingMessage, "DirectTransfer"},
252 { SuccessfulOutcome, NULL},
253 { UnsuccessfulOutcome, NULL},
256 { /* PC_OverloadControl */
257 { InitiatingMessage, "Overload"},
258 { SuccessfulOutcome, NULL},
259 { UnsuccessfulOutcome, NULL},
262 { /* PC_ErrorIndication */
263 { InitiatingMessage, "ErrorIndication"},
264 { SuccessfulOutcome, NULL},
265 { UnsuccessfulOutcome, NULL},
268 { /* PC_SRNS_DataForward */
269 { InitiatingMessage, "SRNS-DataForwardCommand"},
270 { SuccessfulOutcome, NULL},
271 { UnsuccessfulOutcome, NULL},
274 { /* PC_ForwardSRNS_Context */
275 { InitiatingMessage, "ForwardSRNS-Context"},
276 { SuccessfulOutcome, NULL},
277 { UnsuccessfulOutcome, NULL},
280 { /* PC_privateMessage */
281 { InitiatingMessage, "PrivateMessage"},
282 { SuccessfulOutcome, NULL},
283 { UnsuccessfulOutcome, NULL},
286 { /* PC_CN_DeactivateTrace */
287 { InitiatingMessage, "CN-DeactivateTrace"},
288 { SuccessfulOutcome, NULL},
289 { UnsuccessfulOutcome, NULL},
292 { /* PC_ResetResource */
293 { InitiatingMessage, "ResetResource"},
294 { SuccessfulOutcome, "ResetResourceAcknowledge"},
295 { UnsuccessfulOutcome, NULL},
298 { /* PC_RANAP_Relocation */
299 { InitiatingMessage, "RANAP-RelocationInformation"},
300 { SuccessfulOutcome, NULL},
301 { UnsuccessfulOutcome, NULL},
307 /* Criticality Values */
312 static const value_string ranap_criticality_values[] = {
313 {CR_reject, "reject"},
314 {CR_ignore, "ignore"},
315 {CR_notify, "notify"},
319 /* presence values for optional components */
320 #define PR_not_present 0
323 static const value_string ranap_presence_values[] = {
324 {PR_not_present, "not present"},
325 {PR_present, "present"},
329 /* description of IE Header */
330 #define IE_ID_LENGTH 2
331 #define IE_CRITICALITY_LENGTH 1
334 /* description of IE-ID values */
335 #define IE_AreaIdentity 0
336 #define IE_CN_BroadcastInformationPiece 1
337 #define IE_CN_BroadcastInformationPieceList 2
338 #define IE_CN_DomainIndicator 3
340 #define IE_ChosenEncryptionAlgorithm 5
341 #define IE_ChosenIntegrityProtectionAlgorithm 6
342 #define IE_ClassmarkInformation2 7
343 #define IE_ClassmarkInformation3 8
344 #define IE_CriticalityDiagnostics 9
345 #define IE_DL_GTP_PDU_SequenceNumber 10
346 #define IE_EncryptionInformation 11
347 #define IE_IntegrityProtectionInformation 12
348 #define IE_IuTransportAssociation 13
349 #define IE_L3_Information 14
351 #define IE_NAS_PDU 16
352 #define IE_NonSearchingIndication 17
353 #define IE_NumberOfSteps 18
355 #define IE_OldBSS_ToNewBSS_Information 20
356 #define IE_PagingAreaID 21
357 #define IE_PagingCause 22
358 #define IE_PermanentNAS_UE_ID 23
359 #define IE_RAB_ContextItem 24
360 #define IE_RAB_ContextList 25
361 #define IE_RAB_DataForwardingItem 26
362 #define IE_RAB_DataForwardingItem_SRNS_CtxReq 27
363 #define IE_RAB_DataForwardingList 28
364 #define IE_RAB_DataForwardingList_SRNS_CtxReq 29
365 #define IE_RAB_DataVolumeReportItem 30
366 #define IE_RAB_DataVolumeReportList 31
367 #define IE_RAB_DataVolumeReportRequestItem 32
368 #define IE_RAB_DataVolumeReportRequestList 33
369 #define IE_RAB_FailedItem 34
370 #define IE_RAB_FailedList 35
372 #define IE_RAB_QueuedItem 37
373 #define IE_RAB_QueuedList 38
374 #define IE_RAB_ReleaseFailedList 39
375 #define IE_RAB_ReleaseItem 40
376 #define IE_RAB_ReleaseList 41
377 #define IE_RAB_ReleasedItem 42
378 #define IE_RAB_ReleasedList 43
379 #define IE_RAB_ReleasedList_IuRelComp 44
380 #define IE_RAB_RelocationReleaseItem 45
381 #define IE_RAB_RelocationReleaseList 46
382 #define IE_RAB_SetupItem_RelocReq 47
383 #define IE_RAB_SetupItem_RelocReqAck 48
384 #define IE_RAB_SetupList_RelocReq 49
385 #define IE_RAB_SetupList_RelocReqAck 50
386 #define IE_RAB_SetupOrModifiedItem 51
387 #define IE_RAB_SetupOrModifiedList 52
388 #define IE_RAB_SetupOrModifyItem 53
389 #define IE_RAB_SetupOrModifyList 54
391 #define IE_RelocationType 56
392 #define IE_RequestType 57
395 #define IE_SourceID 60
396 #define IE_SourceRNC_ToTargetRNC_TransparentContainer 61
397 #define IE_TargetID 62
398 #define IE_TargetRNC_ToSourceRNC_TransparentContainer 63
399 #define IE_TemporaryUE_ID 64
400 #define IE_TraceReference 65
401 #define IE_TraceType 66
402 #define IE_TransportLayerAddress 67
403 #define IE_TriggerID 68
405 #define IE_UL_GTP_PDU_SequenceNumber 70
406 #define IE_RAB_FailedtoReportItem 71
407 #define IE_RAB_FailedtoReportList 72
408 #define IE_KeyStatus 75
409 #define IE_DRX_CycleLengthCoefficient 76
410 #define IE_IuSigConIdList 77
411 #define IE_IuSigConIdItem 78
412 #define IE_IuSigConId 79
413 #define IE_DirectTransferInformationItem_RANAP_RelocInf 80
414 #define IE_DirectTransferInformationList_RANAP_RelocInf 81
415 #define IE_RAB_ContextItem_RANAP_RelocInf 82
416 #define IE_RAB_ContextList_RANAP_RelocInf 83
417 #define IE_RAB_ContextFailedtoTransferItem 84
418 #define IE_RAB_ContextFailedtoTransferList 85
419 #define IE_GlobalRNC_ID 86
420 #define IE_RAB_ReleasedItem_IuRelComp 87
422 static const value_string ranap_ie_id_values[] = {
423 {IE_AreaIdentity, "AreaIdentity"},
424 {IE_CN_BroadcastInformationPiece, "CN_BroadcastInformationPiece"},
425 {IE_CN_BroadcastInformationPieceList, "CN_BroadcastInformationPieceList"},
426 {IE_CN_DomainIndicator, "CN_DomainIndicator"},
428 {IE_ChosenEncryptionAlgorithm, "ChosenEncryptionAlgorithm"},
429 {IE_ChosenIntegrityProtectionAlgorithm, "ChosenIntegrityProtectionAlgorithm"},
430 {IE_ClassmarkInformation2, "ClassmarkInformation2"},
431 {IE_ClassmarkInformation3, "ClassmarkInformation3"},
432 {IE_CriticalityDiagnostics, "CriticalityDiagnostics"},
433 {IE_DL_GTP_PDU_SequenceNumber, "DL_GTP_PDU_SequenceNumber"},
434 {IE_EncryptionInformation, "EncryptionInformation"},
435 {IE_IntegrityProtectionInformation, "IntegrityProtectionInformation"},
436 {IE_IuTransportAssociation, "IuTransportAssociation"},
437 {IE_L3_Information, "L3_Information"},
439 {IE_NAS_PDU, "NAS_PDU"},
440 {IE_NonSearchingIndication, "NonSearchingIndication"},
441 {IE_NumberOfSteps, "NumberOfSteps"},
442 {IE_OMC_ID, "OMC_ID"},
443 {IE_OldBSS_ToNewBSS_Information, "OldBSS_ToNewBSS_Information"},
444 {IE_PagingAreaID, "PagingAreaID"},
445 {IE_PagingCause, "PagingCause"},
446 {IE_PermanentNAS_UE_ID, "PermanentNAS_UE_ID"},
447 {IE_RAB_ContextItem, "RAB_ContextItem"},
448 {IE_RAB_ContextList, "RAB_ContextList"},
449 {IE_RAB_DataForwardingItem, "RAB_DataForwardingItem"},
450 {IE_RAB_DataForwardingItem_SRNS_CtxReq, "RAB_DataForwardingItem_SRNS_CtxReq"},
451 {IE_RAB_DataForwardingList, "RAB_DataForwardingList"},
452 {IE_RAB_DataForwardingList_SRNS_CtxReq, "RAB_DataForwardingList_SRNS_CtxReq"},
453 {IE_RAB_DataVolumeReportItem, "RAB_DataVolumeReportItem"},
454 {IE_RAB_DataVolumeReportList, "RAB_DataVolumeReportList"},
455 {IE_RAB_DataVolumeReportRequestItem, "RAB_DataVolumeReportRequestItem"},
456 {IE_RAB_DataVolumeReportRequestList, "RAB_DataVolumeReportRequestList"},
457 {IE_RAB_FailedItem, "RAB_FailedItem"},
458 {IE_RAB_FailedList, "RAB_FailedList"},
459 {IE_RAB_ID, "RAB_ID"},
460 {IE_RAB_QueuedItem, "RAB_QueuedItem"},
461 {IE_RAB_QueuedList, "RAB_QueuedList"},
462 {IE_RAB_ReleaseFailedList, "RAB_ReleaseFailedList"},
463 {IE_RAB_ReleaseItem, "RAB_ReleaseItem"},
464 {IE_RAB_ReleaseList, "RAB_ReleaseList"},
465 {IE_RAB_ReleasedItem, "RAB_ReleasedItem"},
466 {IE_RAB_ReleasedList, "RAB_ReleasedList"},
467 {IE_RAB_ReleasedList_IuRelComp, "RAB_ReleasedList_IuRelComp"},
468 {IE_RAB_RelocationReleaseItem, "RAB_RelocationReleaseItem"},
469 {IE_RAB_RelocationReleaseList, "RAB_RelocationReleaseList"},
470 {IE_RAB_SetupItem_RelocReq, "RAB_SetupItem_RelocReq"},
471 {IE_RAB_SetupItem_RelocReqAck, "RAB_SetupItem_RelocReqAck"},
472 {IE_RAB_SetupList_RelocReq, "RAB_SetupList_RelocReq"},
473 {IE_RAB_SetupList_RelocReqAck, "RAB_SetupList_RelocReqAck"},
474 {IE_RAB_SetupOrModifiedItem, "RAB_SetupOrModifiedItem"},
475 {IE_RAB_SetupOrModifiedList, "RAB_SetupOrModifiedList"},
476 {IE_RAB_SetupOrModifyItem, "RAB_SetupOrModifyItem"},
477 {IE_RAB_SetupOrModifyList, "RAB_SetupOrModifyList"},
479 {IE_RelocationType, "RelocationType"},
480 {IE_RequestType, "RequestType"},
483 {IE_SourceID, "SourceID"},
484 {IE_SourceRNC_ToTargetRNC_TransparentContainer,
485 "SourceRNC_ToTargetRNC_TransparentContainer"},
486 {IE_TargetID, "TargetID"},
487 {IE_TargetRNC_ToSourceRNC_TransparentContainer,
488 "TargetRNC_ToSourceRNC_TransparentContainer"},
489 {IE_TemporaryUE_ID, "TemporaryUE_ID"},
490 {IE_TraceReference, "TraceReference"},
491 {IE_TraceType, "TraceType"},
492 {IE_TransportLayerAddress, "TransportLayerAddress"},
493 {IE_TriggerID, "TriggerID"},
495 {IE_UL_GTP_PDU_SequenceNumber, "UL_GTP_PDU_SequenceNumber"},
496 {IE_RAB_FailedtoReportItem, "RAB_FailedtoReportItem"},
497 {IE_RAB_FailedtoReportList, "RAB_FailedtoReportList"},
498 {IE_KeyStatus, "KeyStatus"},
499 {IE_DRX_CycleLengthCoefficient, "DRX_CycleLengthCoefficient"},
500 {IE_IuSigConIdList, "IuSigConIdList"},
501 {IE_IuSigConIdItem, "IuSigConIdItem"},
502 {IE_IuSigConId, "IuSigConId"},
503 {IE_DirectTransferInformationItem_RANAP_RelocInf,
504 "DirectTransferInformationItem_RANAP_RelocInf"},
505 {IE_DirectTransferInformationList_RANAP_RelocInf,
506 "DirectTransferInformationList_RANAP_RelocInf"},
507 {IE_RAB_ContextItem_RANAP_RelocInf, "RAB_ContextItem_RANAP_RelocInf"},
508 {IE_RAB_ContextList_RANAP_RelocInf, "RAB_ContextList_RANAP_RelocInf"},
509 {IE_RAB_ContextFailedtoTransferItem, "RAB_ContextFailedtoTransferItem"},
510 {IE_RAB_ContextFailedtoTransferList, "RAB_ContextFailedtoTransferList"},
511 {IE_GlobalRNC_ID, "GlobalRNC_ID"},
512 {IE_RAB_ReleasedItem_IuRelComp, "RAB_ReleasedItem_IuRelComp"},
517 /* Description of IE-Contents */
519 /* Length of fields within IEs */
520 #define RAB_ID_LENGTH 1
521 #define PLMN_ID_LENGTH 3
523 #define IE_PROTOCOL_EXTENSION_LENGTH 1
526 #define NUM_RABS_LENGTH 1
529 /* Traffic Class values */
530 #define TC_conversational 0
531 #define TC_streaming 1
532 #define TC_interactive 2
533 #define TC_background 3
535 static const value_string ranap_trafficClass_values[] = {
536 {TC_conversational, "conversational"},
537 {TC_streaming, "streaming"},
538 {TC_interactive, "interactive"},
539 {TC_background, "background"},
543 /* rAB-AsymmetryIndicator values */
544 #define AI_symmetric_bidirectional 0
545 #define AI_asymmetric_unidirectional_downlink 1
546 #define AI_asymmetric_unidirectional_uplink 2
547 #define AI_asymmetric_bidirectional 3
549 static const value_string ranap_rAB_AsymmetryIndicator_values[] = {
550 {AI_symmetric_bidirectional, "symmetric-bidirectional"},
551 {AI_asymmetric_unidirectional_downlink, "asymmetric-unidirectional-downlink"},
552 {AI_asymmetric_unidirectional_uplink, "asymmetric-unidirectional-uplink"},
553 {AI_asymmetric_bidirectional, "asymmetric-bidirectional"},
557 /* DeliveryOrder values */
558 #define DO_delivery_order_requested 0
559 #define DO_delivery_order_not_requested 1
561 static const value_string ranap_DeliveryOrder_values[] = {
562 {DO_delivery_order_requested, "delivery-order-requested"},
563 {DO_delivery_order_not_requested, "delivery-order-not-requested"},
566 #define maxSDU_Size_LENGTH 2
568 /* deliveryOfErroneousSDU values */
571 #define DOES_no_error_detection_consideration 2
573 static const value_string ranap_deliveryOfErroneousSDU_values[] = {
576 {DOES_no_error_detection_consideration, "no-error-detection-consideration"},
580 #define subflowSDU_Size_LENGTH 2
581 #define transferDelay_LENGTH 2
584 /* trafficHandlingPriority values */
585 static const value_string ranap_priority_values[] = {
601 { 15, "no-priority-used"},
605 /* pre-emptionCapability values */
606 static const value_string ranap_pre_emptionCapability_values[] = {
607 { 0, "shall-not-trigger-pre-emption"},
608 { 1, "may-trigger-pre-emption"},
611 /* pre-emptionVulnerability values */
612 static const value_string ranap_pre_emptionVulnerability_values[] = {
613 { 0, "not-pre-emptable"},
614 { 1, "pre-emptable"},
618 /* queuingAllowed values */
619 static const value_string ranap_queuingAllowed_values[] = {
620 { 0, "queueing-not-allowed"},
621 { 1, "queueing-allowed"},
625 /* sourceStatisticsDescriptor values */
626 static const value_string ranap_sourceStatisticsDescriptor_values[] = {
631 /* relocationRequirement values */
632 static const value_string ranap_relocationRequirement_values[] = {
637 /* userPlaneMode values */
638 static const value_string ranap_userPlaneMode_values[] = {
639 { 0, "transparent-mode"},
640 { 1, "support-mode-for-predefined-SDU-sizes"},
643 /* PDP_Type values */
644 static const value_string ranap_PDP_Type_values[] = {
652 /* dataVolumeReportingIndication values */
653 static const value_string ranap_dataVolumeReportingIndication_values[] = {
655 { 1, "do-not-report"},
659 /* cause_choice values */
660 #define CC_CauseRadioNetwork 0
661 #define CC_CauseTransmissionNetwork 1
662 #define CC_CauseNAS 2
663 #define CC_CauseProtocol 3
664 #define CC_CauseMisc 4
665 #define CC_CauseNon_Standard 5
667 static const value_string ranap_cause_choice_values[] = {
668 { CC_CauseRadioNetwork, "CauseRadioNetwork"},
669 { CC_CauseTransmissionNetwork, "CauseTransmissionNetwork"},
670 { CC_CauseNAS, "CauseNAS"},
671 { CC_CauseProtocol, "CauseProtocol"},
672 { CC_CauseMisc, "CauseMisc"},
673 { CC_CauseNon_Standard, "CauseNon-Standard"},
678 static const value_string ranap_cause_value_str[] = {
679 /* CauseRadioNetwork (1..64) */
680 { 1, "rab-pre-empted"},
681 { 2, "trelocoverall-expiry"},
682 { 3, "trelocprep-expiry"},
683 { 4, "treloccomplete-expiry"},
684 { 5, "tqueing-expiry"},
685 { 6, "relocation-triggered"},
686 { 7, "trellocalloc-expiry"},
687 { 8, "unable-to-establish-during-relocation"},
688 { 9, "unknown-target-rnc"},
689 { 10, "relocation-cancelled"},
690 { 11, "successful-relocation"},
691 { 12, "requested-ciphering-and-or-integrity-protection-algorithms-not-supported"},
692 { 13, "change-of-ciphering-and-or-integrity-protection-is-not-supported"},
693 { 14, "failure-in-the-radio-interface-procedure"},
694 { 15, "release-due-to-utran-generated-reason"},
695 { 16, "user-inactivity"},
696 { 17, "time-critical-relocation"},
697 { 18, "requested-traffic-class-not-available"},
698 { 19, "invalid-rab-parameters-value"},
699 { 20, "requested-maximum-bit-rate-not-available"},
700 { 21, "requested-guaranteed-bit-rate-not-available"},
701 { 22, "requested-transfer-delay-not-achievable"},
702 { 23, "invalid-rab-parameters-combination"},
703 { 24, "condition-violation-for-sdu-parameters"},
704 { 25, "condition-violation-for-traffic-handling-priority"},
705 { 26, "condition-violation-for-guaranteed-bit-rate"},
706 { 27, "user-plane-versions-not-supported"},
707 { 28, "iu-up-failure"},
708 { 29, "relocation-failure-in-target-CN-RNC-or-target-system"},
709 { 30, "invalid-RAB-ID"},
710 { 31, "no-remaining-rab"},
711 { 32, "interaction-with-other-procedure"},
712 { 33, "requested-maximum-bit-rate-for-dl-not-available"},
713 { 34, "requested-maximum-bit-rate-for-ul-not-available"},
714 { 35, "requested-guaranteed-bit-rate-for-dl-not-available"},
715 { 36, "requested-guaranteed-bit-rate-for-ul-not-available"},
716 { 37, "repeated-integrity-checking-failure"},
717 { 38, "requested-report-type-not-supported"},
718 { 39, "request-superseded"},
719 { 40, "release-due-to-UE-generated-signalling-connection-release"},
720 { 41, "resource-optimisation-relocation"},
721 { 42, "requested-information-not-available"},
722 { 43, "relocation-desirable-for-radio-reasons"},
723 { 44, "relocation-not-supported-in-target-RNC-or-target-system"},
724 { 45, "directed-retry"},
725 { 46, "radio-connection-with-UE-Lost"},
727 /* CauseTransmissionNetwork (65..80) */
728 { 65, "logical-error-unknown-iu-transport-association"},
729 { 66, "iu-transport-connection-failed-to-establish"},
731 /* CauseNAS (81..96) */
732 { 81, "user-restriction-start-indication"},
733 { 82, "user-restriction-end-indication"},
734 { 83, "normal-release"},
736 /* CauseProtocol (97..112) */
737 { 97, "transfer-syntax-error"},
738 { 98, "semantic-error"},
739 { 99, "message-not-compatible-with-receiver-state"},
740 {100, "abstract-syntax-error-reject"},
741 {101, "abstract-syntax-error-ignore-and-notify"},
742 {102, "abstract-syntax-error-falsely-constructed-message"},
744 /* CauseMisc (113..128) */
745 {113, "om-intervention"},
746 {114, "no-resource-available"},
747 {115, "unspecified-failure"},
748 {116, "network-optimisation"},
752 /* CN_DomainIndicator_values */
753 static const value_string ranap_CN_DomainIndicator_values[] = {
760 static const value_string ranap_SAPI_values[] = {
765 /* service_Handover_values */
766 static const value_string ranap_service_Handover_values[] = {
767 { 0, "handover-to-GSM-should-be-performed"},
768 { 1, "handover-to-GSM-should-not-be-performed"},
769 { 2, "handover-to-GSM-shall-not-be-performed"},
772 /* Initialize the protocol and registered fields */
774 static int proto_ranap = -1;
776 static dissector_table_t nas_pdu_dissector_table;
778 packet_info *g_pinfo = NULL;
779 proto_tree *g_tree = NULL;
781 /* pdu header fields */
782 static int hf_ranap_pdu_number_of_octets = -1;
783 static int hf_ranap_pdu_index = -1;
784 static int hf_ranap_procedure_code = -1;
785 static int hf_ranap_pdu_criticality = -1;
786 static int hf_ranap_number_of_ies = -1;
788 /* ie header fields */
789 static int hf_ranap_ie_ie_id = -1;
790 static int hf_ranap_ie_criticality = -1;
791 static int hf_ranap_ie_number_of_octets = -1;
792 static int hf_ranap_ie_protocol_extension = -1;
794 /*ie contents fields */
795 static int hf_ranap_number_of_ies_in_list = -1;
796 static int hf_ranap_ie_pair_first_criticality = -1;
797 static int hf_ranap_ie_pair_second_criticality = -1;
798 static int hf_ranap_first_value_number_of_octets = -1;
799 static int hf_ranap_second_value_number_of_octets = -1;
800 static int hf_ranap_rab_id = -1;
801 static int hf_ranap_nas_pdu = -1;
802 static int hf_ranap_plmn_id = -1;
803 static int hf_ranap_lac = -1;
804 static int hf_ranap_sac = -1;
805 static int hf_ranap_rac = -1;
806 static int hf_ranap_nAS_SynchronisationIndicator = -1;
807 static int hf_ranap_trafficClass = -1;
808 static int hf_ranap_deliveryOrder = -1;
809 static int hf_ranap_iE_Extensions_present = -1;
810 static int hf_ranap_num_rabs = -1;
811 static int hf_ranap_nAS_SynchronisationIndicator_present = -1;
812 static int hf_ranap_rAB_Parameters_present = -1;
813 static int hf_ranap_userPlaneInformation_present = -1;
814 static int hf_ranap_transportLayerInformation_present = -1;
815 static int hf_ranap_service_Handover_present = -1;
816 static int hf_ranap_guaranteedBitRate_present = -1;
817 static int hf_ranap_transferDelay_present = -1;
818 static int hf_ranap_trafficHandlingPriority_present = -1;
819 static int hf_ranap_allocationOrRetentionPriority_present = -1;
820 static int hf_ranap_sourceStatisticsDescriptor_present = -1;
821 static int hf_ranap_relocationRequirement_present = -1;
822 static int hf_ranap_rAB_AsymmetryIndicator = -1;
823 static int hf_ranap_maxBitrate = -1;
824 static int hf_ranap_guaranteedBitrate = -1;
825 static int hf_ranap_maxSDU_Size = -1;
826 static int hf_ranap_sDU_ErrorRatio_mantissa = -1;
827 static int hf_ranap_sDU_ErrorRatio_exponent = -1;
828 static int hf_ranap_residualBitErrorRatio_mantissa = -1;
829 static int hf_ranap_residualBitErrorRatio_exponent = -1;
830 static int hf_ranap_deliveryOfErroneousSDU = -1;
831 static int hf_ranap_subflowSDU_Size = -1;
832 static int hf_ranap_rAB_SubflowCombinationBitRate = -1;
833 static int hf_ranap_sDU_ErrorRatio_present = -1;
834 static int hf_ranap_sDU_FormatInformationParameters_present = -1;
835 static int hf_ranap_subflowSDU_Size_present = -1;
836 static int hf_ranap_rAB_SubflowCombinationBitRate_present = -1;
837 static int hf_ranap_transferDelay = -1;
838 static int hf_ranap_trafficHandlingPriority = -1;
839 static int hf_ranap_priorityLevel = -1;
840 static int hf_ranap_pre_emptionCapability = -1;
841 static int hf_ranap_pre_emptionVulnerability = -1;
842 static int hf_ranap_queuingAllowed = -1;
843 static int hf_ranap_sourceStatisticsDescriptor = -1;
844 static int hf_ranap_userPlaneMode = -1;
845 static int hf_ranap_uP_ModeVersions = -1;
846 static int hf_ranap_number_of_ProtocolExtensionFields = -1;
847 static int hf_ranap_ext_field_id = -1;
848 static int hf_ranap_ext_field_criticality = -1;
849 static int hf_ranap_ext_field_number_of_octets = -1;
850 static int hf_ranap_transportLayerAddress = -1;
851 static int hf_ranap_transportLayerAddress_length = -1;
852 static int hf_ranap_gTP_TEI = -1;
853 static int hf_ranap_bindingID = -1;
854 static int hf_ranap_pDP_TypeInformation_present = -1;
855 static int hf_ranap_dataVolumeReportingIndication_present = -1;
856 static int hf_ranap_dl_GTP_PDU_SequenceNumber_present = -1;
857 static int hf_ranap_ul_GTP_PDU_SequenceNumber_present = -1;
858 static int hf_ranap_dl_N_PDU_SequenceNumber_present = -1;
859 static int hf_ranap_ul_N_PDU_SequenceNumber_present = -1;
860 static int hf_ranap_PDP_Type = -1;
861 static int hf_ranap_dataVolumeReportingIndication = -1;
862 static int hf_ranap_dl_GTP_PDU_SequenceNumber = -1;
863 static int hf_ranap_ul_GTP_PDU_SequenceNumber = -1;
864 static int hf_ranap_dl_N_PDU_SequenceNumber = -1;
865 static int hf_ranap_ul_N_PDU_SequenceNumber = -1;
866 static int hf_ranap_cause_choice = -1;
867 static int hf_ranap_cause_value = -1;
868 static int hf_ranap_transportLayerAddress_present = -1;
869 static int hf_ranap_iuTransportAssociation_present = -1;
870 static int hf_ranap_dl_dataVolumes_present = -1;
871 static int hf_ranap_dataVolumeReference_present = -1;
872 static int hf_ranap_dl_UnsuccessfullyTransmittedDataVolume = -1;
873 static int hf_ranap_dataVolumeReference = -1;
874 static int hf_ranap_procedureCode_present = -1;
875 static int hf_ranap_triggeringMessage_present = -1;
876 static int hf_ranap_procedureCriticality_present = -1;
877 static int hf_ranap_iEsCriticalityDiagnostics_present = -1;
878 static int hf_ranap_triggeringMessage = -1;
879 static int hf_ranap_iECriticality = -1;
880 static int hf_ranap_procedureCriticality = -1;
881 static int hf_ranap_repetitionNumber = -1;
882 static int hf_ranap_num_of_CriticalityDiagnostics_IEs = -1;
883 static int hf_ranap_repetitionNumber_present = -1;
884 static int hf_ranap_dl_UnsuccessfullyTransmittedDataVolume_present = -1;
885 static int hf_ranap_CN_DomainIndicator = -1;
886 static int hf_ranap_IuSigConId = -1;
887 static int hf_ranap_SAPI = -1;
888 static int hf_ranap_msg_extension_present = -1;
889 static int hf_ranap_ProtocolExtensionContainer_present = -1;
890 static int hf_ranap_nas_pdu_length = -1;
891 static int hf_ranap_relocationRequirement = -1;
892 static int hf_ranap_service_Handover = -1;
893 static int hf_ranap_extension_field = -1;
894 static int hf_ranap_RNC_ID = -1;
898 static gint ett_ranap = -1;
899 static gint ett_ranap_optionals = -1;
900 static gint ett_ranap_iE_Extension = -1;
901 static gint ett_ranap_ie = -1;
902 static gint ett_ranap_ie_pair = -1;
903 static gint ett_ranap_rab = -1;
904 static gint ett_ranap_ie_pair_first_value = -1;
905 static gint ett_ranap_ie_pair_second_value = -1;
906 static gint ett_ranap_rAB_Parameters = -1;
907 static gint ett_ranap_sDU = -1;
908 static gint ett_ranap_allocationOrRetentionPriority = -1;
909 static gint ett_ranap_CriticalityDiagnostics_IE = -1;
913 /*****************************************************************************/
915 /* Utility Functions */
917 /*****************************************************************************/
919 /* sets *offset and *bitoffset n bits further */
921 proceed_nbits(gint *offset, gint *bitoffset, gint n)
924 *offset += *bitoffset / 8;
928 /* sets *offset and *bitoffset to the next byte boundary */
929 static void allign(gint *offset, gint *bitoffset)
931 if ( *bitoffset != 0 )
938 /* sets *offset and *bitoffset behind the following integer */
940 proceed_perint32(gint *offset, gint *bitoffset, gint length)
942 proceed_nbits(offset, bitoffset, 2);
943 allign(offset, bitoffset);
948 /* extract length field found at offset */
949 /* if length field spans more than two bytes -1 is returned and the field is not decoded */
951 extract_length(tvbuff_t *tvb, gint offset, gint *length, gint *length_size)
954 guint16 tmp_length16;
956 tmp_length8 = tvb_get_guint8(tvb, offset);
957 if ((tmp_length8 & 0x80) == 0)
959 /* length coded in one byte */
960 *length = tmp_length8;
965 tmp_length16 = tvb_get_ntohs(tvb, offset);
966 if ( ((tmp_length16 & 0x8000) == 0x8000) && ((tmp_length16 & 0x4000) == 0) )
968 /* length coded in two bytes */
969 *length = tmp_length16 & 0x3FFF;
973 { /* length is coded in more than 2 bytes */
980 /* extract the next n bits and return them alligned to the LSB */
982 extract_nbits(tvbuff_t *tvb, gint offset, gint bitoffset, gint n)
988 if (bitoffset + n <= 8)
990 /* all bits contained in one byte */
991 uint_bits = tvb_get_guint8(tvb, offset);
992 uint_bits <<= bitoffset; /* remove bitoffset */
993 uint_bits >>= 8-n; /* allign to LSB */
997 /* bits contained within 2 bytes */
998 tmp_2bytes = tvb_get_ntohs(tvb, offset);
999 tmp_2bytes <<= bitoffset; /* remove bitoffset */
1000 uint_bits = tmp_2bytes >> ( 8 + (8-n)); /* allign to LSB */
1007 /* extract an integer with 2bit length field and return the int value*/
1009 extract_int32(tvbuff_t *tvb, gint offset, gint bitoffset, gint *length)
1014 tmp_2byte = tvb_get_ntohs(tvb, offset);
1016 tmp_2byte <<= bitoffset; /* remove bitoffset */
1017 *length = tmp_2byte >> (6 + 8); /* allign 2bit length field to LSB */
1018 (*length)++; /* now we have the length of the int value */
1020 proceed_nbits(&offset, &bitoffset, 2);
1021 allign(&offset, &bitoffset);
1026 result = tvb_get_guint8(tvb, offset);
1029 result = tvb_get_ntohs(tvb, offset);
1032 result = tvb_get_ntoh24(tvb, offset);
1035 result = tvb_get_ntohl(tvb, offset);
1043 /* return bitmask string looking like "..01 0..." */
1045 bitmaskstr(guint bitoffset, guint bitlength, guint16 value, guint *length)
1047 static char maskstr[20];
1051 strcpy(maskstr, " ");
1053 for (i=0; i<16; i++)
1055 if ( i < bitoffset || i > bitoffset+bitlength-1 )
1057 /* i is outside extracted bitfield */
1058 maskstr[i + i/4] = '.';
1061 { /* i is inside extracted bitfield */
1062 if ( ((0x8000 >> i) & value) != 0x0000 )
1065 maskstr[i + i/4] = '1';
1069 /* bit is not set */
1070 maskstr[i + i/4] = '0';
1074 if (bitoffset + bitlength <= 8)
1076 /* bitfield is located within first byte only */
1082 /* bitfield is located within first & second byte */
1092 proto_tree_add_bitstring(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint offset,
1093 gint bitoffset, gint bitlength)
1095 guint16 read_2bytes;
1096 guint16 alligned_2bytes;
1099 char maskstr_buf[56] = "\0";
1103 char buf[256] = "\0";
1104 header_field_info *hf_info_p;
1106 gint initial_offset = offset;
1108 memset(bitstr, 0, 128);
1110 /* create bitmask string for first byte */
1111 read_2bytes = tvb_get_ntohs(tvb, offset);
1112 maskstr = bitmaskstr(bitoffset, (bitoffset+bitlength >8) ? 8-bitoffset : bitlength, read_2bytes, &length);
1113 if (bitoffset+bitlength > 8)
1115 sprintf(maskstr_buf, "%s + %d Bits = ", maskstr, bitlength - (8-bitoffset));
1119 sprintf(maskstr_buf, "%s = ", maskstr);
1123 /* print all but the last byte to buf */
1124 byte_span = (bitoffset + bitlength + 7) / 8;
1125 for (i=0; i < byte_span - 1; i++, offset++)
1127 read_2bytes = tvb_get_ntohs(tvb, offset);
1128 alligned_2bytes = read_2bytes << bitoffset; /* remove bitoffset */
1129 one_byte = alligned_2bytes >> 8; /* move to low byte */
1132 sprintf(&(buf[2*i]), "%02X", one_byte);
1135 /* add last byte if it contains bits which have not yet been shifted in */
1136 if ( ((bitlength + 7) / 8 ) == byte_span )
1138 read_2bytes = tvb_get_ntohs(tvb, offset);
1139 alligned_2bytes = read_2bytes << bitoffset; /* remove bitoffset */
1140 one_byte = alligned_2bytes >> 8; /* move to low byte */
1141 one_byte >>= (8 - (bitlength%8)); /*cut off surplus bits */
1142 one_byte <<= (8 - (bitlength%8)); /* allign to MSB in low byte*/
1145 sprintf(&(buf[2*i]), "%02X", one_byte);
1148 /* get header field info */
1149 hf_info_p = proto_registrar_get_nth(hfindex);
1152 return ( proto_tree_add_bytes_format(tree, hfindex, tvb, initial_offset,
1153 byte_span , bitstr, "%s %s: %s", maskstr_buf, hf_info_p->name, buf) );
1158 /* add unsigned int, 1-8 bits long */
1160 proto_tree_add_uint_bits(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint offset,
1161 gint bitoffset, gint bitlength, gint min)
1164 guint16 read_2bytes, alligned_2bytes;
1167 header_field_info *hf_info_p;
1171 if (bitoffset + bitlength <= 8)
1173 /* all bits contained in one byte */
1174 uint_bits = tvb_get_guint8(tvb, offset);
1175 read_2bytes = uint_bits;
1180 /* bits contained within 2 bytes */
1181 read_2bytes = tvb_get_ntohs(tvb, offset);
1183 alligned_2bytes = read_2bytes << bitoffset; /* remove bitoffset */
1184 uint_bits = alligned_2bytes >> ( 8 + (8-bitlength)); /* allign to LSB */
1188 /* create bitmask string */
1189 maskstr = bitmaskstr(bitoffset, bitlength, read_2bytes, &length);
1191 /* get header field info */
1192 hf_info_p = proto_registrar_get_nth(hfindex);
1194 if (hf_info_p->strings != NULL)
1196 /* string representation for decoded header field present */
1197 return ( proto_tree_add_uint_format(tree, hfindex, tvb, offset,
1198 length, uint_bits, "%s = %s: %s (%d)", maskstr, hf_info_p->name,
1199 val_to_str(uint_bits, hf_info_p->strings, "%d"), uint_bits) );
1203 /* no string representation */
1204 return ( proto_tree_add_uint_format(tree, hfindex, tvb, offset,
1205 length, uint_bits, "%s = %s: %d", maskstr, hf_info_p->name, uint_bits) );
1209 /* add PER encoded integer (maximum length of value: 4 bytes) */
1211 proto_tree_add_PERint32(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint offset,
1212 gint bitoffset, gint *length, gint min)
1218 header_field_info *hf_info_p;
1221 value = extract_int32(tvb, offset, bitoffset, length);
1224 /* create bitmask string for 2 bit length field */
1225 tmp_2bytes = tvb_get_ntohs(tvb, offset);
1226 maskstr = bitmaskstr(bitoffset, 2, tmp_2bytes, &length_size);
1228 /* get header field info */
1229 hf_info_p = proto_registrar_get_nth(hfindex);
1231 return ( proto_tree_add_uint_format(tree, hfindex, tvb, offset,
1232 (*length) + length_size, value,
1233 "%s + %d Bytes = %s: %d", maskstr, *length, hf_info_p->name, value) );
1238 /*****************************************************************************/
1240 /* Dissecting Functions for single parameters */
1242 /*****************************************************************************/
1244 dissect_iE_Extension(tvbuff_t *tvb, proto_tree *tree, gint *offset, gint *bitoffset, char *description)
1246 proto_item *ext_item = NULL;
1247 proto_tree *ext_tree = NULL;
1248 guint16 number_of_extFields;
1249 gint number_of_octets = 0;
1250 gint number_of_octets_size = 0;
1253 allign(offset, bitoffset);
1255 /* create subtree for iE_Extension */
1258 ext_item = proto_tree_add_text(tree, tvb, *offset, 0, "%s iE-Extensions", description);
1259 ext_tree = proto_item_add_subtree(ext_item, ett_ranap_iE_Extension);
1262 /* number of extension fields */
1263 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);
1272 /* for each extension field */
1273 for (i=1; i <= number_of_extFields; i++)
1275 /* add fields to ie subtee */
1276 /* Extension Field ID */
1279 proto_tree_add_item(ext_tree, hf_ranap_ext_field_id, tvb,
1280 *offset, IE_ID_LENGTH, FALSE);
1282 *offset += IE_ID_LENGTH;
1287 proto_tree_add_uint_bits(ext_tree, hf_ranap_ext_field_criticality, tvb,
1288 *offset, *bitoffset, 2, 0);
1290 proceed_nbits(offset, bitoffset, 2);
1292 /* number of octets in the IE */
1293 allign(offset, bitoffset);
1294 if (0 == extract_length(tvb, *offset, &number_of_octets, &number_of_octets_size))
1298 proto_tree_add_uint(ext_tree, hf_ranap_ext_field_number_of_octets, tvb,
1299 *offset, number_of_octets_size, number_of_octets);
1304 /* decoding is not supported */
1307 proto_tree_add_text(ext_tree, tvb, *offset, 0,
1308 "Number of Octets greater than 0x3FFF, dissection not supported");
1313 *offset += number_of_octets_size;
1316 proto_tree_add_item(ext_tree, hf_ranap_extension_field, tvb,
1317 *offset, number_of_octets, FALSE);
1321 *offset += number_of_octets;
1329 dissect_userPlaneInformation(tvbuff_t *tvb, proto_tree *tree, gint *offset, gint *bitoffset)
1331 int extension_present;
1332 int iE_Extensions_present;
1333 int tmp_extension_present;
1335 /* protocol_extension present ? */
1336 extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1337 proceed_nbits(offset, bitoffset, 1);
1339 /* iE_Extensions present ? */
1340 iE_Extensions_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1341 proceed_nbits(offset, bitoffset, 1);
1344 tmp_extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1345 proceed_nbits(offset, bitoffset, 1);
1347 proto_tree_add_uint_bits(tree, hf_ranap_userPlaneMode, tvb, *offset,
1349 proceed_nbits(offset, bitoffset, 1);
1351 /* uP-ModeVersions */
1352 proto_tree_add_bitstring(tree, hf_ranap_uP_ModeVersions, tvb, *offset,
1354 proceed_nbits(offset, bitoffset, 16);
1357 if (iE_Extensions_present)
1359 return(dissect_iE_Extension(tvb, tree, offset, bitoffset, "UserPlaneInformation"));
1367 dissect_sDU_Parameters(tvbuff_t *tvb, proto_tree *ie_tree, gint *offset, gint *bitoffset)
1369 proto_item *sDU_item = NULL;
1370 proto_tree *sDU_tree = NULL;
1371 proto_item *optionals_item = NULL;
1372 proto_tree *optionals_tree = NULL;
1374 int extension_present;
1375 int sDU_ErrorRatio_present;
1376 int sDU_FormatInformationParameters_present;
1377 int iE_Extensions_present;
1378 int sDU_ErrorRatio_iE_Extensions_present;
1379 int residualBitErrorRatio_iE_Extensions_present;
1381 gint number_of_sDU_FormatInformationParameters;
1382 int sDU_FormatInformationParameters_extension_present;
1383 int subflowSDU_Size_present;
1384 int rAB_SubflowCombinationBitRate_present;
1385 int sDU_FormatInformationParameters_iE_Extensions_present;
1388 /* create subtree for sDU_Parameters */
1389 sDU_item = proto_tree_add_text(ie_tree, tvb, *offset, 0,
1391 sDU_tree = proto_item_add_subtree(sDU_item, ett_ranap_sDU);
1393 /* create subtree for extension/optional/default bitmap */
1394 optionals_item = proto_tree_add_text(sDU_tree, tvb, *offset, 1,
1395 "sDU_Parameters Extension/Optional/Default bitmap");
1396 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
1398 /* protocol_extension present ? */
1399 extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1400 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
1401 *offset, *bitoffset, 1, 0);
1402 proceed_nbits(offset, bitoffset, 1);
1404 /* sDU_ErrorRatio present ? */
1405 sDU_ErrorRatio_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1406 proto_tree_add_uint_bits(optionals_tree, hf_ranap_sDU_ErrorRatio_present, tvb,
1407 *offset, *bitoffset, 1, 0);
1408 proceed_nbits(offset, bitoffset, 1);
1410 /* sDU_FormatInformationParameters present ? */
1411 sDU_FormatInformationParameters_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1412 proto_tree_add_uint_bits(optionals_tree, hf_ranap_sDU_FormatInformationParameters_present, tvb,
1413 *offset, *bitoffset, 1, 0);
1414 proceed_nbits(offset, bitoffset, 1);
1416 /* iE_Extensions present ? */
1417 iE_Extensions_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1418 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present, tvb,
1419 *offset, *bitoffset, 1, 0);
1420 proceed_nbits(offset, bitoffset, 1);
1423 /* sDU_ErrorRatio */
1424 if (sDU_ErrorRatio_present)
1426 sDU_ErrorRatio_iE_Extensions_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1427 proceed_nbits(offset, bitoffset, 1);
1429 proto_tree_add_uint_bits(sDU_tree, hf_ranap_sDU_ErrorRatio_mantissa, tvb, *offset,
1431 proceed_nbits(offset, bitoffset, 4);
1433 proto_tree_add_uint_bits(sDU_tree, hf_ranap_sDU_ErrorRatio_exponent, tvb, *offset,
1435 proceed_nbits(offset, bitoffset, 3);
1437 if (sDU_ErrorRatio_iE_Extensions_present)
1439 if ((ret=dissect_iE_Extension(tvb, sDU_tree, offset, bitoffset, "sDU_ErrorRatio")) != 0)
1444 /* residualBitErrorRatio */
1445 residualBitErrorRatio_iE_Extensions_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1446 proceed_nbits(offset, bitoffset, 1);
1448 proto_tree_add_uint_bits(sDU_tree, hf_ranap_residualBitErrorRatio_mantissa, tvb, *offset,
1450 proceed_nbits(offset, bitoffset, 4);
1452 proto_tree_add_uint_bits(sDU_tree, hf_ranap_sDU_ErrorRatio_exponent, tvb, *offset,
1454 proceed_nbits(offset, bitoffset, 3);
1457 if (residualBitErrorRatio_iE_Extensions_present)
1459 if ((ret=dissect_iE_Extension(tvb, sDU_tree, offset, bitoffset, "residualBitErrorRatio")) != 0)
1464 /* deliveryOfErroneousSDU */
1465 proto_tree_add_uint_bits(sDU_tree, hf_ranap_deliveryOfErroneousSDU, tvb, *offset,
1467 proceed_nbits(offset, bitoffset, 2);
1470 /* sDU_FormatInformationParameters */
1471 if (sDU_FormatInformationParameters_present)
1473 number_of_sDU_FormatInformationParameters = extract_nbits(tvb, *offset, *bitoffset, 6) + 1;
1474 proceed_nbits(offset, bitoffset, 6);
1476 for (i=1; i<= number_of_sDU_FormatInformationParameters; i++)
1478 /* create subtree for extension/optional/default bitmap */
1479 optionals_item = proto_tree_add_text(sDU_tree, tvb, *offset, 1,
1480 "sDU_FormatInformationParameters Extension/Optional/Default bitmap");
1481 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
1483 /* protocol extension present ? */
1484 sDU_FormatInformationParameters_extension_present =
1485 extract_nbits(tvb, *offset, *bitoffset, 1);
1486 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
1487 *offset, *bitoffset, 1, 0);
1488 proceed_nbits(offset, bitoffset, 1);
1490 /* subflowSDU_Size present ? */
1491 subflowSDU_Size_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1492 proto_tree_add_uint_bits(optionals_tree, hf_ranap_subflowSDU_Size_present, tvb,
1493 *offset, *bitoffset, 1, 0);
1494 proceed_nbits(offset, bitoffset, 1);
1496 /* rAB_SubflowCombinationBitRate present ? */
1497 rAB_SubflowCombinationBitRate_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1498 proto_tree_add_uint_bits(optionals_tree, hf_ranap_rAB_SubflowCombinationBitRate_present, tvb,
1499 *offset, *bitoffset, 1, 0);
1500 proceed_nbits(offset, bitoffset, 1);
1502 /* ie_Extension present ? */
1503 sDU_FormatInformationParameters_iE_Extensions_present =
1504 extract_nbits(tvb, *offset, *bitoffset, 1);
1505 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present, tvb,
1506 *offset, *bitoffset, 1, 0);
1507 proceed_nbits(offset, bitoffset, 1);
1509 if (subflowSDU_Size_present)
1511 allign(offset, bitoffset);
1512 proto_tree_add_item(sDU_tree, hf_ranap_subflowSDU_Size,
1513 tvb, *offset, subflowSDU_Size_LENGTH, FALSE);
1514 offset += subflowSDU_Size_LENGTH;
1517 if (rAB_SubflowCombinationBitRate_present)
1519 proto_tree_add_PERint32(sDU_tree, hf_ranap_rAB_SubflowCombinationBitRate,
1520 tvb, *offset, *bitoffset, &length, 0);
1521 proceed_perint32(offset, bitoffset, length);
1524 if (sDU_FormatInformationParameters_iE_Extensions_present)
1526 if ((ret=dissect_iE_Extension(tvb, sDU_tree, offset, bitoffset,
1527 "sDU_FormatInformationParameters" )) != 0)
1533 if (extension_present)
1535 /* extended sequence */
1536 /* decoding is not supported */
1537 proto_tree_add_text(ie_tree, tvb, *offset, IE_PROTOCOL_EXTENSION_LENGTH,
1538 "Protocol extension for sDU_FormatInformationParameters present, dissection not supported");
1548 dissect_rAB_Parameters(tvbuff_t *tvb, proto_tree *ie_tree, gint *offset, gint *bitoffset)
1551 proto_item *rab_item = NULL;
1552 proto_tree *rab_tree = NULL;
1553 proto_item *optionals_item = NULL;
1554 proto_tree *optionals_tree = NULL;
1555 proto_item *prio_item = NULL;
1556 proto_tree *prio_tree = NULL;
1558 int extension_present;
1559 int tmp_extension_present;
1560 int guaranteedBitRate_present;
1561 int transferDelay_present;
1562 int trafficHandlingPriority_present;
1563 int allocationOrRetentionPriority_present;
1564 int sourceStatisticsDescriptor_present;
1565 int relocationRequirement_present;
1566 int iE_Extensions_present;
1567 int tmp_iE_Extensions_present;
1571 /* create subtree for rAB_Parameters */
1572 rab_item = proto_tree_add_text(ie_tree, tvb, *offset, 0,
1574 rab_tree = proto_item_add_subtree(rab_item, ett_ranap_rAB_Parameters);
1576 /* create subtree for extension/optional/default bitmap */
1577 optionals_item = proto_tree_add_text(rab_tree, tvb, *offset, IE_PROTOCOL_EXTENSION_LENGTH,
1578 "rAB_Parameters Extension/Optional/Default bitmap");
1579 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
1581 /* protocol extension present ? */
1582 extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1583 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
1584 *offset, *bitoffset, 1, 0);
1585 proceed_nbits(offset, bitoffset, 1);
1587 /* guaranteedBitRate present ? */
1588 guaranteedBitRate_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1589 proto_tree_add_uint_bits(optionals_tree, hf_ranap_guaranteedBitRate_present,
1590 tvb, *offset, *bitoffset, 1, 0);
1591 proceed_nbits(offset, bitoffset, 1);
1593 /* transferDelay present ? */
1594 transferDelay_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1595 proto_tree_add_uint_bits(optionals_tree, hf_ranap_transferDelay_present,
1596 tvb, *offset, *bitoffset, 1, 0);
1597 proceed_nbits(offset, bitoffset, 1);
1599 /* trafficHandlingPriority present ? */
1600 trafficHandlingPriority_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1601 proto_tree_add_uint_bits(optionals_tree, hf_ranap_trafficHandlingPriority_present,
1602 tvb, *offset, *bitoffset, 1, 0);
1603 proceed_nbits(offset, bitoffset, 1);
1605 /* allocationOrRetentionPriority present ? */
1606 allocationOrRetentionPriority_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1607 proto_tree_add_uint_bits(optionals_tree, hf_ranap_allocationOrRetentionPriority_present,
1608 tvb, *offset, *bitoffset, 1, 0);
1609 proceed_nbits(offset, bitoffset, 1);
1611 /* sourceStatisticsDescriptor present ? */
1612 sourceStatisticsDescriptor_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1613 proto_tree_add_uint_bits(optionals_tree, hf_ranap_sourceStatisticsDescriptor_present,
1614 tvb, *offset, *bitoffset, 1, 0);
1615 proceed_nbits(offset, bitoffset, 1);
1617 /* relocationRequirement present ? */
1618 relocationRequirement_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1619 proto_tree_add_uint_bits(optionals_tree, hf_ranap_relocationRequirement_present,
1620 tvb, *offset, *bitoffset, 1, 0);
1621 proceed_nbits(offset, bitoffset, 1);
1623 /* iE-Extensions present ? */
1624 iE_Extensions_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1625 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present,
1626 tvb, *offset, *bitoffset, 1, 0);
1627 proceed_nbits(offset, bitoffset, 1);
1631 tmp_extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1632 proceed_nbits(offset, bitoffset, 1);
1634 proto_tree_add_uint_bits(rab_tree, hf_ranap_trafficClass,
1635 tvb, *offset, *bitoffset, 2, 0);
1636 proceed_nbits(offset, bitoffset, 2);
1638 if (tmp_extension_present)
1640 /* decoding is not supported */
1641 proto_tree_add_text(rab_tree, tvb, *offset, IE_PROTOCOL_EXTENSION_LENGTH,
1642 "Protocol extension for trafficClass present, dissection not supported");
1647 /* rAB-AsymmetryIndicator */
1648 tmp_extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1649 proceed_nbits(offset, bitoffset, 1);
1651 proto_tree_add_uint_bits(rab_tree, hf_ranap_rAB_AsymmetryIndicator,
1652 tvb, *offset, *bitoffset, 2, 0);
1653 proceed_nbits(offset, bitoffset, 2);
1655 if (tmp_extension_present)
1657 /* decoding is not supported */
1658 proto_tree_add_text(rab_tree, tvb, *offset, IE_PROTOCOL_EXTENSION_LENGTH,
1659 "Protocol extension for rAB-AsymmetryIndicator present, dissection not supported");
1665 tmp_byte = extract_nbits(tvb, *offset, *bitoffset, 1) +1 ; /*sequence 1..2 */
1666 proceed_nbits(offset, bitoffset, 1);
1668 for (i=1; i<= tmp_byte; i++)
1670 proto_tree_add_PERint32(rab_tree, hf_ranap_maxBitrate,
1671 tvb, *offset, *bitoffset, &length, 1);
1672 proceed_perint32(offset, bitoffset, length);
1676 /* guaranteedBitRate */
1677 if (guaranteedBitRate_present)
1679 tmp_byte = extract_nbits(tvb, *offset, *bitoffset, 1) +1 ; /*sequence 1..2 */
1680 proceed_nbits(offset, bitoffset, 1);
1682 for (i=1; i<= tmp_byte; i++)
1684 proto_tree_add_PERint32(rab_tree, hf_ranap_guaranteedBitrate,
1685 tvb, *offset, *bitoffset, &length, 0);
1686 proceed_perint32(offset, bitoffset, length);
1691 proto_tree_add_uint_bits(rab_tree, hf_ranap_deliveryOrder, tvb, *offset,
1693 proceed_nbits(offset, bitoffset, 1);
1697 allign(offset, bitoffset);
1698 proto_tree_add_item(rab_tree, hf_ranap_maxSDU_Size,
1699 tvb, *offset, maxSDU_Size_LENGTH, FALSE);
1700 *offset += maxSDU_Size_LENGTH;
1702 /* sDU-Parameters */
1703 tmp_byte = extract_nbits(tvb, *offset, *bitoffset, 3) + 1; /*sequence 1..7 */
1704 proceed_nbits(offset, bitoffset, 3);
1705 for (i=1; i<= tmp_byte; i++)
1707 if ((ret=dissect_sDU_Parameters(tvb, rab_tree, offset, bitoffset))!=0) return(ret);
1711 if (transferDelay_present)
1713 allign(offset, bitoffset);
1714 proto_tree_add_item(rab_tree, hf_ranap_transferDelay,
1715 tvb, *offset, transferDelay_LENGTH, FALSE);
1716 *offset += transferDelay_LENGTH;
1720 /* trafficHandlingPriority */
1721 if (trafficHandlingPriority_present)
1723 proto_tree_add_uint_bits(rab_tree, hf_ranap_trafficHandlingPriority, tvb, *offset,
1725 proceed_nbits(offset, bitoffset, 4);
1728 /* allocationOrRetentionPriority */
1729 if (allocationOrRetentionPriority_present)
1731 /* create subtree for */
1732 prio_item = proto_tree_add_text(rab_tree, tvb, *offset, 0,
1733 "allocationOrRetentionPriority");
1734 prio_tree = proto_item_add_subtree(prio_item, ett_ranap_allocationOrRetentionPriority);
1736 /* protocol extension present ? */
1737 tmp_extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1738 proceed_nbits(offset, bitoffset, 1);
1740 /* iE Extension present ? */
1741 tmp_iE_Extensions_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1742 proceed_nbits(offset, bitoffset, 1);
1744 /* allocationOrRetentionPriority */
1745 proto_tree_add_uint_bits(prio_tree, hf_ranap_priorityLevel, tvb, *offset,
1747 proceed_nbits(offset, bitoffset, 4);
1749 /* pre-emptionCapability */
1750 proto_tree_add_uint_bits(prio_tree, hf_ranap_pre_emptionCapability, tvb, *offset,
1752 proceed_nbits(offset, bitoffset, 1);
1754 /* pre-emptionVulnerability */
1755 proto_tree_add_uint_bits(prio_tree, hf_ranap_pre_emptionVulnerability, tvb, *offset,
1757 proceed_nbits(offset, bitoffset, 1);
1759 /* queuingAllowed */
1760 proto_tree_add_uint_bits(prio_tree, hf_ranap_queuingAllowed, tvb, *offset,
1762 proceed_nbits(offset, bitoffset, 1);
1764 if (tmp_iE_Extensions_present)
1766 if ((ret=dissect_iE_Extension(tvb, prio_tree, offset, bitoffset,
1767 "AllocationOrRetentionPriority")) != 0)
1771 if (tmp_extension_present)
1773 /* decoding is not supported */
1774 proto_tree_add_text(prio_tree, tvb, *offset, IE_PROTOCOL_EXTENSION_LENGTH,
1775 "Protocol extension for rAB-allocationOrRetentionPriority present, dissection not supported");
1780 /* sourceStatisticsDescriptor */
1781 if (sourceStatisticsDescriptor_present)
1783 /* protocol extension */
1784 tmp_extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1785 proceed_nbits(offset, bitoffset, 1);
1787 if (tmp_extension_present)
1789 /* decoding is not supported */
1790 proto_tree_add_text(prio_tree, tvb, *offset, IE_PROTOCOL_EXTENSION_LENGTH,
1791 "Protocol extension for sourceStatisticsDescriptor present, dissection not supported");
1795 proto_tree_add_uint_bits(rab_tree, hf_ranap_sourceStatisticsDescriptor, tvb, *offset,
1797 proceed_nbits(offset, bitoffset, 1);
1800 /* relocationRequirement */
1801 if (relocationRequirement_present)
1803 /* protocol extension */
1804 tmp_extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1805 proceed_nbits(offset, bitoffset, 1);
1807 if (tmp_extension_present)
1809 /* decoding is not supported */
1810 proto_tree_add_text(prio_tree, tvb, *offset, IE_PROTOCOL_EXTENSION_LENGTH,
1811 "Protocol extension for relocationRequirement present, dissection not supported");
1815 proto_tree_add_uint_bits(rab_tree, hf_ranap_relocationRequirement, tvb, *offset,
1817 proceed_nbits(offset, bitoffset, 1);
1822 if (iE_Extensions_present)
1824 if ((ret=dissect_iE_Extension(tvb, rab_tree, offset, bitoffset, "rAB_Parameters" )) != 0 )
1829 if (extension_present)
1831 /* decoding is not supported */
1832 proto_tree_add_text(rab_tree, tvb, *offset, IE_PROTOCOL_EXTENSION_LENGTH,
1833 "Protocol extension for rAB_Parameters present, dissection not supported");
1843 dissect_TransportLayerAddress(tvbuff_t *tvb, proto_tree *ie_tree, gint *offset, gint *bitoffset)
1845 gint extension_present;
1848 extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1849 proceed_nbits(offset, bitoffset, 1);
1850 if (extension_present)
1852 /* extended integer */
1853 proto_tree_add_text(ie_tree, tvb, *offset, 0,
1854 "extension present for TransportLayerAddress, dissection not supported");
1858 /* extract and add length of transportLayerAddress bitstring */
1859 str_length = extract_nbits(tvb, *offset, *bitoffset, 8) + 1;
1860 proto_tree_add_uint_bits(ie_tree, hf_ranap_transportLayerAddress_length,
1861 tvb, *offset, *bitoffset, 8, 1);
1862 proceed_nbits(offset, bitoffset, 8);
1863 allign(offset, bitoffset);
1865 /* add transportLayerAddress */
1866 proto_tree_add_bitstring(ie_tree, hf_ranap_transportLayerAddress, tvb, *offset,
1867 *bitoffset, str_length);
1868 proceed_nbits(offset, bitoffset, str_length);
1876 dissect_iuTransportAssociation(tvbuff_t *tvb, proto_tree *ie_tree, gint *offset, gint *bitoffset)
1878 guint extension_present;
1881 /* extension present ? */
1882 extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1883 if (extension_present)
1885 /* extended choice */
1886 proto_tree_add_text(ie_tree, tvb, *offset, 0,
1887 "extension present for IuTransportAssociation, dissection not supported");
1890 proceed_nbits(offset, bitoffset, 1);
1893 choice_value = extract_nbits(tvb, *offset, *bitoffset, 1);
1894 proceed_nbits(offset, bitoffset, 1);
1895 allign(offset, bitoffset);
1896 if (choice_value == 0)
1899 proto_tree_add_item(ie_tree, hf_ranap_gTP_TEI, tvb, *offset, 4, FALSE);
1905 proto_tree_add_item(ie_tree, hf_ranap_bindingID, tvb, *offset, 4, FALSE);
1914 dissect_transportLayerInformation(tvbuff_t *tvb, proto_tree *ie_tree, gint *offset, gint *bitoffset)
1916 proto_item *optionals_item = NULL;
1917 proto_tree *optionals_tree = NULL;
1918 int extension_present;
1919 int iE_Extensions_present;
1922 /* create subtree for extension/optional/default bitmap */
1923 optionals_item = proto_tree_add_text(ie_tree, tvb, *offset, IE_PROTOCOL_EXTENSION_LENGTH,
1924 "TransportLayerInformation Extension/Optional/Default bitmap");
1925 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
1928 /* protocol extension present ? */
1929 extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1930 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
1931 *offset, *bitoffset, 1, 0);
1932 proceed_nbits(offset, bitoffset, 1);
1934 /* iE-Extensions present ? */
1935 iE_Extensions_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1936 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present,
1937 tvb, *offset, *bitoffset, 1, 0);
1938 proceed_nbits(offset, bitoffset, 1);
1941 /* transportLayerAddress */
1942 if ((ret=dissect_TransportLayerAddress(tvb, ie_tree, offset, bitoffset)) != 0)
1945 /* iuTransportAssociation */
1946 if ((ret=dissect_iuTransportAssociation(tvb, ie_tree, offset, bitoffset)) != 0)
1950 if (iE_Extensions_present)
1952 if ((ret=dissect_iE_Extension(tvb, ie_tree, offset, bitoffset, "TransportLayerInformation" )) != 0 )
1956 /* protocol extension */
1957 if (extension_present)
1959 /* extended sequence */
1960 proto_tree_add_text(ie_tree, tvb, *offset, 0,
1961 "extension present for TransportLayerInformation, dissection not supported");
1970 dissect_dataVolumeList (tvbuff_t *tvb, proto_tree *ie_tree, gint *offset, gint *bitoffset, char *parname)
1972 proto_item *optionals_item = NULL;
1973 proto_tree *optionals_tree = NULL;
1974 gint extension_present;
1975 gint dataVolumeReference_present;
1976 gint iE_Extensions_present;
1982 /* number of volumes */
1983 number_vol = extract_nbits(tvb, *offset, *bitoffset, 1) + 1;
1984 proceed_nbits(offset, bitoffset, 1);
1986 for (i=1; i<=number_vol; i++)
1988 /* create subtree for extension/optional/default bitmap */
1989 optionals_item = proto_tree_add_text(ie_tree, tvb, *offset, 1,
1990 "%d. %s Extension/Optional/Default bitmap",
1992 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
1994 /* protocol_extension present ? */
1995 extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1996 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
1997 *offset, *bitoffset, 1, 0);
1998 proceed_nbits(offset, bitoffset, 1);
2000 /* dataVolumeReference present ? */
2001 dataVolumeReference_present = extract_nbits(tvb, *offset, *bitoffset, 1);
2002 proto_tree_add_uint_bits(optionals_tree, hf_ranap_dataVolumeReference_present, tvb,
2003 *offset, *bitoffset, 1, 0);
2004 proceed_nbits(offset, bitoffset, 1);
2006 /* iE_Extensions present ? */
2007 iE_Extensions_present = extract_nbits(tvb, *offset, *bitoffset, 1);
2008 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present, tvb,
2009 *offset, *bitoffset, 1, 0);
2010 proceed_nbits(offset, bitoffset, 1);
2013 /* UnsuccessfullyTransmittedDataVolume */
2014 proto_tree_add_PERint32(ie_tree, hf_ranap_dl_UnsuccessfullyTransmittedDataVolume,
2015 tvb, *offset, *bitoffset, &length, 0);
2016 proceed_perint32(offset, bitoffset, length);
2018 /* DataVolumeReference */
2019 if (dataVolumeReference_present)
2021 proto_tree_add_uint_bits(ie_tree, hf_ranap_dataVolumeReference, tvb,
2022 *offset, *bitoffset, 8, 0);
2023 proceed_nbits(offset, bitoffset, 8);
2027 if (iE_Extensions_present)
2029 if ((ret=dissect_iE_Extension(tvb, ie_tree, offset, bitoffset, "dl-dataVolumes" )) != 0)
2033 /* protocol extended */
2034 if (extension_present)
2036 /* extended sequence */
2037 /* decoding is not supported */
2038 proto_tree_add_text(ie_tree, tvb, *offset, IE_PROTOCOL_EXTENSION_LENGTH,
2039 "Protocol extension for dl-dataVolumes present, dissection not supported");
2049 dissect_cause(tvbuff_t *tvb, proto_tree *ie_tree, gint *offset, gint *bitoffset)
2051 gint extension_present;
2054 /* protocol extension present ? */
2055 extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
2056 proceed_nbits(offset, bitoffset, 1);
2057 if (extension_present)
2059 /* choice extension present */
2060 proto_tree_add_text(ie_tree, tvb, *offset, 0,
2061 "extension present for cause, dissection not supported");
2064 cause_choice = extract_nbits(tvb, *offset, *bitoffset, 3);
2065 proto_tree_add_uint_bits(ie_tree, hf_ranap_cause_choice,
2066 tvb, *offset, *bitoffset, 3, 0);
2067 proceed_nbits(offset, bitoffset, 3);
2069 switch (cause_choice)
2071 case CC_CauseRadioNetwork:
2072 proto_tree_add_uint_bits(ie_tree, hf_ranap_cause_value,
2073 tvb, *offset, *bitoffset, 6, 1);
2074 proceed_nbits(offset, bitoffset, 6);
2076 case CC_CauseTransmissionNetwork:
2077 proto_tree_add_uint_bits(ie_tree, hf_ranap_cause_value,
2078 tvb, *offset, *bitoffset, 4, 65);
2079 proceed_nbits(offset, bitoffset, 4);
2082 proto_tree_add_uint_bits(ie_tree, hf_ranap_cause_value,
2083 tvb, *offset, *bitoffset, 4, 81);
2084 proceed_nbits(offset, bitoffset, 4);
2086 case CC_CauseProtocol:
2087 proto_tree_add_uint_bits(ie_tree, hf_ranap_cause_value,
2088 tvb, *offset, *bitoffset, 4, 97);
2089 proceed_nbits(offset, bitoffset, 4);
2091 proto_tree_add_uint_bits(ie_tree, hf_ranap_cause_value,
2092 tvb, *offset, *bitoffset, 4, 113);
2093 proceed_nbits(offset, bitoffset, 4);
2095 case CC_CauseNon_Standard:
2096 proto_tree_add_uint_bits(ie_tree, hf_ranap_cause_value,
2097 tvb, *offset, *bitoffset, 7, 129);
2098 proceed_nbits(offset, bitoffset, 7);
2101 proto_tree_add_text(ie_tree, tvb, *offset, 0,
2102 "unexpected cause choice value, dissection not supported");
2110 dissect_iEsCriticalityDiagnostics(tvbuff_t *tvb, proto_tree *ie_tree, gint *offset, gint *bitoffset)
2112 proto_item *diag_item = NULL;
2113 proto_tree *diag_tree = NULL;
2114 proto_item *optionals_item = NULL;
2115 proto_tree *optionals_tree = NULL;
2116 int extension_present;
2117 int repetitionNumber_present;
2118 int iE_Extensions_present;
2122 allign(offset, bitoffset);
2123 num_of_errors = extract_nbits(tvb, *offset, *bitoffset, 8) + 1;
2124 proto_tree_add_uint_bits(ie_tree, hf_ranap_num_of_CriticalityDiagnostics_IEs, tvb,
2125 *offset, *bitoffset, 8, 1);
2126 proceed_nbits(offset, bitoffset, 8);
2128 for ( i= 1; i <= num_of_errors; i++)
2130 /* add subtree for CriticalityDiagnostics-IE */
2131 diag_item = proto_tree_add_text(ie_tree, tvb, *offset, 0,
2132 "%d. CriticalityDiagnostics-IE", i);
2133 diag_tree = proto_item_add_subtree(diag_item, ett_ranap_CriticalityDiagnostics_IE);
2135 /* create subtree for extension/optional/default bitmap */
2136 optionals_item = proto_tree_add_text(diag_tree, tvb, *offset, 1,
2137 "CriticalityDiagnostics-IE Extension/Optional/Default bitmap");
2138 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
2140 /* protocol_extension present ? */
2141 extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
2142 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
2143 *offset, *bitoffset, 1, 0);
2144 proceed_nbits(offset, bitoffset, 1);
2146 /* repetitionNumber present ? */
2147 repetitionNumber_present = extract_nbits(tvb, *offset, *bitoffset, 1);
2148 proto_tree_add_uint_bits(optionals_tree, hf_ranap_repetitionNumber_present, tvb,
2149 *offset, *bitoffset, 1, 0);
2150 proceed_nbits(offset, bitoffset, 1);
2152 /* iE_Extensions present ? */
2153 iE_Extensions_present = extract_nbits(tvb, *offset, *bitoffset, 1);
2154 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present,
2155 tvb, *offset, *bitoffset, 1, 0);
2156 proceed_nbits(offset, bitoffset, 1);
2159 proto_tree_add_uint_bits(diag_tree, hf_ranap_iECriticality,
2160 tvb, *offset, *bitoffset, 2, 0);
2161 proceed_nbits(offset, bitoffset, 2);
2164 allign(offset, bitoffset);
2165 proto_tree_add_item(diag_tree, hf_ranap_ie_ie_id, tvb,
2166 *offset, IE_ID_LENGTH, FALSE);
2167 *offset += IE_ID_LENGTH;
2169 /* repetitionNumber */
2170 if (repetitionNumber_present)
2172 allign(offset, bitoffset);
2173 proto_tree_add_uint_bits(diag_tree, hf_ranap_repetitionNumber,
2174 tvb, *offset, *bitoffset, 8, 1);
2175 proceed_nbits(offset, bitoffset, 8);
2179 if (iE_Extensions_present)
2181 return(dissect_iE_Extension(tvb, diag_tree, offset, bitoffset, "CriticalityDiagnostics-IE"));
2185 /* protocol extended */
2186 if (extension_present)
2188 /* extended sequence */
2189 /* decoding is not supported */
2190 proto_tree_add_text(diag_tree, tvb, *offset, IE_PROTOCOL_EXTENSION_LENGTH,
2191 "Protocol extension for CriticalityDiagnostics-IE present, dissection not supported");
2201 /*****************************************************************************/
2203 /* Dissecting Functions for IEs */
2205 /*****************************************************************************/
2208 dissect_IE_RAB_ID(tvbuff_t *tvb, proto_tree *ie_tree)
2212 proto_tree_add_item(ie_tree, hf_ranap_rab_id, tvb,
2213 0, RAB_ID_LENGTH, FALSE);
2220 dissect_IE_RAC(tvbuff_t *tvb, proto_tree *ie_tree)
2224 proto_tree_add_item(ie_tree, hf_ranap_rac, tvb,
2225 0, RAC_LENGTH, FALSE);
2232 dissect_IE_LAI(tvbuff_t *tvb, proto_tree *ie_tree)
2234 proto_item *optionals_item = NULL;
2235 proto_tree *optionals_tree = NULL;
2236 int iE_Extensions_present;
2243 /* create subtree for extension/optional/default bitmap */
2244 optionals_item = proto_tree_add_text(ie_tree, tvb, offset, 1,
2245 "LAI Extension/Optional/Default bitmap");
2246 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
2248 /* iE_Extensions_present present ? */
2249 iE_Extensions_present = extract_nbits(tvb, offset, bitoffset, 1);
2250 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present, tvb,
2251 offset, bitoffset, 1, 0);
2252 proceed_nbits(&offset, &bitoffset, 1);
2255 allign(&offset, &bitoffset);
2256 proto_tree_add_item(ie_tree, hf_ranap_plmn_id, tvb,
2257 offset, PLMN_ID_LENGTH, FALSE);
2258 offset += PLMN_ID_LENGTH;
2261 proto_tree_add_item(ie_tree, hf_ranap_lac, tvb,
2262 offset, LAC_LENGTH, FALSE);
2263 offset += LAC_LENGTH;
2266 if (iE_Extensions_present)
2268 if ((ret=dissect_iE_Extension(tvb, ie_tree, &offset, &bitoffset, "LAI")) != 0)
2277 dissect_IE_GlobalRNC_ID(tvbuff_t *tvb, proto_tree *ie_tree)
2284 proto_tree_add_item(ie_tree, hf_ranap_plmn_id, tvb,
2285 offset, PLMN_ID_LENGTH, FALSE);
2286 offset += PLMN_ID_LENGTH;
2289 proto_tree_add_item(ie_tree, hf_ranap_RNC_ID, tvb, offset, 2, FALSE);
2298 dissect_IE_SAI(tvbuff_t *tvb, proto_tree *ie_tree)
2300 proto_item *optionals_item = NULL;
2301 proto_tree *optionals_tree = NULL;
2302 int iE_Extensions_present;
2309 /* create subtree for extension/optional/default bitmap */
2310 optionals_item = proto_tree_add_text(ie_tree, tvb, offset, 1,
2311 "SAI Extension/Optional/Default bitmap");
2312 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
2314 /* iE_Extensions_present present ? */
2315 iE_Extensions_present = extract_nbits(tvb, offset, bitoffset, 1);
2316 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present, tvb,
2317 offset, bitoffset, 1, 0);
2318 proceed_nbits(&offset, &bitoffset, 1);
2321 allign(&offset, &bitoffset);
2322 proto_tree_add_item(ie_tree, hf_ranap_plmn_id, tvb,
2323 offset, PLMN_ID_LENGTH, FALSE);
2324 offset += PLMN_ID_LENGTH;
2327 proto_tree_add_item(ie_tree, hf_ranap_lac, tvb,
2328 offset, LAC_LENGTH, FALSE);
2329 offset += LAC_LENGTH;
2332 proto_tree_add_item(ie_tree, hf_ranap_sac, tvb,
2333 offset, SAC_LENGTH, FALSE);
2334 offset += SAC_LENGTH;
2337 if (iE_Extensions_present)
2339 if ((ret=dissect_iE_Extension(tvb, ie_tree, &offset, &bitoffset, "SAI")) != 0)
2348 dissect_IE_NAS_PDU(tvbuff_t *tvb, proto_tree *ie_tree)
2354 if (extract_length(tvb, 0, &length, &length_size) != 0)
2358 /* decoding is not supported */
2359 proto_tree_add_text(ie_tree, tvb, 0,
2360 2, "Number of Octets greater than 0x3FFF, dissection not supported");
2367 /* NAS - PDU length */
2368 proto_tree_add_item(ie_tree, hf_ranap_nas_pdu_length, tvb,
2369 0, length_size, FALSE);
2375 proto_tree_add_item(ie_tree, hf_ranap_nas_pdu, tvb,
2376 length_size, length, FALSE);
2379 /* call NAS dissector */
2380 next_tvb = tvb_new_subset(tvb, length_size, length, length);
2382 if (dissector_try_port(nas_pdu_dissector_table, 0x1, next_tvb, g_pinfo, g_tree)) return(0);
2388 dissect_IE_CN_DomainIndicator(tvbuff_t *tvb, proto_tree *ie_tree)
2395 proto_tree_add_uint_bits(ie_tree, hf_ranap_CN_DomainIndicator, tvb,
2396 offset, bitoffset, 1, 0);
2403 dissect_IE_IuSigConId(tvbuff_t *tvb, proto_tree *ie_tree)
2409 value = tvb_get_ntoh24(tvb, 0);
2410 proto_tree_add_uint(ie_tree, hf_ranap_IuSigConId,
2419 dissect_IE_SAPI(tvbuff_t *tvb, proto_tree *ie_tree)
2423 int extension_present;
2427 /* protocol_extension present ? */
2428 extension_present = extract_nbits(tvb, offset, bitoffset, 1);
2429 proceed_nbits(&offset, &bitoffset, 1);
2431 if (extension_present)
2434 /* decoding is not supported */
2435 proto_tree_add_text(ie_tree, tvb, offset, IE_PROTOCOL_EXTENSION_LENGTH,
2436 "Protocol extension for IE_SAPI present, dissection not supported");
2441 proto_tree_add_uint_bits(ie_tree, hf_ranap_SAPI, tvb,
2442 offset, bitoffset, 1, 0);
2449 dissect_IE_TransportLayerAddress(tvbuff_t *tvb, proto_tree *ie_tree)
2456 return(dissect_TransportLayerAddress(tvb, ie_tree, &offset, &bitoffset));
2463 dissect_IE_IuTransportAssociation(tvbuff_t *tvb, proto_tree *ie_tree)
2470 return(dissect_iuTransportAssociation(tvb, ie_tree, &offset, &bitoffset));
2477 dissect_IE_Cause(tvbuff_t *tvb, proto_tree *ie_tree)
2484 return(dissect_cause(tvb, ie_tree, &offset, &bitoffset));
2491 dissect_IE_RAB_ReleasedItem_IuRelComp(tvbuff_t *tvb, proto_tree *ie_tree)
2493 proto_item *optionals_item = NULL;
2494 proto_tree *optionals_tree = NULL;
2495 int extension_present;
2496 int dl_GTP_PDU_SequenceNumber_present;
2497 int ul_GTP_PDU_SequenceNumber_present;
2498 int iE_Extensions_present;
2505 /* create subtree for extension/optional/default bitmap */
2506 optionals_item = proto_tree_add_text(ie_tree, tvb, offset, 1,
2507 "RAB_ReleasedItem_IuRelComp Extension/Optional/Default bitmap");
2508 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
2510 /* protocol_extension present ? */
2511 extension_present = extract_nbits(tvb, offset, bitoffset, 1);
2512 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
2513 offset, bitoffset, 1, 0);
2514 proceed_nbits(&offset, &bitoffset, 1);
2516 /* dl_GTP_PDU_SequenceNumber present ? */
2517 dl_GTP_PDU_SequenceNumber_present = extract_nbits(tvb, offset, bitoffset, 1);
2518 proto_tree_add_uint_bits(optionals_tree, hf_ranap_dl_GTP_PDU_SequenceNumber_present, tvb,
2519 offset, bitoffset, 1, 0);
2520 proceed_nbits(&offset, &bitoffset, 1);
2522 /* ul_GTP_PDU_SequenceNumber present ? */
2523 ul_GTP_PDU_SequenceNumber_present = extract_nbits(tvb, offset, bitoffset, 1);
2524 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ul_GTP_PDU_SequenceNumber_present, tvb,
2525 offset, bitoffset, 1, 0);
2526 proceed_nbits(&offset, &bitoffset, 1);
2528 /* iE_Extensions_present present ? */
2529 iE_Extensions_present = extract_nbits(tvb, offset, bitoffset, 1);
2530 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present, tvb,
2531 offset, bitoffset, 1, 0);
2532 proceed_nbits(&offset, &bitoffset, 1);
2536 proto_tree_add_uint_bits(ie_tree, hf_ranap_rab_id,
2537 tvb, offset, bitoffset, 8, 0);
2538 proceed_nbits(&offset, &bitoffset, 8);
2540 /* dl-GTP-PDU-SequenceNumber */
2541 if (dl_GTP_PDU_SequenceNumber_present)
2543 allign(&offset, &bitoffset);
2544 proto_tree_add_item(ie_tree, hf_ranap_dl_GTP_PDU_SequenceNumber, tvb, offset, 2, FALSE);
2548 /* ul-GTP-PDU-SequenceNumber */
2549 if (ul_GTP_PDU_SequenceNumber_present)
2551 allign(&offset, &bitoffset);
2552 proto_tree_add_item(ie_tree, hf_ranap_ul_GTP_PDU_SequenceNumber, tvb, offset, 2, FALSE);
2557 if (iE_Extensions_present)
2559 if ((ret=dissect_iE_Extension(tvb, ie_tree, &offset, &bitoffset, "RAB_ReleasedItem_IuRelComp")) != 0)
2563 /* protocol extended */
2564 if (extension_present)
2566 /* extended sequence */
2567 /* decoding is not supported */
2568 proto_tree_add_text(ie_tree, tvb, offset, IE_PROTOCOL_EXTENSION_LENGTH,
2569 "Protocol extension for RAB_ReleasedItem_IuRelComp present, dissection not supported");
2578 dissect_IE_RAB_DataVolumeReportItem(tvbuff_t *tvb, proto_tree *ie_tree)
2580 proto_item *optionals_item = NULL;
2581 proto_tree *optionals_tree = NULL;
2582 int extension_present;
2583 int dl_UnsuccessfullyTransmittedDataVolume_present;
2584 int iE_Extensions_present;
2591 /* create subtree for extension/optional/default bitmap */
2592 optionals_item = proto_tree_add_text(ie_tree, tvb, offset, 1,
2593 "RAB_DataVolumeReportItem Extension/Optional/Default bitmap");
2594 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
2596 /* protocol_extension present ? */
2597 extension_present = extract_nbits(tvb, offset, bitoffset, 1);
2598 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
2599 offset, bitoffset, 1, 0);
2600 proceed_nbits(&offset, &bitoffset, 1);
2602 /* dl_UnsuccessfullyTransmittedDataVolume present ? */
2603 dl_UnsuccessfullyTransmittedDataVolume_present = extract_nbits(tvb, offset, bitoffset, 1);
2604 proto_tree_add_uint_bits(optionals_tree, hf_ranap_dl_UnsuccessfullyTransmittedDataVolume_present, tvb,
2605 offset, bitoffset, 1, 0);
2606 proceed_nbits(&offset, &bitoffset, 1);
2608 /* iE_Extensions_present present ? */
2609 iE_Extensions_present = extract_nbits(tvb, offset, bitoffset, 1);
2610 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present, tvb,
2611 offset, bitoffset, 1, 0);
2612 proceed_nbits(&offset, &bitoffset, 1);
2616 proto_tree_add_uint_bits(ie_tree, hf_ranap_rab_id,
2617 tvb, offset, bitoffset, 8, 0);
2618 proceed_nbits(&offset, &bitoffset, 8);
2620 /* dl_UnsuccessfullyTransmittedDataVolume */
2621 if (dl_UnsuccessfullyTransmittedDataVolume_present)
2624 if ((ret = dissect_dataVolumeList(tvb, ie_tree, &offset, &bitoffset,
2625 "dl_UnsuccessfullyTransmittedDataVolume")) != 0)
2630 if (iE_Extensions_present)
2632 if ((ret=dissect_iE_Extension(tvb, ie_tree, &offset, &bitoffset, "IE_RAB_DataVolumeReportItem")) != 0)
2636 /* protocol extended */
2637 if (extension_present)
2640 /* decoding is not supported */
2641 proto_tree_add_text(ie_tree, tvb, offset, IE_PROTOCOL_EXTENSION_LENGTH,
2642 "Protocol extension for IE_RAB_DataVolumeReportItem present, dissection not supported");
2651 dissect_IE_RAB_SetupOrModifyItemSecond(tvbuff_t *tvb, proto_tree *ie_tree)
2653 proto_item *optionals_item = NULL;
2654 proto_tree *optionals_tree = NULL;
2655 int extension_present;
2657 int pDP_TypeInformation_present;
2658 int dataVolumeReportingIndication_present;
2659 int dl_GTP_PDU_SequenceNumber_present;
2660 int ul_GTP_PDU_SequenceNumber_present;
2661 int dl_N_PDU_SequenceNumber_present;
2662 int ul_N_PDU_SequenceNumber_present;
2663 int iE_Extensions_present;
2672 /* create subtree for extension/optional/default bitmap */
2673 optionals_item = proto_tree_add_text(ie_tree, tvb, offset, 1,
2674 "SetupOrModifyItemSecond Extension/Optional/Default bitmap");
2675 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
2677 /* protocol_extension present ? */
2678 extension_present = extract_nbits(tvb, offset, bitoffset, 1);
2679 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
2680 offset, bitoffset, 1, 0);
2681 proceed_nbits(&offset, &bitoffset, 1);
2683 /* pDP_TypeInformation present ? */
2684 pDP_TypeInformation_present = extract_nbits(tvb, offset, bitoffset, 1);
2685 proto_tree_add_uint_bits(optionals_tree, hf_ranap_pDP_TypeInformation_present, tvb,
2686 offset, bitoffset, 1, 0);
2687 proceed_nbits(&offset, &bitoffset, 1);
2689 /* dataVolumeReportingIndication present ? */
2690 dataVolumeReportingIndication_present = extract_nbits(tvb, offset, bitoffset, 1);
2691 proto_tree_add_uint_bits(optionals_tree, hf_ranap_dataVolumeReportingIndication_present, tvb,
2692 offset, bitoffset, 1, 0);
2693 proceed_nbits(&offset, &bitoffset, 1);
2695 /* dl_GTP_PDU_SequenceNumber present present ? */
2696 dl_GTP_PDU_SequenceNumber_present = extract_nbits(tvb, offset, bitoffset, 1);
2697 proto_tree_add_uint_bits(optionals_tree, hf_ranap_dl_GTP_PDU_SequenceNumber_present, tvb,
2698 offset, bitoffset, 1, 0);
2699 proceed_nbits(&offset, &bitoffset, 1);
2702 /* ul_GTP_PDU_SequenceNumber present ? */
2703 ul_GTP_PDU_SequenceNumber_present = extract_nbits(tvb, offset, bitoffset, 1);
2704 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ul_GTP_PDU_SequenceNumber_present, tvb,
2705 offset, bitoffset, 1, 0);
2706 proceed_nbits(&offset, &bitoffset, 1);
2708 /* dl_N_PDU_SequenceNumber present ? */
2709 dl_N_PDU_SequenceNumber_present = extract_nbits(tvb, offset, bitoffset, 1);
2710 proto_tree_add_uint_bits(optionals_tree, hf_ranap_dl_N_PDU_SequenceNumber_present, tvb,
2711 offset, bitoffset, 1, 0);
2712 proceed_nbits(&offset, &bitoffset, 1);
2714 /* ul_N_PDU_SequenceNumber present ? */
2715 ul_N_PDU_SequenceNumber_present = extract_nbits(tvb, offset, bitoffset, 1);
2716 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ul_N_PDU_SequenceNumber_present, tvb,
2717 offset, bitoffset, 1, 0);
2718 proceed_nbits(&offset, &bitoffset, 1);
2720 /* iE_Extensions present ? */
2721 iE_Extensions_present = extract_nbits(tvb, offset, bitoffset, 1);
2722 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present, tvb,
2723 offset, bitoffset, 1, 0);
2724 proceed_nbits(&offset, &bitoffset, 1);
2726 /* pDP-TypeInformation */
2727 if (pDP_TypeInformation_present)
2729 tmp_byte = extract_nbits(tvb, offset, bitoffset, 1) + 1; /* Sequence 1..2 */
2730 proceed_nbits(&offset, &bitoffset, 1);
2731 for (i=1; i<=tmp_byte; i++)
2733 tmp_extension = extract_nbits(tvb, offset, bitoffset, 1);
2734 proceed_nbits(&offset, &bitoffset, 1);
2735 if (tmp_extension != 0)
2738 /* decoding is not supported */
2739 proto_tree_add_text(ie_tree, tvb, offset, IE_PROTOCOL_EXTENSION_LENGTH,
2740 "Protocol extension for PDP-Type present, dissection not supported");
2744 proto_tree_add_uint_bits(ie_tree, hf_ranap_PDP_Type, tvb,
2745 offset, bitoffset, 3, 0);
2746 proceed_nbits(&offset, &bitoffset, 3);
2750 /* dataVolumeReportingIndication */
2751 if (dataVolumeReportingIndication_present)
2753 proto_tree_add_uint_bits(ie_tree, hf_ranap_dataVolumeReportingIndication, tvb,
2754 offset, bitoffset, 1, 0);
2755 proceed_nbits(&offset, &bitoffset, 1);
2758 /* dl-GTP-PDU-SequenceNumber */
2759 if (dl_GTP_PDU_SequenceNumber_present)
2761 allign(&offset, &bitoffset);
2762 proto_tree_add_item(ie_tree, hf_ranap_dl_GTP_PDU_SequenceNumber, tvb, offset, 2, FALSE);
2766 /* ul-GTP-PDU-SequenceNumber */
2767 if (ul_GTP_PDU_SequenceNumber_present)
2769 allign(&offset, &bitoffset);
2770 proto_tree_add_item(ie_tree, hf_ranap_ul_GTP_PDU_SequenceNumber, tvb, offset, 2, FALSE);
2774 /* dl-N-PDU-SequenceNumber */
2775 if (dl_N_PDU_SequenceNumber_present)
2777 allign(&offset, &bitoffset);
2778 proto_tree_add_item(ie_tree, hf_ranap_dl_N_PDU_SequenceNumber, tvb, offset, 2, FALSE);
2782 /* ul-N-PDU-SequenceNumber */
2783 if (ul_N_PDU_SequenceNumber_present)
2785 allign(&offset, &bitoffset);
2786 proto_tree_add_item(ie_tree, hf_ranap_ul_N_PDU_SequenceNumber, tvb, offset, 2, FALSE);
2791 if (iE_Extensions_present)
2793 if ((ret=dissect_iE_Extension(tvb, ie_tree, &offset, &bitoffset, "SetupOrModifyItemSecond")) != 0)
2797 /* protocol extended */
2798 if (extension_present)
2801 /* decoding is not supported */
2802 proto_tree_add_text(ie_tree, tvb, offset, IE_PROTOCOL_EXTENSION_LENGTH,
2803 "Protocol extension for SetupOrModifyItemSecond present, dissection not supported");
2812 dissect_IE_RAB_SetupOrModifiedItem (tvbuff_t *tvb, proto_tree *ie_tree)
2814 proto_item *optionals_item = NULL;
2815 proto_tree *optionals_tree = NULL;
2817 int extension_present;
2818 int transportLayerAddress_present;
2819 int iuTransportAssociation_present;
2820 int dl_dataVolumes_present;
2821 int iE_Extensions_present;
2828 /* create subtree for extension/optional/default bitmap */
2829 optionals_item = proto_tree_add_text(ie_tree, tvb, offset, 1,
2830 "RAB-SetupOrModifiedItem Extension/Optional/Default bitmap");
2831 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
2833 /* protocol_extension present ? */
2834 extension_present = extract_nbits(tvb, offset, bitoffset, 1);
2835 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
2836 offset, bitoffset, 1, 0);
2837 proceed_nbits(&offset, &bitoffset, 1);
2839 /* transportLayerAddress present ? */
2840 transportLayerAddress_present = extract_nbits(tvb, offset, bitoffset, 1);
2841 proto_tree_add_uint_bits(optionals_tree, hf_ranap_transportLayerAddress_present, tvb,
2842 offset, bitoffset, 1, 0);
2843 proceed_nbits(&offset, &bitoffset, 1);
2845 /* iuTransportAssociation present ? */
2846 iuTransportAssociation_present = extract_nbits(tvb, offset, bitoffset, 1);
2847 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iuTransportAssociation_present, tvb,
2848 offset, bitoffset, 1, 0);
2849 proceed_nbits(&offset, &bitoffset, 1);
2851 /* dl_dataVolumes present ? */
2852 dl_dataVolumes_present = extract_nbits(tvb, offset, bitoffset, 1);
2853 proto_tree_add_uint_bits(optionals_tree, hf_ranap_dl_dataVolumes_present, tvb,
2854 offset, bitoffset, 1, 0);
2855 proceed_nbits(&offset, &bitoffset, 1);
2857 /* iE_Extensions present ? */
2858 iE_Extensions_present = extract_nbits(tvb, offset, bitoffset, 1);
2859 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present, tvb,
2860 offset, bitoffset, 1, 0);
2861 proceed_nbits(&offset, &bitoffset, 1);
2865 proto_tree_add_uint_bits(ie_tree, hf_ranap_rab_id,
2866 tvb, offset, bitoffset, 8, 0);
2867 proceed_nbits(&offset, &bitoffset, 8);
2869 /* transportLayerAddress */
2870 if (transportLayerAddress_present)
2872 if ((ret=dissect_TransportLayerAddress(tvb, ie_tree, &offset, &bitoffset)) != 0)
2876 /* iuTransportAssociation */
2877 if (iuTransportAssociation_present)
2879 if ((ret=dissect_iuTransportAssociation(tvb, ie_tree, &offset, &bitoffset)) != 0)
2883 /* dl-dataVolumes */
2884 if (dl_dataVolumes_present)
2886 if ((ret = dissect_dataVolumeList(tvb, ie_tree, &offset, &bitoffset,
2887 "dl-dataVolumes")) != 0)
2892 if (iE_Extensions_present)
2894 if ((ret=dissect_iE_Extension(tvb, ie_tree, &offset, &bitoffset, "RAB_SetupOrModifiedItem")) != 0)
2898 /* protocol extended */
2899 if (extension_present)
2901 /* extended sequence */
2902 /* decoding is not supported */
2903 proto_tree_add_text(ie_tree, tvb, offset, IE_PROTOCOL_EXTENSION_LENGTH,
2904 "Protocol extension for RAB_SetupOrModifiedItem present, dissection not supported");
2914 dissect_IE_RAB_SetupOrModifyItemFirst (tvbuff_t *tvb, proto_tree *ie_tree)
2918 proto_item *optionals_item = NULL;
2919 proto_tree *optionals_tree = NULL;
2920 int extension_present;
2921 int nAS_SynchronisationIndicator_present;
2922 int rAB_Parameters_present;
2923 int userPlaneInformation_present;
2924 int transportLayerInformation_present;
2925 int service_Handover_present;
2926 int iE_Extensions_present;
2927 int tmp_extension_present;
2932 offset = 0; bitoffset = 0;
2934 /* create subtree for extension/optional/default bitmap */
2935 optionals_item = proto_tree_add_text(ie_tree, tvb, offset,IE_PROTOCOL_EXTENSION_LENGTH,
2936 "RAB_SetupOrModifyItemFirst Extension/Optional/Default bitmap");
2937 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
2939 /* protocol extension present ? */
2940 extension_present = extract_nbits(tvb, offset, bitoffset, 1);
2941 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension,
2942 tvb, offset, bitoffset, 1, 0);
2943 proceed_nbits(&offset, &bitoffset, 1);
2945 /* nAS_SynchronisationIndicator present ? */
2946 nAS_SynchronisationIndicator_present = extract_nbits(tvb, offset, bitoffset, 1);
2947 proto_tree_add_uint_bits(optionals_tree, hf_ranap_nAS_SynchronisationIndicator_present,
2948 tvb, offset, bitoffset, 1, 0);
2949 proceed_nbits(&offset, &bitoffset, 1);
2951 /* rAB_Parameters present ? */
2952 rAB_Parameters_present = extract_nbits(tvb, offset, bitoffset, 1);
2953 proto_tree_add_uint_bits(optionals_tree, hf_ranap_rAB_Parameters_present,
2954 tvb, offset, bitoffset, 1, 0);
2955 proceed_nbits(&offset, &bitoffset, 1);
2957 /* userPlaneInformation present ? */
2958 userPlaneInformation_present = extract_nbits(tvb, offset, bitoffset, 1);
2959 proto_tree_add_uint_bits(optionals_tree, hf_ranap_userPlaneInformation_present,
2960 tvb, offset, bitoffset, 1, 0);
2961 proceed_nbits(&offset, &bitoffset, 1);
2963 /* transportLayerInformation present ? */
2964 transportLayerInformation_present = extract_nbits(tvb, offset, bitoffset, 1);
2965 proto_tree_add_uint_bits(optionals_tree, hf_ranap_transportLayerInformation_present,
2966 tvb, offset, bitoffset, 1, 0);
2967 proceed_nbits(&offset, &bitoffset, 1);
2969 /* service_Handover present ? */
2970 service_Handover_present = extract_nbits(tvb, offset, bitoffset, 1);
2971 proto_tree_add_uint_bits(optionals_tree, hf_ranap_service_Handover_present,
2972 tvb, offset, bitoffset, 1, 0);
2973 proceed_nbits(&offset, &bitoffset, 1);
2975 /* iE_Extensions present ? */
2976 iE_Extensions_present = extract_nbits(tvb, offset, bitoffset, 1);
2977 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present,
2978 tvb, offset, bitoffset, 1, 0);
2979 proceed_nbits(&offset, &bitoffset, 1);
2983 proto_tree_add_uint_bits(ie_tree, hf_ranap_rab_id,
2984 tvb, offset, bitoffset, 8, 0);
2985 proceed_nbits(&offset, &bitoffset, 8);
2987 /* nAS-SynchronisationIndicator */
2988 if (nAS_SynchronisationIndicator_present)
2990 proto_tree_add_uint_bits(ie_tree, hf_ranap_nAS_SynchronisationIndicator,
2991 tvb, offset, bitoffset, 4, 0);
2992 proceed_nbits(&offset, &bitoffset, 4);
2995 /* rAB-Parameters */
2996 if (rAB_Parameters_present)
2998 if ((ret=dissect_rAB_Parameters(tvb, ie_tree, &offset, &bitoffset)) != 0)
3002 /* userPlaneInformation */
3003 if (userPlaneInformation_present)
3005 if ((ret=dissect_userPlaneInformation(tvb, ie_tree, &offset, &bitoffset)) != 0)
3009 /* transportLayerInformation */
3010 if (transportLayerInformation_present)
3012 if ((ret=dissect_transportLayerInformation(tvb, ie_tree, &offset, &bitoffset)) != 0)
3016 /* service_Handover */
3017 if (service_Handover_present)
3019 tmp_extension_present = extract_nbits(tvb, offset, bitoffset, 1);
3020 proceed_nbits(&offset, &bitoffset, 1);
3022 if (tmp_extension_present)
3025 /* decoding is not supported */
3026 proto_tree_add_text(ie_tree, tvb, offset, IE_PROTOCOL_EXTENSION_LENGTH,
3027 "Protocol extension for service_Handover present, dissection not supported");
3031 proto_tree_add_uint_bits(ie_tree, hf_ranap_service_Handover,
3032 tvb, offset, bitoffset, 2, 0);
3033 proceed_nbits(&offset, &bitoffset, 2);
3037 if (iE_Extensions_present)
3039 if ((ret=dissect_iE_Extension(tvb, ie_tree, &offset, &bitoffset, "SetupOrModifyItemFirst" )) != 0)
3049 dissect_IE_RAB_ReleaseItem(tvbuff_t *tvb, proto_tree *ie_tree)
3051 proto_item *optionals_item = NULL;
3052 proto_tree *optionals_tree = NULL;
3055 int extension_present;
3056 int iE_Extensions_present;
3060 /* create subtree for extension/optional/default bitmap */
3061 optionals_item = proto_tree_add_text(ie_tree, tvb, offset,IE_PROTOCOL_EXTENSION_LENGTH,
3062 "RAB_ReleaseItem Extension/Optional/Default bitmap");
3063 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
3065 /* protocol extension present ? */
3066 extension_present = extract_nbits(tvb, offset, bitoffset, 1);
3067 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension,
3068 tvb, offset, bitoffset, 1, 0);
3069 proceed_nbits(&offset, &bitoffset, 1);
3072 /* iE_Extensions present ? */
3073 iE_Extensions_present = extract_nbits(tvb, offset, bitoffset, 1);
3074 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present,
3075 tvb, offset, bitoffset, 1, 0);
3076 proceed_nbits(&offset, &bitoffset, 1);
3080 proto_tree_add_uint_bits(ie_tree, hf_ranap_rab_id,
3081 tvb, offset, bitoffset, 8, 0);
3082 proceed_nbits(&offset, &bitoffset, 8);
3086 if ((ret=dissect_cause(tvb, ie_tree, &offset, &bitoffset)) != 0)
3090 if (iE_Extensions_present)
3092 if ((ret=dissect_iE_Extension(tvb, ie_tree, &offset, &bitoffset, "RAB_ReleasedItem")) != 0)
3096 /* protocol extended */
3097 if (extension_present)
3099 /* extended sequence */
3100 /* decoding is not supported */
3101 proto_tree_add_text(ie_tree, tvb, offset, IE_PROTOCOL_EXTENSION_LENGTH,
3102 "Protocol extension for RAB_ReleasedItem present, dissection not supported");
3111 dissect_IE_RAB_ReleasedItem (tvbuff_t *tvb, proto_tree *ie_tree)
3113 proto_item *optionals_item = NULL;
3114 proto_tree *optionals_tree = NULL;
3116 int extension_present;
3117 int dl_dataVolumes_present;
3118 int dl_GTP_PDU_SequenceNumber_present;
3119 int ul_GTP_PDU_SequenceNumber_present;
3120 int iE_Extensions_present;
3126 /* create subtree for extension/optional/default bitmap */
3127 optionals_item = proto_tree_add_text(ie_tree, tvb, offset, 1,
3128 "RAB-ReleasedItem Extension/Optional/Default bitmap");
3129 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
3131 /* protocol_extension present ? */
3132 extension_present = extract_nbits(tvb, offset, bitoffset, 1);
3133 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
3134 offset, bitoffset, 1, 0);
3135 proceed_nbits(&offset, &bitoffset, 1);
3137 /* dl_dataVolumes present ? */
3138 dl_dataVolumes_present = extract_nbits(tvb, offset, bitoffset, 1);
3139 proto_tree_add_uint_bits(optionals_tree, hf_ranap_dl_dataVolumes_present, tvb,
3140 offset, bitoffset, 1, 0);
3141 proceed_nbits(&offset, &bitoffset, 1);
3143 /* dL_GTP_PDU_SequenceNumber present ? */
3144 dl_GTP_PDU_SequenceNumber_present = extract_nbits(tvb, offset, bitoffset, 1);
3145 proto_tree_add_uint_bits(optionals_tree, hf_ranap_dl_GTP_PDU_SequenceNumber_present,
3146 tvb, offset, bitoffset, 1, 0);
3147 proceed_nbits(&offset, &bitoffset, 1);
3149 /* uL_GTP_PDU_SequenceNumber present ? */
3150 ul_GTP_PDU_SequenceNumber_present = extract_nbits(tvb, offset, bitoffset, 1);
3151 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ul_GTP_PDU_SequenceNumber_present,
3152 tvb, offset, bitoffset, 1, 0);
3153 proceed_nbits(&offset, &bitoffset, 1);
3155 /* iE_Extensions present ? */
3156 iE_Extensions_present = extract_nbits(tvb, offset, bitoffset, 1);
3157 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present,
3158 tvb, offset, bitoffset, 1, 0);
3159 proceed_nbits(&offset, &bitoffset, 1);
3162 proto_tree_add_uint_bits(ie_tree, hf_ranap_rab_id,
3163 tvb, offset, bitoffset, 8, 0);
3164 proceed_nbits(&offset, &bitoffset, 8);
3166 /* dl-dataVolumes */
3167 if (dl_dataVolumes_present)
3169 if ((ret=dissect_dataVolumeList(tvb, ie_tree, &offset, &bitoffset,
3170 "dl-dataVolumes")) != 0)
3174 /* dL-GTP-PDU-SequenceNumber */
3175 if (dl_GTP_PDU_SequenceNumber_present)
3177 allign(&offset, &bitoffset);
3178 proto_tree_add_item(ie_tree, hf_ranap_dl_GTP_PDU_SequenceNumber, tvb, offset, 2, FALSE);
3182 /* uL-GTP-PDU-SequenceNumber */
3183 if (ul_GTP_PDU_SequenceNumber_present)
3185 allign(&offset, &bitoffset);
3186 proto_tree_add_item(ie_tree, hf_ranap_ul_GTP_PDU_SequenceNumber, tvb, offset, 2, FALSE);
3191 if (iE_Extensions_present)
3193 if ((ret=dissect_iE_Extension(tvb, ie_tree, &offset, &bitoffset, "UserPlaneInformation")) != 0)
3197 /* protocol extended */
3198 if (extension_present)
3200 /* extended sequence */
3201 /* decoding is not supported */
3202 proto_tree_add_text(ie_tree, tvb, offset, IE_PROTOCOL_EXTENSION_LENGTH,
3203 "Protocol extension for RAB_ReleasedItem present, dissection not supported");
3213 dissect_IE_RAB_QueuedItem (tvbuff_t *tvb, proto_tree *ie_tree)
3215 proto_item *optionals_item = NULL;
3216 proto_tree *optionals_tree = NULL;
3218 int extension_present;
3219 int iE_Extensions_present;
3226 /* create subtree for extension/optional/default bitmap */
3227 optionals_item = proto_tree_add_text(ie_tree, tvb, offset, 1,
3228 "RAB-QueuedItem Extension/Optional/Default bitmap");
3229 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
3231 /* protocol_extension present ? */
3232 extension_present = extract_nbits(tvb, offset, bitoffset, 1);
3233 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
3234 offset, bitoffset, 1, 0);
3235 proceed_nbits(&offset, &bitoffset, 1);
3237 /* iE_Extensions present ? */
3238 iE_Extensions_present = extract_nbits(tvb, offset, bitoffset, 1);
3239 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present,
3240 tvb, offset, bitoffset, 1, 0);
3241 proceed_nbits(&offset, &bitoffset, 1);
3244 proto_tree_add_uint_bits(ie_tree, hf_ranap_rab_id,
3245 tvb, offset, bitoffset, 8, 0);
3246 proceed_nbits(&offset, &bitoffset, 8);
3249 if (iE_Extensions_present)
3251 if ((ret=dissect_iE_Extension(tvb, ie_tree, &offset, &bitoffset, "RAB_QueuedItem" )) != 0 )
3255 /* protocol extended */
3256 if (extension_present)
3258 /* extended sequence */
3259 /* decoding is not supported */
3260 proto_tree_add_text(ie_tree, tvb, offset, IE_PROTOCOL_EXTENSION_LENGTH,
3261 "Protocol extension for RAB_QueuedItem present, dissection not supported");
3271 dissect_IE_RAB_FailedItem(tvbuff_t *tvb, proto_tree *ie_tree)
3273 proto_item *optionals_item = NULL;
3274 proto_tree *optionals_tree = NULL;
3276 int extension_present;
3277 int iE_Extensions_present;
3283 /* create subtree for extension/optional/default bitmap */
3284 optionals_item = proto_tree_add_text(ie_tree, tvb, offset, 1,
3285 "RAB-FailedItem Extension/Optional/Default bitmap");
3286 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
3288 /* protocol_extension present ? */
3289 extension_present = extract_nbits(tvb, offset, bitoffset, 1);
3290 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
3291 offset, bitoffset, 1, 0);
3292 proceed_nbits(&offset, &bitoffset, 1);
3294 /* iE_Extensions present ? */
3295 iE_Extensions_present = extract_nbits(tvb, offset, bitoffset, 1);
3296 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present,
3297 tvb, offset, bitoffset, 1, 0);
3298 proceed_nbits(&offset, &bitoffset, 1);
3301 proto_tree_add_uint_bits(ie_tree, hf_ranap_rab_id,
3302 tvb, offset, bitoffset, 8, 0);
3303 proceed_nbits(&offset, &bitoffset, 8);
3306 if ((ret=dissect_cause(tvb, ie_tree, &offset, &bitoffset)) != 0)
3310 if (iE_Extensions_present)
3312 if ((ret=dissect_iE_Extension(tvb, ie_tree, &offset, &bitoffset, "RAB-FailedItem")) != 0)
3317 /* protocol extended */
3318 if (extension_present)
3320 /* extended sequence */
3321 /* decoding is not supported */
3322 proto_tree_add_text(ie_tree, tvb, offset, IE_PROTOCOL_EXTENSION_LENGTH,
3323 "Protocol extension for RAB-FailedItem present, dissection not supported");
3332 dissect_IE_CriticalityDiagnostics(tvbuff_t *tvb, proto_tree *ie_tree)
3335 proto_item *optionals_item = NULL;
3336 proto_tree *optionals_tree = NULL;
3338 int extension_present;
3339 int procedureCode_present;
3340 int triggeringMessage_present;
3341 int procedureCriticality_present;
3342 int iEsCriticalityDiagnostics_present;
3343 int iE_Extensions_present;
3350 /* create subtree for extension/optional/default bitmap */
3351 optionals_item = proto_tree_add_text(ie_tree, tvb, offset, 1,
3352 "IE-CriticalityDiagnostics Extension/Optional/Default bitmap");
3353 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
3355 /* protocol_extension present ? */
3356 extension_present = extract_nbits(tvb, offset, bitoffset, 1);
3357 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
3358 offset, bitoffset, 1, 0);
3359 proceed_nbits(&offset, &bitoffset, 1);
3361 /* procedureCode present ? */
3362 procedureCode_present = extract_nbits(tvb, offset, bitoffset, 1);
3363 proto_tree_add_uint_bits(optionals_tree, hf_ranap_procedureCode_present,
3364 tvb, offset, bitoffset, 1, 0);
3365 proceed_nbits(&offset, &bitoffset, 1);
3367 /* triggeringMessage present ? */
3368 triggeringMessage_present = extract_nbits(tvb, offset, bitoffset, 1);
3369 proto_tree_add_uint_bits(optionals_tree, hf_ranap_triggeringMessage_present,
3370 tvb, offset, bitoffset, 1, 0);
3371 proceed_nbits(&offset, &bitoffset, 1);
3373 /* procedureCriticality present ? */
3374 procedureCriticality_present = extract_nbits(tvb, offset, bitoffset, 1);
3375 proto_tree_add_uint_bits(optionals_tree, hf_ranap_procedureCriticality_present,
3376 tvb, offset, bitoffset, 1, 0);
3377 proceed_nbits(&offset, &bitoffset, 1);
3379 /* iEsCriticalityDiagnostics present ? */
3380 iEsCriticalityDiagnostics_present = extract_nbits(tvb, offset, bitoffset, 1);
3381 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iEsCriticalityDiagnostics_present,
3382 tvb, offset, bitoffset, 1, 0);
3383 proceed_nbits(&offset, &bitoffset, 1);
3385 /* iE_Extensions present ? */
3386 iE_Extensions_present = extract_nbits(tvb, offset, bitoffset, 1);
3387 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present,
3388 tvb, offset, bitoffset, 1, 0);
3389 proceed_nbits(&offset, &bitoffset, 1);
3393 if (procedureCode_present)
3395 allign (&offset, &bitoffset);
3396 proto_tree_add_item(ie_tree, hf_ranap_procedure_code, tvb, offset, 1, FALSE);
3400 /* triggeringMessage */
3401 if (triggeringMessage_present)
3403 proto_tree_add_uint_bits(ie_tree, hf_ranap_triggeringMessage,
3404 tvb, offset, bitoffset, 2, 0);
3405 proceed_nbits(&offset, &bitoffset, 2);
3408 /* procedureCriticality */
3409 if (procedureCriticality_present)
3411 proto_tree_add_uint_bits(ie_tree, hf_ranap_procedureCriticality,
3412 tvb, offset, bitoffset, 2, 0);
3413 proceed_nbits(&offset, &bitoffset, 2);
3416 /* iEsCriticalityDiagnostics */
3417 if (iEsCriticalityDiagnostics_present)
3419 if ((ret=dissect_iEsCriticalityDiagnostics(tvb, ie_tree, &offset, &bitoffset)) != 0)
3424 if (iE_Extensions_present)
3426 if ((ret=dissect_iE_Extension(tvb, ie_tree, &offset, &bitoffset, "IE_CriticalityDiagnostics")) != 0)
3431 /* protocol extended */
3432 if (extension_present)
3434 /* extended sequence */
3435 /* decoding is not supported */
3436 proto_tree_add_text(ie_tree, tvb, offset, IE_PROTOCOL_EXTENSION_LENGTH,
3437 "Protocol extension for IE CriticalityDiagnostics present, dissection not supported");
3446 dissect_unknown_IE(tvbuff_t *tvb, proto_tree *ie_tree)
3450 proto_tree_add_text(ie_tree, tvb, 0, -1,
3451 "IE Contents (dissection not implemented)");
3458 /*****************************************************************************/
3460 /* Dissecting Functions for IE Lists / Containers */
3462 /*****************************************************************************/
3465 dissect_RAB_IE_ContainerPairList(tvbuff_t *tvb, proto_tree *ie_tree)
3467 proto_item *rab_item = NULL;
3468 proto_tree *rab_tree = NULL;
3469 proto_item *ie_pair_item = NULL;
3470 proto_tree *ie_pair_tree = NULL;
3471 proto_item *first_value_item = NULL;
3472 proto_tree *first_value_tree = NULL;
3473 proto_item *second_value_item = NULL;
3474 proto_tree *second_value_tree = NULL;
3475 guint number_of_RABs, currentRAB;
3476 guint number_of_IEs, currentIE;
3477 gint number_of_octets_first, number_of_octets_second;
3478 gint number_of_octets_first_size, number_of_octets_second_size ;
3483 tvbuff_t *first_value_tvb;
3484 tvbuff_t *second_value_tvb;
3488 /* number of RABs in the list */
3489 number_of_RABs = 1 + tvb_get_guint8(tvb, offset);
3490 proto_tree_add_uint(ie_tree, hf_ranap_num_rabs,
3492 NUM_RABS_LENGTH, number_of_RABs);
3494 offset += NUM_RABS_LENGTH;
3496 /* do for each RAB */
3497 for (currentRAB=1; currentRAB<=number_of_RABs; currentRAB++)
3499 /* create subtree for RAB */
3500 rab_item = proto_tree_add_text(ie_tree, tvb, offset, 0, "%d. RAB", currentRAB);
3501 rab_tree = proto_item_add_subtree(rab_item, ett_ranap_rab);
3503 /* number of IE pairs for this RAB */
3504 number_of_IEs = tvb_get_ntohs(tvb, offset);
3505 proto_tree_add_uint(rab_tree, hf_ranap_number_of_ies_in_list,
3506 tvb, offset, 2, number_of_IEs);
3508 offset += 2; /*points now to beginning of first IE pair */
3510 /* do for each IE pair */
3511 for (currentIE=1; currentIE<=number_of_IEs; currentIE++)
3513 /* use tmp_offset to point to current field */
3514 tmp_offset = offset;
3516 ie_id = tvb_get_ntohs(tvb, tmp_offset);
3517 tmp_offset += IE_ID_LENGTH;
3519 tmp_offset += 1; /* skip first criticality byte */
3520 /* number of octets in first value */
3521 extract_length(tvb, tmp_offset, &number_of_octets_first, &number_of_octets_first_size);
3522 tmp_offset += number_of_octets_first_size + number_of_octets_first;
3524 tmp_offset += 1; /* skip second criticality byte */
3525 /* number of octets in second value */
3526 extract_length(tvb, tmp_offset, &number_of_octets_second, &number_of_octets_second_size);
3527 tmp_offset += number_of_octets_second_size + number_of_octets_second;
3529 /* create subtree for ie_pair */
3530 ie_pair_item = proto_tree_add_text(rab_tree, tvb, offset,
3531 tmp_offset - offset,
3533 val_to_str(ie_id, ranap_ie_id_values, "Unknown"),
3535 ie_pair_tree = proto_item_add_subtree(ie_pair_item, ett_ranap_ie_pair);
3537 /* add fields to ie pair subtee */
3538 /* use offset to point to current field */
3540 proto_tree_add_item(ie_pair_tree, hf_ranap_ie_ie_id, tvb, offset, IE_ID_LENGTH, FALSE);
3541 offset += IE_ID_LENGTH;
3543 /* first criticality */
3544 proto_tree_add_uint_bits(ie_pair_tree, hf_ranap_ie_pair_first_criticality, tvb,
3545 offset, bitoffset, 2, 0);
3546 proceed_nbits(&offset, &bitoffset, 2);
3548 /* number of octets in first value */
3549 allign(&offset, &bitoffset);
3550 if (number_of_octets_first != 0)
3552 proto_tree_add_uint(ie_pair_tree, hf_ranap_first_value_number_of_octets,
3554 number_of_octets_first_size,
3555 number_of_octets_first);
3559 /* decoding is not supported */
3560 proto_tree_add_text(ie_pair_tree, tvb, offset,
3561 2, "Number of Octets greater than 0x3FFF, dissection not supported");
3564 offset += number_of_octets_first_size;
3566 /* add subtree for first value */
3567 first_value_item = proto_tree_add_text(ie_pair_tree, tvb, offset,
3568 number_of_octets_first,
3570 val_to_str(ie_id, ranap_ie_id_values, "Unknown"));
3571 first_value_tree = proto_item_add_subtree(first_value_item, ett_ranap_ie_pair_first_value);
3573 /* create tvb containing first value */
3574 first_value_tvb = tvb_new_subset(tvb, offset, number_of_octets_first, number_of_octets_first);
3576 /* add fields of first value */
3579 case IE_RAB_SetupOrModifyItem:
3580 dissect_IE_RAB_SetupOrModifyItemFirst (first_value_tvb, first_value_tree);
3584 dissect_unknown_IE(first_value_tvb, first_value_tree);
3588 offset += number_of_octets_first;
3591 /* second criticality */
3592 proto_tree_add_uint_bits(ie_pair_tree, hf_ranap_ie_pair_second_criticality, tvb,
3593 offset, bitoffset, 2, 0);
3594 proceed_nbits(&offset, &bitoffset, 2);
3596 /* number of octets of second value */
3597 allign(&offset, &bitoffset);
3598 if (number_of_octets_second != 0)
3600 proto_tree_add_uint(ie_pair_tree, hf_ranap_second_value_number_of_octets,
3602 number_of_octets_second_size,
3603 number_of_octets_second);
3607 /* decoding is not supported */
3608 proto_tree_add_text(ie_pair_tree, tvb, offset,
3609 2, "Number of Octets greater than 0x3FFF, dissection not supported");
3612 offset += number_of_octets_second_size;
3614 /* add subtree for second value */
3615 second_value_item = proto_tree_add_text(ie_pair_tree, tvb, offset,
3616 number_of_octets_second,
3618 val_to_str(ie_id, ranap_ie_id_values, "Unknown"));
3619 second_value_tree = proto_item_add_subtree(second_value_item, ett_ranap_ie_pair_second_value);
3621 /* create tvb containing first value */
3622 second_value_tvb = tvb_new_subset(tvb, offset, number_of_octets_second, number_of_octets_second);
3624 /* add fields of second value */
3627 case IE_RAB_SetupOrModifyItem:
3628 dissect_IE_RAB_SetupOrModifyItemSecond (second_value_tvb, second_value_tree);
3632 dissect_unknown_IE(second_value_tvb, second_value_tree);
3636 offset += number_of_octets_second;
3638 }/* for each IE ... */
3639 }/* for each RAB ... */
3646 dissect_RAB_IE_ContainerList(tvbuff_t *tvb, proto_tree *list_tree)
3648 proto_item *rab_item = NULL;
3649 proto_tree *rab_tree = NULL;
3650 proto_item *ie_item = NULL;
3651 proto_tree *ie_tree = NULL;
3653 guint number_of_RABs, currentRAB;
3654 guint number_of_IEs, currentIE;
3655 gint ie_number_of_octets = 0;
3656 gint ie_number_of_octets_size = 0;
3660 gint ie_header_length;
3667 /* number of RABs in the list */
3668 number_of_RABs = 1 + tvb_get_guint8(tvb, offset);
3669 proto_tree_add_uint(list_tree, hf_ranap_num_rabs,
3671 NUM_RABS_LENGTH, number_of_RABs);
3673 offset += NUM_RABS_LENGTH;
3675 /* do for each RAB */
3676 for (currentRAB=1; currentRAB<=number_of_RABs; currentRAB++)
3678 /* create subtree for RAB */
3679 rab_item = proto_tree_add_text(list_tree, tvb, offset, 0, "%d. RAB", currentRAB);
3680 rab_tree = proto_item_add_subtree(rab_item, ett_ranap_rab);
3682 /* number of IEs for this RAB */
3683 number_of_IEs = tvb_get_ntohs(tvb, offset);
3684 proto_tree_add_uint(rab_tree, hf_ranap_number_of_ies_in_list,
3685 tvb, offset, 2, number_of_IEs);
3687 offset += 2; /*points now to beginning of first IE in list */
3690 /* do for each IE */
3691 for (currentIE=1; currentIE<=number_of_IEs; currentIE++)
3694 ie_id = tvb_get_ntohs(tvb, offset);
3695 offset += IE_ID_LENGTH;
3697 offset += IE_CRITICALITY_LENGTH; /* skip criticality byte */
3699 /* number of octets */
3700 extract_length(tvb, offset, &ie_number_of_octets, &ie_number_of_octets_size);
3701 ie_header_length = IE_ID_LENGTH + IE_CRITICALITY_LENGTH + ie_number_of_octets_size;
3703 /* reset offset to beginning of ie */
3706 /* create subtree for ie */
3707 ie_item = proto_tree_add_text(rab_tree, tvb, offset,
3708 ie_header_length + ie_number_of_octets,
3710 val_to_str(ie_id, ranap_ie_id_values, "Unknown"),
3712 ie_tree = proto_item_add_subtree(ie_item, ett_ranap_ie);
3715 proto_tree_add_item(ie_tree, hf_ranap_ie_ie_id, tvb,
3716 offset, IE_ID_LENGTH, FALSE);
3717 offset += IE_ID_LENGTH;
3720 proto_tree_add_uint_bits(ie_tree, hf_ranap_ie_criticality, tvb,
3721 offset, bitoffset, 2, 0);
3722 proceed_nbits(&offset, &bitoffset, 2);
3724 allign(&offset, &bitoffset);
3725 if (ie_number_of_octets != 0)
3727 proto_tree_add_uint(ie_tree, hf_ranap_ie_number_of_octets, tvb,
3728 offset, ie_number_of_octets_size, ie_number_of_octets);
3732 /* decoding is not supported */
3733 proto_tree_add_text(ie_tree, tvb, offset,
3734 0, "Number of Octets greater than 0x3FFF, dissection not supported");
3737 offset += ie_number_of_octets_size;
3740 /* create tvb containing ie */
3741 ie_tvb = tvb_new_subset(tvb, offset, ie_number_of_octets, ie_number_of_octets);
3743 /* add fields of ie */
3746 case IE_RAB_SetupOrModifiedItem:
3747 dissect_IE_RAB_SetupOrModifiedItem(ie_tvb, ie_tree);
3749 case IE_RAB_ReleaseItem:
3750 dissect_IE_RAB_ReleaseItem(ie_tvb, ie_tree);
3752 case IE_RAB_ReleasedItem:
3753 dissect_IE_RAB_ReleasedItem(ie_tvb, ie_tree);
3755 case IE_RAB_ReleasedItem_IuRelComp:
3756 dissect_IE_RAB_ReleasedItem_IuRelComp(ie_tvb, ie_tree);
3758 case IE_RAB_QueuedItem:
3759 dissect_IE_RAB_QueuedItem(ie_tvb, ie_tree);
3761 case IE_RAB_FailedItem:
3762 dissect_IE_RAB_FailedItem(ie_tvb, ie_tree);
3764 case IE_RAB_DataVolumeReportItem:
3765 dissect_IE_RAB_DataVolumeReportItem(ie_tvb, ie_tree);
3768 dissect_unknown_IE(ie_tvb, ie_tree);
3772 ie_offset += (ie_header_length + ie_number_of_octets);
3775 } /* for each RAB */
3782 dissect_ranap_ie(guint16 ie_id, tvbuff_t *ie_contents_tvb, proto_tree *ie_tree)
3784 /* call specific dissection function for ie contents */
3788 return(dissect_IE_RAB_ID(ie_contents_tvb, ie_tree));
3791 return(dissect_IE_NAS_PDU(ie_contents_tvb, ie_tree));
3794 return(dissect_IE_LAI(ie_contents_tvb, ie_tree));
3797 return(dissect_IE_RAC(ie_contents_tvb, ie_tree));
3800 return(dissect_IE_SAI(ie_contents_tvb, ie_tree));
3802 case IE_GlobalRNC_ID:
3803 return(dissect_IE_GlobalRNC_ID(ie_contents_tvb, ie_tree));
3805 case IE_CN_DomainIndicator:
3806 return(dissect_IE_CN_DomainIndicator(ie_contents_tvb, ie_tree));
3809 return(dissect_IE_IuSigConId(ie_contents_tvb, ie_tree));
3812 return(dissect_IE_SAPI(ie_contents_tvb, ie_tree));
3814 case IE_TransportLayerAddress:
3815 return(dissect_IE_TransportLayerAddress(ie_contents_tvb, ie_tree));
3817 case IE_IuTransportAssociation:
3818 return(dissect_IE_IuTransportAssociation(ie_contents_tvb, ie_tree));
3820 case IE_RAB_SetupOrModifyList:
3821 return(dissect_RAB_IE_ContainerPairList(ie_contents_tvb, ie_tree));
3823 case IE_RAB_SetupOrModifiedList:
3824 case IE_RAB_ReleaseList:
3825 case IE_RAB_ReleasedList:
3826 case IE_RAB_QueuedList:
3827 case IE_RAB_FailedList:
3828 case IE_RAB_ReleaseFailedList:
3829 case IE_RAB_DataVolumeReportList:
3830 case IE_RAB_ReleasedList_IuRelComp:
3831 case IE_RAB_RelocationReleaseList:
3832 case IE_RAB_DataForwardingList:
3833 case IE_RAB_SetupList_RelocReq:
3834 case IE_RAB_SetupList_RelocReqAck:
3835 case IE_RAB_DataForwardingList_SRNS_CtxReq:
3836 case IE_RAB_ContextList:
3837 case IE_RAB_ContextFailedtoTransferList:
3838 case IE_RAB_DataVolumeReportRequestList:
3839 case IE_RAB_FailedtoReportList:
3840 case IE_RAB_ContextList_RANAP_RelocInf:
3841 return(dissect_RAB_IE_ContainerList(ie_contents_tvb, ie_tree));
3843 case IE_CriticalityDiagnostics:
3844 return(dissect_IE_CriticalityDiagnostics(ie_contents_tvb, ie_tree));
3847 return(dissect_IE_Cause(ie_contents_tvb, ie_tree));
3850 return(dissect_unknown_IE(ie_contents_tvb, ie_tree));
3857 dissect_ranap_ie_container(tvbuff_t *tvb, proto_tree *ranap_tree)
3859 proto_item *ie_item = NULL;
3860 proto_tree *ie_tree = NULL;
3861 proto_item *optionals_item = NULL;
3862 proto_tree *optionals_tree = NULL;
3864 int msg_extension_present;
3865 int ProtocolExtensionContainer_present;
3867 guint16 number_of_ies;
3869 gint ie_number_of_octets = 0;
3870 gint ie_number_of_octets_size = 0;
3871 guint16 ie_header_length;
3875 tvbuff_t *ie_contents_tvb;
3879 /* create subtree for extension/optional bitmap of message */
3880 optionals_item = proto_tree_add_text(ranap_tree, tvb, offset, 1,
3881 "Message Extension/Optional/Default bitmap");
3882 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
3885 /* msg_extension present ? */
3886 msg_extension_present = extract_nbits(tvb, offset, bitoffset, 1);
3890 proto_tree_add_uint_bits(optionals_tree, hf_ranap_msg_extension_present, tvb,
3891 offset, bitoffset, 1, 0);
3893 proceed_nbits(&offset, &bitoffset, 1);
3895 /* ProtocolExtensionContainer present ? */
3896 ProtocolExtensionContainer_present = extract_nbits(tvb, offset, bitoffset, 1);
3899 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ProtocolExtensionContainer_present,
3900 tvb, offset, bitoffset, 1, 0);
3902 proceed_nbits(&offset, &bitoffset, 1);
3905 /* extract ie container data */
3907 allign(&offset, &bitoffset);
3908 number_of_ies = tvb_get_ntohs(tvb, offset);
3911 proto_tree_add_uint(ranap_tree, hf_ranap_number_of_ies,
3912 tvb, offset, 2, number_of_ies);
3916 ie_offset = offset; /* ie_offset marks beginning of IE-Header */
3918 /* do the following for each IE in the PDU */
3919 for (i=1; i <= number_of_ies; i++)
3921 /* extract IE header fields which are needed even if no ranap tree exists*/
3923 ie_id = tvb_get_ntohs(tvb, offset);
3924 offset += IE_ID_LENGTH;
3926 /* number of octets in the IE */
3927 offset += IE_CRITICALITY_LENGTH; /* skip criticality byte */
3928 ie_number_of_octets = 0;
3929 extract_length(tvb, offset, &ie_number_of_octets, &ie_number_of_octets_size);
3930 ie_header_length = IE_ID_LENGTH + IE_CRITICALITY_LENGTH + ie_number_of_octets_size;
3934 offset = ie_offset; /* start from beginning of IE */
3935 /* create subtree for ie */
3936 ie_item = proto_tree_add_text(ranap_tree, tvb, offset,
3937 ie_header_length + ie_number_of_octets,
3939 val_to_str(ie_id, ranap_ie_id_values, "Unknown"),
3941 ie_tree = proto_item_add_subtree(ie_item, ett_ranap_ie);
3943 /* add fields to ie subtee */
3945 proto_tree_add_item(ie_tree, hf_ranap_ie_ie_id, tvb,
3946 offset, IE_ID_LENGTH, FALSE);
3947 offset += IE_ID_LENGTH;
3950 proto_tree_add_uint_bits(ie_tree, hf_ranap_ie_criticality, tvb,
3951 offset, bitoffset, 2, 0);
3952 proceed_nbits(&offset, &bitoffset, 2);
3954 /* number of octets */
3955 allign(&offset, &bitoffset);
3956 if (ie_number_of_octets != 0)
3958 proto_tree_add_uint(ie_tree, hf_ranap_ie_number_of_octets, tvb,
3959 offset, ie_number_of_octets_size, ie_number_of_octets);
3960 offset += ie_number_of_octets_size;
3964 /* decoding is not supported */
3965 proto_tree_add_text(ranap_tree, tvb, offset,
3966 2, "Number of Octets greater than 0x3FFF, dissection not supported");
3971 /* check if number_of_octets could be decoded */
3972 /* in case we skipped if (ranap_tree) {....} */
3973 if (ie_number_of_octets == 0) return (-1);
3975 /* create tvb containing the ie contents */
3976 ie_contents_tvb = tvb_new_subset(tvb, ie_offset + ie_header_length,
3977 ie_number_of_octets, ie_number_of_octets);
3979 /* call specific dissection function for ie contents */
3980 dissect_ranap_ie(ie_id, ie_contents_tvb, ie_tree);
3982 /* set ie_offset to beginning of next ie */
3983 ie_offset += (ie_header_length + ie_number_of_octets);
3987 /* protocol Extensions */
3988 if (ProtocolExtensionContainer_present)
3990 return(dissect_iE_Extension(tvb, ranap_tree, &offset, &bitoffset, "PDU"));
3999 dissect_ranap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
4001 proto_item *ranap_item = NULL;
4002 proto_tree *ranap_tree = NULL;
4004 guint procedure_code;
4006 gint number_of_octets = 0;
4007 gint number_of_octets_size = 0;
4009 gint tmp_offset = 0;
4011 gint tmp_bitoffset = 0;
4012 guint extension_present;
4019 /* make entry in the Protocol column on summary display */
4020 if (check_col(pinfo->cinfo, COL_PROTOCOL))
4021 col_set_str(pinfo->cinfo, COL_PROTOCOL, "RANAP");
4023 /* extract header fields which are needed even if no tree exists */
4025 /* protocol_extension present ? */
4026 extension_present = extract_nbits(tvb, tmp_offset, tmp_bitoffset, 1);
4027 proceed_nbits(&tmp_offset, &tmp_bitoffset, 1);
4028 if (extension_present)
4030 /* extended choice */
4031 /* decoding is not supported */
4032 if (check_col(pinfo->cinfo, COL_INFO))
4034 col_append_str(pinfo->cinfo, COL_INFO, "RANAP-PDU Protocol extension present, dissection not supported");
4039 proto_tree_add_text(tree, tvb, 0, -1, "RANAP Message");
4044 /* pdu_index choice 0..3 */
4045 pdu_index = extract_nbits(tvb, tmp_offset, tmp_bitoffset, 2);
4046 proceed_nbits(&tmp_offset, &tmp_bitoffset, 2);
4048 /* procedure code */
4049 allign(&tmp_offset, &tmp_bitoffset);
4050 procedure_code = tvb_get_guint8(tvb, tmp_offset);
4053 /* add Procedure Code to Info Column */
4054 if (check_col(pinfo->cinfo, COL_INFO))
4056 if (procedure_code <= PC_max)
4058 col_add_fstr(pinfo->cinfo, COL_INFO, "%s ",
4059 val_to_str(pdu_index, ranap_message_names[procedure_code],
4060 "unknown message"));
4064 /* extract number of octets */
4065 tmp_offset += 1; /* leave out criticality byte */
4066 extract_length(tvb, tmp_offset, &number_of_octets, &number_of_octets_size);
4068 /* In the interest of speed, if "tree" is NULL, don't do any work not
4069 necessary to generate protocol tree items. */
4074 /* create the ranap protocol tree */
4075 ranap_item = proto_tree_add_item(tree, proto_ranap, tvb, 0, -1, FALSE);
4076 ranap_tree = proto_item_add_subtree(ranap_item, ett_ranap);
4078 /* Add fields to ranap protocol tree */
4080 proceed_nbits(&offset, &bitoffset, 1); /* leave out extension bit, checked above */
4081 proto_tree_add_uint_bits(ranap_tree, hf_ranap_pdu_index, tvb,
4082 offset, bitoffset, 2, 0);
4083 proceed_nbits(&offset, &bitoffset, 2);
4086 /* Procedure Code */
4087 allign(&offset, &bitoffset);
4088 proto_tree_add_item(ranap_tree, hf_ranap_procedure_code, tvb, offset, 1, FALSE);
4091 /* PDU Criticality */
4092 proto_tree_add_uint_bits(ranap_tree, hf_ranap_pdu_criticality, tvb,
4093 offset, bitoffset, 2, 0);
4094 proceed_nbits(&offset, &bitoffset, 2);
4096 /* number of octets */
4097 allign(&offset, &bitoffset);
4098 if (number_of_octets != 0)
4100 proto_tree_add_uint(ranap_tree, hf_ranap_pdu_number_of_octets,
4102 number_of_octets_size, number_of_octets);
4103 offset += number_of_octets_size;
4107 /* decoding is not supported */
4108 proto_tree_add_text(ranap_tree, tvb, offset,
4109 2, "Number of Octets greater than 0x3FFF, dissection not supported");
4114 /* set offset to the beginning of ProtocolIE-Container */
4115 /* in case we skipped "if(tree){...}" above */
4116 offset = PDU_NUMBER_OF_OCTETS_OFFSET + number_of_octets_size;
4118 /* create a tvb containing the remainder of the PDU */
4119 ie_tvb = tvb_new_subset(tvb, offset, -1, -1);
4121 /* dissect the ies */
4122 dissect_ranap_ie_container(ie_tvb, ranap_tree);
4127 dissect_sccp_ranap_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
4131 /* Is it a ranap packet?
4133 * 4th octet should be the length of the rest of the message.
4134 * note: I believe the length octet may actually be represented
4135 * by more than one octet. Something like...
4136 * bit 01234567 octets
4138 * 10xxxxxx xxxxxxxx 2
4139 * For now, we have ignored this. I hope that's safe.
4141 * 2nd octet is the message-type e Z[0, 28]
4142 * (obviously there must be at least four octets)
4144 * If both hold true we'll assume its RANAP
4147 #define LENGTH_OFFSET 3
4148 #define MSG_TYPE_OFFSET 1
4149 if (tvb_length(tvb) < 4) { return FALSE; }
4150 if (tvb_get_guint8(tvb, LENGTH_OFFSET) != (tvb_length(tvb) - 4)) { return FALSE; }
4151 temp = tvb_get_guint8(tvb, MSG_TYPE_OFFSET);
4152 if (temp > 28) { return FALSE; }
4154 dissect_ranap(tvb, pinfo, tree);
4160 /*****************************************************************************/
4162 /* Protocol Registration Functions */
4164 /*****************************************************************************/
4167 proto_register_ranap(void)
4169 /* Setup list of header fields */
4170 static hf_register_info hf[] = {
4171 { &hf_ranap_pdu_index,
4172 { "RANAP-PDU Index",
4173 "ranap.ranap_pdu_index",
4174 FT_UINT8, BASE_HEX, VALS(&ranap_pdu_index_values), 0x0,
4177 { &hf_ranap_procedure_code,
4179 "ranap.procedure_code",
4180 FT_UINT8, BASE_DEC, VALS(&ranap_procedure_code_values), 0x0,
4183 { &hf_ranap_pdu_criticality,
4184 { "Criticality of PDU",
4185 "ranap.pdu.criticality",
4186 FT_UINT8, BASE_HEX, VALS(&ranap_criticality_values), 0x0,
4189 { &hf_ranap_pdu_number_of_octets,
4190 { "Number of Octets in PDU",
4191 "ranap.pdu.num_of_octets",
4192 FT_UINT16, BASE_DEC, NULL, 0x0,
4195 { &hf_ranap_ie_protocol_extension,
4196 { "Protocol Extension",
4197 "ranap.ie.protocol_extension_present",
4198 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4201 { &hf_ranap_number_of_ies,
4202 { "Number of IEs in PDU",
4203 "ranap.pdu.number_of_ies",
4204 FT_UINT16, BASE_DEC, NULL, 0x0,
4207 { &hf_ranap_number_of_ies_in_list,
4208 { "Number of IEs in list",
4209 "ranap.number_of_ies",
4210 FT_UINT16, BASE_DEC, NULL, 0x0,
4213 { &hf_ranap_ie_ie_id,
4216 FT_UINT16, BASE_DEC, VALS(&ranap_ie_id_values), 0x0,
4219 { &hf_ranap_ext_field_id,
4220 { "ProtocolExtensionField ID",
4221 "ranap.ie.ProtocolExtensionFields.Id",
4222 FT_UINT16, BASE_DEC, NULL, 0x0,
4225 { &hf_ranap_ie_criticality,
4226 { "Criticality of IE",
4227 "ranap.ie.criticality",
4228 FT_UINT8, BASE_HEX, VALS(&ranap_criticality_values), 0x0,
4231 { &hf_ranap_ext_field_criticality,
4232 { "Criticality of ProtocolExtensionField",
4233 "ranap.ie.ProtocolExtensionFields.criticality",
4234 FT_UINT8, BASE_HEX, VALS(&ranap_criticality_values), 0x0,
4237 { &hf_ranap_ie_pair_first_criticality,
4238 { "First Criticality",
4239 "ranap.ie_pair.first_criticality",
4240 FT_UINT8, BASE_HEX, VALS(&ranap_criticality_values), 0x0,
4243 { &hf_ranap_ie_pair_second_criticality,
4244 { "Second Criticality",
4245 "ranap.ie_pair.second_criticality",
4246 FT_UINT8, BASE_HEX, VALS(&ranap_criticality_values), 0x0,
4249 { &hf_ranap_ie_number_of_octets,
4250 { "Number of Octets in IE",
4251 "ranap.ie.number_of_octets",
4252 FT_UINT16, BASE_DEC, NULL, 0x0,
4255 { &hf_ranap_first_value_number_of_octets,
4256 { "Number of Octets in first value",
4257 "ranap.ie_pair.first_value.number_of_octets",
4258 FT_UINT16, BASE_DEC, NULL, 0x0,
4261 { &hf_ranap_second_value_number_of_octets,
4262 { "Number of Octets in second value",
4263 "ranap.ie_pair.second_value.number_of_octets",
4264 FT_UINT16, BASE_DEC, NULL, 0x0,
4270 FT_UINT8, BASE_HEX, NULL, 0x0,
4273 { &hf_ranap_nas_pdu,
4276 FT_BYTES, BASE_NONE, NULL, 0x0,
4279 { &hf_ranap_extension_field,
4280 { "Extension Field Value",
4281 "ranap.Extension_Field_Value",
4282 FT_BYTES, BASE_NONE, NULL, 0x0,
4285 { &hf_ranap_plmn_id,
4288 FT_BYTES, BASE_NONE, NULL, 0x0,
4294 FT_BYTES, BASE_NONE, NULL, 0x0,
4300 FT_BYTES, BASE_NONE, NULL, 0x0,
4306 FT_BYTES, BASE_NONE, NULL, 0x0,
4309 { &hf_ranap_num_rabs,
4311 "ranap.number_of_RABs",
4312 FT_UINT8, BASE_DEC, NULL, 0x0,
4315 { &hf_ranap_nAS_SynchronisationIndicator_present,
4316 { "nAS-SynchronisationIndicator",
4317 "ranap.nAS-SynchronisationIndicator_present",
4318 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4321 { &hf_ranap_rAB_Parameters_present,
4323 "ranap.rAB_Parameters_present",
4324 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4327 { &hf_ranap_userPlaneInformation_present,
4328 { "userPlaneInformation",
4329 "ranap.userPlaneInformation_present",
4330 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4333 { &hf_ranap_transportLayerInformation_present,
4334 { "transportLayerInformation",
4335 "ranap.transportLayerInformation_present",
4336 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4339 { &hf_ranap_service_Handover_present,
4340 { "service-Handover",
4341 "ranap.service_Handover_present",
4342 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4345 { &hf_ranap_iE_Extensions_present,
4347 "ranap.ie.iE-Extensions_present",
4348 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4351 { &hf_ranap_nAS_SynchronisationIndicator,
4352 { "nAS-SynchronisationIndicator",
4353 "ranap.nAS-SynchronisationIndicator",
4354 FT_UINT8, BASE_HEX, NULL, 0x0,
4357 { &hf_ranap_guaranteedBitRate_present,
4358 { "guaranteedBitRate",
4359 "ranap.guaranteedBitRate_present",
4360 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4363 { &hf_ranap_transferDelay_present,
4365 "ranap.transferDelay_present",
4366 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4369 { &hf_ranap_trafficHandlingPriority_present,
4370 { "trafficHandlingPriority",
4371 "ranap.trafficHandlingPriority_present",
4372 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4375 { &hf_ranap_allocationOrRetentionPriority_present,
4376 { "allocationOrRetentionPriority",
4377 "ranap.allocationOrRetentionPriority_present",
4378 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4381 { &hf_ranap_sourceStatisticsDescriptor_present,
4382 { "sourceStatisticsDescriptor",
4383 "ranap.sourceStatisticsDescriptor_present",
4384 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4387 { &hf_ranap_relocationRequirement_present,
4388 { "relocationRequirement",
4389 "ranap.relocationRequirement_present",
4390 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4393 { &hf_ranap_trafficClass,
4395 "ranap.rab_Parameters.trafficClass",
4396 FT_UINT8, BASE_DEC, VALS(&ranap_trafficClass_values), 0x0,
4399 { &hf_ranap_rAB_AsymmetryIndicator,
4400 { "rAB_AsymmetryIndicator",
4401 "ranap.rab_Parameters.rAB_AsymmetryIndicator",
4402 FT_UINT8, BASE_DEC, VALS(&ranap_rAB_AsymmetryIndicator_values), 0x0,
4405 { &hf_ranap_maxBitrate,
4407 "ranap.rab_Parameters.maxBitrate",
4408 FT_UINT32, BASE_DEC, NULL, 0x0,
4411 { &hf_ranap_guaranteedBitrate,
4412 { "guaranteedBitrate",
4413 "ranap.rab_Parameters.guaranteedBitrate",
4414 FT_UINT32, BASE_DEC, NULL, 0x0,
4417 { &hf_ranap_deliveryOrder,
4419 "ranap.rab_Parameters.deliveryOrder",
4420 FT_UINT8, BASE_DEC, VALS(&ranap_DeliveryOrder_values), 0x0,
4423 { &hf_ranap_maxSDU_Size,
4425 "ranap.rab_Parameters.maxSDU_Size",
4426 FT_UINT16, BASE_DEC, NULL, 0x0,
4429 { &hf_ranap_sDU_ErrorRatio_mantissa,
4430 { "sDU_ErrorRatio: mantissa",
4431 "ranap.rab_Parameters.sDU_ErrorRatio.mantissa",
4432 FT_UINT8, BASE_DEC, NULL, 0x0,
4435 { &hf_ranap_sDU_ErrorRatio_exponent,
4436 { "sDU_ErrorRatio: exponent",
4437 "ranap.rab_Parameters.sDU_ErrorRatio.exponent",
4438 FT_UINT8, BASE_DEC, NULL, 0x0,
4441 { &hf_ranap_residualBitErrorRatio_mantissa,
4442 { "residualBitErrorRatio: mantissa",
4443 "ranap.rab_Parameters.residualBitErrorRatio.mantissa",
4444 FT_UINT8, BASE_DEC, NULL, 0x0,
4447 { &hf_ranap_residualBitErrorRatio_exponent,
4448 { "residualBitErrorRatio: exponent",
4449 "ranap.rab_Parameters.residualBitErrorRatio.exponent",
4450 FT_UINT8, BASE_DEC, NULL, 0x0,
4453 { &hf_ranap_deliveryOfErroneousSDU,
4454 { "deliveryOfErroneousSDU",
4455 "ranap.rab_Parameters.ranap_deliveryOfErroneousSDU",
4456 FT_UINT8, BASE_DEC, VALS(&ranap_deliveryOfErroneousSDU_values), 0x0,
4459 { &hf_ranap_subflowSDU_Size,
4460 { "subflowSDU_Size",
4461 "ranap.rab_Parameters.subflowSDU_Size",
4462 FT_UINT8, BASE_DEC, NULL, 0x0,
4465 { &hf_ranap_rAB_SubflowCombinationBitRate,
4466 { "rAB_SubflowCombinationBitRate",
4467 "ranap.rab_Parameters.rAB_SubflowCombinationBitRate",
4468 FT_UINT32, BASE_DEC, NULL, 0x0,
4471 { &hf_ranap_sDU_ErrorRatio_present,
4473 "ranap.sDU_ErrorRatio_present",
4474 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4477 { &hf_ranap_sDU_FormatInformationParameters_present,
4478 { "sDU_FormatInformationParameters",
4479 "ranap.sDU_FormatInformationParameters_present",
4480 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4483 { &hf_ranap_subflowSDU_Size_present,
4484 { "subflowSDU_Size",
4485 "ranap.subflowSDU_Size_present",
4486 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4489 { &hf_ranap_rAB_SubflowCombinationBitRate_present,
4490 { "subflowSDU_Size",
4491 "ranap.rAB_SubflowCombinationBitRate_present",
4492 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4495 { &hf_ranap_transferDelay,
4497 "ranap.rab_Parameters.transferDelay",
4498 FT_UINT16, BASE_DEC, NULL, 0x0,
4501 { &hf_ranap_trafficHandlingPriority,
4502 { "trafficHandlingPriority",
4503 "ranap.rab_Parameters.trafficHandlingPriority",
4504 FT_UINT8, BASE_DEC, VALS(&ranap_priority_values), 0x0,
4507 { &hf_ranap_priorityLevel,
4509 "ranap.rab_Parameters.allocationOrRetentionPriority.priorityLevel",
4510 FT_UINT8, BASE_DEC, VALS(&ranap_priority_values), 0x0,
4513 { &hf_ranap_pre_emptionCapability,
4514 { "pre-emptionCapability",
4515 "ranap.rab_Parameters.allocationOrRetentionPriority.pre_emptionCapability",
4516 FT_UINT8, BASE_DEC, VALS(&ranap_pre_emptionCapability_values), 0x0,
4519 { &hf_ranap_pre_emptionVulnerability,
4520 { "pre-emptionVulnerability",
4521 "ranap.rab_Parameters.allocationOrRetentionPriority.pre_emptionVulnerability",
4522 FT_UINT8, BASE_DEC, VALS(&ranap_pre_emptionVulnerability_values), 0x0,
4525 { &hf_ranap_queuingAllowed,
4527 "ranap.rab_Parameters.allocationOrRetentionPriority.queuingAllowed",
4528 FT_UINT8, BASE_DEC, VALS(&ranap_queuingAllowed_values), 0x0,
4531 { &hf_ranap_sourceStatisticsDescriptor,
4532 { "sourceStatisticsDescriptor",
4533 "ranap.rab_Parameters.sourceStatisticsDescriptor",
4534 FT_UINT8, BASE_DEC, VALS(&ranap_sourceStatisticsDescriptor_values), 0x0,
4537 { &hf_ranap_relocationRequirement,
4538 { "relocationRequirement",
4539 "ranap.rab_Parameters.relocationRequirement",
4540 FT_UINT8, BASE_DEC, VALS(&ranap_relocationRequirement_values), 0x0,
4543 { &hf_ranap_userPlaneMode,
4545 "ranap.userPlaneMode",
4546 FT_UINT8, BASE_DEC, VALS(&ranap_userPlaneMode_values), 0x0,
4549 { &hf_ranap_uP_ModeVersions,
4550 { "uP_ModeVersions",
4551 "ranap.uP_ModeVersions",
4552 FT_BYTES, BASE_NONE, NULL, 0x0,
4555 { &hf_ranap_number_of_ProtocolExtensionFields,
4556 { "Number of ProtocolExtensionFields",
4557 "ranap.number_of_ProtocolExtensionFields",
4558 FT_UINT16, BASE_DEC, NULL, 0x0,
4561 { &hf_ranap_ext_field_number_of_octets,
4562 { "Number of octets",
4563 "ranap.ProtocolExtensionFields.octets",
4564 FT_UINT16, BASE_DEC, NULL, 0x0,
4567 { &hf_ranap_transportLayerAddress_length,
4568 { "bit length of transportLayerAddress",
4569 "ranap.transportLayerAddress_length",
4570 FT_UINT8, BASE_DEC, NULL, 0x0,
4573 { &hf_ranap_transportLayerAddress,
4574 { "transportLayerAddress",
4575 "ranap.transportLayerAddress",
4576 FT_BYTES, BASE_NONE, NULL, 0x0,
4579 { &hf_ranap_gTP_TEI,
4582 FT_BYTES, BASE_NONE, NULL, 0x0,
4585 { &hf_ranap_bindingID,
4588 FT_BYTES, BASE_NONE, NULL, 0x0,
4591 { &hf_ranap_pDP_TypeInformation_present,
4592 { "pDP_TypeInformation",
4593 "ranap.pDP_TypeInformation_present",
4594 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4597 { &hf_ranap_dataVolumeReportingIndication_present,
4598 { "dataVolumeReportingIndication",
4599 "ranap.dataVolumeReportingIndication_present",
4600 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4603 { &hf_ranap_dl_GTP_PDU_SequenceNumber_present,
4604 { "dl_GTP_PDU_SequenceNumber",
4605 "ranap.dl_GTP_PDU_SequenceNumber_present",
4606 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4609 { &hf_ranap_ul_GTP_PDU_SequenceNumber_present,
4610 { "ul_GTP_PDU_SequenceNumber",
4611 "ranap.ul_GTP_PDU_SequenceNumber_present",
4612 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4615 { &hf_ranap_dl_N_PDU_SequenceNumber_present,
4616 { "dl_N_PDU_SequenceNumber",
4617 "ranap.dl_N_PDU_SequenceNumber_present",
4618 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4621 { &hf_ranap_ul_N_PDU_SequenceNumber_present,
4622 { "ul_N_PDU_SequenceNumber",
4623 "ranap.ul_N_PDU_SequenceNumber_present",
4624 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4627 { &hf_ranap_PDP_Type,
4629 "ranap.RAB_SetupOrModifyItemSecond.PDP_Type",
4630 FT_UINT8, BASE_HEX, VALS(&ranap_PDP_Type_values), 0x0,
4633 { &hf_ranap_dataVolumeReportingIndication,
4634 { "dataVolumeReportingIndication",
4635 "ranap.RAB_SetupOrModifyItemSecond.dataVolumeReportingIndication",
4636 FT_UINT8, BASE_HEX, VALS(&ranap_dataVolumeReportingIndication_values), 0x0,
4639 { &hf_ranap_dl_GTP_PDU_SequenceNumber,
4640 { "dl_GTP_PDU_SequenceNumber",
4641 "ranap.RAB_SetupOrModifyItemSecond.dl_GTP_PDU_SequenceNumber",
4642 FT_UINT16, BASE_DEC, NULL, 0x0,
4645 { &hf_ranap_ul_GTP_PDU_SequenceNumber,
4646 { "ul_GTP_PDU_SequenceNumber",
4647 "ranap.RAB_SetupOrModifyItemSecond.ul_GTP_PDU_SequenceNumber",
4648 FT_UINT16, BASE_DEC, NULL, 0x0,
4651 { &hf_ranap_dl_N_PDU_SequenceNumber,
4652 { "ul_GTP_PDU_SequenceNumber",
4653 "ranap.RAB_SetupOrModifyItemSecond.ul_GTP_PDU_SequenceNumber",
4654 FT_UINT16, BASE_DEC, NULL, 0x0,
4657 { &hf_ranap_ul_N_PDU_SequenceNumber,
4658 { "ul_GTP_PDU_SequenceNumber",
4659 "ranap.RAB_SetupOrModifyItemSecond.ul_GTP_PDU_SequenceNumber",
4660 FT_UINT16, BASE_DEC, NULL, 0x0,
4663 { &hf_ranap_cause_choice,
4665 "ranap.cause_choice",
4666 FT_UINT8, BASE_HEX, VALS(&ranap_cause_choice_values), 0x0,
4669 { &hf_ranap_cause_value,
4671 "ranap.cause_value",
4672 FT_UINT8, BASE_DEC,VALS(&ranap_cause_value_str), 0x0,
4675 { &hf_ranap_transportLayerAddress_present,
4676 { "transportLayerAddress",
4677 "ranap.transportLayerAddress_present",
4678 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4681 { &hf_ranap_iuTransportAssociation_present,
4682 { "iuTransportAssociation",
4683 "ranap.iuTransportAssociation_present",
4684 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4687 { &hf_ranap_dl_dataVolumes_present,
4689 "ranap.dl_dataVolumes_present",
4690 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4693 { &hf_ranap_dataVolumeReference_present,
4694 { "dataVolumeReference",
4695 "ranap.dataVolumeReference_present",
4696 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4699 { &hf_ranap_dl_UnsuccessfullyTransmittedDataVolume,
4700 { "dl-UnsuccessfullyTransmittedDataVolume",
4701 "ranap.dl-UnsuccessfullyTransmittedDataVolume",
4702 FT_UINT32, BASE_DEC, NULL, 0x0,
4705 { &hf_ranap_dataVolumeReference,
4706 { "dataVolumeReference",
4707 "ranap.dataVolumeReference",
4708 FT_UINT8, BASE_DEC, NULL, 0x0,
4711 { &hf_ranap_procedureCode_present,
4713 "ranap.procedureCode_present",
4714 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4717 { &hf_ranap_triggeringMessage_present,
4718 { "triggeringMessage",
4719 "ranap.triggeringMessage_present",
4720 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4723 { &hf_ranap_procedureCriticality_present,
4724 { "procedureCriticality",
4725 "ranap.procedureCriticality_present",
4726 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4729 { &hf_ranap_iEsCriticalityDiagnostics_present,
4730 { "iEsCriticalityDiagnostics",
4731 "ranap.iEsCriticalityDiagnostics_present",
4732 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4735 { &hf_ranap_triggeringMessage,
4736 { "triggeringMessage",
4737 "ranap.triggeringMessage",
4738 FT_UINT8, BASE_HEX, VALS(&ranap_pdu_index_values), 0x0,
4741 { &hf_ranap_procedureCriticality,
4742 { "procedureCriticality",
4743 "ranap.procedureCriticality",
4744 FT_UINT8, BASE_HEX, VALS(&ranap_criticality_values), 0x0,
4747 { &hf_ranap_iECriticality,
4749 "ranap.iECriticality",
4750 FT_UINT8, BASE_HEX, VALS(&ranap_criticality_values), 0x0,
4753 { &hf_ranap_repetitionNumber,
4754 { "repetitionNumber",
4755 "ranap.repetitionNumber",
4756 FT_UINT16, BASE_DEC, NULL, 0x0,
4759 { &hf_ranap_num_of_CriticalityDiagnostics_IEs,
4760 { "Number of CriticalityDiagnostics-IEs",
4761 "ranap.num_of_CriticalityDiagnostics_IEs",
4762 FT_UINT16, BASE_DEC, NULL, 0x0,
4765 { &hf_ranap_repetitionNumber_present,
4766 { "repetitionNumber",
4767 "ranap.repetitionNumber_present",
4768 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4771 { &hf_ranap_dl_UnsuccessfullyTransmittedDataVolume_present,
4772 { "dl-UnsuccessfullyTransmittedDataVolume",
4773 "ranap.dl_UnsuccessfullyTransmittedDataVolume_present",
4774 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4777 { &hf_ranap_CN_DomainIndicator,
4778 { "CN-DomainIndicator",
4779 "ranap.CN_DomainIndicator",
4780 FT_UINT8, BASE_HEX, VALS(&ranap_CN_DomainIndicator_values), 0x0,
4783 { &hf_ranap_service_Handover,
4784 { "service-Handover",
4785 "ranap.service_Handover",
4786 FT_UINT8, BASE_HEX, VALS(&ranap_service_Handover_values), 0x0,
4789 { &hf_ranap_IuSigConId,
4792 FT_UINT24, BASE_DEC, NULL, 0x0,
4798 FT_UINT8, BASE_HEX, VALS(&ranap_SAPI_values), 0x0,
4801 { &hf_ranap_msg_extension_present,
4802 { "Message Extension",
4803 "ranap.msg_extension_present",
4804 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4807 { &hf_ranap_ProtocolExtensionContainer_present,
4808 { "ProtocolExtensionContainer",
4809 "ranap.ProtocolExtensionContainer_present",
4810 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4813 { &hf_ranap_nas_pdu_length,
4814 { "length of NAS-PDU",
4815 "ranap.nas_pdu_length",
4816 FT_UINT16, BASE_DEC, NULL, 0x0,
4822 FT_UINT16, BASE_DEC, NULL, 0x0fff,
4827 /* Setup protocol subtree array */
4828 static gint *ett[] = {
4830 &ett_ranap_optionals,
4831 &ett_ranap_iE_Extension,
4835 &ett_ranap_ie_pair_first_value,
4836 &ett_ranap_ie_pair_second_value,
4838 &ett_ranap_rAB_Parameters,
4839 &ett_ranap_allocationOrRetentionPriority ,
4840 &ett_ranap_CriticalityDiagnostics_IE
4844 /* Register the protocol name and description */
4845 proto_ranap = proto_register_protocol("Radio Access Network Application Part",
4848 /* Register the header fields and subtrees */
4849 proto_register_field_array(proto_ranap, hf, array_length(hf));
4850 proto_register_subtree_array(ett, array_length(ett));
4852 nas_pdu_dissector_table = register_dissector_table("ranap.nas_pdu", "RANAP NAS PDU", FT_UINT8, BASE_DEC);
4857 proto_reg_handoff_ranap(void)
4859 dissector_handle_t ranap_handle;
4861 ranap_handle = create_dissector_handle(dissect_ranap, proto_ranap);
4863 dissector_add("sua.ssn", SCCP_SSN_RANAP, ranap_handle);
4865 dissector_add("sccp.ssn", SCCP_SSN_RANAP, ranap_handle);
4867 /* Add heuristic dissector
4868 * Perhaps we want a preference whether the heuristic dissector
4869 * is or isn't enabled
4871 heur_dissector_add("sccp", dissect_sccp_ranap_heur, proto_ranap);