2 * Routines for Radio Access Network Application Part Protocol dissection
3 * Based on 3GPP TS 25.413 V3.4.0
4 * Copyright 2001, Martin Held <Martin.Held@icn.siemens.de>
6 * $Id: packet-ranap.c,v 1.9 2001/12/10 00:25:33 guy Exp $
8 * Ethereal - Network traffic analyzer
9 * By Gerald Combs <gerald@ethereal.com>
10 * Copyright 1998 Gerald Combs
12 * Copied from README.developer
14 * This program is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU General Public License
16 * as published by the Free Software Foundation; either version 2
17 * of the License, or (at your option) any later version.
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, write to the Free Software
26 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
37 #ifdef HAVE_SYS_TYPES_H
38 # include <sys/types.h>
41 #ifdef HAVE_NETINET_IN_H
42 # include <netinet/in.h>
48 #ifdef NEED_SNPRINTF_H
49 # include "snprintf.h"
55 #define SCCP_SSN_RANAP 0x8E
56 #define SCCP_SSN_RANAP_C 0x19
57 #define SCCP_SSN_RANAP_D 0x1A
59 /* description of PDU header */
60 #define PDU_NUMBER_OF_OCTETS_OFFSET 3
62 /* PDU Index Values */
63 #define InitiatingMessage 0
64 #define SuccessfulOutcome 1
65 #define UnsuccessfulOutcome 2
68 static const value_string ranap_pdu_index_values[] = {
69 {InitiatingMessage, "InitiatingMessage"},
70 {SuccessfulOutcome, "SuccessfulOutcome"},
71 {UnsuccessfulOutcome, "UnsuccessfulOutcome"},
77 /* Procedure Code Values */
78 #define PC_RAB_Assignment 0
79 #define PC_Iu_Release 1
80 #define PC_RelocationPreparation 2
81 #define PC_RelocationResourceAllocation 3
82 #define PC_RelocationCancel 4
83 #define PC_SRNS_ContextTransfer 5
84 #define PC_SecurityModeControl 6
85 #define PC_DataVolumeReport 7
86 #define PC_CN_InformationBroadcast 8
88 #define PC_RAB_ReleaseRequest 10
89 #define PC_Iu_ReleaseRequest 11
90 #define PC_RelocationDetect 12
91 #define PC_RelocationComplete 13
93 #define PC_CommonID 15
94 #define PC_CN_InvokeTrace 16
95 #define PC_LocationReportingControl 17
96 #define PC_LocationReport 18
97 #define PC_InitialUE_Message 19
98 #define PC_DirectTransfer 20
99 #define PC_OverloadControl 21
100 #define PC_ErrorIndication 22
101 #define PC_SRNS_DataForward 23
102 #define PC_ForwardSRNS_Context 24
103 #define PC_privateMessage 25
104 #define PC_CN_DeactivateTrace 26
105 #define PC_ResetResource 27
106 #define PC_RANAP_Relocation 28
109 static const value_string ranap_procedure_code_values[] = {
110 {PC_RAB_Assignment, "RAB-Assignment"},
111 {PC_Iu_Release, "IU-Release"},
112 {PC_RelocationPreparation, "RelocationPreparation"},
113 {PC_RelocationResourceAllocation, "RelocationResourceAllocation"},
114 {PC_RelocationCancel, "RelocationCancel"},
115 {PC_SRNS_ContextTransfer, "SRNS-ContextTransfer"},
116 {PC_SecurityModeControl, "SecurityModeControl"},
117 {PC_DataVolumeReport, "DataVolumeReport"},
118 {PC_CN_InformationBroadcast, "CN-InformationBroadcast"},
120 {PC_RAB_ReleaseRequest, "RAB-ReleaseRequest"},
121 {PC_Iu_ReleaseRequest, "Iu-ReleaseRequest"},
122 {PC_RelocationDetect, "RelocationDetect"},
123 {PC_RelocationComplete, "RelocationComplete"},
124 {PC_Paging, "Paging"},
125 {PC_CommonID, "CommonID"},
126 {PC_CN_InvokeTrace, "CN-InvokeTrace"},
127 {PC_LocationReportingControl, "LocationReportingControl"},
128 {PC_LocationReport, "LocationReport"},
129 {PC_InitialUE_Message, "InitialUE_Message"},
130 {PC_DirectTransfer, "DirectTransfer"},
131 {PC_OverloadControl, "OverloadControl"},
132 {PC_ErrorIndication, "ErrorIndication"},
133 {PC_SRNS_DataForward, "SRNS-DataForward"},
134 {PC_ForwardSRNS_Context, "ForwardSRNS-Context"},
135 {PC_privateMessage, "privateMessage"},
136 {PC_CN_DeactivateTrace, "CN-DeactivateTrace"},
137 {PC_ResetResource, "ResetResource"},
138 {PC_RANAP_Relocation, "RANAP-Relocation"},
143 static const value_string ranap_message_names[][5] = {
144 {/* PC_RAB_Assignment */
145 { InitiatingMessage, "RAB-AssignmentRequest"},
146 { SuccessfulOutcome, "undefined message"},
147 { UnsuccessfulOutcome, "undefined message"},
148 { Outcome, "RAB-AssignmentResponse"},
150 { /* PC_Iu_Release */
151 { InitiatingMessage, "Iu-ReleaseCommand"},
152 { SuccessfulOutcome, "Iu-ReleaseComplete"},
153 { UnsuccessfulOutcome, NULL},
156 { /* PC_RelocationPreparation */
157 { InitiatingMessage, "RelocationRequired"},
158 { SuccessfulOutcome, "RelocationCommand"},
159 { UnsuccessfulOutcome, "RelocationPreparationFailure"},
162 { /* PC_RelocationResourceAllocation */
163 { InitiatingMessage, "RelocationRequest"},
164 { SuccessfulOutcome, "RelocationRequestAcknowledge"},
165 { UnsuccessfulOutcome, "RelocationFailure"},
168 { /* PC_RelocationCancel */
169 { InitiatingMessage, "RelocationCancel"},
170 { SuccessfulOutcome, "RelocationCancelAcknowledge"},
171 { UnsuccessfulOutcome, NULL},
174 { /* PC_SRNS_ContextTransfer */
175 { InitiatingMessage, "SRNS-ContextRequest"},
176 { SuccessfulOutcome, "SRNS-ContextResponse"},
177 { UnsuccessfulOutcome, NULL},
180 { /* PC_SecurityModeControl */
181 { InitiatingMessage, "SecurityModeCommand"},
182 { SuccessfulOutcome, "SecurityModeComplete"},
183 { UnsuccessfulOutcome, "SecurityModeReject"},
186 { /* PC_DataVolumeReport */
187 { InitiatingMessage, "DataVolumeReportRequest"},
188 { SuccessfulOutcome, "DataVolumeReport"},
189 { UnsuccessfulOutcome, NULL},
192 { /* PC_CN_InformationBroadcast */
193 { InitiatingMessage, "CN-InformationBroadcastRequest"},
194 { SuccessfulOutcome, "CN-InformationBroadcastConfirm"},
195 { UnsuccessfulOutcome, "CN-InformationBroadcastReject"},
199 { InitiatingMessage, "Reset"},
200 { SuccessfulOutcome, "ResetAcknowledge"},
201 { UnsuccessfulOutcome, NULL},
204 { /* PC_RAB_ReleaseRequest */
205 { InitiatingMessage, "RAB-ReleaseRequest"},
206 { SuccessfulOutcome, NULL},
207 { UnsuccessfulOutcome, NULL},
210 { /* PC_Iu_ReleaseRequest */
211 { InitiatingMessage, "Iu-ReleaseRequest"},
212 { SuccessfulOutcome, NULL},
213 { UnsuccessfulOutcome, NULL},
216 { /* PC_RelocationDetect */
217 { InitiatingMessage, "RelocationDetect"},
218 { SuccessfulOutcome, NULL},
219 { UnsuccessfulOutcome, NULL},
222 { /* PC_RelocationComplete */
223 { InitiatingMessage, "RelocationComplete"},
224 { SuccessfulOutcome, NULL},
225 { UnsuccessfulOutcome, NULL},
229 { InitiatingMessage, "Paging"},
230 { SuccessfulOutcome, NULL},
231 { UnsuccessfulOutcome, NULL},
235 { InitiatingMessage, "CommonID"},
236 { SuccessfulOutcome, NULL},
237 { UnsuccessfulOutcome, NULL},
240 { /* PC_CN_InvokeTrace */
241 { InitiatingMessage, "CN-InvokeTrace"},
242 { SuccessfulOutcome, NULL},
243 { UnsuccessfulOutcome, NULL},
246 {/* PC_LocationReportingControl */
247 { InitiatingMessage, "LocationReportingControl"},
248 { SuccessfulOutcome, NULL},
249 { UnsuccessfulOutcome, NULL},
252 { /* PC_LocationReport */
253 { InitiatingMessage, "LocationReport"},
254 { SuccessfulOutcome, NULL},
255 { UnsuccessfulOutcome, NULL},
258 { /* PC_InitialUE_Message */
259 { InitiatingMessage, "InitialUE-Message"},
260 { SuccessfulOutcome, NULL},
261 { UnsuccessfulOutcome, NULL},
264 { /* PC_DirectTransfer */
265 { InitiatingMessage, "DirectTransfer"},
266 { SuccessfulOutcome, NULL},
267 { UnsuccessfulOutcome, NULL},
270 { /* PC_OverloadControl */
271 { InitiatingMessage, "Overload"},
272 { SuccessfulOutcome, NULL},
273 { UnsuccessfulOutcome, NULL},
276 { /* PC_ErrorIndication */
277 { InitiatingMessage, "ErrorIndication"},
278 { SuccessfulOutcome, NULL},
279 { UnsuccessfulOutcome, NULL},
282 { /* PC_SRNS_DataForward */
283 { InitiatingMessage, "SRNS-DataForwardCommand"},
284 { SuccessfulOutcome, NULL},
285 { UnsuccessfulOutcome, NULL},
288 { /* PC_ForwardSRNS_Context */
289 { InitiatingMessage, "ForwardSRNS-Context"},
290 { SuccessfulOutcome, NULL},
291 { UnsuccessfulOutcome, NULL},
294 { /* PC_privateMessage */
295 { InitiatingMessage, "PrivateMessage"},
296 { SuccessfulOutcome, NULL},
297 { UnsuccessfulOutcome, NULL},
300 { /* PC_CN_DeactivateTrace */
301 { InitiatingMessage, "CN-DeactivateTrace"},
302 { SuccessfulOutcome, NULL},
303 { UnsuccessfulOutcome, NULL},
306 { /* PC_ResetResource */
307 { InitiatingMessage, "ResetResource"},
308 { SuccessfulOutcome, "ResetResourceAcknowledge"},
309 { UnsuccessfulOutcome, NULL},
312 { /* PC_RANAP_Relocation */
313 { InitiatingMessage, "RANAP-RelocationInformation"},
314 { SuccessfulOutcome, NULL},
315 { UnsuccessfulOutcome, NULL},
321 /* Criticality Values */
326 static const value_string ranap_criticality_values[] = {
327 {CR_reject, "reject"},
328 {CR_ignore, "ignore"},
329 {CR_notify, "notify"},
333 /* presence values for optional components */
334 #define PR_not_present 0
337 static const value_string ranap_presence_values[] = {
338 {PR_not_present, "not present"},
339 {PR_present, "present"},
343 /* description of IE Header */
344 #define IE_ID_LENGTH 2
345 #define IE_CRITICALITY_LENGTH 1
348 /* description of IE-ID values */
349 #define IE_AreaIdentity 0
350 #define IE_CN_BroadcastInformationPiece 1
351 #define IE_CN_BroadcastInformationPieceList 2
352 #define IE_CN_DomainIndicator 3
354 #define IE_ChosenEncryptionAlgorithm 5
355 #define IE_ChosenIntegrityProtectionAlgorithm 6
356 #define IE_ClassmarkInformation2 7
357 #define IE_ClassmarkInformation3 8
358 #define IE_CriticalityDiagnostics 9
359 #define IE_DL_GTP_PDU_SequenceNumber 10
360 #define IE_EncryptionInformation 11
361 #define IE_IntegrityProtectionInformation 12
362 #define IE_IuTransportAssociation 13
363 #define IE_L3_Information 14
365 #define IE_NAS_PDU 16
366 #define IE_NonSearchingIndication 17
367 #define IE_NumberOfSteps 18
369 #define IE_OldBSS_ToNewBSS_Information 20
370 #define IE_PagingAreaID 21
371 #define IE_PagingCause 22
372 #define IE_PermanentNAS_UE_ID 23
373 #define IE_RAB_ContextItem 24
374 #define IE_RAB_ContextList 25
375 #define IE_RAB_DataForwardingItem 26
376 #define IE_RAB_DataForwardingItem_SRNS_CtxReq 27
377 #define IE_RAB_DataForwardingList 28
378 #define IE_RAB_DataForwardingList_SRNS_CtxReq 29
379 #define IE_RAB_DataVolumeReportItem 30
380 #define IE_RAB_DataVolumeReportList 31
381 #define IE_RAB_DataVolumeReportRequestItem 32
382 #define IE_RAB_DataVolumeReportRequestList 33
383 #define IE_RAB_FailedItem 34
384 #define IE_RAB_FailedList 35
386 #define IE_RAB_QueuedItem 37
387 #define IE_RAB_QueuedList 38
388 #define IE_RAB_ReleaseFailedList 39
389 #define IE_RAB_ReleaseItem 40
390 #define IE_RAB_ReleaseList 41
391 #define IE_RAB_ReleasedItem 42
392 #define IE_RAB_ReleasedList 43
393 #define IE_RAB_ReleasedList_IuRelComp 44
394 #define IE_RAB_RelocationReleaseItem 45
395 #define IE_RAB_RelocationReleaseList 46
396 #define IE_RAB_SetupItem_RelocReq 47
397 #define IE_RAB_SetupItem_RelocReqAck 48
398 #define IE_RAB_SetupList_RelocReq 49
399 #define IE_RAB_SetupList_RelocReqAck 50
400 #define IE_RAB_SetupOrModifiedItem 51
401 #define IE_RAB_SetupOrModifiedList 52
402 #define IE_RAB_SetupOrModifyItem 53
403 #define IE_RAB_SetupOrModifyList 54
405 #define IE_RelocationType 56
406 #define IE_RequestType 57
409 #define IE_SourceID 60
410 #define IE_SourceRNC_ToTargetRNC_TransparentContainer 61
411 #define IE_TargetID 62
412 #define IE_TargetRNC_ToSourceRNC_TransparentContainer 63
413 #define IE_TemporaryUE_ID 64
414 #define IE_TraceReference 65
415 #define IE_TraceType 66
416 #define IE_TransportLayerAddress 67
417 #define IE_TriggerID 68
419 #define IE_UL_GTP_PDU_SequenceNumber 70
420 #define IE_RAB_FailedtoReportItem 71
421 #define IE_RAB_FailedtoReportList 72
422 #define IE_KeyStatus 75
423 #define IE_DRX_CycleLengthCoefficient 76
424 #define IE_IuSigConIdList 77
425 #define IE_IuSigConIdItem 78
426 #define IE_IuSigConId 79
427 #define IE_DirectTransferInformationItem_RANAP_RelocInf 80
428 #define IE_DirectTransferInformationList_RANAP_RelocInf 81
429 #define IE_RAB_ContextItem_RANAP_RelocInf 82
430 #define IE_RAB_ContextList_RANAP_RelocInf 83
431 #define IE_RAB_ContextFailedtoTransferItem 84
432 #define IE_RAB_ContextFailedtoTransferList 85
433 #define IE_GlobalRNC_ID 86
434 #define IE_RAB_ReleasedItem_IuRelComp 87
436 static const value_string ranap_ie_id_values[] = {
437 {IE_AreaIdentity, "AreaIdentity"},
438 {IE_CN_BroadcastInformationPiece, "CN_BroadcastInformationPiece"},
439 {IE_CN_BroadcastInformationPieceList, "CN_BroadcastInformationPieceList"},
440 {IE_CN_DomainIndicator, "CN_DomainIndicator"},
442 {IE_ChosenEncryptionAlgorithm, "ChosenEncryptionAlgorithm"},
443 {IE_ChosenIntegrityProtectionAlgorithm, "ChosenIntegrityProtectionAlgorithm"},
444 {IE_ClassmarkInformation2, "ClassmarkInformation2"},
445 {IE_ClassmarkInformation3, "ClassmarkInformation3"},
446 {IE_CriticalityDiagnostics, "CriticalityDiagnostics"},
447 {IE_DL_GTP_PDU_SequenceNumber, "DL_GTP_PDU_SequenceNumber"},
448 {IE_EncryptionInformation, "EncryptionInformation"},
449 {IE_IntegrityProtectionInformation, "IntegrityProtectionInformation"},
450 {IE_IuTransportAssociation, "IuTransportAssociation"},
451 {IE_L3_Information, "L3_Information"},
453 {IE_NAS_PDU, "NAS_PDU"},
454 {IE_NonSearchingIndication, "NonSearchingIndication"},
455 {IE_NumberOfSteps, "NumberOfSteps"},
456 {IE_OMC_ID, "OMC_ID"},
457 {IE_OldBSS_ToNewBSS_Information, "OldBSS_ToNewBSS_Information"},
458 {IE_PagingAreaID, "PagingAreaID"},
459 {IE_PagingCause, "PagingCause"},
460 {IE_PermanentNAS_UE_ID, "PermanentNAS_UE_ID"},
461 {IE_RAB_ContextItem, "RAB_ContextItem"},
462 {IE_RAB_ContextList, "RAB_ContextList"},
463 {IE_RAB_DataForwardingItem, "RAB_DataForwardingItem"},
464 {IE_RAB_DataForwardingItem_SRNS_CtxReq, "RAB_DataForwardingItem_SRNS_CtxReq"},
465 {IE_RAB_DataForwardingList, "RAB_DataForwardingList"},
466 {IE_RAB_DataForwardingList_SRNS_CtxReq, "RAB_DataForwardingList_SRNS_CtxReq"},
467 {IE_RAB_DataVolumeReportItem, "RAB_DataVolumeReportItem"},
468 {IE_RAB_DataVolumeReportList, "RAB_DataVolumeReportList"},
469 {IE_RAB_DataVolumeReportRequestItem, "RAB_DataVolumeReportRequestItem"},
470 {IE_RAB_DataVolumeReportRequestList, "RAB_DataVolumeReportRequestList"},
471 {IE_RAB_FailedItem, "RAB_FailedItem"},
472 {IE_RAB_FailedList, "RAB_FailedList"},
473 {IE_RAB_ID, "RAB_ID"},
474 {IE_RAB_QueuedItem, "RAB_QueuedItem"},
475 {IE_RAB_QueuedList, "RAB_QueuedList"},
476 {IE_RAB_ReleaseFailedList, "RAB_ReleaseFailedList"},
477 {IE_RAB_ReleaseItem, "RAB_ReleaseItem"},
478 {IE_RAB_ReleaseList, "RAB_ReleaseList"},
479 {IE_RAB_ReleasedItem, "RAB_ReleasedItem"},
480 {IE_RAB_ReleasedList, "RAB_ReleasedList"},
481 {IE_RAB_ReleasedList_IuRelComp, "RAB_ReleasedList_IuRelComp"},
482 {IE_RAB_RelocationReleaseItem, "RAB_RelocationReleaseItem"},
483 {IE_RAB_RelocationReleaseList, "RAB_RelocationReleaseList"},
484 {IE_RAB_SetupItem_RelocReq, "RAB_SetupItem_RelocReq"},
485 {IE_RAB_SetupItem_RelocReqAck, "RAB_SetupItem_RelocReqAck"},
486 {IE_RAB_SetupList_RelocReq, "RAB_SetupList_RelocReq"},
487 {IE_RAB_SetupList_RelocReqAck, "RAB_SetupList_RelocReqAck"},
488 {IE_RAB_SetupOrModifiedItem, "RAB_SetupOrModifiedItem"},
489 {IE_RAB_SetupOrModifiedList, "RAB_SetupOrModifiedList"},
490 {IE_RAB_SetupOrModifyItem, "RAB_SetupOrModifyItem"},
491 {IE_RAB_SetupOrModifyList, "RAB_SetupOrModifyList"},
493 {IE_RelocationType, "RelocationType"},
494 {IE_RequestType, "RequestType"},
497 {IE_SourceID, "SourceID"},
498 {IE_SourceRNC_ToTargetRNC_TransparentContainer,
499 "SourceRNC_ToTargetRNC_TransparentContainer"},
500 {IE_TargetID, "TargetID"},
501 {IE_TargetRNC_ToSourceRNC_TransparentContainer,
502 "TargetRNC_ToSourceRNC_TransparentContainer"},
503 {IE_TemporaryUE_ID, "TemporaryUE_ID"},
504 {IE_TraceReference, "TraceReference"},
505 {IE_TraceType, "TraceType"},
506 {IE_TransportLayerAddress, "TransportLayerAddress"},
507 {IE_TriggerID, "TriggerID"},
509 {IE_UL_GTP_PDU_SequenceNumber, "UL_GTP_PDU_SequenceNumber"},
510 {IE_RAB_FailedtoReportItem, "RAB_FailedtoReportItem"},
511 {IE_RAB_FailedtoReportList, "RAB_FailedtoReportList"},
512 {IE_KeyStatus, "KeyStatus"},
513 {IE_DRX_CycleLengthCoefficient, "DRX_CycleLengthCoefficient"},
514 {IE_IuSigConIdList, "IuSigConIdList"},
515 {IE_IuSigConIdItem, "IuSigConIdItem"},
516 {IE_IuSigConId, "IuSigConId"},
517 {IE_DirectTransferInformationItem_RANAP_RelocInf,
518 "DirectTransferInformationItem_RANAP_RelocInf"},
519 {IE_DirectTransferInformationList_RANAP_RelocInf,
520 "DirectTransferInformationList_RANAP_RelocInf"},
521 {IE_RAB_ContextItem_RANAP_RelocInf, "RAB_ContextItem_RANAP_RelocInf"},
522 {IE_RAB_ContextList_RANAP_RelocInf, "RAB_ContextList_RANAP_RelocInf"},
523 {IE_RAB_ContextFailedtoTransferItem, "RAB_ContextFailedtoTransferItem"},
524 {IE_RAB_ContextFailedtoTransferList, "RAB_ContextFailedtoTransferList"},
525 {IE_GlobalRNC_ID, "GlobalRNC_ID"},
526 {IE_RAB_ReleasedItem_IuRelComp, "RAB_ReleasedItem_IuRelComp"},
531 /* Description of IE-Contents */
533 /* Length of fields within IEs */
534 #define RAB_ID_LENGTH 1
535 #define PLMN_ID_LENGTH 3
537 #define IE_PROTOCOL_EXTENSION_LENGTH 1
540 #define NUM_RABS_LENGTH 1
543 /* Traffic Class values */
544 #define TC_conversational 0
545 #define TC_streaming 1
546 #define TC_interactive 2
547 #define TC_background 3
549 static const value_string ranap_trafficClass_values[] = {
550 {TC_conversational, "conversational"},
551 {TC_streaming, "streaming"},
552 {TC_interactive, "interactive"},
553 {TC_background, "background"},
557 /* rAB-AsymmetryIndicator values */
558 #define AI_symmetric_bidirectional 0
559 #define AI_asymmetric_unidirectional_downlink 1
560 #define AI_asymmetric_unidirectional_uplink 2
561 #define AI_asymmetric_bidirectional 3
563 static const value_string ranap_rAB_AsymmetryIndicator_values[] = {
564 {AI_symmetric_bidirectional, "symmetric-bidirectional"},
565 {AI_asymmetric_unidirectional_downlink, "asymmetric-unidirectional-downlink"},
566 {AI_asymmetric_unidirectional_uplink, "asymmetric-unidirectional-uplink"},
567 {AI_asymmetric_bidirectional, "asymmetric-bidirectional"},
571 /* DeliveryOrder values */
572 #define DO_delivery_order_requested 0
573 #define DO_delivery_order_not_requested 1
575 static const value_string ranap_DeliveryOrder_values[] = {
576 {DO_delivery_order_requested, "delivery-order-requested"},
577 {DO_delivery_order_not_requested, "delivery-order-not-requested"},
580 #define maxSDU_Size_LENGTH 2
582 /* deliveryOfErroneousSDU values */
585 #define DOES_no_error_detection_consideration 2
587 static const value_string ranap_deliveryOfErroneousSDU_values[] = {
590 {DOES_no_error_detection_consideration, "no-error-detection-consideration"},
594 #define subflowSDU_Size_LENGTH 2
595 #define transferDelay_LENGTH 2
598 /* trafficHandlingPriority values */
599 static const value_string ranap_priority_values[] = {
615 { 15, "no-priority-used"},
619 /* pre-emptionCapability values */
620 static const value_string ranap_pre_emptionCapability_values[] = {
621 { 0, "shall-not-trigger-pre-emption"},
622 { 1, "may-trigger-pre-emption"},
625 /* pre-emptionVulnerability values */
626 static const value_string ranap_pre_emptionVulnerability_values[] = {
627 { 0, "not-pre-emptable"},
628 { 1, "pre-emptable"},
632 /* queuingAllowed values */
633 static const value_string ranap_queuingAllowed_values[] = {
634 { 0, "queueing-not-allowed"},
635 { 1, "queueing-allowed"},
639 /* sourceStatisticsDescriptor values */
640 static const value_string ranap_sourceStatisticsDescriptor_values[] = {
645 /* relocationRequirement values */
646 static const value_string ranap_relocationRequirement_values[] = {
651 /* userPlaneMode values */
652 static const value_string ranap_userPlaneMode_values[] = {
653 { 0, "transparent-mode"},
654 { 1, "support-mode-for-predefined-SDU-sizes"},
657 /* PDP_Type values */
658 static const value_string ranap_PDP_Type_values[] = {
666 /* dataVolumeReportingIndication values */
667 static const value_string ranap_dataVolumeReportingIndication_values[] = {
669 { 1, "do-not-report"},
673 /* cause_choice values */
674 #define CC_CauseRadioNetwork 0
675 #define CC_CauseTransmissionNetwork 1
676 #define CC_CauseNAS 2
677 #define CC_CauseProtocol 3
678 #define CC_CauseMisc 4
679 #define CC_CauseNon_Standard 5
681 static const value_string ranap_cause_choice_values[] = {
682 { CC_CauseRadioNetwork, "CauseRadioNetwork"},
683 { CC_CauseTransmissionNetwork, "CauseTransmissionNetwork"},
684 { CC_CauseNAS, "CauseNAS"},
685 { CC_CauseProtocol, "CauseProtocol"},
686 { CC_CauseMisc, "CauseMisc"},
687 { CC_CauseNon_Standard, "CauseNon-Standard"},
692 static const value_string ranap_cause_value_str[] = {
693 /* CauseRadioNetwork (1..64) */
694 { 1, "rab-pre-empted"},
695 { 2, "trelocoverall-expiry"},
696 { 3, "trelocprep-expiry"},
697 { 4, "treloccomplete-expiry"},
698 { 5, "tqueing-expiry"},
699 { 6, "relocation-triggered"},
700 { 7, "trellocalloc-expiry"},
701 { 8, "unable-to-establish-during-relocation"},
702 { 9, "unknown-target-rnc"},
703 { 10, "relocation-cancelled"},
704 { 11, "successful-relocation"},
705 { 12, "requested-ciphering-and-or-integrity-protection-algorithms-not-supported"},
706 { 13, "change-of-ciphering-and-or-integrity-protection-is-not-supported"},
707 { 14, "failure-in-the-radio-interface-procedure"},
708 { 15, "release-due-to-utran-generated-reason"},
709 { 16, "user-inactivity"},
710 { 17, "time-critical-relocation"},
711 { 18, "requested-traffic-class-not-available"},
712 { 19, "invalid-rab-parameters-value"},
713 { 20, "requested-maximum-bit-rate-not-available"},
714 { 21, "requested-guaranteed-bit-rate-not-available"},
715 { 22, "requested-transfer-delay-not-achievable"},
716 { 23, "invalid-rab-parameters-combination"},
717 { 24, "condition-violation-for-sdu-parameters"},
718 { 25, "condition-violation-for-traffic-handling-priority"},
719 { 26, "condition-violation-for-guaranteed-bit-rate"},
720 { 27, "user-plane-versions-not-supported"},
721 { 28, "iu-up-failure"},
722 { 29, "relocation-failure-in-target-CN-RNC-or-target-system"},
723 { 30, "invalid-RAB-ID"},
724 { 31, "no-remaining-rab"},
725 { 32, "interaction-with-other-procedure"},
726 { 33, "requested-maximum-bit-rate-for-dl-not-available"},
727 { 34, "requested-maximum-bit-rate-for-ul-not-available"},
728 { 35, "requested-guaranteed-bit-rate-for-dl-not-available"},
729 { 36, "requested-guaranteed-bit-rate-for-ul-not-available"},
730 { 37, "repeated-integrity-checking-failure"},
731 { 38, "requested-report-type-not-supported"},
732 { 39, "request-superseded"},
733 { 40, "release-due-to-UE-generated-signalling-connection-release"},
734 { 41, "resource-optimisation-relocation"},
735 { 42, "requested-information-not-available"},
736 { 43, "relocation-desirable-for-radio-reasons"},
737 { 44, "relocation-not-supported-in-target-RNC-or-target-system"},
738 { 45, "directed-retry"},
739 { 46, "radio-connection-with-UE-Lost"},
741 /* CauseTransmissionNetwork (65..80) */
742 { 65, "logical-error-unknown-iu-transport-association"},
743 { 66, "iu-transport-connection-failed-to-establish"},
745 /* CauseNAS (81..96) */
746 { 81, "user-restriction-start-indication"},
747 { 82, "user-restriction-end-indication"},
748 { 83, "normal-release"},
750 /* CauseProtocol (97..112) */
751 { 97, "transfer-syntax-error"},
752 { 98, "semantic-error"},
753 { 99, "message-not-compatible-with-receiver-state"},
754 {100, "abstract-syntax-error-reject"},
755 {101, "abstract-syntax-error-ignore-and-notify"},
756 {102, "abstract-syntax-error-falsely-constructed-message"},
758 /* CauseMisc (113..128) */
759 {113, "om-intervention"},
760 {114, "no-resource-available"},
761 {115, "unspecified-failure"},
762 {116, "network-optimisation"},
766 /* CN_DomainIndicator_values */
767 static const value_string ranap_CN_DomainIndicator_values[] = {
774 static const value_string ranap_SAPI_values[] = {
779 /* service_Handover_values */
780 static const value_string ranap_service_Handover_values[] = {
781 { 0, "handover-to-GSM-should-be-performed"},
782 { 1, "handover-to-GSM-should-not-be-performed"},
783 { 2, "handover-to-GSM-shall-not-be-performed"},
786 /* Initialize the protocol and registered fields */
788 static int proto_ranap = -1;
790 /* pdu header fields */
791 static int hf_ranap_pdu_number_of_octets = -1;
792 static int hf_ranap_pdu_index = -1;
793 static int hf_ranap_procedure_code = -1;
794 static int hf_ranap_pdu_criticality = -1;
795 static int hf_ranap_number_of_ies = -1;
797 /* ie header fields */
798 static int hf_ranap_ie_ie_id = -1;
799 static int hf_ranap_ie_criticality = -1;
800 static int hf_ranap_ie_number_of_octets = -1;
801 static int hf_ranap_ie_protocol_extension = -1;
803 /*ie contents fields */
804 static int hf_ranap_number_of_ies_in_list = -1;
805 static int hf_ranap_ie_pair_first_criticality = -1;
806 static int hf_ranap_ie_pair_second_criticality = -1;
807 static int hf_ranap_first_value_number_of_octets = -1;
808 static int hf_ranap_second_value_number_of_octets = -1;
809 static int hf_ranap_rab_id = -1;
810 static int hf_ranap_nas_pdu = -1;
811 static int hf_ranap_plmn_id = -1;
812 static int hf_ranap_lac = -1;
813 static int hf_ranap_sac = -1;
814 static int hf_ranap_rac = -1;
815 static int hf_ranap_nAS_SynchronisationIndicator = -1;
816 static int hf_ranap_trafficClass = -1;
817 static int hf_ranap_deliveryOrder = -1;
818 static int hf_ranap_iE_Extensions_present = -1;
819 static int hf_ranap_num_rabs = -1;
820 static int hf_ranap_nAS_SynchronisationIndicator_present = -1;
821 static int hf_ranap_rAB_Parameters_present = -1;
822 static int hf_ranap_userPlaneInformation_present = -1;
823 static int hf_ranap_transportLayerInformation_present = -1;
824 static int hf_ranap_service_Handover_present = -1;
825 static int hf_ranap_guaranteedBitRate_present = -1;
826 static int hf_ranap_transferDelay_present = -1;
827 static int hf_ranap_trafficHandlingPriority_present = -1;
828 static int hf_ranap_allocationOrRetentionPriority_present = -1;
829 static int hf_ranap_sourceStatisticsDescriptor_present = -1;
830 static int hf_ranap_relocationRequirement_present = -1;
831 static int hf_ranap_rAB_AsymmetryIndicator = -1;
832 static int hf_ranap_maxBitrate = -1;
833 static int hf_ranap_guaranteedBitrate = -1;
834 static int hf_ranap_maxSDU_Size = -1;
835 static int hf_ranap_sDU_ErrorRatio_mantissa = -1;
836 static int hf_ranap_sDU_ErrorRatio_exponent = -1;
837 static int hf_ranap_residualBitErrorRatio_mantissa = -1;
838 static int hf_ranap_residualBitErrorRatio_exponent = -1;
839 static int hf_ranap_deliveryOfErroneousSDU = -1;
840 static int hf_ranap_subflowSDU_Size = -1;
841 static int hf_ranap_rAB_SubflowCombinationBitRate = -1;
842 static int hf_ranap_sDU_ErrorRatio_present = -1;
843 static int hf_ranap_sDU_FormatInformationParameters_present = -1;
844 static int hf_ranap_subflowSDU_Size_present = -1;
845 static int hf_ranap_rAB_SubflowCombinationBitRate_present = -1;
846 static int hf_ranap_transferDelay = -1;
847 static int hf_ranap_trafficHandlingPriority = -1;
848 static int hf_ranap_priorityLevel = -1;
849 static int hf_ranap_pre_emptionCapability = -1;
850 static int hf_ranap_pre_emptionVulnerability = -1;
851 static int hf_ranap_queuingAllowed = -1;
852 static int hf_ranap_sourceStatisticsDescriptor = -1;
853 static int hf_ranap_userPlaneMode = -1;
854 static int hf_ranap_uP_ModeVersions = -1;
855 static int hf_ranap_number_of_ProtocolExtensionFields = -1;
856 static int hf_ranap_ext_field_id = -1;
857 static int hf_ranap_ext_field_criticality = -1;
858 static int hf_ranap_ext_field_number_of_octets = -1;
859 static int hf_ranap_transportLayerAddress = -1;
860 static int hf_ranap_transportLayerAddress_length = -1;
861 static int hf_ranap_gTP_TEI = -1;
862 static int hf_ranap_bindingID = -1;
863 static int hf_ranap_pDP_TypeInformation_present = -1;
864 static int hf_ranap_dataVolumeReportingIndication_present = -1;
865 static int hf_ranap_dl_GTP_PDU_SequenceNumber_present = -1;
866 static int hf_ranap_ul_GTP_PDU_SequenceNumber_present = -1;
867 static int hf_ranap_dl_N_PDU_SequenceNumber_present = -1;
868 static int hf_ranap_ul_N_PDU_SequenceNumber_present = -1;
869 static int hf_ranap_PDP_Type = -1;
870 static int hf_ranap_dataVolumeReportingIndication = -1;
871 static int hf_ranap_dl_GTP_PDU_SequenceNumber = -1;
872 static int hf_ranap_ul_GTP_PDU_SequenceNumber = -1;
873 static int hf_ranap_dl_N_PDU_SequenceNumber = -1;
874 static int hf_ranap_ul_N_PDU_SequenceNumber = -1;
875 static int hf_ranap_cause_choice = -1;
876 static int hf_ranap_cause_value = -1;
877 static int hf_ranap_transportLayerAddress_present = -1;
878 static int hf_ranap_iuTransportAssociation_present = -1;
879 static int hf_ranap_dl_dataVolumes_present = -1;
880 static int hf_ranap_dataVolumeReference_present = -1;
881 static int hf_ranap_dl_UnsuccessfullyTransmittedDataVolume = -1;
882 static int hf_ranap_dataVolumeReference = -1;
883 static int hf_ranap_procedureCode_present = -1;
884 static int hf_ranap_triggeringMessage_present = -1;
885 static int hf_ranap_procedureCriticality_present = -1;
886 static int hf_ranap_iEsCriticalityDiagnostics_present = -1;
887 static int hf_ranap_triggeringMessage = -1;
888 static int hf_ranap_iECriticality = -1;
889 static int hf_ranap_procedureCriticality = -1;
890 static int hf_ranap_repetitionNumber = -1;
891 static int hf_ranap_num_of_CriticalityDiagnostics_IEs = -1;
892 static int hf_ranap_repetitionNumber_present = -1;
893 static int hf_ranap_dl_UnsuccessfullyTransmittedDataVolume_present = -1;
894 static int hf_ranap_CN_DomainIndicator = -1;
895 static int hf_ranap_IuSigConId = -1;
896 static int hf_ranap_SAPI = -1;
897 static int hf_ranap_msg_extension_present = -1;
898 static int hf_ranap_ProtocolExtensionContainer_present = -1;
899 static int hf_ranap_nas_pdu_length = -1;
900 static int hf_ranap_relocationRequirement = -1;
901 static int hf_ranap_service_Handover = -1;
902 static int hf_ranap_extension_field = -1;
906 static gint ett_ranap = -1;
907 static gint ett_ranap_optionals = -1;
908 static gint ett_ranap_iE_Extension = -1;
909 static gint ett_ranap_ie = -1;
910 static gint ett_ranap_ie_pair = -1;
911 static gint ett_ranap_rab = -1;
912 static gint ett_ranap_ie_pair_first_value = -1;
913 static gint ett_ranap_ie_pair_second_value = -1;
914 static gint ett_ranap_rAB_Parameters = -1;
915 static gint ett_ranap_sDU = -1;
916 static gint ett_ranap_allocationOrRetentionPriority = -1;
917 static gint ett_ranap_CriticalityDiagnostics_IE = -1;
921 /*****************************************************************************/
923 /* Utility Functions */
925 /*****************************************************************************/
927 /* sets *offset and *bitoffset n bits further */
929 proceed_nbits(gint *offset, gint *bitoffset, gint n)
932 *offset += *bitoffset / 8;
936 /* sets *offset and *bitoffset to the next byte boundary */
937 static void allign(gint *offset, gint *bitoffset)
939 if ( *bitoffset != 0 )
946 /* sets *offset and *bitoffset behind the following integer */
948 proceed_perint32(gint *offset, gint *bitoffset, gint length)
950 proceed_nbits(offset, bitoffset, 2);
951 allign(offset, bitoffset);
956 /* extract length field found at offset */
957 /* if length field spans more than two bytes -1 is returned and the field is not decoded */
959 extract_length(tvbuff_t *tvb, gint offset, gint *length, gint *length_size)
962 guint16 tmp_length16;
964 tmp_length8 = tvb_get_guint8(tvb, offset);
965 if ((tmp_length8 & 0x80) == 0)
967 /* length coded in one byte */
968 *length = tmp_length8;
973 tmp_length16 = tvb_get_ntohs(tvb, offset);
974 if ( ((tmp_length16 & 0x8000) == 0x8000) && ((tmp_length16 & 0x4000) == 0) )
976 /* length coded in two bytes */
977 *length = tmp_length16 & 0x3FFF;
981 { /* length is coded in more than 2 bytes */
988 /* extract the next n bits and return them alligned to the LSB */
990 extract_nbits(tvbuff_t *tvb, gint offset, gint bitoffset, gint n)
996 if (bitoffset + n <= 8)
998 /* all bits contained in one byte */
999 uint_bits = tvb_get_guint8(tvb, offset);
1000 uint_bits <<= bitoffset; /* remove bitoffset */
1001 uint_bits >>= 8-n; /* allign to LSB */
1005 /* bits contained within 2 bytes */
1006 tmp_2bytes = tvb_get_ntohs(tvb, offset);
1007 tmp_2bytes <<= bitoffset; /* remove bitoffset */
1008 uint_bits = tmp_2bytes >> ( 8 + (8-n)); /* allign to LSB */
1015 /* extract an integer with 2bit length field and return the int value*/
1017 extract_int32(tvbuff_t *tvb, gint offset, gint bitoffset, gint *length)
1022 tmp_2byte = tvb_get_ntohs(tvb, offset);
1024 tmp_2byte <<= bitoffset; /* remove bitoffset */
1025 *length = tmp_2byte >> (6 + 8); /* allign 2bit length field to LSB */
1026 (*length)++; /* now we have the length of the int value */
1028 proceed_nbits(&offset, &bitoffset, 2);
1029 allign(&offset, &bitoffset);
1034 result = tvb_get_guint8(tvb, offset);
1037 result = tvb_get_ntohs(tvb, offset);
1040 result = tvb_get_ntoh24(tvb, offset);
1043 result = tvb_get_ntohl(tvb, offset);
1051 /* return bitmask string looking like "..01 0..." */
1053 bitmaskstr(guint bitoffset, guint bitlength, guint16 value, guint *length)
1055 static char maskstr[20];
1059 strcpy(maskstr, " ");
1061 for (i=0; i<16; i++)
1063 if ( i < bitoffset || i > bitoffset+bitlength-1 )
1065 /* i is outside extracted bitfield */
1066 maskstr[i + i/4] = '.';
1069 { /* i is inside extracted bitfield */
1070 if ( ((0x8000 >> i) & value) != 0x0000 )
1073 maskstr[i + i/4] = '1';
1077 /* bit is not set */
1078 maskstr[i + i/4] = '0';
1082 if (bitoffset + bitlength <= 8)
1084 /* bitfield is located within first byte only */
1090 /* bitfield is located within first & second byte */
1100 proto_tree_add_bitstring(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint offset,
1101 gint bitoffset, gint bitlength)
1103 guint16 read_2bytes;
1104 guint16 alligned_2bytes;
1107 char maskstr_buf[56] = "\0";
1111 char buf[256] = "\0";
1112 header_field_info *hf_info_p;
1114 gint initial_offset = offset;
1116 memset(bitstr, 0, 128);
1118 /* create bitmask string for first byte */
1119 read_2bytes = tvb_get_ntohs(tvb, offset);
1120 maskstr = bitmaskstr(bitoffset, (bitoffset+bitlength >8) ? 8-bitoffset : bitlength, read_2bytes, &length);
1121 if (bitoffset+bitlength > 8)
1123 sprintf(maskstr_buf, "%s + %d Bits = ", maskstr, bitlength - (8-bitoffset));
1127 sprintf(maskstr_buf, "%s = ", maskstr);
1131 /* print all but the last byte to buf */
1132 byte_span = (bitoffset + bitlength + 7) / 8;
1133 for (i=0; i < byte_span - 1; i++, offset++)
1135 read_2bytes = tvb_get_ntohs(tvb, offset);
1136 alligned_2bytes = read_2bytes << bitoffset; /* remove bitoffset */
1137 one_byte = alligned_2bytes >> 8; /* move to low byte */
1140 sprintf(&(buf[2*i]), "%02X", one_byte);
1143 /* add last byte if it contains bits which have not yet been shifted in */
1144 if ( ((bitlength + 7) / 8 ) == byte_span )
1146 read_2bytes = tvb_get_ntohs(tvb, offset);
1147 alligned_2bytes = read_2bytes << bitoffset; /* remove bitoffset */
1148 one_byte = alligned_2bytes >> 8; /* move to low byte */
1149 one_byte >>= (8 - (bitlength%8)); /*cut off surplus bits */
1150 one_byte <<= (8 - (bitlength%8)); /* allign to MSB in low byte*/
1153 sprintf(&(buf[2*i]), "%02X", one_byte);
1156 /* get header field info */
1157 hf_info_p = proto_registrar_get_nth(hfindex);
1160 return ( proto_tree_add_bytes_format(tree, hfindex, tvb, initial_offset,
1161 byte_span , bitstr, "%s %s: %s", maskstr_buf, hf_info_p->name, buf) );
1166 /* add unsigned int, 1-8 bits long */
1168 proto_tree_add_uint_bits(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint offset,
1169 gint bitoffset, gint bitlength, gint min)
1172 guint16 read_2bytes, alligned_2bytes;
1175 header_field_info *hf_info_p;
1179 if (bitoffset + bitlength <= 8)
1181 /* all bits contained in one byte */
1182 uint_bits = tvb_get_guint8(tvb, offset);
1183 read_2bytes = uint_bits;
1188 /* bits contained within 2 bytes */
1189 read_2bytes = tvb_get_ntohs(tvb, offset);
1191 alligned_2bytes = read_2bytes << bitoffset; /* remove bitoffset */
1192 uint_bits = alligned_2bytes >> ( 8 + (8-bitlength)); /* allign to LSB */
1196 /* create bitmask string */
1197 maskstr = bitmaskstr(bitoffset, bitlength, read_2bytes, &length);
1199 /* get header field info */
1200 hf_info_p = proto_registrar_get_nth(hfindex);
1202 if (hf_info_p->strings != NULL)
1204 /* string representation for decoded header field present */
1205 return ( proto_tree_add_uint_format(tree, hfindex, tvb, offset,
1206 length, uint_bits, "%s = %s: %s (%d)", maskstr, hf_info_p->name,
1207 val_to_str(uint_bits, hf_info_p->strings, "%d"), uint_bits) );
1211 /* no string representation */
1212 return ( proto_tree_add_uint_format(tree, hfindex, tvb, offset,
1213 length, uint_bits, "%s = %s: %d", maskstr, hf_info_p->name, uint_bits) );
1217 /* add PER encoded integer (maximum length of value: 4 bytes) */
1219 proto_tree_add_PERint32(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint offset,
1220 gint bitoffset, gint *length, gint min)
1226 header_field_info *hf_info_p;
1229 value = extract_int32(tvb, offset, bitoffset, length);
1232 /* create bitmask string for 2 bit length field */
1233 tmp_2bytes = tvb_get_ntohs(tvb, offset);
1234 maskstr = bitmaskstr(bitoffset, 2, tmp_2bytes, &length_size);
1236 /* get header field info */
1237 hf_info_p = proto_registrar_get_nth(hfindex);
1239 return ( proto_tree_add_uint_format(tree, hfindex, tvb, offset,
1240 (*length) + length_size, value,
1241 "%s + %d Bytes = %s: %d", maskstr, *length, hf_info_p->name, value) );
1246 /*****************************************************************************/
1248 /* Dissecting Functions for single parameters */
1250 /*****************************************************************************/
1252 dissect_iE_Extension(tvbuff_t *tvb, proto_tree *tree, gint *offset, gint *bitoffset, char *description)
1254 proto_item *ext_item = NULL;
1255 proto_tree *ext_tree = NULL;
1256 guint16 number_of_extFields;
1257 gint number_of_octets = 0;
1258 gint number_of_octets_size = 0;
1261 allign(offset, bitoffset);
1263 /* create subtree for iE_Extension */
1266 ext_item = proto_tree_add_text(tree, tvb, *offset, 0, "%s iE-Extensions", description);
1267 ext_tree = proto_item_add_subtree(ext_item, ett_ranap_iE_Extension);
1270 /* number of extension fields */
1271 number_of_extFields = tvb_get_ntohs(tvb, *offset) + 1;
1274 proto_tree_add_uint(ext_tree, hf_ranap_number_of_ProtocolExtensionFields,
1275 tvb, *offset, 2, number_of_extFields);
1280 /* for each extension field */
1281 for (i=1; i <= number_of_extFields; i++)
1283 /* add fields to ie subtee */
1284 /* Extension Field ID */
1287 proto_tree_add_item(ext_tree, hf_ranap_ext_field_id, tvb,
1288 *offset, IE_ID_LENGTH, FALSE);
1290 *offset += IE_ID_LENGTH;
1295 proto_tree_add_uint_bits(ext_tree, hf_ranap_ext_field_criticality, tvb,
1296 *offset, *bitoffset, 2, 0);
1298 proceed_nbits(offset, bitoffset, 2);
1300 /* number of octets in the IE */
1301 allign(offset, bitoffset);
1302 if (0 == extract_length(tvb, *offset, &number_of_octets, &number_of_octets_size))
1306 proto_tree_add_uint(ext_tree, hf_ranap_ext_field_number_of_octets, tvb,
1307 *offset, number_of_octets_size, number_of_octets);
1312 /* decoding is not supported */
1315 proto_tree_add_text(ext_tree, tvb, *offset, 0,
1316 "Number of Octets greater than 0x3FFF, dissection not supported");
1321 *offset += number_of_octets_size;
1324 proto_tree_add_item(ext_tree, hf_ranap_extension_field, tvb,
1325 *offset, number_of_octets, FALSE);
1329 *offset += number_of_octets;
1337 dissect_userPlaneInformation(tvbuff_t *tvb, proto_tree *tree, gint *offset, gint *bitoffset)
1339 int extension_present;
1340 int iE_Extensions_present;
1341 int tmp_extension_present;
1343 /* protocol_extension present ? */
1344 extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1345 proceed_nbits(offset, bitoffset, 1);
1347 /* iE_Extensions present ? */
1348 iE_Extensions_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1349 proceed_nbits(offset, bitoffset, 1);
1352 tmp_extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1353 proceed_nbits(offset, bitoffset, 1);
1355 proto_tree_add_uint_bits(tree, hf_ranap_userPlaneMode, tvb, *offset,
1357 proceed_nbits(offset, bitoffset, 1);
1359 /* uP-ModeVersions */
1360 proto_tree_add_bitstring(tree, hf_ranap_uP_ModeVersions, tvb, *offset,
1362 proceed_nbits(offset, bitoffset, 16);
1365 if (iE_Extensions_present)
1367 return(dissect_iE_Extension(tvb, tree, offset, bitoffset, "UserPlaneInformation"));
1375 dissect_sDU_Parameters(tvbuff_t *tvb, proto_tree *ie_tree, gint *offset, gint *bitoffset)
1377 proto_item *sDU_item = NULL;
1378 proto_tree *sDU_tree = NULL;
1379 proto_item *optionals_item = NULL;
1380 proto_tree *optionals_tree = NULL;
1382 int extension_present;
1383 int sDU_ErrorRatio_present;
1384 int sDU_FormatInformationParameters_present;
1385 int iE_Extensions_present;
1386 int sDU_ErrorRatio_iE_Extensions_present;
1387 int residualBitErrorRatio_iE_Extensions_present;
1389 gint number_of_sDU_FormatInformationParameters;
1390 int sDU_FormatInformationParameters_extension_present;
1391 int subflowSDU_Size_present;
1392 int rAB_SubflowCombinationBitRate_present;
1393 int sDU_FormatInformationParameters_iE_Extensions_present;
1396 /* create subtree for sDU_Parameters */
1397 sDU_item = proto_tree_add_text(ie_tree, tvb, *offset, 0,
1399 sDU_tree = proto_item_add_subtree(sDU_item, ett_ranap_sDU);
1401 /* create subtree for extension/optional/default bitmap */
1402 optionals_item = proto_tree_add_text(sDU_tree, tvb, *offset, 1,
1403 "sDU_Parameters Extension/Optional/Default bitmap");
1404 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
1406 /* protocol_extension present ? */
1407 extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1408 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
1409 *offset, *bitoffset, 1, 0);
1410 proceed_nbits(offset, bitoffset, 1);
1412 /* sDU_ErrorRatio present ? */
1413 sDU_ErrorRatio_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1414 proto_tree_add_uint_bits(optionals_tree, hf_ranap_sDU_ErrorRatio_present, tvb,
1415 *offset, *bitoffset, 1, 0);
1416 proceed_nbits(offset, bitoffset, 1);
1418 /* sDU_FormatInformationParameters present ? */
1419 sDU_FormatInformationParameters_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1420 proto_tree_add_uint_bits(optionals_tree, hf_ranap_sDU_FormatInformationParameters_present, tvb,
1421 *offset, *bitoffset, 1, 0);
1422 proceed_nbits(offset, bitoffset, 1);
1424 /* iE_Extensions present ? */
1425 iE_Extensions_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1426 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present, tvb,
1427 *offset, *bitoffset, 1, 0);
1428 proceed_nbits(offset, bitoffset, 1);
1431 /* sDU_ErrorRatio */
1432 if (sDU_ErrorRatio_present)
1434 sDU_ErrorRatio_iE_Extensions_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1435 proceed_nbits(offset, bitoffset, 1);
1437 proto_tree_add_uint_bits(sDU_tree, hf_ranap_sDU_ErrorRatio_mantissa, tvb, *offset,
1439 proceed_nbits(offset, bitoffset, 4);
1441 proto_tree_add_uint_bits(sDU_tree, hf_ranap_sDU_ErrorRatio_exponent, tvb, *offset,
1443 proceed_nbits(offset, bitoffset, 3);
1445 if (sDU_ErrorRatio_iE_Extensions_present)
1447 if ((ret=dissect_iE_Extension(tvb, sDU_tree, offset, bitoffset, "sDU_ErrorRatio")) != 0)
1452 /* residualBitErrorRatio */
1453 residualBitErrorRatio_iE_Extensions_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1454 proceed_nbits(offset, bitoffset, 1);
1456 proto_tree_add_uint_bits(sDU_tree, hf_ranap_residualBitErrorRatio_mantissa, tvb, *offset,
1458 proceed_nbits(offset, bitoffset, 4);
1460 proto_tree_add_uint_bits(sDU_tree, hf_ranap_sDU_ErrorRatio_exponent, tvb, *offset,
1462 proceed_nbits(offset, bitoffset, 3);
1465 if (residualBitErrorRatio_iE_Extensions_present)
1467 if ((ret=dissect_iE_Extension(tvb, sDU_tree, offset, bitoffset, "residualBitErrorRatio")) != 0)
1472 /* deliveryOfErroneousSDU */
1473 proto_tree_add_uint_bits(sDU_tree, hf_ranap_deliveryOfErroneousSDU, tvb, *offset,
1475 proceed_nbits(offset, bitoffset, 2);
1478 /* sDU_FormatInformationParameters */
1479 if (sDU_FormatInformationParameters_present)
1481 number_of_sDU_FormatInformationParameters = extract_nbits(tvb, *offset, *bitoffset, 6) + 1;
1482 proceed_nbits(offset, bitoffset, 6);
1484 for (i=1; i<= number_of_sDU_FormatInformationParameters; i++)
1486 /* create subtree for extension/optional/default bitmap */
1487 optionals_item = proto_tree_add_text(sDU_tree, tvb, *offset, 1,
1488 "sDU_FormatInformationParameters Extension/Optional/Default bitmap");
1489 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
1491 /* protocol extension present ? */
1492 sDU_FormatInformationParameters_extension_present =
1493 extract_nbits(tvb, *offset, *bitoffset, 1);
1494 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
1495 *offset, *bitoffset, 1, 0);
1496 proceed_nbits(offset, bitoffset, 1);
1498 /* subflowSDU_Size present ? */
1499 subflowSDU_Size_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1500 proto_tree_add_uint_bits(optionals_tree, hf_ranap_subflowSDU_Size_present, tvb,
1501 *offset, *bitoffset, 1, 0);
1502 proceed_nbits(offset, bitoffset, 1);
1504 /* rAB_SubflowCombinationBitRate present ? */
1505 rAB_SubflowCombinationBitRate_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1506 proto_tree_add_uint_bits(optionals_tree, hf_ranap_rAB_SubflowCombinationBitRate_present, tvb,
1507 *offset, *bitoffset, 1, 0);
1508 proceed_nbits(offset, bitoffset, 1);
1510 /* ie_Extension present ? */
1511 sDU_FormatInformationParameters_iE_Extensions_present =
1512 extract_nbits(tvb, *offset, *bitoffset, 1);
1513 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present, tvb,
1514 *offset, *bitoffset, 1, 0);
1515 proceed_nbits(offset, bitoffset, 1);
1517 if (subflowSDU_Size_present)
1519 allign(offset, bitoffset);
1520 proto_tree_add_item(sDU_tree, hf_ranap_subflowSDU_Size,
1521 tvb, *offset, subflowSDU_Size_LENGTH, FALSE);
1522 offset += subflowSDU_Size_LENGTH;
1525 if (rAB_SubflowCombinationBitRate_present)
1527 proto_tree_add_PERint32(sDU_tree, hf_ranap_rAB_SubflowCombinationBitRate,
1528 tvb, *offset, *bitoffset, &length, 0);
1529 proceed_perint32(offset, bitoffset, length);
1532 if (sDU_FormatInformationParameters_iE_Extensions_present)
1534 if ((ret=dissect_iE_Extension(tvb, sDU_tree, offset, bitoffset,
1535 "sDU_FormatInformationParameters" )) != 0)
1541 if (extension_present)
1543 /* extended sequence */
1544 /* decoding is not supported */
1545 proto_tree_add_text(ie_tree, tvb, *offset, IE_PROTOCOL_EXTENSION_LENGTH,
1546 "Protocol extension for sDU_FormatInformationParameters present, dissection not supported");
1556 dissect_rAB_Parameters(tvbuff_t *tvb, proto_tree *ie_tree, gint *offset, gint *bitoffset)
1559 proto_item *rab_item = NULL;
1560 proto_tree *rab_tree = NULL;
1561 proto_item *optionals_item = NULL;
1562 proto_tree *optionals_tree = NULL;
1563 proto_item *prio_item = NULL;
1564 proto_tree *prio_tree = NULL;
1566 int extension_present;
1567 int tmp_extension_present;
1568 int guaranteedBitRate_present;
1569 int transferDelay_present;
1570 int trafficHandlingPriority_present;
1571 int allocationOrRetentionPriority_present;
1572 int sourceStatisticsDescriptor_present;
1573 int relocationRequirement_present;
1574 int iE_Extensions_present;
1575 int tmp_iE_Extensions_present;
1579 /* create subtree for rAB_Parameters */
1580 rab_item = proto_tree_add_text(ie_tree, tvb, *offset, 0,
1582 rab_tree = proto_item_add_subtree(rab_item, ett_ranap_rAB_Parameters);
1584 /* create subtree for extension/optional/default bitmap */
1585 optionals_item = proto_tree_add_text(rab_tree, tvb, *offset, IE_PROTOCOL_EXTENSION_LENGTH,
1586 "rAB_Parameters Extension/Optional/Default bitmap");
1587 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
1589 /* protocol extension present ? */
1590 extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1591 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
1592 *offset, *bitoffset, 1, 0);
1593 proceed_nbits(offset, bitoffset, 1);
1595 /* guaranteedBitRate present ? */
1596 guaranteedBitRate_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1597 proto_tree_add_uint_bits(optionals_tree, hf_ranap_guaranteedBitRate_present,
1598 tvb, *offset, *bitoffset, 1, 0);
1599 proceed_nbits(offset, bitoffset, 1);
1601 /* transferDelay present ? */
1602 transferDelay_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1603 proto_tree_add_uint_bits(optionals_tree, hf_ranap_transferDelay_present,
1604 tvb, *offset, *bitoffset, 1, 0);
1605 proceed_nbits(offset, bitoffset, 1);
1607 /* trafficHandlingPriority present ? */
1608 trafficHandlingPriority_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1609 proto_tree_add_uint_bits(optionals_tree, hf_ranap_trafficHandlingPriority_present,
1610 tvb, *offset, *bitoffset, 1, 0);
1611 proceed_nbits(offset, bitoffset, 1);
1613 /* allocationOrRetentionPriority present ? */
1614 allocationOrRetentionPriority_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1615 proto_tree_add_uint_bits(optionals_tree, hf_ranap_allocationOrRetentionPriority_present,
1616 tvb, *offset, *bitoffset, 1, 0);
1617 proceed_nbits(offset, bitoffset, 1);
1619 /* sourceStatisticsDescriptor present ? */
1620 sourceStatisticsDescriptor_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1621 proto_tree_add_uint_bits(optionals_tree, hf_ranap_sourceStatisticsDescriptor_present,
1622 tvb, *offset, *bitoffset, 1, 0);
1623 proceed_nbits(offset, bitoffset, 1);
1625 /* relocationRequirement present ? */
1626 relocationRequirement_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1627 proto_tree_add_uint_bits(optionals_tree, hf_ranap_relocationRequirement_present,
1628 tvb, *offset, *bitoffset, 1, 0);
1629 proceed_nbits(offset, bitoffset, 1);
1631 /* iE-Extensions present ? */
1632 iE_Extensions_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1633 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present,
1634 tvb, *offset, *bitoffset, 1, 0);
1635 proceed_nbits(offset, bitoffset, 1);
1639 tmp_extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1640 proceed_nbits(offset, bitoffset, 1);
1642 proto_tree_add_uint_bits(rab_tree, hf_ranap_trafficClass,
1643 tvb, *offset, *bitoffset, 2, 0);
1644 proceed_nbits(offset, bitoffset, 2);
1646 if (tmp_extension_present)
1648 /* decoding is not supported */
1649 proto_tree_add_text(rab_tree, tvb, *offset, IE_PROTOCOL_EXTENSION_LENGTH,
1650 "Protocol extension for trafficClass present, dissection not supported");
1655 /* rAB-AsymmetryIndicator */
1656 tmp_extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1657 proceed_nbits(offset, bitoffset, 1);
1659 proto_tree_add_uint_bits(rab_tree, hf_ranap_rAB_AsymmetryIndicator,
1660 tvb, *offset, *bitoffset, 2, 0);
1661 proceed_nbits(offset, bitoffset, 2);
1663 if (tmp_extension_present)
1665 /* decoding is not supported */
1666 proto_tree_add_text(rab_tree, tvb, *offset, IE_PROTOCOL_EXTENSION_LENGTH,
1667 "Protocol extension for rAB-AsymmetryIndicator present, dissection not supported");
1673 tmp_byte = extract_nbits(tvb, *offset, *bitoffset, 1) +1 ; /*sequence 1..2 */
1674 proceed_nbits(offset, bitoffset, 1);
1676 for (i=1; i<= tmp_byte; i++)
1678 proto_tree_add_PERint32(rab_tree, hf_ranap_maxBitrate,
1679 tvb, *offset, *bitoffset, &length, 1);
1680 proceed_perint32(offset, bitoffset, length);
1684 /* guaranteedBitRate */
1685 if (guaranteedBitRate_present)
1687 tmp_byte = extract_nbits(tvb, *offset, *bitoffset, 1) +1 ; /*sequence 1..2 */
1688 proceed_nbits(offset, bitoffset, 1);
1690 for (i=1; i<= tmp_byte; i++)
1692 proto_tree_add_PERint32(rab_tree, hf_ranap_guaranteedBitrate,
1693 tvb, *offset, *bitoffset, &length, 0);
1694 proceed_perint32(offset, bitoffset, length);
1699 proto_tree_add_uint_bits(rab_tree, hf_ranap_deliveryOrder, tvb, *offset,
1701 proceed_nbits(offset, bitoffset, 1);
1705 allign(offset, bitoffset);
1706 proto_tree_add_item(rab_tree, hf_ranap_maxSDU_Size,
1707 tvb, *offset, maxSDU_Size_LENGTH, FALSE);
1708 *offset += maxSDU_Size_LENGTH;
1710 /* sDU-Parameters */
1711 tmp_byte = extract_nbits(tvb, *offset, *bitoffset, 3) + 1; /*sequence 1..7 */
1712 proceed_nbits(offset, bitoffset, 3);
1713 for (i=1; i<= tmp_byte; i++)
1715 if ((ret=dissect_sDU_Parameters(tvb, rab_tree, offset, bitoffset))!=0) return(ret);
1719 if (transferDelay_present)
1721 allign(offset, bitoffset);
1722 proto_tree_add_item(rab_tree, hf_ranap_transferDelay,
1723 tvb, *offset, transferDelay_LENGTH, FALSE);
1724 *offset += transferDelay_LENGTH;
1728 /* trafficHandlingPriority */
1729 if (trafficHandlingPriority_present)
1731 proto_tree_add_uint_bits(rab_tree, hf_ranap_trafficHandlingPriority, tvb, *offset,
1733 proceed_nbits(offset, bitoffset, 4);
1736 /* allocationOrRetentionPriority */
1737 if (allocationOrRetentionPriority_present)
1739 /* create subtree for */
1740 prio_item = proto_tree_add_text(rab_tree, tvb, *offset, 0,
1741 "allocationOrRetentionPriority");
1742 prio_tree = proto_item_add_subtree(prio_item, ett_ranap_allocationOrRetentionPriority);
1744 /* protocol extension present ? */
1745 tmp_extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1746 proceed_nbits(offset, bitoffset, 1);
1748 /* iE Extension present ? */
1749 tmp_iE_Extensions_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1750 proceed_nbits(offset, bitoffset, 1);
1752 /* allocationOrRetentionPriority */
1753 proto_tree_add_uint_bits(prio_tree, hf_ranap_priorityLevel, tvb, *offset,
1755 proceed_nbits(offset, bitoffset, 4);
1757 /* pre-emptionCapability */
1758 proto_tree_add_uint_bits(prio_tree, hf_ranap_pre_emptionCapability, tvb, *offset,
1760 proceed_nbits(offset, bitoffset, 1);
1762 /* pre-emptionVulnerability */
1763 proto_tree_add_uint_bits(prio_tree, hf_ranap_pre_emptionVulnerability, tvb, *offset,
1765 proceed_nbits(offset, bitoffset, 1);
1767 /* queuingAllowed */
1768 proto_tree_add_uint_bits(prio_tree, hf_ranap_queuingAllowed, tvb, *offset,
1770 proceed_nbits(offset, bitoffset, 1);
1772 if (tmp_iE_Extensions_present)
1774 if ((ret=dissect_iE_Extension(tvb, prio_tree, offset, bitoffset,
1775 "AllocationOrRetentionPriority")) != 0)
1779 if (tmp_extension_present)
1781 /* decoding is not supported */
1782 proto_tree_add_text(prio_tree, tvb, *offset, IE_PROTOCOL_EXTENSION_LENGTH,
1783 "Protocol extension for rAB-allocationOrRetentionPriority present, dissection not supported");
1788 /* sourceStatisticsDescriptor */
1789 if (sourceStatisticsDescriptor_present)
1791 /* protocol extension */
1792 tmp_extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1793 proceed_nbits(offset, bitoffset, 1);
1795 if (tmp_extension_present)
1797 /* decoding is not supported */
1798 proto_tree_add_text(prio_tree, tvb, *offset, IE_PROTOCOL_EXTENSION_LENGTH,
1799 "Protocol extension for sourceStatisticsDescriptor present, dissection not supported");
1803 proto_tree_add_uint_bits(rab_tree, hf_ranap_sourceStatisticsDescriptor, tvb, *offset,
1805 proceed_nbits(offset, bitoffset, 1);
1808 /* relocationRequirement */
1809 if (relocationRequirement_present)
1811 /* protocol extension */
1812 tmp_extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1813 proceed_nbits(offset, bitoffset, 1);
1815 if (tmp_extension_present)
1817 /* decoding is not supported */
1818 proto_tree_add_text(prio_tree, tvb, *offset, IE_PROTOCOL_EXTENSION_LENGTH,
1819 "Protocol extension for relocationRequirement present, dissection not supported");
1823 proto_tree_add_uint_bits(rab_tree, hf_ranap_relocationRequirement, tvb, *offset,
1825 proceed_nbits(offset, bitoffset, 1);
1830 if (iE_Extensions_present)
1832 if ((ret=dissect_iE_Extension(tvb, rab_tree, offset, bitoffset, "rAB_Parameters" )) != 0 )
1837 if (extension_present)
1839 /* decoding is not supported */
1840 proto_tree_add_text(rab_tree, tvb, *offset, IE_PROTOCOL_EXTENSION_LENGTH,
1841 "Protocol extension for rAB_Parameters present, dissection not supported");
1851 dissect_TransportLayerAddress(tvbuff_t *tvb, proto_tree *ie_tree, gint *offset, gint *bitoffset)
1853 gint extension_present;
1856 extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1857 proceed_nbits(offset, bitoffset, 1);
1858 if (extension_present)
1860 /* extended integer */
1861 proto_tree_add_text(ie_tree, tvb, *offset, 0,
1862 "extension present for TransportLayerAddress, dissection not supported");
1866 /* extract and add length of transportLayerAddress bitstring */
1867 str_length = extract_nbits(tvb, *offset, *bitoffset, 8) + 1;
1868 proto_tree_add_uint_bits(ie_tree, hf_ranap_transportLayerAddress_length,
1869 tvb, *offset, *bitoffset, 8, 1);
1870 proceed_nbits(offset, bitoffset, 8);
1871 allign(offset, bitoffset);
1873 /* add transportLayerAddress */
1874 proto_tree_add_bitstring(ie_tree, hf_ranap_transportLayerAddress, tvb, *offset,
1875 *bitoffset, str_length);
1876 proceed_nbits(offset, bitoffset, str_length);
1884 dissect_iuTransportAssociation(tvbuff_t *tvb, proto_tree *ie_tree, gint *offset, gint *bitoffset)
1886 guint extension_present;
1889 /* extension present ? */
1890 extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1891 if (extension_present)
1893 /* extended choice */
1894 proto_tree_add_text(ie_tree, tvb, *offset, 0,
1895 "extension present for IuTransportAssociation, dissection not supported");
1898 proceed_nbits(offset, bitoffset, 1);
1901 choice_value = extract_nbits(tvb, *offset, *bitoffset, 1);
1902 proceed_nbits(offset, bitoffset, 1);
1903 allign(offset, bitoffset);
1904 if (choice_value == 0)
1907 proto_tree_add_item(ie_tree, hf_ranap_gTP_TEI, tvb, *offset, 4, FALSE);
1913 proto_tree_add_item(ie_tree, hf_ranap_bindingID, tvb, *offset, 4, FALSE);
1922 dissect_transportLayerInformation(tvbuff_t *tvb, proto_tree *ie_tree, gint *offset, gint *bitoffset)
1924 proto_item *optionals_item = NULL;
1925 proto_tree *optionals_tree = NULL;
1926 int extension_present;
1927 int iE_Extensions_present;
1930 /* create subtree for extension/optional/default bitmap */
1931 optionals_item = proto_tree_add_text(ie_tree, tvb, *offset, IE_PROTOCOL_EXTENSION_LENGTH,
1932 "TransportLayerInformation Extension/Optional/Default bitmap");
1933 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
1936 /* protocol extension present ? */
1937 extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1938 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
1939 *offset, *bitoffset, 1, 0);
1940 proceed_nbits(offset, bitoffset, 1);
1942 /* iE-Extensions present ? */
1943 iE_Extensions_present = extract_nbits(tvb, *offset, *bitoffset, 1);
1944 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present,
1945 tvb, *offset, *bitoffset, 1, 0);
1946 proceed_nbits(offset, bitoffset, 1);
1949 /* transportLayerAddress */
1950 if ((ret=dissect_TransportLayerAddress(tvb, ie_tree, offset, bitoffset)) != 0)
1953 /* iuTransportAssociation */
1954 if ((ret=dissect_iuTransportAssociation(tvb, ie_tree, offset, bitoffset)) != 0)
1958 if (iE_Extensions_present)
1960 if ((ret=dissect_iE_Extension(tvb, ie_tree, offset, bitoffset, "TransportLayerInformation" )) != 0 )
1964 /* protocol extension */
1965 if (extension_present)
1967 /* extended sequence */
1968 proto_tree_add_text(ie_tree, tvb, *offset, 0,
1969 "extension present for TransportLayerInformation, dissection not supported");
1978 dissect_dataVolumeList (tvbuff_t *tvb, proto_tree *ie_tree, gint *offset, gint *bitoffset, char *parname)
1980 proto_item *optionals_item = NULL;
1981 proto_tree *optionals_tree = NULL;
1982 gint extension_present;
1983 gint dataVolumeReference_present;
1984 gint iE_Extensions_present;
1990 /* number of volumes */
1991 number_vol = extract_nbits(tvb, *offset, *bitoffset, 1) + 1;
1992 proceed_nbits(offset, bitoffset, 1);
1994 for (i=1; i<=number_vol; i++)
1996 /* create subtree for extension/optional/default bitmap */
1997 optionals_item = proto_tree_add_text(ie_tree, tvb, *offset, 1,
1998 "%d. %s Extension/Optional/Default bitmap",
2000 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
2002 /* protocol_extension present ? */
2003 extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
2004 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
2005 *offset, *bitoffset, 1, 0);
2006 proceed_nbits(offset, bitoffset, 1);
2008 /* dataVolumeReference present ? */
2009 dataVolumeReference_present = extract_nbits(tvb, *offset, *bitoffset, 1);
2010 proto_tree_add_uint_bits(optionals_tree, hf_ranap_dataVolumeReference_present, tvb,
2011 *offset, *bitoffset, 1, 0);
2012 proceed_nbits(offset, bitoffset, 1);
2014 /* iE_Extensions present ? */
2015 iE_Extensions_present = extract_nbits(tvb, *offset, *bitoffset, 1);
2016 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present, tvb,
2017 *offset, *bitoffset, 1, 0);
2018 proceed_nbits(offset, bitoffset, 1);
2021 /* UnsuccessfullyTransmittedDataVolume */
2022 proto_tree_add_PERint32(ie_tree, hf_ranap_dl_UnsuccessfullyTransmittedDataVolume,
2023 tvb, *offset, *bitoffset, &length, 0);
2024 proceed_perint32(offset, bitoffset, length);
2026 /* DataVolumeReference */
2027 if (dataVolumeReference_present)
2029 proto_tree_add_uint_bits(ie_tree, hf_ranap_dataVolumeReference, tvb,
2030 *offset, *bitoffset, 8, 0);
2031 proceed_nbits(offset, bitoffset, 8);
2035 if (iE_Extensions_present)
2037 if ((ret=dissect_iE_Extension(tvb, ie_tree, offset, bitoffset, "dl-dataVolumes" )) != 0)
2041 /* protocol extended */
2042 if (extension_present)
2044 /* extended sequence */
2045 /* decoding is not supported */
2046 proto_tree_add_text(ie_tree, tvb, *offset, IE_PROTOCOL_EXTENSION_LENGTH,
2047 "Protocol extension for dl-dataVolumes present, dissection not supported");
2057 dissect_cause(tvbuff_t *tvb, proto_tree *ie_tree, gint *offset, gint *bitoffset)
2059 gint extension_present;
2062 /* protocol extension present ? */
2063 extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
2064 proceed_nbits(offset, bitoffset, 1);
2065 if (extension_present)
2067 /* choice extension present */
2068 proto_tree_add_text(ie_tree, tvb, *offset, 0,
2069 "extension present for cause, dissection not supported");
2072 cause_choice = extract_nbits(tvb, *offset, *bitoffset, 3);
2073 proto_tree_add_uint_bits(ie_tree, hf_ranap_cause_choice,
2074 tvb, *offset, *bitoffset, 3, 0);
2075 proceed_nbits(offset, bitoffset, 3);
2077 switch (cause_choice)
2079 case CC_CauseRadioNetwork:
2080 proto_tree_add_uint_bits(ie_tree, hf_ranap_cause_value,
2081 tvb, *offset, *bitoffset, 6, 1);
2082 proceed_nbits(offset, bitoffset, 6);
2084 case CC_CauseTransmissionNetwork:
2085 proto_tree_add_uint_bits(ie_tree, hf_ranap_cause_value,
2086 tvb, *offset, *bitoffset, 4, 65);
2087 proceed_nbits(offset, bitoffset, 4);
2090 proto_tree_add_uint_bits(ie_tree, hf_ranap_cause_value,
2091 tvb, *offset, *bitoffset, 4, 81);
2092 proceed_nbits(offset, bitoffset, 4);
2094 case CC_CauseProtocol:
2095 proto_tree_add_uint_bits(ie_tree, hf_ranap_cause_value,
2096 tvb, *offset, *bitoffset, 4, 97);
2097 proceed_nbits(offset, bitoffset, 4);
2099 proto_tree_add_uint_bits(ie_tree, hf_ranap_cause_value,
2100 tvb, *offset, *bitoffset, 4, 113);
2101 proceed_nbits(offset, bitoffset, 4);
2103 case CC_CauseNon_Standard:
2104 proto_tree_add_uint_bits(ie_tree, hf_ranap_cause_value,
2105 tvb, *offset, *bitoffset, 7, 129);
2106 proceed_nbits(offset, bitoffset, 7);
2109 proto_tree_add_text(ie_tree, tvb, *offset, 0,
2110 "unexpected cause choice value, dissection not supported");
2118 dissect_iEsCriticalityDiagnostics(tvbuff_t *tvb, proto_tree *ie_tree, gint *offset, gint *bitoffset)
2120 proto_item *diag_item = NULL;
2121 proto_tree *diag_tree = NULL;
2122 proto_item *optionals_item = NULL;
2123 proto_tree *optionals_tree = NULL;
2124 int extension_present;
2125 int repetitionNumber_present;
2126 int iE_Extensions_present;
2130 allign(offset, bitoffset);
2131 num_of_errors = extract_nbits(tvb, *offset, *bitoffset, 8) + 1;
2132 proto_tree_add_uint_bits(ie_tree, hf_ranap_num_of_CriticalityDiagnostics_IEs, tvb,
2133 *offset, *bitoffset, 8, 1);
2134 proceed_nbits(offset, bitoffset, 8);
2136 for ( i= 1; i <= num_of_errors; i++)
2138 /* add subtree for CriticalityDiagnostics-IE */
2139 diag_item = proto_tree_add_text(ie_tree, tvb, *offset, 0,
2140 "%d. CriticalityDiagnostics-IE", i);
2141 diag_tree = proto_item_add_subtree(diag_item, ett_ranap_CriticalityDiagnostics_IE);
2143 /* create subtree for extension/optional/default bitmap */
2144 optionals_item = proto_tree_add_text(diag_tree, tvb, *offset, 1,
2145 "CriticalityDiagnostics-IE Extension/Optional/Default bitmap");
2146 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
2148 /* protocol_extension present ? */
2149 extension_present = extract_nbits(tvb, *offset, *bitoffset, 1);
2150 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
2151 *offset, *bitoffset, 1, 0);
2152 proceed_nbits(offset, bitoffset, 1);
2154 /* repetitionNumber present ? */
2155 repetitionNumber_present = extract_nbits(tvb, *offset, *bitoffset, 1);
2156 proto_tree_add_uint_bits(optionals_tree, hf_ranap_repetitionNumber_present, tvb,
2157 *offset, *bitoffset, 1, 0);
2158 proceed_nbits(offset, bitoffset, 1);
2160 /* iE_Extensions present ? */
2161 iE_Extensions_present = extract_nbits(tvb, *offset, *bitoffset, 1);
2162 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present,
2163 tvb, *offset, *bitoffset, 1, 0);
2164 proceed_nbits(offset, bitoffset, 1);
2167 proto_tree_add_uint_bits(diag_tree, hf_ranap_iECriticality,
2168 tvb, *offset, *bitoffset, 2, 0);
2169 proceed_nbits(offset, bitoffset, 2);
2172 allign(offset, bitoffset);
2173 proto_tree_add_item(diag_tree, hf_ranap_ie_ie_id, tvb,
2174 *offset, IE_ID_LENGTH, FALSE);
2175 *offset += IE_ID_LENGTH;
2177 /* repetitionNumber */
2178 if (repetitionNumber_present)
2180 allign(offset, bitoffset);
2181 proto_tree_add_uint_bits(diag_tree, hf_ranap_repetitionNumber,
2182 tvb, *offset, *bitoffset, 8, 1);
2183 proceed_nbits(offset, bitoffset, 8);
2187 if (iE_Extensions_present)
2189 return(dissect_iE_Extension(tvb, diag_tree, offset, bitoffset, "CriticalityDiagnostics-IE"));
2193 /* protocol extended */
2194 if (extension_present)
2196 /* extended sequence */
2197 /* decoding is not supported */
2198 proto_tree_add_text(diag_tree, tvb, *offset, IE_PROTOCOL_EXTENSION_LENGTH,
2199 "Protocol extension for CriticalityDiagnostics-IE present, dissection not supported");
2209 /*****************************************************************************/
2211 /* Dissecting Functions for IEs */
2213 /*****************************************************************************/
2216 dissect_IE_RAB_ID(tvbuff_t *tvb, proto_tree *ie_tree)
2220 proto_tree_add_item(ie_tree, hf_ranap_rab_id, tvb,
2221 0, RAB_ID_LENGTH, FALSE);
2228 dissect_IE_RAC(tvbuff_t *tvb, proto_tree *ie_tree)
2232 proto_tree_add_item(ie_tree, hf_ranap_rac, tvb,
2233 0, RAC_LENGTH, FALSE);
2240 dissect_IE_LAI(tvbuff_t *tvb, proto_tree *ie_tree)
2242 proto_item *optionals_item = NULL;
2243 proto_tree *optionals_tree = NULL;
2244 int iE_Extensions_present;
2251 /* create subtree for extension/optional/default bitmap */
2252 optionals_item = proto_tree_add_text(ie_tree, tvb, offset, 1,
2253 "LAI Extension/Optional/Default bitmap");
2254 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
2256 /* iE_Extensions_present present ? */
2257 iE_Extensions_present = extract_nbits(tvb, offset, bitoffset, 1);
2258 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present, tvb,
2259 offset, bitoffset, 1, 0);
2260 proceed_nbits(&offset, &bitoffset, 1);
2263 allign(&offset, &bitoffset);
2264 proto_tree_add_item(ie_tree, hf_ranap_plmn_id, tvb,
2265 offset, PLMN_ID_LENGTH, FALSE);
2266 offset += PLMN_ID_LENGTH;
2269 proto_tree_add_item(ie_tree, hf_ranap_lac, tvb,
2270 offset, LAC_LENGTH, FALSE);
2271 offset += LAC_LENGTH;
2274 if (iE_Extensions_present)
2276 if ((ret=dissect_iE_Extension(tvb, ie_tree, &offset, &bitoffset, "LAI")) != 0)
2285 dissect_IE_SAI(tvbuff_t *tvb, proto_tree *ie_tree)
2287 proto_item *optionals_item = NULL;
2288 proto_tree *optionals_tree = NULL;
2289 int iE_Extensions_present;
2296 /* create subtree for extension/optional/default bitmap */
2297 optionals_item = proto_tree_add_text(ie_tree, tvb, offset, 1,
2298 "SAI Extension/Optional/Default bitmap");
2299 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
2301 /* iE_Extensions_present present ? */
2302 iE_Extensions_present = extract_nbits(tvb, offset, bitoffset, 1);
2303 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present, tvb,
2304 offset, bitoffset, 1, 0);
2305 proceed_nbits(&offset, &bitoffset, 1);
2308 proto_tree_add_item(ie_tree, hf_ranap_plmn_id, tvb,
2309 offset, PLMN_ID_LENGTH, FALSE);
2310 offset += PLMN_ID_LENGTH;
2313 proto_tree_add_item(ie_tree, hf_ranap_lac, tvb,
2314 offset, LAC_LENGTH, FALSE);
2315 offset += LAC_LENGTH;
2318 proto_tree_add_item(ie_tree, hf_ranap_sac, tvb,
2319 offset, SAC_LENGTH, FALSE);
2320 offset += SAC_LENGTH;
2323 if (iE_Extensions_present)
2325 if ((ret=dissect_iE_Extension(tvb, ie_tree, &offset, &bitoffset, "LAI")) != 0)
2334 dissect_IE_NAS_PDU(tvbuff_t *tvb, proto_tree *ie_tree)
2339 if (extract_length(tvb, 0, &length, &length_size) != 0)
2343 /* decoding is not supported */
2344 proto_tree_add_text(ie_tree, tvb, 0,
2345 2, "Number of Octets greater than 0x3FFF, dissection not supported");
2352 /* NAS - PDU length */
2353 proto_tree_add_item(ie_tree, hf_ranap_nas_pdu_length, tvb,
2354 0, length_size, FALSE);
2357 /* call NAS dissector (not implemented yet) */
2360 /* meanwhile display in hex */
2364 proto_tree_add_item(ie_tree, hf_ranap_nas_pdu, tvb,
2365 length_size, length, FALSE);
2372 dissect_IE_CN_DomainIndicator(tvbuff_t *tvb, proto_tree *ie_tree)
2379 proto_tree_add_uint_bits(ie_tree, hf_ranap_CN_DomainIndicator, tvb,
2380 offset, bitoffset, 1, 0);
2387 dissect_IE_IuSigConId(tvbuff_t *tvb, proto_tree *ie_tree)
2391 proto_tree_add_bitstring(ie_tree, hf_ranap_IuSigConId, tvb, 0, 0, 24);
2398 dissect_IE_SAPI(tvbuff_t *tvb, proto_tree *ie_tree)
2402 int extension_present;
2406 /* protocol_extension present ? */
2407 extension_present = extract_nbits(tvb, offset, bitoffset, 1);
2408 proceed_nbits(&offset, &bitoffset, 1);
2410 if (extension_present)
2413 /* decoding is not supported */
2414 proto_tree_add_text(ie_tree, tvb, offset, IE_PROTOCOL_EXTENSION_LENGTH,
2415 "Protocol extension for IE_SAPI present, dissection not supported");
2420 proto_tree_add_uint_bits(ie_tree, hf_ranap_SAPI, tvb,
2421 offset, bitoffset, 1, 0);
2428 dissect_IE_TransportLayerAddress(tvbuff_t *tvb, proto_tree *ie_tree)
2435 return(dissect_TransportLayerAddress(tvb, ie_tree, &offset, &bitoffset));
2442 dissect_IE_IuTransportAssociation(tvbuff_t *tvb, proto_tree *ie_tree)
2449 return(dissect_iuTransportAssociation(tvb, ie_tree, &offset, &bitoffset));
2456 dissect_IE_Cause(tvbuff_t *tvb, proto_tree *ie_tree)
2463 return(dissect_cause(tvb, ie_tree, &offset, &bitoffset));
2470 dissect_IE_RAB_ReleasedItem_IuRelComp(tvbuff_t *tvb, proto_tree *ie_tree)
2472 proto_item *optionals_item = NULL;
2473 proto_tree *optionals_tree = NULL;
2474 int extension_present;
2475 int dl_GTP_PDU_SequenceNumber_present;
2476 int ul_GTP_PDU_SequenceNumber_present;
2477 int iE_Extensions_present;
2484 /* create subtree for extension/optional/default bitmap */
2485 optionals_item = proto_tree_add_text(ie_tree, tvb, offset, 1,
2486 "RAB_ReleasedItem_IuRelComp Extension/Optional/Default bitmap");
2487 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
2489 /* protocol_extension present ? */
2490 extension_present = extract_nbits(tvb, offset, bitoffset, 1);
2491 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
2492 offset, bitoffset, 1, 0);
2493 proceed_nbits(&offset, &bitoffset, 1);
2495 /* dl_GTP_PDU_SequenceNumber present ? */
2496 dl_GTP_PDU_SequenceNumber_present = extract_nbits(tvb, offset, bitoffset, 1);
2497 proto_tree_add_uint_bits(optionals_tree, hf_ranap_dl_GTP_PDU_SequenceNumber_present, tvb,
2498 offset, bitoffset, 1, 0);
2499 proceed_nbits(&offset, &bitoffset, 1);
2501 /* ul_GTP_PDU_SequenceNumber present ? */
2502 ul_GTP_PDU_SequenceNumber_present = extract_nbits(tvb, offset, bitoffset, 1);
2503 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ul_GTP_PDU_SequenceNumber_present, tvb,
2504 offset, bitoffset, 1, 0);
2505 proceed_nbits(&offset, &bitoffset, 1);
2507 /* iE_Extensions_present present ? */
2508 iE_Extensions_present = extract_nbits(tvb, offset, bitoffset, 1);
2509 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present, tvb,
2510 offset, bitoffset, 1, 0);
2511 proceed_nbits(&offset, &bitoffset, 1);
2515 proto_tree_add_uint_bits(ie_tree, hf_ranap_rab_id,
2516 tvb, offset, bitoffset, 8, 0);
2517 proceed_nbits(&offset, &bitoffset, 8);
2519 /* dl-GTP-PDU-SequenceNumber */
2520 if (dl_GTP_PDU_SequenceNumber_present)
2522 allign(&offset, &bitoffset);
2523 proto_tree_add_item(ie_tree, hf_ranap_dl_GTP_PDU_SequenceNumber, tvb, offset, 2, FALSE);
2527 /* ul-GTP-PDU-SequenceNumber */
2528 if (ul_GTP_PDU_SequenceNumber_present)
2530 allign(&offset, &bitoffset);
2531 proto_tree_add_item(ie_tree, hf_ranap_ul_GTP_PDU_SequenceNumber, tvb, offset, 2, FALSE);
2536 if (iE_Extensions_present)
2538 if ((ret=dissect_iE_Extension(tvb, ie_tree, &offset, &bitoffset, "RAB_ReleasedItem_IuRelComp")) != 0)
2542 /* protocol extended */
2543 if (extension_present)
2545 /* extended sequence */
2546 /* decoding is not supported */
2547 proto_tree_add_text(ie_tree, tvb, offset, IE_PROTOCOL_EXTENSION_LENGTH,
2548 "Protocol extension for RAB_ReleasedItem_IuRelComp present, dissection not supported");
2557 dissect_IE_RAB_DataVolumeReportItem(tvbuff_t *tvb, proto_tree *ie_tree)
2559 proto_item *optionals_item = NULL;
2560 proto_tree *optionals_tree = NULL;
2561 int extension_present;
2562 int dl_UnsuccessfullyTransmittedDataVolume_present;
2563 int iE_Extensions_present;
2570 /* create subtree for extension/optional/default bitmap */
2571 optionals_item = proto_tree_add_text(ie_tree, tvb, offset, 1,
2572 "RAB_DataVolumeReportItem Extension/Optional/Default bitmap");
2573 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
2575 /* protocol_extension present ? */
2576 extension_present = extract_nbits(tvb, offset, bitoffset, 1);
2577 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
2578 offset, bitoffset, 1, 0);
2579 proceed_nbits(&offset, &bitoffset, 1);
2581 /* dl_UnsuccessfullyTransmittedDataVolume present ? */
2582 dl_UnsuccessfullyTransmittedDataVolume_present = extract_nbits(tvb, offset, bitoffset, 1);
2583 proto_tree_add_uint_bits(optionals_tree, hf_ranap_dl_UnsuccessfullyTransmittedDataVolume_present, tvb,
2584 offset, bitoffset, 1, 0);
2585 proceed_nbits(&offset, &bitoffset, 1);
2587 /* iE_Extensions_present present ? */
2588 iE_Extensions_present = extract_nbits(tvb, offset, bitoffset, 1);
2589 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present, tvb,
2590 offset, bitoffset, 1, 0);
2591 proceed_nbits(&offset, &bitoffset, 1);
2595 proto_tree_add_uint_bits(ie_tree, hf_ranap_rab_id,
2596 tvb, offset, bitoffset, 8, 0);
2597 proceed_nbits(&offset, &bitoffset, 8);
2599 /* dl_UnsuccessfullyTransmittedDataVolume */
2600 if (dl_UnsuccessfullyTransmittedDataVolume_present)
2603 if ((ret = dissect_dataVolumeList(tvb, ie_tree, &offset, &bitoffset,
2604 "dl_UnsuccessfullyTransmittedDataVolume")) != 0)
2609 if (iE_Extensions_present)
2611 if ((ret=dissect_iE_Extension(tvb, ie_tree, &offset, &bitoffset, "IE_RAB_DataVolumeReportItem")) != 0)
2615 /* protocol extended */
2616 if (extension_present)
2619 /* decoding is not supported */
2620 proto_tree_add_text(ie_tree, tvb, offset, IE_PROTOCOL_EXTENSION_LENGTH,
2621 "Protocol extension for IE_RAB_DataVolumeReportItem present, dissection not supported");
2630 dissect_IE_RAB_SetupOrModifyItemSecond(tvbuff_t *tvb, proto_tree *ie_tree)
2632 proto_item *optionals_item = NULL;
2633 proto_tree *optionals_tree = NULL;
2634 int extension_present;
2636 int pDP_TypeInformation_present;
2637 int dataVolumeReportingIndication_present;
2638 int dl_GTP_PDU_SequenceNumber_present;
2639 int ul_GTP_PDU_SequenceNumber_present;
2640 int dl_N_PDU_SequenceNumber_present;
2641 int ul_N_PDU_SequenceNumber_present;
2642 int iE_Extensions_present;
2651 /* create subtree for extension/optional/default bitmap */
2652 optionals_item = proto_tree_add_text(ie_tree, tvb, offset, 1,
2653 "SetupOrModifyItemSecond Extension/Optional/Default bitmap");
2654 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
2656 /* protocol_extension present ? */
2657 extension_present = extract_nbits(tvb, offset, bitoffset, 1);
2658 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
2659 offset, bitoffset, 1, 0);
2660 proceed_nbits(&offset, &bitoffset, 1);
2662 /* pDP_TypeInformation present ? */
2663 pDP_TypeInformation_present = extract_nbits(tvb, offset, bitoffset, 1);
2664 proto_tree_add_uint_bits(optionals_tree, hf_ranap_pDP_TypeInformation_present, tvb,
2665 offset, bitoffset, 1, 0);
2666 proceed_nbits(&offset, &bitoffset, 1);
2668 /* dataVolumeReportingIndication present ? */
2669 dataVolumeReportingIndication_present = extract_nbits(tvb, offset, bitoffset, 1);
2670 proto_tree_add_uint_bits(optionals_tree, hf_ranap_dataVolumeReportingIndication_present, tvb,
2671 offset, bitoffset, 1, 0);
2672 proceed_nbits(&offset, &bitoffset, 1);
2674 /* dl_GTP_PDU_SequenceNumber present present ? */
2675 dl_GTP_PDU_SequenceNumber_present = extract_nbits(tvb, offset, bitoffset, 1);
2676 proto_tree_add_uint_bits(optionals_tree, hf_ranap_dl_GTP_PDU_SequenceNumber_present, tvb,
2677 offset, bitoffset, 1, 0);
2678 proceed_nbits(&offset, &bitoffset, 1);
2681 /* ul_GTP_PDU_SequenceNumber present ? */
2682 ul_GTP_PDU_SequenceNumber_present = extract_nbits(tvb, offset, bitoffset, 1);
2683 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ul_GTP_PDU_SequenceNumber_present, tvb,
2684 offset, bitoffset, 1, 0);
2685 proceed_nbits(&offset, &bitoffset, 1);
2687 /* dl_N_PDU_SequenceNumber present ? */
2688 dl_N_PDU_SequenceNumber_present = extract_nbits(tvb, offset, bitoffset, 1);
2689 proto_tree_add_uint_bits(optionals_tree, hf_ranap_dl_N_PDU_SequenceNumber_present, tvb,
2690 offset, bitoffset, 1, 0);
2691 proceed_nbits(&offset, &bitoffset, 1);
2693 /* ul_N_PDU_SequenceNumber present ? */
2694 ul_N_PDU_SequenceNumber_present = extract_nbits(tvb, offset, bitoffset, 1);
2695 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ul_N_PDU_SequenceNumber_present, tvb,
2696 offset, bitoffset, 1, 0);
2697 proceed_nbits(&offset, &bitoffset, 1);
2699 /* iE_Extensions present ? */
2700 iE_Extensions_present = extract_nbits(tvb, offset, bitoffset, 1);
2701 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present, tvb,
2702 offset, bitoffset, 1, 0);
2703 proceed_nbits(&offset, &bitoffset, 1);
2705 /* pDP-TypeInformation */
2706 if (pDP_TypeInformation_present)
2708 tmp_byte = extract_nbits(tvb, offset, bitoffset, 1) + 1; /* Sequence 1..2 */
2709 proceed_nbits(&offset, &bitoffset, 1);
2710 for (i=1; i<=tmp_byte; i++)
2712 tmp_extension = extract_nbits(tvb, offset, bitoffset, 1);
2713 proceed_nbits(&offset, &bitoffset, 1);
2714 if (tmp_extension != 0)
2717 /* decoding is not supported */
2718 proto_tree_add_text(ie_tree, tvb, offset, IE_PROTOCOL_EXTENSION_LENGTH,
2719 "Protocol extension for PDP-Type present, dissection not supported");
2723 proto_tree_add_uint_bits(ie_tree, hf_ranap_PDP_Type, tvb,
2724 offset, bitoffset, 3, 0);
2725 proceed_nbits(&offset, &bitoffset, 3);
2729 /* dataVolumeReportingIndication */
2730 if (dataVolumeReportingIndication_present)
2732 proto_tree_add_uint_bits(ie_tree, hf_ranap_dataVolumeReportingIndication, tvb,
2733 offset, bitoffset, 1, 0);
2734 proceed_nbits(&offset, &bitoffset, 1);
2737 /* dl-GTP-PDU-SequenceNumber */
2738 if (dl_GTP_PDU_SequenceNumber_present)
2740 allign(&offset, &bitoffset);
2741 proto_tree_add_item(ie_tree, hf_ranap_dl_GTP_PDU_SequenceNumber, tvb, offset, 2, FALSE);
2745 /* ul-GTP-PDU-SequenceNumber */
2746 if (ul_GTP_PDU_SequenceNumber_present)
2748 allign(&offset, &bitoffset);
2749 proto_tree_add_item(ie_tree, hf_ranap_ul_GTP_PDU_SequenceNumber, tvb, offset, 2, FALSE);
2753 /* dl-N-PDU-SequenceNumber */
2754 if (dl_N_PDU_SequenceNumber_present)
2756 allign(&offset, &bitoffset);
2757 proto_tree_add_item(ie_tree, hf_ranap_dl_N_PDU_SequenceNumber, tvb, offset, 2, FALSE);
2761 /* ul-N-PDU-SequenceNumber */
2762 if (ul_N_PDU_SequenceNumber_present)
2764 allign(&offset, &bitoffset);
2765 proto_tree_add_item(ie_tree, hf_ranap_ul_N_PDU_SequenceNumber, tvb, offset, 2, FALSE);
2770 if (iE_Extensions_present)
2772 if ((ret=dissect_iE_Extension(tvb, ie_tree, &offset, &bitoffset, "SetupOrModifyItemSecond")) != 0)
2776 /* protocol extended */
2777 if (extension_present)
2780 /* decoding is not supported */
2781 proto_tree_add_text(ie_tree, tvb, offset, IE_PROTOCOL_EXTENSION_LENGTH,
2782 "Protocol extension for SetupOrModifyItemSecond present, dissection not supported");
2791 dissect_IE_RAB_SetupOrModifiedItem (tvbuff_t *tvb, proto_tree *ie_tree)
2793 proto_item *optionals_item = NULL;
2794 proto_tree *optionals_tree = NULL;
2796 int extension_present;
2797 int transportLayerAddress_present;
2798 int iuTransportAssociation_present;
2799 int dl_dataVolumes_present;
2800 int iE_Extensions_present;
2807 /* create subtree for extension/optional/default bitmap */
2808 optionals_item = proto_tree_add_text(ie_tree, tvb, offset, 1,
2809 "RAB-SetupOrModifiedItem Extension/Optional/Default bitmap");
2810 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
2812 /* protocol_extension present ? */
2813 extension_present = extract_nbits(tvb, offset, bitoffset, 1);
2814 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
2815 offset, bitoffset, 1, 0);
2816 proceed_nbits(&offset, &bitoffset, 1);
2818 /* transportLayerAddress present ? */
2819 transportLayerAddress_present = extract_nbits(tvb, offset, bitoffset, 1);
2820 proto_tree_add_uint_bits(optionals_tree, hf_ranap_transportLayerAddress_present, tvb,
2821 offset, bitoffset, 1, 0);
2822 proceed_nbits(&offset, &bitoffset, 1);
2824 /* iuTransportAssociation present ? */
2825 iuTransportAssociation_present = extract_nbits(tvb, offset, bitoffset, 1);
2826 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iuTransportAssociation_present, tvb,
2827 offset, bitoffset, 1, 0);
2828 proceed_nbits(&offset, &bitoffset, 1);
2830 /* dl_dataVolumes present ? */
2831 dl_dataVolumes_present = extract_nbits(tvb, offset, bitoffset, 1);
2832 proto_tree_add_uint_bits(optionals_tree, hf_ranap_dl_dataVolumes_present, tvb,
2833 offset, bitoffset, 1, 0);
2834 proceed_nbits(&offset, &bitoffset, 1);
2836 /* iE_Extensions present ? */
2837 iE_Extensions_present = extract_nbits(tvb, offset, bitoffset, 1);
2838 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present, tvb,
2839 offset, bitoffset, 1, 0);
2840 proceed_nbits(&offset, &bitoffset, 1);
2844 proto_tree_add_uint_bits(ie_tree, hf_ranap_rab_id,
2845 tvb, offset, bitoffset, 8, 0);
2846 proceed_nbits(&offset, &bitoffset, 8);
2848 /* transportLayerAddress */
2849 if (transportLayerAddress_present)
2851 if ((ret=dissect_TransportLayerAddress(tvb, ie_tree, &offset, &bitoffset)) != 0)
2855 /* iuTransportAssociation */
2856 if (iuTransportAssociation_present)
2858 if ((ret=dissect_iuTransportAssociation(tvb, ie_tree, &offset, &bitoffset)) != 0)
2862 /* dl-dataVolumes */
2863 if (dl_dataVolumes_present)
2865 if ((ret = dissect_dataVolumeList(tvb, ie_tree, &offset, &bitoffset,
2866 "dl-dataVolumes")) != 0)
2871 if (iE_Extensions_present)
2873 if ((ret=dissect_iE_Extension(tvb, ie_tree, &offset, &bitoffset, "RAB_SetupOrModifiedItem")) != 0)
2877 /* protocol extended */
2878 if (extension_present)
2880 /* extended sequence */
2881 /* decoding is not supported */
2882 proto_tree_add_text(ie_tree, tvb, offset, IE_PROTOCOL_EXTENSION_LENGTH,
2883 "Protocol extension for RAB_SetupOrModifiedItem present, dissection not supported");
2893 dissect_IE_RAB_SetupOrModifyItemFirst (tvbuff_t *tvb, proto_tree *ie_tree)
2897 proto_item *optionals_item = NULL;
2898 proto_tree *optionals_tree = NULL;
2899 int extension_present;
2900 int nAS_SynchronisationIndicator_present;
2901 int rAB_Parameters_present;
2902 int userPlaneInformation_present;
2903 int transportLayerInformation_present;
2904 int service_Handover_present;
2905 int iE_Extensions_present;
2906 int tmp_extension_present;
2911 offset = 0; bitoffset = 0;
2913 /* create subtree for extension/optional/default bitmap */
2914 optionals_item = proto_tree_add_text(ie_tree, tvb, offset,IE_PROTOCOL_EXTENSION_LENGTH,
2915 "RAB_SetupOrModifyItemFirst Extension/Optional/Default bitmap");
2916 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
2918 /* protocol extension present ? */
2919 extension_present = extract_nbits(tvb, offset, bitoffset, 1);
2920 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension,
2921 tvb, offset, bitoffset, 1, 0);
2922 proceed_nbits(&offset, &bitoffset, 1);
2924 /* nAS_SynchronisationIndicator present ? */
2925 nAS_SynchronisationIndicator_present = extract_nbits(tvb, offset, bitoffset, 1);
2926 proto_tree_add_uint_bits(optionals_tree, hf_ranap_nAS_SynchronisationIndicator_present,
2927 tvb, offset, bitoffset, 1, 0);
2928 proceed_nbits(&offset, &bitoffset, 1);
2930 /* rAB_Parameters present ? */
2931 rAB_Parameters_present = extract_nbits(tvb, offset, bitoffset, 1);
2932 proto_tree_add_uint_bits(optionals_tree, hf_ranap_rAB_Parameters_present,
2933 tvb, offset, bitoffset, 1, 0);
2934 proceed_nbits(&offset, &bitoffset, 1);
2936 /* userPlaneInformation present ? */
2937 userPlaneInformation_present = extract_nbits(tvb, offset, bitoffset, 1);
2938 proto_tree_add_uint_bits(optionals_tree, hf_ranap_userPlaneInformation_present,
2939 tvb, offset, bitoffset, 1, 0);
2940 proceed_nbits(&offset, &bitoffset, 1);
2942 /* transportLayerInformation present ? */
2943 transportLayerInformation_present = extract_nbits(tvb, offset, bitoffset, 1);
2944 proto_tree_add_uint_bits(optionals_tree, hf_ranap_transportLayerInformation_present,
2945 tvb, offset, bitoffset, 1, 0);
2946 proceed_nbits(&offset, &bitoffset, 1);
2948 /* service_Handover present ? */
2949 service_Handover_present = extract_nbits(tvb, offset, bitoffset, 1);
2950 proto_tree_add_uint_bits(optionals_tree, hf_ranap_service_Handover_present,
2951 tvb, offset, bitoffset, 1, 0);
2952 proceed_nbits(&offset, &bitoffset, 1);
2954 /* iE_Extensions present ? */
2955 iE_Extensions_present = extract_nbits(tvb, offset, bitoffset, 1);
2956 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present,
2957 tvb, offset, bitoffset, 1, 0);
2958 proceed_nbits(&offset, &bitoffset, 1);
2962 proto_tree_add_uint_bits(ie_tree, hf_ranap_rab_id,
2963 tvb, offset, bitoffset, 8, 0);
2964 proceed_nbits(&offset, &bitoffset, 8);
2966 /* nAS-SynchronisationIndicator */
2967 if (nAS_SynchronisationIndicator_present)
2969 proto_tree_add_uint_bits(ie_tree, hf_ranap_nAS_SynchronisationIndicator,
2970 tvb, offset, bitoffset, 4, 0);
2971 proceed_nbits(&offset, &bitoffset, 4);
2974 /* rAB-Parameters */
2975 if (rAB_Parameters_present)
2977 if ((ret=dissect_rAB_Parameters(tvb, ie_tree, &offset, &bitoffset)) != 0)
2981 /* userPlaneInformation */
2982 if (userPlaneInformation_present)
2984 if ((ret=dissect_userPlaneInformation(tvb, ie_tree, &offset, &bitoffset)) != 0)
2988 /* transportLayerInformation */
2989 if (transportLayerInformation_present)
2991 if ((ret=dissect_transportLayerInformation(tvb, ie_tree, &offset, &bitoffset)) != 0)
2995 /* service_Handover */
2996 if (service_Handover_present)
2998 tmp_extension_present = extract_nbits(tvb, offset, bitoffset, 1);
2999 proceed_nbits(&offset, &bitoffset, 1);
3001 if (tmp_extension_present)
3004 /* decoding is not supported */
3005 proto_tree_add_text(ie_tree, tvb, offset, IE_PROTOCOL_EXTENSION_LENGTH,
3006 "Protocol extension for service_Handover present, dissection not supported");
3010 proto_tree_add_uint_bits(ie_tree, hf_ranap_service_Handover,
3011 tvb, offset, bitoffset, 2, 0);
3012 proceed_nbits(&offset, &bitoffset, 2);
3016 if (iE_Extensions_present)
3018 if ((ret=dissect_iE_Extension(tvb, ie_tree, &offset, &bitoffset, "SetupOrModifyItemFirst" )) != 0)
3028 dissect_IE_RAB_ReleaseItem(tvbuff_t *tvb, proto_tree *ie_tree)
3030 proto_item *optionals_item = NULL;
3031 proto_tree *optionals_tree = NULL;
3034 int extension_present;
3035 int iE_Extensions_present;
3039 /* create subtree for extension/optional/default bitmap */
3040 optionals_item = proto_tree_add_text(ie_tree, tvb, offset,IE_PROTOCOL_EXTENSION_LENGTH,
3041 "RAB_ReleaseItem Extension/Optional/Default bitmap");
3042 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
3044 /* protocol extension present ? */
3045 extension_present = extract_nbits(tvb, offset, bitoffset, 1);
3046 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension,
3047 tvb, offset, bitoffset, 1, 0);
3048 proceed_nbits(&offset, &bitoffset, 1);
3051 /* iE_Extensions present ? */
3052 iE_Extensions_present = extract_nbits(tvb, offset, bitoffset, 1);
3053 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present,
3054 tvb, offset, bitoffset, 1, 0);
3055 proceed_nbits(&offset, &bitoffset, 1);
3059 proto_tree_add_uint_bits(ie_tree, hf_ranap_rab_id,
3060 tvb, offset, bitoffset, 8, 0);
3061 proceed_nbits(&offset, &bitoffset, 8);
3065 if ((ret=dissect_cause(tvb, ie_tree, &offset, &bitoffset)) != 0)
3069 if (iE_Extensions_present)
3071 if ((ret=dissect_iE_Extension(tvb, ie_tree, &offset, &bitoffset, "RAB_ReleasedItem")) != 0)
3075 /* protocol extended */
3076 if (extension_present)
3078 /* extended sequence */
3079 /* decoding is not supported */
3080 proto_tree_add_text(ie_tree, tvb, offset, IE_PROTOCOL_EXTENSION_LENGTH,
3081 "Protocol extension for RAB_ReleasedItem present, dissection not supported");
3090 dissect_IE_RAB_ReleasedItem (tvbuff_t *tvb, proto_tree *ie_tree)
3092 proto_item *optionals_item = NULL;
3093 proto_tree *optionals_tree = NULL;
3095 int extension_present;
3096 int dl_dataVolumes_present;
3097 int dl_GTP_PDU_SequenceNumber_present;
3098 int ul_GTP_PDU_SequenceNumber_present;
3099 int iE_Extensions_present;
3105 /* create subtree for extension/optional/default bitmap */
3106 optionals_item = proto_tree_add_text(ie_tree, tvb, offset, 1,
3107 "RAB-ReleasedItem Extension/Optional/Default bitmap");
3108 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
3110 /* protocol_extension present ? */
3111 extension_present = extract_nbits(tvb, offset, bitoffset, 1);
3112 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
3113 offset, bitoffset, 1, 0);
3114 proceed_nbits(&offset, &bitoffset, 1);
3116 /* dl_dataVolumes present ? */
3117 dl_dataVolumes_present = extract_nbits(tvb, offset, bitoffset, 1);
3118 proto_tree_add_uint_bits(optionals_tree, hf_ranap_dl_dataVolumes_present, tvb,
3119 offset, bitoffset, 1, 0);
3120 proceed_nbits(&offset, &bitoffset, 1);
3122 /* dL_GTP_PDU_SequenceNumber present ? */
3123 dl_GTP_PDU_SequenceNumber_present = extract_nbits(tvb, offset, bitoffset, 1);
3124 proto_tree_add_uint_bits(optionals_tree, hf_ranap_dl_GTP_PDU_SequenceNumber_present,
3125 tvb, offset, bitoffset, 1, 0);
3126 proceed_nbits(&offset, &bitoffset, 1);
3128 /* uL_GTP_PDU_SequenceNumber present ? */
3129 ul_GTP_PDU_SequenceNumber_present = extract_nbits(tvb, offset, bitoffset, 1);
3130 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ul_GTP_PDU_SequenceNumber_present,
3131 tvb, offset, bitoffset, 1, 0);
3132 proceed_nbits(&offset, &bitoffset, 1);
3134 /* iE_Extensions present ? */
3135 iE_Extensions_present = extract_nbits(tvb, offset, bitoffset, 1);
3136 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present,
3137 tvb, offset, bitoffset, 1, 0);
3138 proceed_nbits(&offset, &bitoffset, 1);
3141 proto_tree_add_uint_bits(ie_tree, hf_ranap_rab_id,
3142 tvb, offset, bitoffset, 8, 0);
3143 proceed_nbits(&offset, &bitoffset, 8);
3145 /* dl-dataVolumes */
3146 if (dl_dataVolumes_present)
3148 if ((ret=dissect_dataVolumeList(tvb, ie_tree, &offset, &bitoffset,
3149 "dl-dataVolumes")) != 0)
3153 /* dL-GTP-PDU-SequenceNumber */
3154 if (dl_GTP_PDU_SequenceNumber_present)
3156 allign(&offset, &bitoffset);
3157 proto_tree_add_item(ie_tree, hf_ranap_dl_GTP_PDU_SequenceNumber, tvb, offset, 2, FALSE);
3161 /* uL-GTP-PDU-SequenceNumber */
3162 if (ul_GTP_PDU_SequenceNumber_present)
3164 allign(&offset, &bitoffset);
3165 proto_tree_add_item(ie_tree, hf_ranap_ul_GTP_PDU_SequenceNumber, tvb, offset, 2, FALSE);
3170 if (iE_Extensions_present)
3172 if ((ret=dissect_iE_Extension(tvb, ie_tree, &offset, &bitoffset, "UserPlaneInformation")) != 0)
3176 /* protocol extended */
3177 if (extension_present)
3179 /* extended sequence */
3180 /* decoding is not supported */
3181 proto_tree_add_text(ie_tree, tvb, offset, IE_PROTOCOL_EXTENSION_LENGTH,
3182 "Protocol extension for RAB_ReleasedItem present, dissection not supported");
3192 dissect_IE_RAB_QueuedItem (tvbuff_t *tvb, proto_tree *ie_tree)
3194 proto_item *optionals_item = NULL;
3195 proto_tree *optionals_tree = NULL;
3197 int extension_present;
3198 int iE_Extensions_present;
3205 /* create subtree for extension/optional/default bitmap */
3206 optionals_item = proto_tree_add_text(ie_tree, tvb, offset, 1,
3207 "RAB-QueuedItem Extension/Optional/Default bitmap");
3208 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
3210 /* protocol_extension present ? */
3211 extension_present = extract_nbits(tvb, offset, bitoffset, 1);
3212 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
3213 offset, bitoffset, 1, 0);
3214 proceed_nbits(&offset, &bitoffset, 1);
3216 /* iE_Extensions present ? */
3217 iE_Extensions_present = extract_nbits(tvb, offset, bitoffset, 1);
3218 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present,
3219 tvb, offset, bitoffset, 1, 0);
3220 proceed_nbits(&offset, &bitoffset, 1);
3223 proto_tree_add_uint_bits(ie_tree, hf_ranap_rab_id,
3224 tvb, offset, bitoffset, 8, 0);
3225 proceed_nbits(&offset, &bitoffset, 8);
3228 if (iE_Extensions_present)
3230 if ((ret=dissect_iE_Extension(tvb, ie_tree, &offset, &bitoffset, "RAB_QueuedItem" )) != 0 )
3234 /* protocol extended */
3235 if (extension_present)
3237 /* extended sequence */
3238 /* decoding is not supported */
3239 proto_tree_add_text(ie_tree, tvb, offset, IE_PROTOCOL_EXTENSION_LENGTH,
3240 "Protocol extension for RAB_QueuedItem present, dissection not supported");
3250 dissect_IE_RAB_FailedItem(tvbuff_t *tvb, proto_tree *ie_tree)
3252 proto_item *optionals_item = NULL;
3253 proto_tree *optionals_tree = NULL;
3255 int extension_present;
3256 int iE_Extensions_present;
3262 /* create subtree for extension/optional/default bitmap */
3263 optionals_item = proto_tree_add_text(ie_tree, tvb, offset, 1,
3264 "RAB-FailedItem Extension/Optional/Default bitmap");
3265 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
3267 /* protocol_extension present ? */
3268 extension_present = extract_nbits(tvb, offset, bitoffset, 1);
3269 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
3270 offset, bitoffset, 1, 0);
3271 proceed_nbits(&offset, &bitoffset, 1);
3273 /* iE_Extensions present ? */
3274 iE_Extensions_present = extract_nbits(tvb, offset, bitoffset, 1);
3275 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present,
3276 tvb, offset, bitoffset, 1, 0);
3277 proceed_nbits(&offset, &bitoffset, 1);
3280 proto_tree_add_uint_bits(ie_tree, hf_ranap_rab_id,
3281 tvb, offset, bitoffset, 8, 0);
3282 proceed_nbits(&offset, &bitoffset, 8);
3285 if ((ret=dissect_cause(tvb, ie_tree, &offset, &bitoffset)) != 0)
3289 if (iE_Extensions_present)
3291 if ((ret=dissect_iE_Extension(tvb, ie_tree, &offset, &bitoffset, "RAB-FailedItem")) != 0)
3296 /* protocol extended */
3297 if (extension_present)
3299 /* extended sequence */
3300 /* decoding is not supported */
3301 proto_tree_add_text(ie_tree, tvb, offset, IE_PROTOCOL_EXTENSION_LENGTH,
3302 "Protocol extension for RAB-FailedItem present, dissection not supported");
3311 dissect_IE_CriticalityDiagnostics(tvbuff_t *tvb, proto_tree *ie_tree)
3314 proto_item *optionals_item = NULL;
3315 proto_tree *optionals_tree = NULL;
3317 int extension_present;
3318 int procedureCode_present;
3319 int triggeringMessage_present;
3320 int procedureCriticality_present;
3321 int iEsCriticalityDiagnostics_present;
3322 int iE_Extensions_present;
3329 /* create subtree for extension/optional/default bitmap */
3330 optionals_item = proto_tree_add_text(ie_tree, tvb, offset, 1,
3331 "IE-CriticalityDiagnostics Extension/Optional/Default bitmap");
3332 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
3334 /* protocol_extension present ? */
3335 extension_present = extract_nbits(tvb, offset, bitoffset, 1);
3336 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ie_protocol_extension, tvb,
3337 offset, bitoffset, 1, 0);
3338 proceed_nbits(&offset, &bitoffset, 1);
3340 /* procedureCode present ? */
3341 procedureCode_present = extract_nbits(tvb, offset, bitoffset, 1);
3342 proto_tree_add_uint_bits(optionals_tree, hf_ranap_procedureCode_present,
3343 tvb, offset, bitoffset, 1, 0);
3344 proceed_nbits(&offset, &bitoffset, 1);
3346 /* triggeringMessage present ? */
3347 triggeringMessage_present = extract_nbits(tvb, offset, bitoffset, 1);
3348 proto_tree_add_uint_bits(optionals_tree, hf_ranap_triggeringMessage_present,
3349 tvb, offset, bitoffset, 1, 0);
3350 proceed_nbits(&offset, &bitoffset, 1);
3352 /* procedureCriticality present ? */
3353 procedureCriticality_present = extract_nbits(tvb, offset, bitoffset, 1);
3354 proto_tree_add_uint_bits(optionals_tree, hf_ranap_procedureCriticality_present,
3355 tvb, offset, bitoffset, 1, 0);
3356 proceed_nbits(&offset, &bitoffset, 1);
3358 /* iEsCriticalityDiagnostics present ? */
3359 iEsCriticalityDiagnostics_present = extract_nbits(tvb, offset, bitoffset, 1);
3360 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iEsCriticalityDiagnostics_present,
3361 tvb, offset, bitoffset, 1, 0);
3362 proceed_nbits(&offset, &bitoffset, 1);
3364 /* iE_Extensions present ? */
3365 iE_Extensions_present = extract_nbits(tvb, offset, bitoffset, 1);
3366 proto_tree_add_uint_bits(optionals_tree, hf_ranap_iE_Extensions_present,
3367 tvb, offset, bitoffset, 1, 0);
3368 proceed_nbits(&offset, &bitoffset, 1);
3372 if (procedureCode_present)
3374 allign (&offset, &bitoffset);
3375 proto_tree_add_item(ie_tree, hf_ranap_procedure_code, tvb, offset, 1, FALSE);
3379 /* triggeringMessage */
3380 if (triggeringMessage_present)
3382 proto_tree_add_uint_bits(ie_tree, hf_ranap_triggeringMessage,
3383 tvb, offset, bitoffset, 2, 0);
3384 proceed_nbits(&offset, &bitoffset, 2);
3387 /* procedureCriticality */
3388 if (procedureCriticality_present)
3390 proto_tree_add_uint_bits(ie_tree, hf_ranap_procedureCriticality,
3391 tvb, offset, bitoffset, 2, 0);
3392 proceed_nbits(&offset, &bitoffset, 2);
3395 /* iEsCriticalityDiagnostics */
3396 if (iEsCriticalityDiagnostics_present)
3398 if ((ret=dissect_iEsCriticalityDiagnostics(tvb, ie_tree, &offset, &bitoffset)) != 0)
3403 if (iE_Extensions_present)
3405 if ((ret=dissect_iE_Extension(tvb, ie_tree, &offset, &bitoffset, "IE_CriticalityDiagnostics")) != 0)
3410 /* protocol extended */
3411 if (extension_present)
3413 /* extended sequence */
3414 /* decoding is not supported */
3415 proto_tree_add_text(ie_tree, tvb, offset, IE_PROTOCOL_EXTENSION_LENGTH,
3416 "Protocol extension for IE CriticalityDiagnostics present, dissection not supported");
3425 dissect_unknown_IE(tvbuff_t *tvb, proto_tree *ie_tree)
3431 length = tvb_length(tvb);
3433 proto_tree_add_text(ie_tree, tvb, 0, length,
3434 "IE Contents (dissection not implemented)");
3441 /*****************************************************************************/
3443 /* Dissecting Functions for IE Lists / Containers */
3445 /*****************************************************************************/
3448 dissect_RAB_IE_ContainerPairList(tvbuff_t *tvb, proto_tree *ie_tree)
3450 proto_item *rab_item = NULL;
3451 proto_tree *rab_tree = NULL;
3452 proto_item *ie_pair_item = NULL;
3453 proto_tree *ie_pair_tree = NULL;
3454 proto_item *first_value_item = NULL;
3455 proto_tree *first_value_tree = NULL;
3456 proto_item *second_value_item = NULL;
3457 proto_tree *second_value_tree = NULL;
3458 guint number_of_RABs, currentRAB;
3459 guint number_of_IEs, currentIE;
3460 gint number_of_octets_first, number_of_octets_second;
3461 gint number_of_octets_first_size, number_of_octets_second_size ;
3466 tvbuff_t *first_value_tvb;
3467 tvbuff_t *second_value_tvb;
3471 /* number of RABs in the list */
3472 number_of_RABs = 1 + tvb_get_guint8(tvb, offset);
3473 proto_tree_add_uint(ie_tree, hf_ranap_num_rabs,
3475 NUM_RABS_LENGTH, number_of_RABs);
3477 offset += NUM_RABS_LENGTH;
3479 /* do for each RAB */
3480 for (currentRAB=1; currentRAB<=number_of_RABs; currentRAB++)
3482 /* create subtree for RAB */
3483 rab_item = proto_tree_add_text(ie_tree, tvb, offset, 0, "%d. RAB", currentRAB);
3484 rab_tree = proto_item_add_subtree(rab_item, ett_ranap_rab);
3486 /* number of IE pairs for this RAB */
3487 number_of_IEs = tvb_get_ntohs(tvb, offset);
3488 proto_tree_add_uint(rab_tree, hf_ranap_number_of_ies_in_list,
3489 tvb, offset, 2, number_of_IEs);
3491 offset += 2; /*points now to beginning of first IE pair */
3493 /* do for each IE pair */
3494 for (currentIE=1; currentIE<=number_of_IEs; currentIE++)
3496 /* use tmp_offset to point to current field */
3497 tmp_offset = offset;
3499 ie_id = tvb_get_ntohs(tvb, tmp_offset);
3500 tmp_offset += IE_ID_LENGTH;
3502 tmp_offset += 1; /* skip first criticality byte */
3503 /* number of octets in first value */
3504 extract_length(tvb, tmp_offset, &number_of_octets_first, &number_of_octets_first_size);
3505 tmp_offset += number_of_octets_first_size + number_of_octets_first;
3507 tmp_offset += 1; /* skip second criticality byte */
3508 /* number of octets in second value */
3509 extract_length(tvb, tmp_offset, &number_of_octets_second, &number_of_octets_second_size);
3510 tmp_offset += number_of_octets_second_size + number_of_octets_second;
3512 /* create subtree for ie_pair */
3513 ie_pair_item = proto_tree_add_text(rab_tree, tvb, offset,
3514 tmp_offset - offset,
3516 val_to_str(ie_id, ranap_ie_id_values, "Unknown"),
3518 ie_pair_tree = proto_item_add_subtree(ie_pair_item, ett_ranap_ie_pair);
3520 /* add fields to ie pair subtee */
3521 /* use offset to point to current field */
3523 proto_tree_add_item(ie_pair_tree, hf_ranap_ie_ie_id, tvb, offset, IE_ID_LENGTH, FALSE);
3524 offset += IE_ID_LENGTH;
3526 /* first criticality */
3527 proto_tree_add_uint_bits(ie_pair_tree, hf_ranap_ie_pair_first_criticality, tvb,
3528 offset, bitoffset, 2, 0);
3529 proceed_nbits(&offset, &bitoffset, 2);
3531 /* number of octets in first value */
3532 allign(&offset, &bitoffset);
3533 if (number_of_octets_first != 0)
3535 proto_tree_add_uint(ie_pair_tree, hf_ranap_first_value_number_of_octets,
3537 number_of_octets_first_size,
3538 number_of_octets_first);
3542 /* decoding is not supported */
3543 proto_tree_add_text(ie_pair_tree, tvb, offset,
3544 2, "Number of Octets greater than 0x3FFF, dissection not supported");
3547 offset += number_of_octets_first_size;
3549 /* add subtree for first value */
3550 first_value_item = proto_tree_add_text(ie_pair_tree, tvb, offset,
3551 number_of_octets_first,
3553 val_to_str(ie_id, ranap_ie_id_values, "Unknown"));
3554 first_value_tree = proto_item_add_subtree(first_value_item, ett_ranap_ie_pair_first_value);
3556 /* create tvb containing first value */
3557 first_value_tvb = tvb_new_subset(tvb, offset, number_of_octets_first, number_of_octets_first);
3559 /* add fields of first value */
3562 case IE_RAB_SetupOrModifyItem:
3563 dissect_IE_RAB_SetupOrModifyItemFirst (first_value_tvb, first_value_tree);
3567 dissect_unknown_IE(first_value_tvb, first_value_tree);
3571 offset += number_of_octets_first;
3574 /* second criticality */
3575 proto_tree_add_uint_bits(ie_pair_tree, hf_ranap_ie_pair_second_criticality, tvb,
3576 offset, bitoffset, 2, 0);
3577 proceed_nbits(&offset, &bitoffset, 2);
3579 /* number of octets of second value */
3580 allign(&offset, &bitoffset);
3581 if (number_of_octets_second != 0)
3583 proto_tree_add_uint(ie_pair_tree, hf_ranap_second_value_number_of_octets,
3585 number_of_octets_second_size,
3586 number_of_octets_second);
3590 /* decoding is not supported */
3591 proto_tree_add_text(ie_pair_tree, tvb, offset,
3592 2, "Number of Octets greater than 0x3FFF, dissection not supported");
3595 offset += number_of_octets_second_size;
3597 /* add subtree for second value */
3598 second_value_item = proto_tree_add_text(ie_pair_tree, tvb, offset,
3599 number_of_octets_second,
3601 val_to_str(ie_id, ranap_ie_id_values, "Unknown"));
3602 second_value_tree = proto_item_add_subtree(second_value_item, ett_ranap_ie_pair_second_value);
3604 /* create tvb containing first value */
3605 second_value_tvb = tvb_new_subset(tvb, offset, number_of_octets_second, number_of_octets_second);
3607 /* add fields of second value */
3610 case IE_RAB_SetupOrModifyItem:
3611 dissect_IE_RAB_SetupOrModifyItemSecond (second_value_tvb, second_value_tree);
3615 dissect_unknown_IE(second_value_tvb, second_value_tree);
3619 offset += number_of_octets_second;
3621 }/* for each IE ... */
3622 }/* for each RAB ... */
3629 dissect_RAB_IE_ContainerList(tvbuff_t *tvb, proto_tree *list_tree)
3631 proto_item *rab_item = NULL;
3632 proto_tree *rab_tree = NULL;
3633 proto_item *ie_item = NULL;
3634 proto_tree *ie_tree = NULL;
3636 guint number_of_RABs, currentRAB;
3637 guint number_of_IEs, currentIE;
3638 gint ie_number_of_octets = 0;
3639 gint ie_number_of_octets_size = 0;
3643 gint ie_header_length;
3650 /* number of RABs in the list */
3651 number_of_RABs = 1 + tvb_get_guint8(tvb, offset);
3652 proto_tree_add_uint(list_tree, hf_ranap_num_rabs,
3654 NUM_RABS_LENGTH, number_of_RABs);
3656 offset += NUM_RABS_LENGTH;
3658 /* do for each RAB */
3659 for (currentRAB=1; currentRAB<=number_of_RABs; currentRAB++)
3661 /* create subtree for RAB */
3662 rab_item = proto_tree_add_text(list_tree, tvb, offset, 0, "%d. RAB", currentRAB);
3663 rab_tree = proto_item_add_subtree(rab_item, ett_ranap_rab);
3665 /* number of IEs for this RAB */
3666 number_of_IEs = tvb_get_ntohs(tvb, offset);
3667 proto_tree_add_uint(rab_tree, hf_ranap_number_of_ies_in_list,
3668 tvb, offset, 2, number_of_IEs);
3670 offset += 2; /*points now to beginning of first IE in list */
3673 /* do for each IE */
3674 for (currentIE=1; currentIE<=number_of_IEs; currentIE++)
3677 ie_id = tvb_get_ntohs(tvb, offset);
3678 offset += IE_ID_LENGTH;
3680 offset += IE_CRITICALITY_LENGTH; /* skip criticality byte */
3682 /* number of octets */
3683 extract_length(tvb, offset, &ie_number_of_octets, &ie_number_of_octets_size);
3684 ie_header_length = IE_ID_LENGTH + IE_CRITICALITY_LENGTH + ie_number_of_octets_size;
3686 /* reset offset to beginning of ie */
3689 /* create subtree for ie */
3690 ie_item = proto_tree_add_text(rab_tree, tvb, offset,
3691 ie_header_length + ie_number_of_octets,
3693 val_to_str(ie_id, ranap_ie_id_values, "Unknown"),
3695 ie_tree = proto_item_add_subtree(ie_item, ett_ranap_ie);
3698 proto_tree_add_item(ie_tree, hf_ranap_ie_ie_id, tvb,
3699 offset, IE_ID_LENGTH, FALSE);
3700 offset += IE_ID_LENGTH;
3703 proto_tree_add_uint_bits(ie_tree, hf_ranap_ie_criticality, tvb,
3704 offset, bitoffset, 2, 0);
3705 proceed_nbits(&offset, &bitoffset, 2);
3707 allign(&offset, &bitoffset);
3708 if (ie_number_of_octets != 0)
3710 proto_tree_add_uint(ie_tree, hf_ranap_ie_number_of_octets, tvb,
3711 offset, ie_number_of_octets_size, ie_number_of_octets);
3715 /* decoding is not supported */
3716 proto_tree_add_text(ie_tree, tvb, offset,
3717 0, "Number of Octets greater than 0x3FFF, dissection not supported");
3720 offset += ie_number_of_octets_size;
3723 /* create tvb containing ie */
3724 ie_tvb = tvb_new_subset(tvb, offset, ie_number_of_octets, ie_number_of_octets);
3726 /* add fields of ie */
3729 case IE_RAB_SetupOrModifiedItem:
3730 dissect_IE_RAB_SetupOrModifiedItem(ie_tvb, ie_tree);
3732 case IE_RAB_ReleaseItem:
3733 dissect_IE_RAB_ReleaseItem(ie_tvb, ie_tree);
3735 case IE_RAB_ReleasedItem:
3736 dissect_IE_RAB_ReleasedItem(ie_tvb, ie_tree);
3738 case IE_RAB_ReleasedItem_IuRelComp:
3739 dissect_IE_RAB_ReleasedItem_IuRelComp(ie_tvb, ie_tree);
3741 case IE_RAB_QueuedItem:
3742 dissect_IE_RAB_QueuedItem(ie_tvb, ie_tree);
3744 case IE_RAB_FailedItem:
3745 dissect_IE_RAB_FailedItem(ie_tvb, ie_tree);
3747 case IE_RAB_DataVolumeReportItem:
3748 dissect_IE_RAB_DataVolumeReportItem(ie_tvb, ie_tree);
3751 dissect_unknown_IE(ie_tvb, ie_tree);
3755 ie_offset += (ie_header_length + ie_number_of_octets);
3758 } /* for each RAB */
3765 dissect_ranap_ie(guint16 ie_id, tvbuff_t *ie_contents_tvb, proto_tree *ie_tree)
3767 /* call specific dissection function for ie contents */
3771 return(dissect_IE_RAB_ID(ie_contents_tvb, ie_tree));
3774 return(dissect_IE_NAS_PDU(ie_contents_tvb, ie_tree));
3777 return(dissect_IE_LAI(ie_contents_tvb, ie_tree));
3780 return(dissect_IE_RAC(ie_contents_tvb, ie_tree));
3783 return(dissect_IE_SAI(ie_contents_tvb, ie_tree));
3785 case IE_CN_DomainIndicator:
3786 return(dissect_IE_CN_DomainIndicator(ie_contents_tvb, ie_tree));
3789 return(dissect_IE_IuSigConId(ie_contents_tvb, ie_tree));
3792 return(dissect_IE_SAPI(ie_contents_tvb, ie_tree));
3794 case IE_TransportLayerAddress:
3795 return(dissect_IE_TransportLayerAddress(ie_contents_tvb, ie_tree));
3797 case IE_IuTransportAssociation:
3798 return(dissect_IE_IuTransportAssociation(ie_contents_tvb, ie_tree));
3800 case IE_RAB_SetupOrModifyList:
3801 return(dissect_RAB_IE_ContainerPairList(ie_contents_tvb, ie_tree));
3803 case IE_RAB_SetupOrModifiedList:
3804 case IE_RAB_ReleaseList:
3805 case IE_RAB_ReleasedList:
3806 case IE_RAB_QueuedList:
3807 case IE_RAB_FailedList:
3808 case IE_RAB_ReleaseFailedList:
3809 case IE_RAB_DataVolumeReportList:
3810 case IE_RAB_ReleasedList_IuRelComp:
3811 case IE_RAB_RelocationReleaseList:
3812 case IE_RAB_DataForwardingList:
3813 case IE_RAB_SetupList_RelocReq:
3814 case IE_RAB_SetupList_RelocReqAck:
3815 case IE_RAB_DataForwardingList_SRNS_CtxReq:
3816 case IE_RAB_ContextList:
3817 case IE_RAB_ContextFailedtoTransferList:
3818 case IE_RAB_DataVolumeReportRequestList:
3819 case IE_RAB_FailedtoReportList:
3820 case IE_RAB_ContextList_RANAP_RelocInf:
3821 return(dissect_RAB_IE_ContainerList(ie_contents_tvb, ie_tree));
3823 case IE_CriticalityDiagnostics:
3824 return(dissect_IE_CriticalityDiagnostics(ie_contents_tvb, ie_tree));
3827 return(dissect_IE_Cause(ie_contents_tvb, ie_tree));
3830 return(dissect_unknown_IE(ie_contents_tvb, ie_tree));
3837 dissect_ranap_ie_container(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_tree *ranap_tree)
3839 proto_item *ie_item = NULL;
3840 proto_tree *ie_tree = NULL;
3841 proto_item *optionals_item = NULL;
3842 proto_tree *optionals_tree = NULL;
3844 int msg_extension_present;
3845 int ProtocolExtensionContainer_present;
3847 guint16 number_of_ies;
3849 gint ie_number_of_octets = 0;
3850 gint ie_number_of_octets_size = 0;
3851 guint16 ie_header_length;
3855 tvbuff_t *ie_contents_tvb;
3859 /* create subtree for extension/optional bitmap of message */
3860 optionals_item = proto_tree_add_text(ranap_tree, tvb, offset, 1,
3861 "Message Extension/Optional/Default bitmap");
3862 optionals_tree = proto_item_add_subtree(optionals_item, ett_ranap_optionals);
3865 /* msg_extension present ? */
3866 msg_extension_present = extract_nbits(tvb, offset, bitoffset, 1);
3870 proto_tree_add_uint_bits(optionals_tree, hf_ranap_msg_extension_present, tvb,
3871 offset, bitoffset, 1, 0);
3873 proceed_nbits(&offset, &bitoffset, 1);
3875 /* ProtocolExtensionContainer present ? */
3876 ProtocolExtensionContainer_present = extract_nbits(tvb, offset, bitoffset, 1);
3879 proto_tree_add_uint_bits(optionals_tree, hf_ranap_ProtocolExtensionContainer_present,
3880 tvb, offset, bitoffset, 1, 0);
3882 proceed_nbits(&offset, &bitoffset, 1);
3885 /* extract ie container data */
3887 allign(&offset, &bitoffset);
3888 number_of_ies = tvb_get_ntohs(tvb, offset);
3891 proto_tree_add_uint(ranap_tree, hf_ranap_number_of_ies,
3892 tvb, offset, 2, number_of_ies);
3896 ie_offset = offset; /* ie_offset marks beginning of IE-Header */
3898 /* do the following for each IE in the PDU */
3899 for (i=1; i <= number_of_ies; i++)
3901 /* extract IE header fields which are needed even if no ranap tree exists*/
3903 ie_id = tvb_get_ntohs(tvb, offset);
3904 offset += IE_ID_LENGTH;
3906 /* number of octets in the IE */
3907 offset += IE_CRITICALITY_LENGTH; /* skip criticality byte */
3908 ie_number_of_octets = 0;
3909 extract_length(tvb, offset, &ie_number_of_octets, &ie_number_of_octets_size);
3910 ie_header_length = IE_ID_LENGTH + IE_CRITICALITY_LENGTH + ie_number_of_octets_size;
3914 offset = ie_offset; /* start from beginning of IE */
3915 /* create subtree for ie */
3916 ie_item = proto_tree_add_text(ranap_tree, tvb, offset,
3917 ie_header_length + ie_number_of_octets,
3919 val_to_str(ie_id, ranap_ie_id_values, "Unknown"),
3921 ie_tree = proto_item_add_subtree(ie_item, ett_ranap_ie);
3923 /* add fields to ie subtee */
3925 proto_tree_add_item(ie_tree, hf_ranap_ie_ie_id, tvb,
3926 offset, IE_ID_LENGTH, FALSE);
3927 offset += IE_ID_LENGTH;
3930 proto_tree_add_uint_bits(ie_tree, hf_ranap_ie_criticality, tvb,
3931 offset, bitoffset, 2, 0);
3932 proceed_nbits(&offset, &bitoffset, 2);
3934 /* number of octets */
3935 allign(&offset, &bitoffset);
3936 if (ie_number_of_octets != 0)
3938 proto_tree_add_uint(ie_tree, hf_ranap_ie_number_of_octets, tvb,
3939 offset, ie_number_of_octets_size, ie_number_of_octets);
3940 offset += ie_number_of_octets_size;
3944 /* decoding is not supported */
3945 proto_tree_add_text(ranap_tree, tvb, offset,
3946 2, "Number of Octets greater than 0x3FFF, dissection not supported");
3951 /* check if number_of_octets could be decoded */
3952 /* in case we skipped if (ranap_tree) {....} */
3953 if (ie_number_of_octets == 0) return (-1);
3955 /* create tvb containing the ie contents */
3956 ie_contents_tvb = tvb_new_subset(tvb, ie_offset + ie_header_length,
3957 ie_number_of_octets, ie_number_of_octets);
3959 /* call specific dissection function for ie contents */
3960 dissect_ranap_ie(ie_id, ie_contents_tvb, ie_tree);
3962 /* set ie_offset to beginning of next ie */
3963 ie_offset += (ie_header_length + ie_number_of_octets);
3967 /* protocol Extensions */
3968 if (ProtocolExtensionContainer_present)
3970 return(dissect_iE_Extension(tvb, ranap_tree, &offset, &bitoffset, "PDU"));
3979 dissect_ranap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
3981 proto_item *ranap_item = NULL;
3982 proto_tree *ranap_tree = NULL;
3984 guint procedure_code;
3986 gint number_of_octets = 0;
3987 gint number_of_octets_size = 0;
3989 gint tmp_offset = 0;
3991 gint tmp_bitoffset = 0;
3992 guint extension_present;
3998 /* make entry in the Protocol column on summary display */
3999 if (check_col(pinfo->cinfo, COL_PROTOCOL))
4000 col_set_str(pinfo->cinfo, COL_PROTOCOL, "RANAP");
4002 /* extract header fields which are needed even if no tree exists */
4004 /* protocol_extension present ? */
4005 extension_present = extract_nbits(tvb, tmp_offset, tmp_bitoffset, 1);
4006 proceed_nbits(&tmp_offset, &tmp_bitoffset, 1);
4007 if (extension_present)
4009 /* extended choice */
4010 /* decoding is not supported */
4011 col_append_str(pinfo->cinfo, COL_INFO, "RANAP-PDU Protocol extension present, dissection not supported");
4015 /* pdu_index choice 0..3 */
4016 pdu_index = extract_nbits(tvb, tmp_offset, tmp_bitoffset, 2);
4017 proceed_nbits(&tmp_offset, &tmp_bitoffset, 2);
4019 /* procedure code */
4020 allign(&tmp_offset, &tmp_bitoffset);
4021 procedure_code = tvb_get_guint8(tvb, tmp_offset);
4024 /* add Procedure Code to Info Column */
4025 if (check_col(pinfo->cinfo, COL_INFO))
4027 if (procedure_code <= PC_max)
4029 col_append_str(pinfo->cinfo, COL_INFO,
4030 val_to_str(pdu_index, ranap_message_names[procedure_code],
4031 "unknown message"));
4032 col_append_str(pinfo->cinfo, COL_INFO, " ");
4036 /* extract number of octets */
4037 tmp_offset += 1; /* leave out criticality byte */
4038 extract_length(tvb, tmp_offset, &number_of_octets, &number_of_octets_size);
4040 /* In the interest of speed, if "tree" is NULL, don't do any work not
4041 necessary to generate protocol tree items. */
4044 /* create the ranap protocol tree */
4045 ranap_item = proto_tree_add_item(tree, proto_ranap, tvb, 0, tvb_length(tvb), FALSE);
4046 ranap_tree = proto_item_add_subtree(ranap_item, ett_ranap);
4048 /* Add fields to ranap protocol tree */
4050 proceed_nbits(&offset, &bitoffset, 1); /* leave out extension bit, checked above */
4051 proto_tree_add_uint_bits(ranap_tree, hf_ranap_pdu_index, tvb,
4052 offset, bitoffset, 2, 0);
4053 proceed_nbits(&offset, &bitoffset, 2);
4056 /* Procedure Code */
4057 allign(&offset, &bitoffset);
4058 proto_tree_add_item(ranap_tree, hf_ranap_procedure_code, tvb, offset, 1, FALSE);
4061 /* PDU Criticality */
4062 proto_tree_add_uint_bits(ranap_tree, hf_ranap_pdu_criticality, tvb,
4063 offset, bitoffset, 2, 0);
4064 proceed_nbits(&offset, &bitoffset, 2);
4066 /* number of octets */
4067 allign(&offset, &bitoffset);
4068 if (number_of_octets != 0)
4070 proto_tree_add_uint(ranap_tree, hf_ranap_pdu_number_of_octets,
4072 number_of_octets_size, number_of_octets);
4073 offset += number_of_octets_size;
4077 /* decoding is not supported */
4078 proto_tree_add_text(ranap_tree, tvb, offset,
4079 2, "Number of Octets greater than 0x3FFF, dissection not supported");
4084 /* set offset to the beginning of ProtocolIE-Container */
4085 /* in case we skipped "if(tree){...}" above */
4086 offset = PDU_NUMBER_OF_OCTETS_OFFSET + number_of_octets_size;
4088 /* create a tvb containing the remainder of the PDU */
4089 ie_tvb_length = tvb_length(tvb)- offset;
4090 ie_tvb = tvb_new_subset(tvb, offset, ie_tvb_length, ie_tvb_length);
4092 /* dissect the ies */
4093 dissect_ranap_ie_container(ie_tvb, pinfo, tree, ranap_tree);
4098 /*****************************************************************************/
4100 /* Protocol Registration Functions */
4102 /*****************************************************************************/
4105 proto_register_ranap(void)
4107 /* Setup list of header fields */
4108 static hf_register_info hf[] = {
4109 { &hf_ranap_pdu_index,
4110 { "RANAP-PDU Index",
4111 "ranap.ranap_pdu_index",
4112 FT_UINT8, BASE_HEX, VALS(&ranap_pdu_index_values), 0x0,
4115 { &hf_ranap_procedure_code,
4117 "ranap.procedure_code",
4118 FT_UINT8, BASE_DEC, VALS(&ranap_procedure_code_values), 0x0,
4121 { &hf_ranap_pdu_criticality,
4122 { "Criticality of PDU",
4123 "ranap.pdu.criticality",
4124 FT_UINT8, BASE_HEX, VALS(&ranap_criticality_values), 0x0,
4127 { &hf_ranap_pdu_number_of_octets,
4128 { "Number of Octets in PDU",
4129 "ranap.pdu.num_of_octets",
4130 FT_UINT16, BASE_DEC, NULL, 0x0,
4133 { &hf_ranap_ie_protocol_extension,
4134 { "Protocol Extension",
4135 "ranap.ie.protocol_extension_present",
4136 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4139 { &hf_ranap_number_of_ies,
4140 { "Number of IEs in PDU",
4141 "ranap.pdu.number_of_ies",
4142 FT_UINT16, BASE_DEC, NULL, 0x0,
4145 { &hf_ranap_number_of_ProtocolExtensionFields,
4146 { "Number of Protocol Extension Fields",
4147 "ranap.ie.number_of_ProtocolExtensionFields",
4148 FT_UINT16, BASE_DEC, NULL, 0x0,
4151 { &hf_ranap_number_of_ies_in_list,
4152 { "Number of IEs in list",
4153 "ranap.number_of_ies",
4154 FT_UINT16, BASE_DEC, NULL, 0x0,
4157 { &hf_ranap_ie_ie_id,
4160 FT_UINT16, BASE_DEC, VALS(&ranap_ie_id_values), 0x0,
4163 { &hf_ranap_ext_field_id,
4164 { "ProtocolExtensionField ID",
4165 "ranap.ie.ProtocolExtensionFields.Id",
4166 FT_UINT16, BASE_DEC, NULL, 0x0,
4169 { &hf_ranap_ie_criticality,
4170 { "Criticality of IE",
4171 "ranap.ie.criticality",
4172 FT_UINT8, BASE_HEX, VALS(&ranap_criticality_values), 0x0,
4175 { &hf_ranap_ext_field_criticality,
4176 { "Criticality of ProtocolExtensionField",
4177 "ranap.ie.ProtocolExtensionFields.criticality",
4178 FT_UINT8, BASE_HEX, VALS(&ranap_criticality_values), 0x0,
4181 { &hf_ranap_ie_pair_first_criticality,
4182 { "First Criticality",
4183 "ranap.ie_pair.first_criticality",
4184 FT_UINT8, BASE_HEX, VALS(&ranap_criticality_values), 0x0,
4187 { &hf_ranap_ie_pair_second_criticality,
4188 { "Second Criticality",
4189 "ranap.ie_pair.second_criticality",
4190 FT_UINT8, BASE_HEX, VALS(&ranap_criticality_values), 0x0,
4193 { &hf_ranap_ie_number_of_octets,
4194 { "Number of Octets in IE",
4195 "ranap.ie.number_of_octets",
4196 FT_UINT16, BASE_DEC, NULL, 0x0,
4199 { &hf_ranap_first_value_number_of_octets,
4200 { "Number of Octets in first value",
4201 "ranap.ie_pair.first_value.number_of_octets",
4202 FT_UINT16, BASE_DEC, NULL, 0x0,
4205 { &hf_ranap_second_value_number_of_octets,
4206 { "Number of Octets in second value",
4207 "ranap.ie_pair.second_value.number_of_octets",
4208 FT_UINT16, BASE_DEC, NULL, 0x0,
4214 FT_UINT8, BASE_HEX, NULL, 0x0,
4217 { &hf_ranap_nas_pdu,
4220 FT_BYTES, BASE_NONE, NULL, 0x0,
4223 { &hf_ranap_extension_field,
4224 { "Extension Field Value",
4225 "ranap.Extension_Field_Value",
4226 FT_BYTES, BASE_NONE, NULL, 0x0,
4229 { &hf_ranap_plmn_id,
4232 FT_BYTES, BASE_NONE, NULL, 0x0,
4238 FT_BYTES, BASE_NONE, NULL, 0x0,
4241 { &hf_ranap_plmn_id,
4244 FT_BYTES, BASE_NONE, NULL, 0x0,
4250 FT_BYTES, BASE_NONE, NULL, 0x0,
4256 FT_BYTES, BASE_NONE, NULL, 0x0,
4262 FT_BYTES, BASE_NONE, NULL, 0x0,
4265 { &hf_ranap_num_rabs,
4267 "ranap.number_of_RABs",
4268 FT_UINT8, BASE_DEC, NULL, 0x0,
4271 { &hf_ranap_nAS_SynchronisationIndicator_present,
4272 { "nAS-SynchronisationIndicator",
4273 "ranap.nAS-SynchronisationIndicator_present",
4274 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4277 { &hf_ranap_rAB_Parameters_present,
4279 "ranap.rAB_Parameters_present",
4280 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4283 { &hf_ranap_userPlaneInformation_present,
4284 { "userPlaneInformation",
4285 "ranap.userPlaneInformation_present",
4286 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4289 { &hf_ranap_transportLayerInformation_present,
4290 { "transportLayerInformation",
4291 "ranap.transportLayerInformation_present",
4292 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4295 { &hf_ranap_service_Handover_present,
4296 { "service-Handover",
4297 "ranap.service_Handover_present",
4298 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4301 { &hf_ranap_iE_Extensions_present,
4303 "ranap.ie.iE-Extensions_present",
4304 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4307 { &hf_ranap_nAS_SynchronisationIndicator,
4308 { "nAS-SynchronisationIndicator",
4309 "ranap.nAS-SynchronisationIndicator",
4310 FT_UINT8, BASE_HEX, NULL, 0x0,
4313 { &hf_ranap_guaranteedBitRate_present,
4314 { "guaranteedBitRate",
4315 "ranap.guaranteedBitRate_present",
4316 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4319 { &hf_ranap_transferDelay_present,
4321 "ranap.transferDelay_present",
4322 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4325 { &hf_ranap_trafficHandlingPriority_present,
4326 { "trafficHandlingPriority",
4327 "ranap.trafficHandlingPriority_present",
4328 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4331 { &hf_ranap_allocationOrRetentionPriority_present,
4332 { "allocationOrRetentionPriority",
4333 "ranap.allocationOrRetentionPriority_present",
4334 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4337 { &hf_ranap_sourceStatisticsDescriptor_present,
4338 { "sourceStatisticsDescriptor",
4339 "ranap.sourceStatisticsDescriptor_present",
4340 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4343 { &hf_ranap_relocationRequirement_present,
4344 { "relocationRequirement",
4345 "ranap.relocationRequirement_present",
4346 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4349 { &hf_ranap_trafficClass,
4351 "ranap.rab_Parameters.trafficClass",
4352 FT_UINT8, BASE_DEC, VALS(&ranap_trafficClass_values), 0x0,
4355 { &hf_ranap_rAB_AsymmetryIndicator,
4356 { "rAB_AsymmetryIndicator",
4357 "ranap.rab_Parameters.rAB_AsymmetryIndicator",
4358 FT_UINT8, BASE_DEC, VALS(&ranap_rAB_AsymmetryIndicator_values), 0x0,
4361 { &hf_ranap_maxBitrate,
4363 "ranap.rab_Parameters.maxBitrate",
4364 FT_UINT32, BASE_DEC, NULL, 0x0,
4367 { &hf_ranap_guaranteedBitrate,
4368 { "guaranteedBitrate",
4369 "ranap.rab_Parameters.guaranteedBitrate",
4370 FT_UINT32, BASE_DEC, NULL, 0x0,
4373 { &hf_ranap_deliveryOrder,
4375 "ranap.rab_Parameters.deliveryOrder",
4376 FT_UINT8, BASE_DEC, VALS(&ranap_DeliveryOrder_values), 0x0,
4379 { &hf_ranap_maxSDU_Size,
4381 "ranap.rab_Parameters.maxSDU_Size",
4382 FT_UINT16, BASE_DEC, NULL, 0x0,
4385 { &hf_ranap_sDU_ErrorRatio_mantissa,
4386 { "sDU_ErrorRatio: mantissa",
4387 "ranap.rab_Parameters.sDU_ErrorRatio.mantissa",
4388 FT_UINT8, BASE_DEC, NULL, 0x0,
4391 { &hf_ranap_sDU_ErrorRatio_exponent,
4392 { "sDU_ErrorRatio: exponent",
4393 "ranap.rab_Parameters.sDU_ErrorRatio.exponent",
4394 FT_UINT8, BASE_DEC, NULL, 0x0,
4397 { &hf_ranap_residualBitErrorRatio_mantissa,
4398 { "residualBitErrorRatio: mantissa",
4399 "ranap.rab_Parameters.residualBitErrorRatio.mantissa",
4400 FT_UINT8, BASE_DEC, NULL, 0x0,
4403 { &hf_ranap_residualBitErrorRatio_exponent,
4404 { "residualBitErrorRatio: exponent",
4405 "ranap.rab_Parameters.residualBitErrorRatio.exponent",
4406 FT_UINT8, BASE_DEC, NULL, 0x0,
4409 { &hf_ranap_deliveryOfErroneousSDU,
4410 { "deliveryOfErroneousSDU",
4411 "ranap.rab_Parameters.ranap_deliveryOfErroneousSDU",
4412 FT_UINT8, BASE_DEC, VALS(&ranap_deliveryOfErroneousSDU_values), 0x0,
4415 { &hf_ranap_subflowSDU_Size,
4416 { "subflowSDU_Size",
4417 "ranap.rab_Parameters.subflowSDU_Size",
4418 FT_UINT8, BASE_DEC, NULL, 0x0,
4421 { &hf_ranap_rAB_SubflowCombinationBitRate,
4422 { "rAB_SubflowCombinationBitRate",
4423 "ranap.rab_Parameters.rAB_SubflowCombinationBitRate",
4424 FT_UINT32, BASE_DEC, NULL, 0x0,
4427 { &hf_ranap_sDU_ErrorRatio_present,
4429 "ranap.sDU_ErrorRatio_present",
4430 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4433 { &hf_ranap_sDU_FormatInformationParameters_present,
4434 { "sDU_FormatInformationParameters",
4435 "ranap.sDU_FormatInformationParameters_present",
4436 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4439 { &hf_ranap_subflowSDU_Size_present,
4440 { "subflowSDU_Size",
4441 "ranap.subflowSDU_Size_present",
4442 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4445 { &hf_ranap_rAB_SubflowCombinationBitRate_present,
4446 { "subflowSDU_Size",
4447 "ranap.rAB_SubflowCombinationBitRate_present",
4448 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4451 { &hf_ranap_transferDelay,
4453 "ranap.rab_Parameters.transferDelay",
4454 FT_UINT16, BASE_DEC, NULL, 0x0,
4457 { &hf_ranap_trafficHandlingPriority,
4458 { "trafficHandlingPriority",
4459 "ranap.rab_Parameters.trafficHandlingPriority",
4460 FT_UINT8, BASE_DEC, VALS(&ranap_priority_values), 0x0,
4463 { &hf_ranap_priorityLevel,
4465 "ranap.rab_Parameters.allocationOrRetentionPriority.priorityLevel",
4466 FT_UINT8, BASE_DEC, VALS(&ranap_priority_values), 0x0,
4469 { &hf_ranap_pre_emptionCapability,
4470 { "pre-emptionCapability",
4471 "ranap.rab_Parameters.allocationOrRetentionPriority.pre_emptionCapability",
4472 FT_UINT8, BASE_DEC, VALS(&ranap_pre_emptionCapability_values), 0x0,
4475 { &hf_ranap_pre_emptionVulnerability,
4476 { "pre-emptionVulnerability",
4477 "ranap.rab_Parameters.allocationOrRetentionPriority.pre_emptionVulnerability",
4478 FT_UINT8, BASE_DEC, VALS(&ranap_pre_emptionVulnerability_values), 0x0,
4481 { &hf_ranap_queuingAllowed,
4483 "ranap.rab_Parameters.allocationOrRetentionPriority.queuingAllowed",
4484 FT_UINT8, BASE_DEC, VALS(&ranap_queuingAllowed_values), 0x0,
4487 { &hf_ranap_sourceStatisticsDescriptor,
4488 { "sourceStatisticsDescriptor",
4489 "ranap.rab_Parameters.sourceStatisticsDescriptor",
4490 FT_UINT8, BASE_DEC, VALS(&ranap_sourceStatisticsDescriptor_values), 0x0,
4493 { &hf_ranap_relocationRequirement,
4494 { "relocationRequirement",
4495 "ranap.rab_Parameters.relocationRequirement",
4496 FT_UINT8, BASE_DEC, VALS(&ranap_relocationRequirement_values), 0x0,
4499 { &hf_ranap_userPlaneMode,
4501 "ranap.userPlaneMode",
4502 FT_UINT8, BASE_DEC, VALS(&ranap_userPlaneMode_values), 0x0,
4505 { &hf_ranap_uP_ModeVersions,
4506 { "uP_ModeVersions",
4507 "ranap.uP_ModeVersions",
4508 FT_BYTES, BASE_NONE, NULL, 0x0,
4511 { &hf_ranap_number_of_ProtocolExtensionFields,
4512 { "Number of ProtocolExtensionFields",
4513 "ranap.number_of_ProtocolExtensionFields",
4514 FT_UINT16, BASE_DEC, NULL, 0x0,
4517 { &hf_ranap_ext_field_number_of_octets,
4518 { "Number of octets",
4519 "ranap.ProtocolExtensionFields.octets",
4520 FT_UINT16, BASE_DEC, NULL, 0x0,
4523 { &hf_ranap_transportLayerAddress_length,
4524 { "bit length of transportLayerAddress",
4525 "ranap.transportLayerAddress_length",
4526 FT_UINT8, BASE_DEC, NULL, 0x0,
4529 { &hf_ranap_transportLayerAddress,
4530 { "transportLayerAddress",
4531 "ranap.transportLayerAddress",
4532 FT_BYTES, BASE_NONE, NULL, 0x0,
4535 { &hf_ranap_gTP_TEI,
4538 FT_BYTES, BASE_NONE, NULL, 0x0,
4541 { &hf_ranap_bindingID,
4544 FT_BYTES, BASE_NONE, NULL, 0x0,
4547 { &hf_ranap_pDP_TypeInformation_present,
4548 { "pDP_TypeInformation",
4549 "ranap.pDP_TypeInformation_present",
4550 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4553 { &hf_ranap_dataVolumeReportingIndication_present,
4554 { "dataVolumeReportingIndication",
4555 "ranap.dataVolumeReportingIndication_present",
4556 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4559 { &hf_ranap_dl_GTP_PDU_SequenceNumber_present,
4560 { "dl_GTP_PDU_SequenceNumber",
4561 "ranap.dl_GTP_PDU_SequenceNumber_present",
4562 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4565 { &hf_ranap_ul_GTP_PDU_SequenceNumber_present,
4566 { "ul_GTP_PDU_SequenceNumber",
4567 "ranap.ul_GTP_PDU_SequenceNumber_present",
4568 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4571 { &hf_ranap_dl_N_PDU_SequenceNumber_present,
4572 { "dl_N_PDU_SequenceNumber",
4573 "ranap.dl_N_PDU_SequenceNumber_present",
4574 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4577 { &hf_ranap_ul_N_PDU_SequenceNumber_present,
4578 { "ul_N_PDU_SequenceNumber",
4579 "ranap.ul_N_PDU_SequenceNumber_present",
4580 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4583 { &hf_ranap_PDP_Type,
4585 "ranap.RAB_SetupOrModifyItemSecond.PDP_Type",
4586 FT_UINT8, BASE_HEX, VALS(&ranap_PDP_Type_values), 0x0,
4589 { &hf_ranap_dataVolumeReportingIndication,
4590 { "dataVolumeReportingIndication",
4591 "ranap.RAB_SetupOrModifyItemSecond.dataVolumeReportingIndication",
4592 FT_UINT8, BASE_HEX, VALS(&ranap_dataVolumeReportingIndication_values), 0x0,
4595 { &hf_ranap_dl_GTP_PDU_SequenceNumber,
4596 { "dl_GTP_PDU_SequenceNumber",
4597 "ranap.RAB_SetupOrModifyItemSecond.dl_GTP_PDU_SequenceNumber",
4598 FT_UINT16, BASE_DEC, NULL, 0x0,
4601 { &hf_ranap_ul_GTP_PDU_SequenceNumber,
4602 { "ul_GTP_PDU_SequenceNumber",
4603 "ranap.RAB_SetupOrModifyItemSecond.ul_GTP_PDU_SequenceNumber",
4604 FT_UINT16, BASE_DEC, NULL, 0x0,
4607 { &hf_ranap_dl_N_PDU_SequenceNumber,
4608 { "ul_GTP_PDU_SequenceNumber",
4609 "ranap.RAB_SetupOrModifyItemSecond.ul_GTP_PDU_SequenceNumber",
4610 FT_UINT16, BASE_DEC, NULL, 0x0,
4613 { &hf_ranap_ul_N_PDU_SequenceNumber,
4614 { "ul_GTP_PDU_SequenceNumber",
4615 "ranap.RAB_SetupOrModifyItemSecond.ul_GTP_PDU_SequenceNumber",
4616 FT_UINT16, BASE_DEC, NULL, 0x0,
4619 { &hf_ranap_cause_choice,
4621 "ranap.cause_choice",
4622 FT_UINT8, BASE_HEX, VALS(&ranap_cause_choice_values), 0x0,
4625 { &hf_ranap_cause_value,
4627 "ranap.cause_value",
4628 FT_UINT8, BASE_DEC,VALS(&ranap_cause_value_str), 0x0,
4631 { &hf_ranap_transportLayerAddress_present,
4632 { "transportLayerAddress",
4633 "ranap.transportLayerAddress_present",
4634 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4637 { &hf_ranap_iuTransportAssociation_present,
4638 { "iuTransportAssociation",
4639 "ranap.iuTransportAssociation_present",
4640 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4643 { &hf_ranap_dl_dataVolumes_present,
4645 "ranap.dl_dataVolumes_present",
4646 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4649 { &hf_ranap_dataVolumeReference_present,
4650 { "dataVolumeReference",
4651 "ranap.dataVolumeReference_present",
4652 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4655 { &hf_ranap_dl_UnsuccessfullyTransmittedDataVolume,
4656 { "dl-UnsuccessfullyTransmittedDataVolume",
4657 "ranap.dl-UnsuccessfullyTransmittedDataVolume",
4658 FT_UINT32, BASE_DEC, NULL, 0x0,
4661 { &hf_ranap_dataVolumeReference,
4662 { "dataVolumeReference",
4663 "ranap.dataVolumeReference",
4664 FT_UINT8, BASE_DEC, NULL, 0x0,
4667 { &hf_ranap_procedureCode_present,
4669 "ranap.procedureCode_present",
4670 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4673 { &hf_ranap_triggeringMessage_present,
4674 { "triggeringMessage",
4675 "ranap.triggeringMessage_present",
4676 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4679 { &hf_ranap_procedureCriticality_present,
4680 { "procedureCriticality",
4681 "ranap.procedureCriticality_present",
4682 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4685 { &hf_ranap_iEsCriticalityDiagnostics_present,
4686 { "iEsCriticalityDiagnostics",
4687 "ranap.iEsCriticalityDiagnostics_present",
4688 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4691 { &hf_ranap_triggeringMessage,
4692 { "triggeringMessage",
4693 "ranap.triggeringMessage",
4694 FT_UINT8, BASE_HEX, VALS(&ranap_pdu_index_values), 0x0,
4697 { &hf_ranap_procedureCriticality,
4698 { "procedureCriticality",
4699 "ranap.procedureCriticality",
4700 FT_UINT8, BASE_HEX, VALS(&ranap_criticality_values), 0x0,
4703 { &hf_ranap_iECriticality,
4705 "ranap.iECriticality",
4706 FT_UINT8, BASE_HEX, VALS(&ranap_criticality_values), 0x0,
4709 { &hf_ranap_repetitionNumber,
4710 { "repetitionNumber",
4711 "ranap.repetitionNumber",
4712 FT_UINT16, BASE_DEC, NULL, 0x0,
4715 { &hf_ranap_num_of_CriticalityDiagnostics_IEs,
4716 { "Number of CriticalityDiagnostics-IEs",
4717 "ranap.num_of_CriticalityDiagnostics_IEs",
4718 FT_UINT16, BASE_DEC, NULL, 0x0,
4721 { &hf_ranap_repetitionNumber_present,
4722 { "repetitionNumber",
4723 "ranap.repetitionNumber_present",
4724 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4727 { &hf_ranap_dl_UnsuccessfullyTransmittedDataVolume_present,
4728 { "dl-UnsuccessfullyTransmittedDataVolume",
4729 "ranap.dl_UnsuccessfullyTransmittedDataVolume_present",
4730 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4733 { &hf_ranap_CN_DomainIndicator,
4734 { "CN-DomainIndicator",
4735 "ranap.CN_DomainIndicator",
4736 FT_UINT8, BASE_HEX, VALS(&ranap_CN_DomainIndicator_values), 0x0,
4739 { &hf_ranap_service_Handover,
4740 { "service-Handover",
4741 "ranap.service_Handover",
4742 FT_UINT8, BASE_HEX, VALS(&ranap_service_Handover_values), 0x0,
4745 { &hf_ranap_IuSigConId,
4748 FT_BYTES, BASE_NONE, NULL, 0x0,
4754 FT_UINT8, BASE_HEX, VALS(&ranap_SAPI_values), 0x0,
4757 { &hf_ranap_msg_extension_present,
4758 { "Message Extension",
4759 "ranap.msg_extension_present",
4760 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4763 { &hf_ranap_ProtocolExtensionContainer_present,
4764 { "ProtocolExtensionContainer",
4765 "ranap.ProtocolExtensionContainer_present",
4766 FT_UINT8, BASE_HEX, VALS(&ranap_presence_values), 0x0,
4769 { &hf_ranap_nas_pdu_length,
4770 { "length of NAS-PDU",
4771 "ranap.nas_pdu_length",
4772 FT_UINT16, BASE_DEC, NULL, 0x0,
4777 /* Setup protocol subtree array */
4778 static gint *ett[] = {
4780 &ett_ranap_optionals,
4781 &ett_ranap_iE_Extension,
4785 &ett_ranap_ie_pair_first_value,
4786 &ett_ranap_ie_pair_second_value,
4788 &ett_ranap_rAB_Parameters,
4789 &ett_ranap_allocationOrRetentionPriority ,
4790 &ett_ranap_CriticalityDiagnostics_IE
4794 /* Register the protocol name and description */
4795 proto_ranap = proto_register_protocol("Radio Access Network Application Part",
4798 /* Register the header fields and subtrees */
4799 proto_register_field_array(proto_ranap, hf, array_length(hf));
4800 proto_register_subtree_array(ett, array_length(ett));
4806 proto_reg_handoff_ranap(void)
4808 dissector_handle_t ranap_handle;
4810 ranap_handle = create_dissector_handle(dissect_ranap, proto_ranap);
4811 dissector_add("sual.subsystem_number", SCCP_SSN_RANAP, ranap_handle);
4812 dissector_add("sual.subsystem_number", SCCP_SSN_RANAP_C, ranap_handle);
4813 dissector_add("sual.subsystem_number", SCCP_SSN_RANAP_D, ranap_handle);