#include <stdio.h> not needed.
[obnox/wireshark/wip.git] / epan / dissectors / packet-rua.c
1 /* Do not modify this file.                                                   */
2 /* It is created automatically by the ASN.1 to Wireshark dissector compiler   */
3 /* packet-rua.c                                                               */
4 /* ../../tools/asn2wrs.py -p rua -c ./rua.cnf -s ./packet-rua-template -D . RUA-CommonDataTypes.asn RUA-Constants.asn RUA-Containers.asn RUA-IEs.asn RUA-PDU-Contents.asn RUA-PDU-Descriptions.asn */
5
6 /* Input file: packet-rua-template.c */
7
8 #line 1 "packet-rua-template.c"
9 /* packet-rua-template.c
10  * Routines for UMTS Home Node B RANAP User Adaptation (RUA) packet dissection
11  * Copyright 2010 Neil Piercy, ip.access Limited <Neil.Piercy@ipaccess.com>
12  *
13  * $Id$
14  *
15  * Wireshark - Network traffic analyzer
16  * By Gerald Combs <gerald@wireshark.org>
17  * Copyright 1998 Gerald Combs
18  *
19  * This program is free software; you can redistribute it and/or
20  * modify it under the terms of the GNU General Public License
21  * as published by the Free Software Foundation; either version 2
22  * of the License, or (at your option) any later version.
23  *
24  * This program is distributed in the hope that it will be useful,
25  * but WITHOUT ANY WARRANTY; without even the implied warranty of
26  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
27  * GNU General Public License for more details.
28  *
29  * You should have received a copy of the GNU General Public License
30  * along with this program; if not, write to the Free Software
31  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
32  *
33  * Ref: 3GPP TS 25.468 version 8.1.0 Release 8
34  */
35
36 #ifdef HAVE_CONFIG_H
37 # include "config.h"
38 #endif
39
40 #include <glib.h>
41 #include <string.h>
42
43 #include <epan/packet.h>
44 #include <epan/sctpppids.h>
45 #include <epan/asn1.h>
46 #include <epan/prefs.h>
47
48 #include "packet-per.h"
49
50 #ifdef _MSC_VER
51 /* disable: "warning C4146: unary minus operator applied to unsigned type, result still unsigned" */
52 #pragma warning(disable:4146)
53 #endif
54
55 #define PNAME  "UTRAN Iuh interface RUA signalling"
56 #define PSNAME "RUA"
57 #define PFNAME "rua"
58 /* Dissector to use SCTP PPID 19 or a configured SCTP port. IANA assigned port = 29169*/
59 #define SCTP_PORT_RUA              29169;
60
61
62 /*--- Included file: packet-rua-val.h ---*/
63 #line 1 "packet-rua-val.h"
64 #define maxPrivateIEs                  65535
65 #define maxProtocolExtensions          65535
66 #define maxProtocolIEs                 65535
67 #define maxNrOfErrors                  256
68 #define maxUEs                         64
69
70 typedef enum _ProcedureCode_enum {
71   id_Connect   =   1,
72   id_DirectTransfer =   2,
73   id_Disconnect =   3,
74   id_ConnectionlessTransfer =   4,
75   id_ErrorIndication =   5,
76   id_privateMessage =   6
77 } ProcedureCode_enum;
78
79 typedef enum _ProtocolIE_ID_enum {
80   id_Cause     =   1,
81   id_CriticalityDiagnostics =   2,
82   id_Context_ID =   3,
83   id_RANAP_Message =   4,
84   id_IntraDomainNasNodeSelector =   5,
85   id_Establishment_Cause =   6,
86   id_CN_DomainIndicator =   7,
87   id_CSGMembershipStatus =   9
88 } ProtocolIE_ID_enum;
89
90 /*--- End of included file: packet-rua-val.h ---*/
91 #line 54 "packet-rua-template.c"
92
93 /* Initialize the protocol and registered fields */
94 static int proto_rua = -1;
95
96
97 /*--- Included file: packet-rua-hf.c ---*/
98 #line 1 "packet-rua-hf.c"
99 static int hf_rua_CN_DomainIndicator_PDU = -1;    /* CN_DomainIndicator */
100 static int hf_rua_CSGMembershipStatus_PDU = -1;   /* CSGMembershipStatus */
101 static int hf_rua_Establishment_Cause_PDU = -1;   /* Establishment_Cause */
102 static int hf_rua_Context_ID_PDU = -1;            /* Context_ID */
103 static int hf_rua_IntraDomainNasNodeSelector_PDU = -1;  /* IntraDomainNasNodeSelector */
104 static int hf_rua_RANAP_Message_PDU = -1;         /* RANAP_Message */
105 static int hf_rua_Cause_PDU = -1;                 /* Cause */
106 static int hf_rua_CriticalityDiagnostics_PDU = -1;  /* CriticalityDiagnostics */
107 static int hf_rua_Connect_PDU = -1;               /* Connect */
108 static int hf_rua_DirectTransfer_PDU = -1;        /* DirectTransfer */
109 static int hf_rua_Disconnect_PDU = -1;            /* Disconnect */
110 static int hf_rua_ConnectionlessTransfer_PDU = -1;  /* ConnectionlessTransfer */
111 static int hf_rua_ErrorIndication_PDU = -1;       /* ErrorIndication */
112 static int hf_rua_PrivateMessage_PDU = -1;        /* PrivateMessage */
113 static int hf_rua_RUA_PDU_PDU = -1;               /* RUA_PDU */
114 static int hf_rua_local = -1;                     /* INTEGER_0_65535 */
115 static int hf_rua_global = -1;                    /* OBJECT_IDENTIFIER */
116 static int hf_rua_ProtocolIE_Container_item = -1;  /* ProtocolIE_Field */
117 static int hf_rua_protocol_ie_field_id = -1;      /* ProtocolIE_ID */
118 static int hf_rua_criticality = -1;               /* Criticality */
119 static int hf_rua_ie_field_value = -1;            /* ProtocolIE_Field_value */
120 static int hf_rua_ProtocolExtensionContainer_item = -1;  /* ProtocolExtensionField */
121 static int hf_rua_id = -1;                        /* ProtocolIE_ID */
122 static int hf_rua_extensionValue = -1;            /* T_extensionValue */
123 static int hf_rua_PrivateIE_Container_item = -1;  /* PrivateIE_Field */
124 static int hf_rua_private_ie_field_id = -1;       /* PrivateIE_ID */
125 static int hf_rua_private_value = -1;             /* PrivateIE_Field_value */
126 static int hf_rua_version = -1;                   /* T_version */
127 static int hf_rua_release99 = -1;                 /* T_release99 */
128 static int hf_rua_cn_Type = -1;                   /* T_cn_Type */
129 static int hf_rua_gsm_Map_IDNNS = -1;             /* Gsm_map_IDNNS */
130 static int hf_rua_ansi_41_IDNNS = -1;             /* Ansi_41_IDNNS */
131 static int hf_rua_later = -1;                     /* T_later */
132 static int hf_rua_futurecoding = -1;              /* BIT_STRING_SIZE_15 */
133 static int hf_rua_routingbasis = -1;              /* T_routingbasis */
134 static int hf_rua_localPTMSI = -1;                /* T_localPTMSI */
135 static int hf_rua_routingparameter = -1;          /* RoutingParameter */
136 static int hf_rua_tMSIofsamePLMN = -1;            /* T_tMSIofsamePLMN */
137 static int hf_rua_tMSIofdifferentPLMN = -1;       /* T_tMSIofdifferentPLMN */
138 static int hf_rua_iMSIresponsetopaging = -1;      /* T_iMSIresponsetopaging */
139 static int hf_rua_iMSIcauseUEinitiatedEvent = -1;  /* T_iMSIcauseUEinitiatedEvent */
140 static int hf_rua_iMEI = -1;                      /* T_iMEI */
141 static int hf_rua_spare2 = -1;                    /* T_spare2 */
142 static int hf_rua_spare1 = -1;                    /* T_spare1 */
143 static int hf_rua_dummy = -1;                     /* BOOLEAN */
144 static int hf_rua_radioNetwork = -1;              /* CauseRadioNetwork */
145 static int hf_rua_transport = -1;                 /* CauseTransport */
146 static int hf_rua_protocol = -1;                  /* CauseProtocol */
147 static int hf_rua_misc = -1;                      /* CauseMisc */
148 static int hf_rua_procedureCode = -1;             /* ProcedureCode */
149 static int hf_rua_triggeringMessage = -1;         /* TriggeringMessage */
150 static int hf_rua_procedureCriticality = -1;      /* Criticality */
151 static int hf_rua_iEsCriticalityDiagnostics = -1;  /* CriticalityDiagnostics_IE_List */
152 static int hf_rua_iE_Extensions = -1;             /* ProtocolExtensionContainer */
153 static int hf_rua_CriticalityDiagnostics_IE_List_item = -1;  /* CriticalityDiagnostics_IE_List_item */
154 static int hf_rua_iECriticality = -1;             /* Criticality */
155 static int hf_rua_iE_ID = -1;                     /* ProtocolIE_ID */
156 static int hf_rua_typeOfError = -1;               /* TypeOfError */
157 static int hf_rua_protocolIEs = -1;               /* ProtocolIE_Container */
158 static int hf_rua_protocolExtensions = -1;        /* ProtocolExtensionContainer */
159 static int hf_rua_privateIEs = -1;                /* PrivateIE_Container */
160 static int hf_rua_initiatingMessage = -1;         /* InitiatingMessage */
161 static int hf_rua_successfulOutcome = -1;         /* SuccessfulOutcome */
162 static int hf_rua_unsuccessfulOutcome = -1;       /* UnsuccessfulOutcome */
163 static int hf_rua_initiatingMessagevalue = -1;    /* InitiatingMessage_value */
164 static int hf_rua_successfulOutcome_value = -1;   /* SuccessfulOutcome_value */
165 static int hf_rua_unsuccessfulOutcome_value = -1;  /* UnsuccessfulOutcome_value */
166
167 /*--- End of included file: packet-rua-hf.c ---*/
168 #line 59 "packet-rua-template.c"
169
170 /* Initialize the subtree pointers */
171 static int ett_rua = -1;
172
173  /* initialise sub-dissector handles */
174  static dissector_handle_t ranap_handle = NULL;
175
176
177 /*--- Included file: packet-rua-ett.c ---*/
178 #line 1 "packet-rua-ett.c"
179 static gint ett_rua_PrivateIE_ID = -1;
180 static gint ett_rua_ProtocolIE_Container = -1;
181 static gint ett_rua_ProtocolIE_Field = -1;
182 static gint ett_rua_ProtocolExtensionContainer = -1;
183 static gint ett_rua_ProtocolExtensionField = -1;
184 static gint ett_rua_PrivateIE_Container = -1;
185 static gint ett_rua_PrivateIE_Field = -1;
186 static gint ett_rua_IntraDomainNasNodeSelector = -1;
187 static gint ett_rua_T_version = -1;
188 static gint ett_rua_T_release99 = -1;
189 static gint ett_rua_T_cn_Type = -1;
190 static gint ett_rua_T_later = -1;
191 static gint ett_rua_Gsm_map_IDNNS = -1;
192 static gint ett_rua_T_routingbasis = -1;
193 static gint ett_rua_T_localPTMSI = -1;
194 static gint ett_rua_T_tMSIofsamePLMN = -1;
195 static gint ett_rua_T_tMSIofdifferentPLMN = -1;
196 static gint ett_rua_T_iMSIresponsetopaging = -1;
197 static gint ett_rua_T_iMSIcauseUEinitiatedEvent = -1;
198 static gint ett_rua_T_iMEI = -1;
199 static gint ett_rua_T_spare2 = -1;
200 static gint ett_rua_T_spare1 = -1;
201 static gint ett_rua_Cause = -1;
202 static gint ett_rua_CriticalityDiagnostics = -1;
203 static gint ett_rua_CriticalityDiagnostics_IE_List = -1;
204 static gint ett_rua_CriticalityDiagnostics_IE_List_item = -1;
205 static gint ett_rua_Connect = -1;
206 static gint ett_rua_DirectTransfer = -1;
207 static gint ett_rua_Disconnect = -1;
208 static gint ett_rua_ConnectionlessTransfer = -1;
209 static gint ett_rua_ErrorIndication = -1;
210 static gint ett_rua_PrivateMessage = -1;
211 static gint ett_rua_RUA_PDU = -1;
212 static gint ett_rua_InitiatingMessage = -1;
213 static gint ett_rua_SuccessfulOutcome = -1;
214 static gint ett_rua_UnsuccessfulOutcome = -1;
215
216 /*--- End of included file: packet-rua-ett.c ---*/
217 #line 67 "packet-rua-template.c"
218
219 /* Global variables */
220 static guint32 ProcedureCode;
221 static guint32 ProtocolIE_ID;
222 static guint global_sctp_port = SCTP_PORT_RUA;
223
224 /* Dissector tables */
225 static dissector_table_t rua_ies_dissector_table;
226 static dissector_table_t rua_extension_dissector_table;
227 static dissector_table_t rua_proc_imsg_dissector_table;
228 static dissector_table_t rua_proc_sout_dissector_table;
229 static dissector_table_t rua_proc_uout_dissector_table;
230
231 static int dissect_ProtocolIEFieldValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
232 static int dissect_ProtocolExtensionFieldExtensionValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
233 static int dissect_InitiatingMessageValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
234 static int dissect_SuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
235 static int dissect_UnsuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
236
237 void proto_reg_handoff_rua(void);
238
239
240 /*--- Included file: packet-rua-fn.c ---*/
241 #line 1 "packet-rua-fn.c"
242
243 static const value_string rua_Criticality_vals[] = {
244   {   0, "reject" },
245   {   1, "ignore" },
246   {   2, "notify" },
247   { 0, NULL }
248 };
249
250
251 static int
252 dissect_rua_Criticality(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
253   offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index,
254                                      3, NULL, FALSE, 0, NULL);
255
256   return offset;
257 }
258
259
260 static const value_string rua_ProcedureCode_vals[] = {
261   { id_Connect, "id-Connect" },
262   { id_DirectTransfer, "id-DirectTransfer" },
263   { id_Disconnect, "id-Disconnect" },
264   { id_ConnectionlessTransfer, "id-ConnectionlessTransfer" },
265   { id_ErrorIndication, "id-ErrorIndication" },
266   { id_privateMessage, "id-privateMessage" },
267   { 0, NULL }
268 };
269
270
271 static int
272 dissect_rua_ProcedureCode(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
273   offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index,
274                                                             0U, 255U, &ProcedureCode, FALSE);
275
276 #line 53 "rua.cnf"
277   if (strcmp(val_to_str(ProcedureCode, rua_ProcedureCode_vals, "Unknown"), "Unknown") == 0) {
278     col_set_str(actx->pinfo->cinfo, COL_INFO,
279                       "Unknown Message ");
280   } /* Known Procedures should be included below and broken out as ELEMENTARY names to avoid confusion */
281
282
283   return offset;
284 }
285
286
287
288 static int
289 dissect_rua_INTEGER_0_65535(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
290   offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index,
291                                                             0U, 65535U, NULL, FALSE);
292
293   return offset;
294 }
295
296
297
298 static int
299 dissect_rua_OBJECT_IDENTIFIER(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
300   offset = dissect_per_object_identifier(tvb, offset, actx, tree, hf_index, NULL);
301
302   return offset;
303 }
304
305
306 static const value_string rua_PrivateIE_ID_vals[] = {
307   {   0, "local" },
308   {   1, "global" },
309   { 0, NULL }
310 };
311
312 static const per_choice_t PrivateIE_ID_choice[] = {
313   {   0, &hf_rua_local           , ASN1_NO_EXTENSIONS     , dissect_rua_INTEGER_0_65535 },
314   {   1, &hf_rua_global          , ASN1_NO_EXTENSIONS     , dissect_rua_OBJECT_IDENTIFIER },
315   { 0, NULL, 0, NULL }
316 };
317
318 static int
319 dissect_rua_PrivateIE_ID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
320   offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
321                                  ett_rua_PrivateIE_ID, PrivateIE_ID_choice,
322                                  NULL);
323
324   return offset;
325 }
326
327
328 static const value_string rua_ProtocolIE_ID_vals[] = {
329   { id_Cause, "id-Cause" },
330   { id_CriticalityDiagnostics, "id-CriticalityDiagnostics" },
331   { id_Context_ID, "id-Context-ID" },
332   { id_RANAP_Message, "id-RANAP-Message" },
333   { id_IntraDomainNasNodeSelector, "id-IntraDomainNasNodeSelector" },
334   { id_Establishment_Cause, "id-Establishment-Cause" },
335   { id_CN_DomainIndicator, "id-CN-DomainIndicator" },
336   { id_CSGMembershipStatus, "id-CSGMembershipStatus" },
337   { 0, NULL }
338 };
339
340
341 static int
342 dissect_rua_ProtocolIE_ID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
343   offset = dissect_per_constrained_integer(tvb, offset, actx, tree, hf_index,
344                                                             0U, maxProtocolIEs, &ProtocolIE_ID, FALSE);
345
346 #line 42 "rua.cnf"
347   if (tree) {
348     proto_item_append_text(proto_item_get_parent_nth(actx->created_item, 2), ": %s", val_to_str(ProtocolIE_ID, VALS(rua_ProtocolIE_ID_vals), "unknown (%d)"));
349   }
350
351   return offset;
352 }
353
354
355 static const value_string rua_TriggeringMessage_vals[] = {
356   {   0, "initiating-message" },
357   {   1, "successful-outcome" },
358   {   2, "unsuccessful-outcome" },
359   { 0, NULL }
360 };
361
362
363 static int
364 dissect_rua_TriggeringMessage(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
365   offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index,
366                                      3, NULL, FALSE, 0, NULL);
367
368   return offset;
369 }
370
371
372
373 static int
374 dissect_rua_ProtocolIE_Field_value(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
375   offset = dissect_per_open_type_pdu_new(tvb, offset, actx, tree, hf_index, dissect_ProtocolIEFieldValue);
376
377   return offset;
378 }
379
380
381 static const per_sequence_t ProtocolIE_Field_sequence[] = {
382   { &hf_rua_protocol_ie_field_id, ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_rua_ProtocolIE_ID },
383   { &hf_rua_criticality     , ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_rua_Criticality },
384   { &hf_rua_ie_field_value  , ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_rua_ProtocolIE_Field_value },
385   { NULL, 0, 0, NULL }
386 };
387
388 static int
389 dissect_rua_ProtocolIE_Field(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
390   offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
391                                    ett_rua_ProtocolIE_Field, ProtocolIE_Field_sequence);
392
393   return offset;
394 }
395
396
397 static const per_sequence_t ProtocolIE_Container_sequence_of[1] = {
398   { &hf_rua_ProtocolIE_Container_item, ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_rua_ProtocolIE_Field },
399 };
400
401 static int
402 dissect_rua_ProtocolIE_Container(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
403   offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index,
404                                                   ett_rua_ProtocolIE_Container, ProtocolIE_Container_sequence_of,
405                                                   0, maxProtocolIEs, FALSE);
406
407   return offset;
408 }
409
410
411
412 static int
413 dissect_rua_T_extensionValue(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
414   offset = dissect_per_open_type_pdu_new(tvb, offset, actx, tree, hf_index, dissect_ProtocolExtensionFieldExtensionValue);
415
416   return offset;
417 }
418
419
420 static const per_sequence_t ProtocolExtensionField_sequence[] = {
421   { &hf_rua_id              , ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_rua_ProtocolIE_ID },
422   { &hf_rua_criticality     , ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_rua_Criticality },
423   { &hf_rua_extensionValue  , ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_rua_T_extensionValue },
424   { NULL, 0, 0, NULL }
425 };
426
427 static int
428 dissect_rua_ProtocolExtensionField(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
429   offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
430                                    ett_rua_ProtocolExtensionField, ProtocolExtensionField_sequence);
431
432   return offset;
433 }
434
435
436 static const per_sequence_t ProtocolExtensionContainer_sequence_of[1] = {
437   { &hf_rua_ProtocolExtensionContainer_item, ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_rua_ProtocolExtensionField },
438 };
439
440 static int
441 dissect_rua_ProtocolExtensionContainer(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
442   offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index,
443                                                   ett_rua_ProtocolExtensionContainer, ProtocolExtensionContainer_sequence_of,
444                                                   1, maxProtocolExtensions, FALSE);
445
446   return offset;
447 }
448
449
450
451 static int
452 dissect_rua_PrivateIE_Field_value(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
453   offset = dissect_per_open_type(tvb, offset, actx, tree, hf_index, NULL);
454
455   return offset;
456 }
457
458
459 static const per_sequence_t PrivateIE_Field_sequence[] = {
460   { &hf_rua_private_ie_field_id, ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_rua_PrivateIE_ID },
461   { &hf_rua_criticality     , ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_rua_Criticality },
462   { &hf_rua_private_value   , ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_rua_PrivateIE_Field_value },
463   { NULL, 0, 0, NULL }
464 };
465
466 static int
467 dissect_rua_PrivateIE_Field(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
468   offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
469                                    ett_rua_PrivateIE_Field, PrivateIE_Field_sequence);
470
471   return offset;
472 }
473
474
475 static const per_sequence_t PrivateIE_Container_sequence_of[1] = {
476   { &hf_rua_PrivateIE_Container_item, ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_rua_PrivateIE_Field },
477 };
478
479 static int
480 dissect_rua_PrivateIE_Container(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
481   offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index,
482                                                   ett_rua_PrivateIE_Container, PrivateIE_Container_sequence_of,
483                                                   1, maxPrivateIEs, FALSE);
484
485   return offset;
486 }
487
488
489 static const value_string rua_CN_DomainIndicator_vals[] = {
490   {   0, "cs-domain" },
491   {   1, "ps-domain" },
492   { 0, NULL }
493 };
494
495
496 static int
497 dissect_rua_CN_DomainIndicator(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
498   offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index,
499                                      2, NULL, FALSE, 0, NULL);
500
501   return offset;
502 }
503
504
505 static const value_string rua_CSGMembershipStatus_vals[] = {
506   {   0, "member" },
507   {   1, "non-member" },
508   { 0, NULL }
509 };
510
511
512 static int
513 dissect_rua_CSGMembershipStatus(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
514   offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index,
515                                      2, NULL, TRUE, 0, NULL);
516
517   return offset;
518 }
519
520
521 static const value_string rua_Establishment_Cause_vals[] = {
522   {   0, "emergency-call" },
523   {   1, "normal-call" },
524   { 0, NULL }
525 };
526
527
528 static int
529 dissect_rua_Establishment_Cause(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
530   offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index,
531                                      2, NULL, TRUE, 0, NULL);
532
533   return offset;
534 }
535
536
537
538 static int
539 dissect_rua_Context_ID(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
540   offset = dissect_per_bit_string(tvb, offset, actx, tree, hf_index,
541                                      24, 24, FALSE, NULL);
542
543   return offset;
544 }
545
546
547
548 static int
549 dissect_rua_RoutingParameter(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
550   offset = dissect_per_bit_string(tvb, offset, actx, tree, hf_index,
551                                      10, 10, FALSE, NULL);
552
553   return offset;
554 }
555
556
557 static const per_sequence_t T_localPTMSI_sequence[] = {
558   { &hf_rua_routingparameter, ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_rua_RoutingParameter },
559   { NULL, 0, 0, NULL }
560 };
561
562 static int
563 dissect_rua_T_localPTMSI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
564   offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
565                                    ett_rua_T_localPTMSI, T_localPTMSI_sequence);
566
567   return offset;
568 }
569
570
571 static const per_sequence_t T_tMSIofsamePLMN_sequence[] = {
572   { &hf_rua_routingparameter, ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_rua_RoutingParameter },
573   { NULL, 0, 0, NULL }
574 };
575
576 static int
577 dissect_rua_T_tMSIofsamePLMN(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
578   offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
579                                    ett_rua_T_tMSIofsamePLMN, T_tMSIofsamePLMN_sequence);
580
581   return offset;
582 }
583
584
585 static const per_sequence_t T_tMSIofdifferentPLMN_sequence[] = {
586   { &hf_rua_routingparameter, ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_rua_RoutingParameter },
587   { NULL, 0, 0, NULL }
588 };
589
590 static int
591 dissect_rua_T_tMSIofdifferentPLMN(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
592   offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
593                                    ett_rua_T_tMSIofdifferentPLMN, T_tMSIofdifferentPLMN_sequence);
594
595   return offset;
596 }
597
598
599 static const per_sequence_t T_iMSIresponsetopaging_sequence[] = {
600   { &hf_rua_routingparameter, ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_rua_RoutingParameter },
601   { NULL, 0, 0, NULL }
602 };
603
604 static int
605 dissect_rua_T_iMSIresponsetopaging(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
606   offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
607                                    ett_rua_T_iMSIresponsetopaging, T_iMSIresponsetopaging_sequence);
608
609   return offset;
610 }
611
612
613 static const per_sequence_t T_iMSIcauseUEinitiatedEvent_sequence[] = {
614   { &hf_rua_routingparameter, ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_rua_RoutingParameter },
615   { NULL, 0, 0, NULL }
616 };
617
618 static int
619 dissect_rua_T_iMSIcauseUEinitiatedEvent(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
620   offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
621                                    ett_rua_T_iMSIcauseUEinitiatedEvent, T_iMSIcauseUEinitiatedEvent_sequence);
622
623   return offset;
624 }
625
626
627 static const per_sequence_t T_iMEI_sequence[] = {
628   { &hf_rua_routingparameter, ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_rua_RoutingParameter },
629   { NULL, 0, 0, NULL }
630 };
631
632 static int
633 dissect_rua_T_iMEI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
634   offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
635                                    ett_rua_T_iMEI, T_iMEI_sequence);
636
637   return offset;
638 }
639
640
641 static const per_sequence_t T_spare2_sequence[] = {
642   { &hf_rua_routingparameter, ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_rua_RoutingParameter },
643   { NULL, 0, 0, NULL }
644 };
645
646 static int
647 dissect_rua_T_spare2(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
648   offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
649                                    ett_rua_T_spare2, T_spare2_sequence);
650
651   return offset;
652 }
653
654
655 static const per_sequence_t T_spare1_sequence[] = {
656   { &hf_rua_routingparameter, ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_rua_RoutingParameter },
657   { NULL, 0, 0, NULL }
658 };
659
660 static int
661 dissect_rua_T_spare1(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
662   offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
663                                    ett_rua_T_spare1, T_spare1_sequence);
664
665   return offset;
666 }
667
668
669 static const value_string rua_T_routingbasis_vals[] = {
670   {   0, "localPTMSI" },
671   {   1, "tMSIofsamePLMN" },
672   {   2, "tMSIofdifferentPLMN" },
673   {   3, "iMSIresponsetopaging" },
674   {   4, "iMSIcauseUEinitiatedEvent" },
675   {   5, "iMEI" },
676   {   6, "spare2" },
677   {   7, "spare1" },
678   { 0, NULL }
679 };
680
681 static const per_choice_t T_routingbasis_choice[] = {
682   {   0, &hf_rua_localPTMSI      , ASN1_NO_EXTENSIONS     , dissect_rua_T_localPTMSI },
683   {   1, &hf_rua_tMSIofsamePLMN  , ASN1_NO_EXTENSIONS     , dissect_rua_T_tMSIofsamePLMN },
684   {   2, &hf_rua_tMSIofdifferentPLMN, ASN1_NO_EXTENSIONS     , dissect_rua_T_tMSIofdifferentPLMN },
685   {   3, &hf_rua_iMSIresponsetopaging, ASN1_NO_EXTENSIONS     , dissect_rua_T_iMSIresponsetopaging },
686   {   4, &hf_rua_iMSIcauseUEinitiatedEvent, ASN1_NO_EXTENSIONS     , dissect_rua_T_iMSIcauseUEinitiatedEvent },
687   {   5, &hf_rua_iMEI            , ASN1_NO_EXTENSIONS     , dissect_rua_T_iMEI },
688   {   6, &hf_rua_spare2          , ASN1_NO_EXTENSIONS     , dissect_rua_T_spare2 },
689   {   7, &hf_rua_spare1          , ASN1_NO_EXTENSIONS     , dissect_rua_T_spare1 },
690   { 0, NULL, 0, NULL }
691 };
692
693 static int
694 dissect_rua_T_routingbasis(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
695   offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
696                                  ett_rua_T_routingbasis, T_routingbasis_choice,
697                                  NULL);
698
699   return offset;
700 }
701
702
703
704 static int
705 dissect_rua_BOOLEAN(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
706   offset = dissect_per_boolean(tvb, offset, actx, tree, hf_index, NULL);
707
708   return offset;
709 }
710
711
712 static const per_sequence_t Gsm_map_IDNNS_sequence[] = {
713   { &hf_rua_routingbasis    , ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_rua_T_routingbasis },
714   { &hf_rua_dummy           , ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_rua_BOOLEAN },
715   { NULL, 0, 0, NULL }
716 };
717
718 static int
719 dissect_rua_Gsm_map_IDNNS(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
720   offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
721                                    ett_rua_Gsm_map_IDNNS, Gsm_map_IDNNS_sequence);
722
723   return offset;
724 }
725
726
727
728 static int
729 dissect_rua_Ansi_41_IDNNS(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
730   offset = dissect_per_bit_string(tvb, offset, actx, tree, hf_index,
731                                      14, 14, FALSE, NULL);
732
733   return offset;
734 }
735
736
737 static const value_string rua_T_cn_Type_vals[] = {
738   {   0, "gsm-Map-IDNNS" },
739   {   1, "ansi-41-IDNNS" },
740   { 0, NULL }
741 };
742
743 static const per_choice_t T_cn_Type_choice[] = {
744   {   0, &hf_rua_gsm_Map_IDNNS   , ASN1_NO_EXTENSIONS     , dissect_rua_Gsm_map_IDNNS },
745   {   1, &hf_rua_ansi_41_IDNNS   , ASN1_NO_EXTENSIONS     , dissect_rua_Ansi_41_IDNNS },
746   { 0, NULL, 0, NULL }
747 };
748
749 static int
750 dissect_rua_T_cn_Type(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
751   offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
752                                  ett_rua_T_cn_Type, T_cn_Type_choice,
753                                  NULL);
754
755   return offset;
756 }
757
758
759 static const per_sequence_t T_release99_sequence[] = {
760   { &hf_rua_cn_Type         , ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_rua_T_cn_Type },
761   { NULL, 0, 0, NULL }
762 };
763
764 static int
765 dissect_rua_T_release99(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
766   offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
767                                    ett_rua_T_release99, T_release99_sequence);
768
769   return offset;
770 }
771
772
773
774 static int
775 dissect_rua_BIT_STRING_SIZE_15(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
776   offset = dissect_per_bit_string(tvb, offset, actx, tree, hf_index,
777                                      15, 15, FALSE, NULL);
778
779   return offset;
780 }
781
782
783 static const per_sequence_t T_later_sequence[] = {
784   { &hf_rua_futurecoding    , ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_rua_BIT_STRING_SIZE_15 },
785   { NULL, 0, 0, NULL }
786 };
787
788 static int
789 dissect_rua_T_later(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
790   offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
791                                    ett_rua_T_later, T_later_sequence);
792
793   return offset;
794 }
795
796
797 static const value_string rua_T_version_vals[] = {
798   {   0, "release99" },
799   {   1, "later" },
800   { 0, NULL }
801 };
802
803 static const per_choice_t T_version_choice[] = {
804   {   0, &hf_rua_release99       , ASN1_NO_EXTENSIONS     , dissect_rua_T_release99 },
805   {   1, &hf_rua_later           , ASN1_NO_EXTENSIONS     , dissect_rua_T_later },
806   { 0, NULL, 0, NULL }
807 };
808
809 static int
810 dissect_rua_T_version(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
811   offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
812                                  ett_rua_T_version, T_version_choice,
813                                  NULL);
814
815   return offset;
816 }
817
818
819 static const per_sequence_t IntraDomainNasNodeSelector_sequence[] = {
820   { &hf_rua_version         , ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_rua_T_version },
821   { NULL, 0, 0, NULL }
822 };
823
824 static int
825 dissect_rua_IntraDomainNasNodeSelector(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
826   offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
827                                    ett_rua_IntraDomainNasNodeSelector, IntraDomainNasNodeSelector_sequence);
828
829   return offset;
830 }
831
832
833
834 static int
835 dissect_rua_RANAP_Message(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
836 #line 96 "rua.cnf"
837   tvbuff_t *ranap_message_tvb=NULL;
838   offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
839                                        NO_BOUND, NO_BOUND, FALSE, &ranap_message_tvb);
840
841  if ((tvb_length(ranap_message_tvb)>0)&&(ranap_handle)) {  /* RUA has a RANAP-PDU */
842      col_set_str(actx->pinfo->cinfo, COL_INFO,
843              "(RUA) ");                                    /* Set info to (RUA) to make room for RANAP */ 
844      col_set_fence(actx->pinfo->cinfo, COL_INFO);  
845      call_dissector(ranap_handle,ranap_message_tvb,actx->pinfo, proto_tree_get_root(tree));
846   }
847
848
849   return offset;
850 }
851
852
853 static const value_string rua_CauseRadioNetwork_vals[] = {
854   {   0, "normal" },
855   {   1, "connect-failed" },
856   {   2, "network-release" },
857   {   3, "unspecified" },
858   { 0, NULL }
859 };
860
861
862 static int
863 dissect_rua_CauseRadioNetwork(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
864   offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index,
865                                      4, NULL, TRUE, 0, NULL);
866
867   return offset;
868 }
869
870
871 static const value_string rua_CauseTransport_vals[] = {
872   {   0, "transport-resource-unavailable" },
873   {   1, "unspecified" },
874   { 0, NULL }
875 };
876
877
878 static int
879 dissect_rua_CauseTransport(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
880   offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index,
881                                      2, NULL, TRUE, 0, NULL);
882
883   return offset;
884 }
885
886
887 static const value_string rua_CauseProtocol_vals[] = {
888   {   0, "transfer-syntax-error" },
889   {   1, "abstract-syntax-error-reject" },
890   {   2, "abstract-syntax-error-ignore-and-notify" },
891   {   3, "message-not-compatible-with-receiver-state" },
892   {   4, "semantic-error" },
893   {   5, "unspecified" },
894   {   6, "abstract-syntax-error-falsely-constructed-message" },
895   { 0, NULL }
896 };
897
898
899 static int
900 dissect_rua_CauseProtocol(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
901   offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index,
902                                      7, NULL, TRUE, 0, NULL);
903
904   return offset;
905 }
906
907
908 static const value_string rua_CauseMisc_vals[] = {
909   {   0, "processing-overload" },
910   {   1, "hardware-failure" },
911   {   2, "o-and-m-intervention" },
912   {   3, "unspecified" },
913   { 0, NULL }
914 };
915
916
917 static int
918 dissect_rua_CauseMisc(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
919   offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index,
920                                      4, NULL, TRUE, 0, NULL);
921
922   return offset;
923 }
924
925
926 static const value_string rua_Cause_vals[] = {
927   {   0, "radioNetwork" },
928   {   1, "transport" },
929   {   2, "protocol" },
930   {   3, "misc" },
931   { 0, NULL }
932 };
933
934 static const per_choice_t Cause_choice[] = {
935   {   0, &hf_rua_radioNetwork    , ASN1_EXTENSION_ROOT    , dissect_rua_CauseRadioNetwork },
936   {   1, &hf_rua_transport       , ASN1_EXTENSION_ROOT    , dissect_rua_CauseTransport },
937   {   2, &hf_rua_protocol        , ASN1_EXTENSION_ROOT    , dissect_rua_CauseProtocol },
938   {   3, &hf_rua_misc            , ASN1_EXTENSION_ROOT    , dissect_rua_CauseMisc },
939   { 0, NULL, 0, NULL }
940 };
941
942 static int
943 dissect_rua_Cause(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
944   offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
945                                  ett_rua_Cause, Cause_choice,
946                                  NULL);
947
948   return offset;
949 }
950
951
952 static const value_string rua_TypeOfError_vals[] = {
953   {   0, "not-understood" },
954   {   1, "missing" },
955   { 0, NULL }
956 };
957
958
959 static int
960 dissect_rua_TypeOfError(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
961   offset = dissect_per_enumerated(tvb, offset, actx, tree, hf_index,
962                                      2, NULL, TRUE, 0, NULL);
963
964   return offset;
965 }
966
967
968 static const per_sequence_t CriticalityDiagnostics_IE_List_item_sequence[] = {
969   { &hf_rua_iECriticality   , ASN1_EXTENSION_ROOT    , ASN1_NOT_OPTIONAL, dissect_rua_Criticality },
970   { &hf_rua_iE_ID           , ASN1_EXTENSION_ROOT    , ASN1_NOT_OPTIONAL, dissect_rua_ProtocolIE_ID },
971   { &hf_rua_typeOfError     , ASN1_EXTENSION_ROOT    , ASN1_NOT_OPTIONAL, dissect_rua_TypeOfError },
972   { &hf_rua_iE_Extensions   , ASN1_EXTENSION_ROOT    , ASN1_OPTIONAL    , dissect_rua_ProtocolExtensionContainer },
973   { NULL, 0, 0, NULL }
974 };
975
976 static int
977 dissect_rua_CriticalityDiagnostics_IE_List_item(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
978   offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
979                                    ett_rua_CriticalityDiagnostics_IE_List_item, CriticalityDiagnostics_IE_List_item_sequence);
980
981   return offset;
982 }
983
984
985 static const per_sequence_t CriticalityDiagnostics_IE_List_sequence_of[1] = {
986   { &hf_rua_CriticalityDiagnostics_IE_List_item, ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_rua_CriticalityDiagnostics_IE_List_item },
987 };
988
989 static int
990 dissect_rua_CriticalityDiagnostics_IE_List(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
991   offset = dissect_per_constrained_sequence_of(tvb, offset, actx, tree, hf_index,
992                                                   ett_rua_CriticalityDiagnostics_IE_List, CriticalityDiagnostics_IE_List_sequence_of,
993                                                   1, maxNrOfErrors, FALSE);
994
995   return offset;
996 }
997
998
999 static const per_sequence_t CriticalityDiagnostics_sequence[] = {
1000   { &hf_rua_procedureCode   , ASN1_EXTENSION_ROOT    , ASN1_OPTIONAL    , dissect_rua_ProcedureCode },
1001   { &hf_rua_triggeringMessage, ASN1_EXTENSION_ROOT    , ASN1_OPTIONAL    , dissect_rua_TriggeringMessage },
1002   { &hf_rua_procedureCriticality, ASN1_EXTENSION_ROOT    , ASN1_OPTIONAL    , dissect_rua_Criticality },
1003   { &hf_rua_iEsCriticalityDiagnostics, ASN1_EXTENSION_ROOT    , ASN1_OPTIONAL    , dissect_rua_CriticalityDiagnostics_IE_List },
1004   { &hf_rua_iE_Extensions   , ASN1_EXTENSION_ROOT    , ASN1_OPTIONAL    , dissect_rua_ProtocolExtensionContainer },
1005   { NULL, 0, 0, NULL }
1006 };
1007
1008 static int
1009 dissect_rua_CriticalityDiagnostics(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1010   offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
1011                                    ett_rua_CriticalityDiagnostics, CriticalityDiagnostics_sequence);
1012
1013   return offset;
1014 }
1015
1016
1017 static const per_sequence_t Connect_sequence[] = {
1018   { &hf_rua_protocolIEs     , ASN1_EXTENSION_ROOT    , ASN1_NOT_OPTIONAL, dissect_rua_ProtocolIE_Container },
1019   { &hf_rua_protocolExtensions, ASN1_EXTENSION_ROOT    , ASN1_OPTIONAL    , dissect_rua_ProtocolExtensionContainer },
1020   { NULL, 0, 0, NULL }
1021 };
1022
1023 static int
1024 dissect_rua_Connect(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1025 #line 65 "rua.cnf"
1026     col_set_str(actx->pinfo->cinfo, COL_INFO,
1027              "CONNECT ");
1028   offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
1029                                    ett_rua_Connect, Connect_sequence);
1030
1031
1032
1033
1034   return offset;
1035 }
1036
1037
1038 static const per_sequence_t DirectTransfer_sequence[] = {
1039   { &hf_rua_protocolIEs     , ASN1_EXTENSION_ROOT    , ASN1_NOT_OPTIONAL, dissect_rua_ProtocolIE_Container },
1040   { &hf_rua_protocolExtensions, ASN1_EXTENSION_ROOT    , ASN1_OPTIONAL    , dissect_rua_ProtocolExtensionContainer },
1041   { NULL, 0, 0, NULL }
1042 };
1043
1044 static int
1045 dissect_rua_DirectTransfer(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1046 #line 70 "rua.cnf"
1047     col_set_str(actx->pinfo->cinfo, COL_INFO,
1048              "DIRECT_TRANSFER ");
1049   offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
1050                                    ett_rua_DirectTransfer, DirectTransfer_sequence);
1051
1052
1053
1054
1055   return offset;
1056 }
1057
1058
1059 static const per_sequence_t Disconnect_sequence[] = {
1060   { &hf_rua_protocolIEs     , ASN1_EXTENSION_ROOT    , ASN1_NOT_OPTIONAL, dissect_rua_ProtocolIE_Container },
1061   { &hf_rua_protocolExtensions, ASN1_EXTENSION_ROOT    , ASN1_OPTIONAL    , dissect_rua_ProtocolExtensionContainer },
1062   { NULL, 0, 0, NULL }
1063 };
1064
1065 static int
1066 dissect_rua_Disconnect(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1067 #line 75 "rua.cnf"
1068     col_set_str(actx->pinfo->cinfo, COL_INFO,
1069              "DISCONNECT ");
1070   offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
1071                                    ett_rua_Disconnect, Disconnect_sequence);
1072
1073
1074
1075
1076   return offset;
1077 }
1078
1079
1080 static const per_sequence_t ConnectionlessTransfer_sequence[] = {
1081   { &hf_rua_protocolIEs     , ASN1_EXTENSION_ROOT    , ASN1_NOT_OPTIONAL, dissect_rua_ProtocolIE_Container },
1082   { &hf_rua_protocolExtensions, ASN1_EXTENSION_ROOT    , ASN1_OPTIONAL    , dissect_rua_ProtocolExtensionContainer },
1083   { NULL, 0, 0, NULL }
1084 };
1085
1086 static int
1087 dissect_rua_ConnectionlessTransfer(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1088 #line 80 "rua.cnf"
1089     col_set_str(actx->pinfo->cinfo, COL_INFO,
1090              "CONNECTIONLESS_TRANSFER ");
1091   offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
1092                                    ett_rua_ConnectionlessTransfer, ConnectionlessTransfer_sequence);
1093
1094
1095
1096
1097   return offset;
1098 }
1099
1100
1101 static const per_sequence_t ErrorIndication_sequence[] = {
1102   { &hf_rua_protocolIEs     , ASN1_EXTENSION_ROOT    , ASN1_NOT_OPTIONAL, dissect_rua_ProtocolIE_Container },
1103   { &hf_rua_protocolExtensions, ASN1_EXTENSION_ROOT    , ASN1_OPTIONAL    , dissect_rua_ProtocolExtensionContainer },
1104   { NULL, 0, 0, NULL }
1105 };
1106
1107 static int
1108 dissect_rua_ErrorIndication(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1109 #line 85 "rua.cnf"
1110     col_set_str(actx->pinfo->cinfo, COL_INFO,
1111              "ERROR_INDICATION ");
1112     col_set_fence(actx->pinfo->cinfo, COL_INFO); /* Protect info from CriticalityDiagnostics decodes */
1113   offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
1114                                    ett_rua_ErrorIndication, ErrorIndication_sequence);
1115
1116
1117
1118
1119   return offset;
1120 }
1121
1122
1123 static const per_sequence_t PrivateMessage_sequence[] = {
1124   { &hf_rua_privateIEs      , ASN1_EXTENSION_ROOT    , ASN1_NOT_OPTIONAL, dissect_rua_PrivateIE_Container },
1125   { NULL, 0, 0, NULL }
1126 };
1127
1128 static int
1129 dissect_rua_PrivateMessage(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1130 #line 91 "rua.cnf"
1131     col_set_str(actx->pinfo->cinfo, COL_INFO,
1132              "PRIVATE_MESSAGE ");
1133   offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
1134                                    ett_rua_PrivateMessage, PrivateMessage_sequence);
1135
1136
1137
1138
1139   return offset;
1140 }
1141
1142
1143
1144 static int
1145 dissect_rua_InitiatingMessage_value(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1146   offset = dissect_per_open_type_pdu_new(tvb, offset, actx, tree, hf_index, dissect_InitiatingMessageValue);
1147
1148   return offset;
1149 }
1150
1151
1152 static const per_sequence_t InitiatingMessage_sequence[] = {
1153   { &hf_rua_procedureCode   , ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_rua_ProcedureCode },
1154   { &hf_rua_criticality     , ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_rua_Criticality },
1155   { &hf_rua_initiatingMessagevalue, ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_rua_InitiatingMessage_value },
1156   { NULL, 0, 0, NULL }
1157 };
1158
1159 static int
1160 dissect_rua_InitiatingMessage(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1161   offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
1162                                    ett_rua_InitiatingMessage, InitiatingMessage_sequence);
1163
1164   return offset;
1165 }
1166
1167
1168
1169 static int
1170 dissect_rua_SuccessfulOutcome_value(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1171   offset = dissect_per_open_type_pdu_new(tvb, offset, actx, tree, hf_index, dissect_SuccessfulOutcomeValue);
1172
1173   return offset;
1174 }
1175
1176
1177 static const per_sequence_t SuccessfulOutcome_sequence[] = {
1178   { &hf_rua_procedureCode   , ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_rua_ProcedureCode },
1179   { &hf_rua_criticality     , ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_rua_Criticality },
1180   { &hf_rua_successfulOutcome_value, ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_rua_SuccessfulOutcome_value },
1181   { NULL, 0, 0, NULL }
1182 };
1183
1184 static int
1185 dissect_rua_SuccessfulOutcome(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1186   offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
1187                                    ett_rua_SuccessfulOutcome, SuccessfulOutcome_sequence);
1188
1189   return offset;
1190 }
1191
1192
1193
1194 static int
1195 dissect_rua_UnsuccessfulOutcome_value(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1196   offset = dissect_per_open_type_pdu_new(tvb, offset, actx, tree, hf_index, dissect_UnsuccessfulOutcomeValue);
1197
1198   return offset;
1199 }
1200
1201
1202 static const per_sequence_t UnsuccessfulOutcome_sequence[] = {
1203   { &hf_rua_procedureCode   , ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_rua_ProcedureCode },
1204   { &hf_rua_criticality     , ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_rua_Criticality },
1205   { &hf_rua_unsuccessfulOutcome_value, ASN1_NO_EXTENSIONS     , ASN1_NOT_OPTIONAL, dissect_rua_UnsuccessfulOutcome_value },
1206   { NULL, 0, 0, NULL }
1207 };
1208
1209 static int
1210 dissect_rua_UnsuccessfulOutcome(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1211   offset = dissect_per_sequence(tvb, offset, actx, tree, hf_index,
1212                                    ett_rua_UnsuccessfulOutcome, UnsuccessfulOutcome_sequence);
1213
1214   return offset;
1215 }
1216
1217
1218 static const value_string rua_RUA_PDU_vals[] = {
1219   {   0, "initiatingMessage" },
1220   {   1, "successfulOutcome" },
1221   {   2, "unsuccessfulOutcome" },
1222   { 0, NULL }
1223 };
1224
1225 static const per_choice_t RUA_PDU_choice[] = {
1226   {   0, &hf_rua_initiatingMessage, ASN1_EXTENSION_ROOT    , dissect_rua_InitiatingMessage },
1227   {   1, &hf_rua_successfulOutcome, ASN1_EXTENSION_ROOT    , dissect_rua_SuccessfulOutcome },
1228   {   2, &hf_rua_unsuccessfulOutcome, ASN1_EXTENSION_ROOT    , dissect_rua_UnsuccessfulOutcome },
1229   { 0, NULL, 0, NULL }
1230 };
1231
1232 static int
1233 dissect_rua_RUA_PDU(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1234   offset = dissect_per_choice(tvb, offset, actx, tree, hf_index,
1235                                  ett_rua_RUA_PDU, RUA_PDU_choice,
1236                                  NULL);
1237
1238   return offset;
1239 }
1240
1241 /*--- PDUs ---*/
1242
1243 static int dissect_CN_DomainIndicator_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
1244   int offset = 0;
1245   asn1_ctx_t asn1_ctx;
1246   asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo);
1247   offset = dissect_rua_CN_DomainIndicator(tvb, offset, &asn1_ctx, tree, hf_rua_CN_DomainIndicator_PDU);
1248   offset += 7; offset >>= 3;
1249   return offset;
1250 }
1251 static int dissect_CSGMembershipStatus_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
1252   int offset = 0;
1253   asn1_ctx_t asn1_ctx;
1254   asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo);
1255   offset = dissect_rua_CSGMembershipStatus(tvb, offset, &asn1_ctx, tree, hf_rua_CSGMembershipStatus_PDU);
1256   offset += 7; offset >>= 3;
1257   return offset;
1258 }
1259 static int dissect_Establishment_Cause_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
1260   int offset = 0;
1261   asn1_ctx_t asn1_ctx;
1262   asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo);
1263   offset = dissect_rua_Establishment_Cause(tvb, offset, &asn1_ctx, tree, hf_rua_Establishment_Cause_PDU);
1264   offset += 7; offset >>= 3;
1265   return offset;
1266 }
1267 static int dissect_Context_ID_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
1268   int offset = 0;
1269   asn1_ctx_t asn1_ctx;
1270   asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo);
1271   offset = dissect_rua_Context_ID(tvb, offset, &asn1_ctx, tree, hf_rua_Context_ID_PDU);
1272   offset += 7; offset >>= 3;
1273   return offset;
1274 }
1275 static int dissect_IntraDomainNasNodeSelector_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
1276   int offset = 0;
1277   asn1_ctx_t asn1_ctx;
1278   asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo);
1279   offset = dissect_rua_IntraDomainNasNodeSelector(tvb, offset, &asn1_ctx, tree, hf_rua_IntraDomainNasNodeSelector_PDU);
1280   offset += 7; offset >>= 3;
1281   return offset;
1282 }
1283 static int dissect_RANAP_Message_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
1284   int offset = 0;
1285   asn1_ctx_t asn1_ctx;
1286   asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo);
1287   offset = dissect_rua_RANAP_Message(tvb, offset, &asn1_ctx, tree, hf_rua_RANAP_Message_PDU);
1288   offset += 7; offset >>= 3;
1289   return offset;
1290 }
1291 static int dissect_Cause_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
1292   int offset = 0;
1293   asn1_ctx_t asn1_ctx;
1294   asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo);
1295   offset = dissect_rua_Cause(tvb, offset, &asn1_ctx, tree, hf_rua_Cause_PDU);
1296   offset += 7; offset >>= 3;
1297   return offset;
1298 }
1299 static int dissect_CriticalityDiagnostics_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
1300   int offset = 0;
1301   asn1_ctx_t asn1_ctx;
1302   asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo);
1303   offset = dissect_rua_CriticalityDiagnostics(tvb, offset, &asn1_ctx, tree, hf_rua_CriticalityDiagnostics_PDU);
1304   offset += 7; offset >>= 3;
1305   return offset;
1306 }
1307 static int dissect_Connect_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
1308   int offset = 0;
1309   asn1_ctx_t asn1_ctx;
1310   asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo);
1311   offset = dissect_rua_Connect(tvb, offset, &asn1_ctx, tree, hf_rua_Connect_PDU);
1312   offset += 7; offset >>= 3;
1313   return offset;
1314 }
1315 static int dissect_DirectTransfer_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
1316   int offset = 0;
1317   asn1_ctx_t asn1_ctx;
1318   asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo);
1319   offset = dissect_rua_DirectTransfer(tvb, offset, &asn1_ctx, tree, hf_rua_DirectTransfer_PDU);
1320   offset += 7; offset >>= 3;
1321   return offset;
1322 }
1323 static int dissect_Disconnect_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
1324   int offset = 0;
1325   asn1_ctx_t asn1_ctx;
1326   asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo);
1327   offset = dissect_rua_Disconnect(tvb, offset, &asn1_ctx, tree, hf_rua_Disconnect_PDU);
1328   offset += 7; offset >>= 3;
1329   return offset;
1330 }
1331 static int dissect_ConnectionlessTransfer_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
1332   int offset = 0;
1333   asn1_ctx_t asn1_ctx;
1334   asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo);
1335   offset = dissect_rua_ConnectionlessTransfer(tvb, offset, &asn1_ctx, tree, hf_rua_ConnectionlessTransfer_PDU);
1336   offset += 7; offset >>= 3;
1337   return offset;
1338 }
1339 static int dissect_ErrorIndication_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
1340   int offset = 0;
1341   asn1_ctx_t asn1_ctx;
1342   asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo);
1343   offset = dissect_rua_ErrorIndication(tvb, offset, &asn1_ctx, tree, hf_rua_ErrorIndication_PDU);
1344   offset += 7; offset >>= 3;
1345   return offset;
1346 }
1347 static int dissect_PrivateMessage_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
1348   int offset = 0;
1349   asn1_ctx_t asn1_ctx;
1350   asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo);
1351   offset = dissect_rua_PrivateMessage(tvb, offset, &asn1_ctx, tree, hf_rua_PrivateMessage_PDU);
1352   offset += 7; offset >>= 3;
1353   return offset;
1354 }
1355 static void dissect_RUA_PDU_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
1356   asn1_ctx_t asn1_ctx;
1357   asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo);
1358   dissect_rua_RUA_PDU(tvb, 0, &asn1_ctx, tree, hf_rua_RUA_PDU_PDU);
1359 }
1360
1361
1362 /*--- End of included file: packet-rua-fn.c ---*/
1363 #line 89 "packet-rua-template.c"
1364
1365 static int dissect_ProtocolIEFieldValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
1366 {
1367   return (dissector_try_port_new(rua_ies_dissector_table, ProtocolIE_ID, tvb, pinfo, tree, FALSE)) ? tvb_length(tvb) : 0;
1368 }
1369
1370 static int dissect_ProtocolExtensionFieldExtensionValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
1371 {
1372   return (dissector_try_port_new(rua_extension_dissector_table, ProtocolIE_ID, tvb, pinfo, tree, FALSE)) ? tvb_length(tvb) : 0;
1373 }
1374
1375 static int dissect_InitiatingMessageValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
1376 {
1377   return (dissector_try_port_new(rua_proc_imsg_dissector_table, ProcedureCode, tvb, pinfo, tree, FALSE)) ? tvb_length(tvb) : 0;
1378 }
1379
1380 static int dissect_SuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
1381 {
1382   return (dissector_try_port_new(rua_proc_sout_dissector_table, ProcedureCode, tvb, pinfo, tree, FALSE)) ? tvb_length(tvb) : 0;
1383 }
1384
1385 static int dissect_UnsuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
1386 {
1387   return (dissector_try_port_new(rua_proc_uout_dissector_table, ProcedureCode, tvb, pinfo, tree, FALSE)) ? tvb_length(tvb) : 0;
1388 }
1389
1390 static void
1391 dissect_rua(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
1392 {
1393     proto_item  *rua_item = NULL;
1394     proto_tree  *rua_tree = NULL;
1395
1396     /* make entry in the Protocol column on summary display */
1397     col_set_str(pinfo->cinfo, COL_PROTOCOL, "RUA");
1398
1399     /* create the rua protocol tree */
1400     rua_item = proto_tree_add_item(tree, proto_rua, tvb, 0, -1, FALSE);
1401     rua_tree = proto_item_add_subtree(rua_item, ett_rua);
1402     
1403     dissect_RUA_PDU_PDU(tvb, pinfo, rua_tree);
1404 }
1405
1406 /*--- proto_register_rua -------------------------------------------*/
1407 void proto_register_rua(void) {
1408 module_t *rua_module;
1409
1410   /* List of fields */
1411
1412   static hf_register_info hf[] = {
1413
1414
1415 /*--- Included file: packet-rua-hfarr.c ---*/
1416 #line 1 "packet-rua-hfarr.c"
1417     { &hf_rua_CN_DomainIndicator_PDU,
1418       { "CN-DomainIndicator", "rua.CN_DomainIndicator",
1419         FT_UINT32, BASE_DEC, VALS(rua_CN_DomainIndicator_vals), 0,
1420         "rua.CN_DomainIndicator", HFILL }},
1421     { &hf_rua_CSGMembershipStatus_PDU,
1422       { "CSGMembershipStatus", "rua.CSGMembershipStatus",
1423         FT_UINT32, BASE_DEC, VALS(rua_CSGMembershipStatus_vals), 0,
1424         "rua.CSGMembershipStatus", HFILL }},
1425     { &hf_rua_Establishment_Cause_PDU,
1426       { "Establishment-Cause", "rua.Establishment_Cause",
1427         FT_UINT32, BASE_DEC, VALS(rua_Establishment_Cause_vals), 0,
1428         "rua.Establishment_Cause", HFILL }},
1429     { &hf_rua_Context_ID_PDU,
1430       { "Context-ID", "rua.Context_ID",
1431         FT_BYTES, BASE_NONE, NULL, 0,
1432         "rua.Context_ID", HFILL }},
1433     { &hf_rua_IntraDomainNasNodeSelector_PDU,
1434       { "IntraDomainNasNodeSelector", "rua.IntraDomainNasNodeSelector",
1435         FT_NONE, BASE_NONE, NULL, 0,
1436         "rua.IntraDomainNasNodeSelector", HFILL }},
1437     { &hf_rua_RANAP_Message_PDU,
1438       { "RANAP-Message", "rua.RANAP_Message",
1439         FT_BYTES, BASE_NONE, NULL, 0,
1440         "rua.RANAP_Message", HFILL }},
1441     { &hf_rua_Cause_PDU,
1442       { "Cause", "rua.Cause",
1443         FT_UINT32, BASE_DEC, VALS(rua_Cause_vals), 0,
1444         "rua.Cause", HFILL }},
1445     { &hf_rua_CriticalityDiagnostics_PDU,
1446       { "CriticalityDiagnostics", "rua.CriticalityDiagnostics",
1447         FT_NONE, BASE_NONE, NULL, 0,
1448         "rua.CriticalityDiagnostics", HFILL }},
1449     { &hf_rua_Connect_PDU,
1450       { "Connect", "rua.Connect",
1451         FT_NONE, BASE_NONE, NULL, 0,
1452         "rua.Connect", HFILL }},
1453     { &hf_rua_DirectTransfer_PDU,
1454       { "DirectTransfer", "rua.DirectTransfer",
1455         FT_NONE, BASE_NONE, NULL, 0,
1456         "rua.DirectTransfer", HFILL }},
1457     { &hf_rua_Disconnect_PDU,
1458       { "Disconnect", "rua.Disconnect",
1459         FT_NONE, BASE_NONE, NULL, 0,
1460         "rua.Disconnect", HFILL }},
1461     { &hf_rua_ConnectionlessTransfer_PDU,
1462       { "ConnectionlessTransfer", "rua.ConnectionlessTransfer",
1463         FT_NONE, BASE_NONE, NULL, 0,
1464         "rua.ConnectionlessTransfer", HFILL }},
1465     { &hf_rua_ErrorIndication_PDU,
1466       { "ErrorIndication", "rua.ErrorIndication",
1467         FT_NONE, BASE_NONE, NULL, 0,
1468         "rua.ErrorIndication", HFILL }},
1469     { &hf_rua_PrivateMessage_PDU,
1470       { "PrivateMessage", "rua.PrivateMessage",
1471         FT_NONE, BASE_NONE, NULL, 0,
1472         "rua.PrivateMessage", HFILL }},
1473     { &hf_rua_RUA_PDU_PDU,
1474       { "RUA-PDU", "rua.RUA_PDU",
1475         FT_UINT32, BASE_DEC, VALS(rua_RUA_PDU_vals), 0,
1476         "rua.RUA_PDU", HFILL }},
1477     { &hf_rua_local,
1478       { "local", "rua.local",
1479         FT_UINT32, BASE_DEC, NULL, 0,
1480         "rua.INTEGER_0_65535", HFILL }},
1481     { &hf_rua_global,
1482       { "global", "rua.global",
1483         FT_OID, BASE_NONE, NULL, 0,
1484         "rua.OBJECT_IDENTIFIER", HFILL }},
1485     { &hf_rua_ProtocolIE_Container_item,
1486       { "ProtocolIE-Field", "rua.ProtocolIE_Field",
1487         FT_NONE, BASE_NONE, NULL, 0,
1488         "rua.ProtocolIE_Field", HFILL }},
1489     { &hf_rua_protocol_ie_field_id,
1490       { "id", "rua.id",
1491         FT_UINT32, BASE_DEC, VALS(rua_ProtocolIE_ID_vals), 0,
1492         "rua.ProtocolIE_ID", HFILL }},
1493     { &hf_rua_criticality,
1494       { "criticality", "rua.criticality",
1495         FT_UINT32, BASE_DEC, VALS(rua_Criticality_vals), 0,
1496         "rua.Criticality", HFILL }},
1497     { &hf_rua_ie_field_value,
1498       { "value", "rua.value",
1499         FT_NONE, BASE_NONE, NULL, 0,
1500         "rua.ProtocolIE_Field_value", HFILL }},
1501     { &hf_rua_ProtocolExtensionContainer_item,
1502       { "ProtocolExtensionField", "rua.ProtocolExtensionField",
1503         FT_NONE, BASE_NONE, NULL, 0,
1504         "rua.ProtocolExtensionField", HFILL }},
1505     { &hf_rua_id,
1506       { "id", "rua.id",
1507         FT_UINT32, BASE_DEC, VALS(rua_ProtocolIE_ID_vals), 0,
1508         "rua.ProtocolIE_ID", HFILL }},
1509     { &hf_rua_extensionValue,
1510       { "extensionValue", "rua.extensionValue",
1511         FT_NONE, BASE_NONE, NULL, 0,
1512         "rua.T_extensionValue", HFILL }},
1513     { &hf_rua_PrivateIE_Container_item,
1514       { "PrivateIE-Field", "rua.PrivateIE_Field",
1515         FT_NONE, BASE_NONE, NULL, 0,
1516         "rua.PrivateIE_Field", HFILL }},
1517     { &hf_rua_private_ie_field_id,
1518       { "id", "rua.id",
1519         FT_UINT32, BASE_DEC, VALS(rua_PrivateIE_ID_vals), 0,
1520         "rua.PrivateIE_ID", HFILL }},
1521     { &hf_rua_private_value,
1522       { "value", "rua.value",
1523         FT_NONE, BASE_NONE, NULL, 0,
1524         "rua.PrivateIE_Field_value", HFILL }},
1525     { &hf_rua_version,
1526       { "version", "rua.version",
1527         FT_UINT32, BASE_DEC, VALS(rua_T_version_vals), 0,
1528         "rua.T_version", HFILL }},
1529     { &hf_rua_release99,
1530       { "release99", "rua.release99",
1531         FT_NONE, BASE_NONE, NULL, 0,
1532         "rua.T_release99", HFILL }},
1533     { &hf_rua_cn_Type,
1534       { "cn-Type", "rua.cn_Type",
1535         FT_UINT32, BASE_DEC, VALS(rua_T_cn_Type_vals), 0,
1536         "rua.T_cn_Type", HFILL }},
1537     { &hf_rua_gsm_Map_IDNNS,
1538       { "gsm-Map-IDNNS", "rua.gsm_Map_IDNNS",
1539         FT_NONE, BASE_NONE, NULL, 0,
1540         "rua.Gsm_map_IDNNS", HFILL }},
1541     { &hf_rua_ansi_41_IDNNS,
1542       { "ansi-41-IDNNS", "rua.ansi_41_IDNNS",
1543         FT_BYTES, BASE_NONE, NULL, 0,
1544         "rua.Ansi_41_IDNNS", HFILL }},
1545     { &hf_rua_later,
1546       { "later", "rua.later",
1547         FT_NONE, BASE_NONE, NULL, 0,
1548         "rua.T_later", HFILL }},
1549     { &hf_rua_futurecoding,
1550       { "futurecoding", "rua.futurecoding",
1551         FT_BYTES, BASE_NONE, NULL, 0,
1552         "rua.BIT_STRING_SIZE_15", HFILL }},
1553     { &hf_rua_routingbasis,
1554       { "routingbasis", "rua.routingbasis",
1555         FT_UINT32, BASE_DEC, VALS(rua_T_routingbasis_vals), 0,
1556         "rua.T_routingbasis", HFILL }},
1557     { &hf_rua_localPTMSI,
1558       { "localPTMSI", "rua.localPTMSI",
1559         FT_NONE, BASE_NONE, NULL, 0,
1560         "rua.T_localPTMSI", HFILL }},
1561     { &hf_rua_routingparameter,
1562       { "routingparameter", "rua.routingparameter",
1563         FT_BYTES, BASE_NONE, NULL, 0,
1564         "rua.RoutingParameter", HFILL }},
1565     { &hf_rua_tMSIofsamePLMN,
1566       { "tMSIofsamePLMN", "rua.tMSIofsamePLMN",
1567         FT_NONE, BASE_NONE, NULL, 0,
1568         "rua.T_tMSIofsamePLMN", HFILL }},
1569     { &hf_rua_tMSIofdifferentPLMN,
1570       { "tMSIofdifferentPLMN", "rua.tMSIofdifferentPLMN",
1571         FT_NONE, BASE_NONE, NULL, 0,
1572         "rua.T_tMSIofdifferentPLMN", HFILL }},
1573     { &hf_rua_iMSIresponsetopaging,
1574       { "iMSIresponsetopaging", "rua.iMSIresponsetopaging",
1575         FT_NONE, BASE_NONE, NULL, 0,
1576         "rua.T_iMSIresponsetopaging", HFILL }},
1577     { &hf_rua_iMSIcauseUEinitiatedEvent,
1578       { "iMSIcauseUEinitiatedEvent", "rua.iMSIcauseUEinitiatedEvent",
1579         FT_NONE, BASE_NONE, NULL, 0,
1580         "rua.T_iMSIcauseUEinitiatedEvent", HFILL }},
1581     { &hf_rua_iMEI,
1582       { "iMEI", "rua.iMEI",
1583         FT_NONE, BASE_NONE, NULL, 0,
1584         "rua.T_iMEI", HFILL }},
1585     { &hf_rua_spare2,
1586       { "spare2", "rua.spare2",
1587         FT_NONE, BASE_NONE, NULL, 0,
1588         "rua.T_spare2", HFILL }},
1589     { &hf_rua_spare1,
1590       { "spare1", "rua.spare1",
1591         FT_NONE, BASE_NONE, NULL, 0,
1592         "rua.T_spare1", HFILL }},
1593     { &hf_rua_dummy,
1594       { "dummy", "rua.dummy",
1595         FT_BOOLEAN, BASE_NONE, NULL, 0,
1596         "rua.BOOLEAN", HFILL }},
1597     { &hf_rua_radioNetwork,
1598       { "radioNetwork", "rua.radioNetwork",
1599         FT_UINT32, BASE_DEC, VALS(rua_CauseRadioNetwork_vals), 0,
1600         "rua.CauseRadioNetwork", HFILL }},
1601     { &hf_rua_transport,
1602       { "transport", "rua.transport",
1603         FT_UINT32, BASE_DEC, VALS(rua_CauseTransport_vals), 0,
1604         "rua.CauseTransport", HFILL }},
1605     { &hf_rua_protocol,
1606       { "protocol", "rua.protocol",
1607         FT_UINT32, BASE_DEC, VALS(rua_CauseProtocol_vals), 0,
1608         "rua.CauseProtocol", HFILL }},
1609     { &hf_rua_misc,
1610       { "misc", "rua.misc",
1611         FT_UINT32, BASE_DEC, VALS(rua_CauseMisc_vals), 0,
1612         "rua.CauseMisc", HFILL }},
1613     { &hf_rua_procedureCode,
1614       { "procedureCode", "rua.procedureCode",
1615         FT_UINT32, BASE_DEC, VALS(rua_ProcedureCode_vals), 0,
1616         "rua.ProcedureCode", HFILL }},
1617     { &hf_rua_triggeringMessage,
1618       { "triggeringMessage", "rua.triggeringMessage",
1619         FT_UINT32, BASE_DEC, VALS(rua_TriggeringMessage_vals), 0,
1620         "rua.TriggeringMessage", HFILL }},
1621     { &hf_rua_procedureCriticality,
1622       { "procedureCriticality", "rua.procedureCriticality",
1623         FT_UINT32, BASE_DEC, VALS(rua_Criticality_vals), 0,
1624         "rua.Criticality", HFILL }},
1625     { &hf_rua_iEsCriticalityDiagnostics,
1626       { "iEsCriticalityDiagnostics", "rua.iEsCriticalityDiagnostics",
1627         FT_UINT32, BASE_DEC, NULL, 0,
1628         "rua.CriticalityDiagnostics_IE_List", HFILL }},
1629     { &hf_rua_iE_Extensions,
1630       { "iE-Extensions", "rua.iE_Extensions",
1631         FT_UINT32, BASE_DEC, NULL, 0,
1632         "rua.ProtocolExtensionContainer", HFILL }},
1633     { &hf_rua_CriticalityDiagnostics_IE_List_item,
1634       { "CriticalityDiagnostics-IE-List item", "rua.CriticalityDiagnostics_IE_List_item",
1635         FT_NONE, BASE_NONE, NULL, 0,
1636         "rua.CriticalityDiagnostics_IE_List_item", HFILL }},
1637     { &hf_rua_iECriticality,
1638       { "iECriticality", "rua.iECriticality",
1639         FT_UINT32, BASE_DEC, VALS(rua_Criticality_vals), 0,
1640         "rua.Criticality", HFILL }},
1641     { &hf_rua_iE_ID,
1642       { "iE-ID", "rua.iE_ID",
1643         FT_UINT32, BASE_DEC, VALS(rua_ProtocolIE_ID_vals), 0,
1644         "rua.ProtocolIE_ID", HFILL }},
1645     { &hf_rua_typeOfError,
1646       { "typeOfError", "rua.typeOfError",
1647         FT_UINT32, BASE_DEC, VALS(rua_TypeOfError_vals), 0,
1648         "rua.TypeOfError", HFILL }},
1649     { &hf_rua_protocolIEs,
1650       { "protocolIEs", "rua.protocolIEs",
1651         FT_UINT32, BASE_DEC, NULL, 0,
1652         "rua.ProtocolIE_Container", HFILL }},
1653     { &hf_rua_protocolExtensions,
1654       { "protocolExtensions", "rua.protocolExtensions",
1655         FT_UINT32, BASE_DEC, NULL, 0,
1656         "rua.ProtocolExtensionContainer", HFILL }},
1657     { &hf_rua_privateIEs,
1658       { "privateIEs", "rua.privateIEs",
1659         FT_UINT32, BASE_DEC, NULL, 0,
1660         "rua.PrivateIE_Container", HFILL }},
1661     { &hf_rua_initiatingMessage,
1662       { "initiatingMessage", "rua.initiatingMessage",
1663         FT_NONE, BASE_NONE, NULL, 0,
1664         "rua.InitiatingMessage", HFILL }},
1665     { &hf_rua_successfulOutcome,
1666       { "successfulOutcome", "rua.successfulOutcome",
1667         FT_NONE, BASE_NONE, NULL, 0,
1668         "rua.SuccessfulOutcome", HFILL }},
1669     { &hf_rua_unsuccessfulOutcome,
1670       { "unsuccessfulOutcome", "rua.unsuccessfulOutcome",
1671         FT_NONE, BASE_NONE, NULL, 0,
1672         "rua.UnsuccessfulOutcome", HFILL }},
1673     { &hf_rua_initiatingMessagevalue,
1674       { "value", "rua.value",
1675         FT_NONE, BASE_NONE, NULL, 0,
1676         "rua.InitiatingMessage_value", HFILL }},
1677     { &hf_rua_successfulOutcome_value,
1678       { "value", "rua.value",
1679         FT_NONE, BASE_NONE, NULL, 0,
1680         "rua.SuccessfulOutcome_value", HFILL }},
1681     { &hf_rua_unsuccessfulOutcome_value,
1682       { "value", "rua.value",
1683         FT_NONE, BASE_NONE, NULL, 0,
1684         "rua.UnsuccessfulOutcome_value", HFILL }},
1685
1686 /*--- End of included file: packet-rua-hfarr.c ---*/
1687 #line 140 "packet-rua-template.c"
1688   };
1689
1690   /* List of subtrees */
1691   static gint *ett[] = {
1692           &ett_rua,
1693
1694 /*--- Included file: packet-rua-ettarr.c ---*/
1695 #line 1 "packet-rua-ettarr.c"
1696     &ett_rua_PrivateIE_ID,
1697     &ett_rua_ProtocolIE_Container,
1698     &ett_rua_ProtocolIE_Field,
1699     &ett_rua_ProtocolExtensionContainer,
1700     &ett_rua_ProtocolExtensionField,
1701     &ett_rua_PrivateIE_Container,
1702     &ett_rua_PrivateIE_Field,
1703     &ett_rua_IntraDomainNasNodeSelector,
1704     &ett_rua_T_version,
1705     &ett_rua_T_release99,
1706     &ett_rua_T_cn_Type,
1707     &ett_rua_T_later,
1708     &ett_rua_Gsm_map_IDNNS,
1709     &ett_rua_T_routingbasis,
1710     &ett_rua_T_localPTMSI,
1711     &ett_rua_T_tMSIofsamePLMN,
1712     &ett_rua_T_tMSIofdifferentPLMN,
1713     &ett_rua_T_iMSIresponsetopaging,
1714     &ett_rua_T_iMSIcauseUEinitiatedEvent,
1715     &ett_rua_T_iMEI,
1716     &ett_rua_T_spare2,
1717     &ett_rua_T_spare1,
1718     &ett_rua_Cause,
1719     &ett_rua_CriticalityDiagnostics,
1720     &ett_rua_CriticalityDiagnostics_IE_List,
1721     &ett_rua_CriticalityDiagnostics_IE_List_item,
1722     &ett_rua_Connect,
1723     &ett_rua_DirectTransfer,
1724     &ett_rua_Disconnect,
1725     &ett_rua_ConnectionlessTransfer,
1726     &ett_rua_ErrorIndication,
1727     &ett_rua_PrivateMessage,
1728     &ett_rua_RUA_PDU,
1729     &ett_rua_InitiatingMessage,
1730     &ett_rua_SuccessfulOutcome,
1731     &ett_rua_UnsuccessfulOutcome,
1732
1733 /*--- End of included file: packet-rua-ettarr.c ---*/
1734 #line 146 "packet-rua-template.c"
1735   };
1736
1737
1738   /* Register protocol */
1739   proto_rua = proto_register_protocol(PNAME, PSNAME, PFNAME);
1740   /* Register fields and subtrees */
1741   proto_register_field_array(proto_rua, hf, array_length(hf));
1742   proto_register_subtree_array(ett, array_length(ett));
1743  
1744   /* Register dissector */
1745   register_dissector("rua", dissect_rua, proto_rua);
1746
1747   /* Register dissector tables */
1748   rua_ies_dissector_table = register_dissector_table("rua.ies", "RUA-PROTOCOL-IES", FT_UINT32, BASE_DEC);
1749   rua_extension_dissector_table = register_dissector_table("rua.extension", "RUA-PROTOCOL-EXTENSION", FT_UINT32, BASE_DEC);
1750   rua_proc_imsg_dissector_table = register_dissector_table("rua.proc.imsg", "RUA-ELEMENTARY-PROCEDURE InitiatingMessage", FT_UINT32, BASE_DEC);
1751   rua_proc_sout_dissector_table = register_dissector_table("rua.proc.sout", "RUA-ELEMENTARY-PROCEDURE SuccessfulOutcome", FT_UINT32, BASE_DEC);
1752   rua_proc_uout_dissector_table = register_dissector_table("rua.proc.uout", "RUA-ELEMENTARY-PROCEDURE UnsuccessfulOutcome", FT_UINT32, BASE_DEC);
1753  
1754   rua_module = prefs_register_protocol(proto_rua, proto_reg_handoff_rua);
1755   prefs_register_uint_preference(rua_module, "port", "RUA SCTP Port", "Set the port for RUA messages (Default of 29169)", 10, &global_sctp_port);
1756
1757 }
1758
1759
1760 /*--- proto_reg_handoff_rua ---------------------------------------*/
1761 void
1762 proto_reg_handoff_rua(void)
1763 {
1764         static gboolean initialized = FALSE;
1765         static dissector_handle_t rua_handle;
1766         static guint sctp_port;
1767
1768         if (!initialized) {
1769                 rua_handle = find_dissector("rua");
1770                 ranap_handle = find_dissector("ranap");
1771                 dissector_add("sctp.ppi", RUA_PAYLOAD_PROTOCOL_ID, rua_handle);
1772                 initialized = TRUE;
1773
1774 /*--- Included file: packet-rua-dis-tab.c ---*/
1775 #line 1 "packet-rua-dis-tab.c"
1776   dissector_add("rua.ies", id_Cause, new_create_dissector_handle(dissect_Cause_PDU, proto_rua));
1777   dissector_add("rua.ies", id_CriticalityDiagnostics, new_create_dissector_handle(dissect_CriticalityDiagnostics_PDU, proto_rua));
1778   dissector_add("rua.ies", id_Context_ID, new_create_dissector_handle(dissect_Context_ID_PDU, proto_rua));
1779   dissector_add("rua.ies", id_RANAP_Message, new_create_dissector_handle(dissect_RANAP_Message_PDU, proto_rua));
1780   dissector_add("rua.ies", id_IntraDomainNasNodeSelector, new_create_dissector_handle(dissect_IntraDomainNasNodeSelector_PDU, proto_rua));
1781   dissector_add("rua.ies", id_Establishment_Cause, new_create_dissector_handle(dissect_Establishment_Cause_PDU, proto_rua));
1782   dissector_add("rua.ies", id_CN_DomainIndicator, new_create_dissector_handle(dissect_CN_DomainIndicator_PDU, proto_rua));
1783   dissector_add("rua.extension", id_CSGMembershipStatus, new_create_dissector_handle(dissect_CSGMembershipStatus_PDU, proto_rua));
1784   dissector_add("rua.proc.imsg", id_Connect, new_create_dissector_handle(dissect_Connect_PDU, proto_rua));
1785   dissector_add("rua.proc.imsg", id_DirectTransfer, new_create_dissector_handle(dissect_DirectTransfer_PDU, proto_rua));
1786   dissector_add("rua.proc.imsg", id_Disconnect, new_create_dissector_handle(dissect_Disconnect_PDU, proto_rua));
1787   dissector_add("rua.proc.imsg", id_ConnectionlessTransfer, new_create_dissector_handle(dissect_ConnectionlessTransfer_PDU, proto_rua));
1788   dissector_add("rua.proc.imsg", id_ErrorIndication, new_create_dissector_handle(dissect_ErrorIndication_PDU, proto_rua));
1789   dissector_add("rua.proc.imsg", id_privateMessage, new_create_dissector_handle(dissect_PrivateMessage_PDU, proto_rua));
1790
1791
1792 /*--- End of included file: packet-rua-dis-tab.c ---*/
1793 #line 185 "packet-rua-template.c"
1794
1795         } else {
1796                 dissector_delete("sctp.port", sctp_port, rua_handle);
1797         }
1798         /* Set our port number for future use */
1799         sctp_port = global_sctp_port;
1800         dissector_add("sctp.port", sctp_port, rua_handle);
1801 }