Fix up a bunch of arguments to "dissect_ber_identifier()" to match its
[obnox/wireshark/wip.git] / epan / dissectors / packet-MAP_DialoguePDU.c
1 /* Do not modify this file.                                                   */
2 /* It is created automatically by the ASN.1 to Ethereal dissector compiler    */
3 /* ./packet-MAP_DialoguePDU.c                                                 */
4 /* ../../tools/asn2eth.py -X -b -e -p MAP_DialoguePDU -c MAP_DialoguePDU.cnf -s packet-MAP-DialoguePDU-template MAP_DialoguePDU.asn */
5
6 /* Input file: packet-MAP-DialoguePDU-template.c */
7
8 /* packet-MAP_DialoguePDU_asn1.c
9  * Routines for MAP_DialoguePDU packet dissection
10  *
11  * $Id$
12  *
13  * Ethereal - Network traffic analyzer
14  * By Gerald Combs <gerald@ethereal.com>
15  * Copyright 1998 Gerald Combs
16  *
17  * This program is free software; you can redistribute it and/or
18  * modify it under the terms of the GNU General Public License
19  * as published by the Free Software Foundation; either version 2
20  * of the License, or (at your option) any later version.
21  *
22  * This program is distributed in the hope that it will be useful,
23  * but WITHOUT ANY WARRANTY; without even the implied warranty of
24  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
25  * GNU General Public License for more details.
26  *
27  * You should have received a copy of the GNU General Public License
28  * along with this program; if not, write to the Free Software
29  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
30  */
31
32 #ifdef HAVE_CONFIG_H
33 # include "config.h"
34 #endif
35
36 #include <glib.h>
37 #include <epan/packet.h>
38 #include <epan/conversation.h>
39
40 #include <stdio.h>
41 #include <string.h>
42
43 #include "packet-ber.h"
44
45 #define PNAME  "MAP_DialoguePDU"
46 #define PSNAME "MAP_DialoguePDU"
47 #define PFNAME "map_dialoguepdu"
48
49 /* Initialize the protocol and registered fields */
50 int proto_MAP_DialoguePDU = -1;
51
52 /*--- Included file: packet-MAP_DialoguePDU-hf.c ---*/
53
54 static int hf_MAP_DialoguePDU_map_open = -1;      /* T_map_open */
55 static int hf_MAP_DialoguePDU_destinationReference = -1;  /* DestinationReference */
56 static int hf_MAP_DialoguePDU_originationReference = -1;  /* OriginationReference */
57 static int hf_MAP_DialoguePDU_map_accept = -1;    /* T_map_accept */
58 static int hf_MAP_DialoguePDU_map_close = -1;     /* T_map_close */
59 static int hf_MAP_DialoguePDU_map_refuse = -1;    /* T_map_refuse */
60 static int hf_MAP_DialoguePDU_reason = -1;        /* Reason */
61 static int hf_MAP_DialoguePDU_map_userAbort = -1;  /* T_map_userAbort */
62 static int hf_MAP_DialoguePDU_map_UserAbortChoice = -1;  /* MAP_UserAbortChoice */
63 static int hf_MAP_DialoguePDU_map_providerAbort = -1;  /* T_map_providerAbort */
64 static int hf_MAP_DialoguePDU_map_ProviderAbortReason = -1;  /* MAP_ProviderAbortReason */
65 static int hf_MAP_DialoguePDU_userSpecificReason = -1;  /* NULL */
66 static int hf_MAP_DialoguePDU_userResourceLimitation = -1;  /* NULL */
67 static int hf_MAP_DialoguePDU_resourceUnavailable = -1;  /* ResourceUnavailable */
68 static int hf_MAP_DialoguePDU_applicationProcedureCancellation = -1;  /* ApplicationProcedureCancellation */
69
70 /*--- End of included file: packet-MAP_DialoguePDU-hf.c ---*/
71
72
73 /* Initialize the subtree pointers */
74
75 /*--- Included file: packet-MAP_DialoguePDU-ett.c ---*/
76
77 static gint ett_MAP_DialoguePDU_MAP_DialoguePDU = -1;
78 static gint ett_MAP_DialoguePDU_T_map_open = -1;
79 static gint ett_MAP_DialoguePDU_T_map_accept = -1;
80 static gint ett_MAP_DialoguePDU_T_map_close = -1;
81 static gint ett_MAP_DialoguePDU_T_map_refuse = -1;
82 static gint ett_MAP_DialoguePDU_T_map_userAbort = -1;
83 static gint ett_MAP_DialoguePDU_T_map_providerAbort = -1;
84 static gint ett_MAP_DialoguePDU_MAP_OpenInfo = -1;
85 static gint ett_MAP_DialoguePDU_MAP_AcceptInfo = -1;
86 static gint ett_MAP_DialoguePDU_MAP_CloseInfo = -1;
87 static gint ett_MAP_DialoguePDU_MAP_RefuseInfo = -1;
88 static gint ett_MAP_DialoguePDU_MAP_UserAbortInfo = -1;
89 static gint ett_MAP_DialoguePDU_MAP_UserAbortChoice = -1;
90 static gint ett_MAP_DialoguePDU_MAP_ProviderAbortInfo = -1;
91
92 /*--- End of included file: packet-MAP_DialoguePDU-ett.c ---*/
93
94
95
96 /*--- Included file: packet-MAP_DialoguePDU-fn.c ---*/
97
98 /*--- Fields for imported types ---*/
99
100
101
102 static int
103 dissect_MAP_DialoguePDU_DestinationReference(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
104   offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index,
105                                     NULL);
106
107   return offset;
108 }
109 static int dissect_destinationReference_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
110   return dissect_MAP_DialoguePDU_DestinationReference(TRUE, tvb, offset, pinfo, tree, hf_MAP_DialoguePDU_destinationReference);
111 }
112
113
114 static int
115 dissect_MAP_DialoguePDU_OriginationReference(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
116   offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index,
117                                     NULL);
118
119   return offset;
120 }
121 static int dissect_originationReference_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
122   return dissect_MAP_DialoguePDU_OriginationReference(TRUE, tvb, offset, pinfo, tree, hf_MAP_DialoguePDU_originationReference);
123 }
124
125 static const ber_sequence_t T_map_open_sequence[] = {
126   { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_destinationReference_impl },
127   { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_originationReference_impl },
128   { 0, 0, 0, NULL }
129 };
130
131 static int
132 dissect_MAP_DialoguePDU_T_map_open(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
133   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
134                                 T_map_open_sequence, hf_index, ett_MAP_DialoguePDU_T_map_open);
135
136   return offset;
137 }
138 static int dissect_map_open_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
139   return dissect_MAP_DialoguePDU_T_map_open(TRUE, tvb, offset, pinfo, tree, hf_MAP_DialoguePDU_map_open);
140 }
141
142 static const ber_sequence_t T_map_accept_sequence[] = {
143   { 0, 0, 0, NULL }
144 };
145
146 static int
147 dissect_MAP_DialoguePDU_T_map_accept(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
148   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
149                                 T_map_accept_sequence, hf_index, ett_MAP_DialoguePDU_T_map_accept);
150
151   return offset;
152 }
153 static int dissect_map_accept_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
154   return dissect_MAP_DialoguePDU_T_map_accept(TRUE, tvb, offset, pinfo, tree, hf_MAP_DialoguePDU_map_accept);
155 }
156
157 static const ber_sequence_t T_map_close_sequence[] = {
158   { 0, 0, 0, NULL }
159 };
160
161 static int
162 dissect_MAP_DialoguePDU_T_map_close(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
163   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
164                                 T_map_close_sequence, hf_index, ett_MAP_DialoguePDU_T_map_close);
165
166   return offset;
167 }
168 static int dissect_map_close_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
169   return dissect_MAP_DialoguePDU_T_map_close(TRUE, tvb, offset, pinfo, tree, hf_MAP_DialoguePDU_map_close);
170 }
171
172
173 static const value_string MAP_DialoguePDU_Reason_vals[] = {
174   {   0, "noReasonGiven" },
175   {   1, "invalidDestinationReference" },
176   {   2, "invalidOriginatingReference" },
177   { 0, NULL }
178 };
179
180
181 static int
182 dissect_MAP_DialoguePDU_Reason(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
183   offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index, NULL);
184
185   return offset;
186 }
187 static int dissect_reason(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
188   return dissect_MAP_DialoguePDU_Reason(FALSE, tvb, offset, pinfo, tree, hf_MAP_DialoguePDU_reason);
189 }
190
191 static const ber_sequence_t T_map_refuse_sequence[] = {
192   { BER_CLASS_UNI, BER_UNI_TAG_ENUMERATED, BER_FLAGS_NOOWNTAG, dissect_reason },
193   { 0, 0, 0, NULL }
194 };
195
196 static int
197 dissect_MAP_DialoguePDU_T_map_refuse(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
198   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
199                                 T_map_refuse_sequence, hf_index, ett_MAP_DialoguePDU_T_map_refuse);
200
201   return offset;
202 }
203 static int dissect_map_refuse_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
204   return dissect_MAP_DialoguePDU_T_map_refuse(TRUE, tvb, offset, pinfo, tree, hf_MAP_DialoguePDU_map_refuse);
205 }
206
207
208
209 static int
210 dissect_MAP_DialoguePDU_NULL(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
211   offset = dissect_ber_null(implicit_tag, pinfo, tree, tvb, offset, hf_index);
212
213   return offset;
214 }
215 static int dissect_userSpecificReason_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
216   return dissect_MAP_DialoguePDU_NULL(TRUE, tvb, offset, pinfo, tree, hf_MAP_DialoguePDU_userSpecificReason);
217 }
218 static int dissect_userResourceLimitation_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
219   return dissect_MAP_DialoguePDU_NULL(TRUE, tvb, offset, pinfo, tree, hf_MAP_DialoguePDU_userResourceLimitation);
220 }
221
222
223 static const value_string MAP_DialoguePDU_ResourceUnavailable_vals[] = {
224   {   0, "shortTermResourceLimitation" },
225   {   1, "longTermResourceLimitation" },
226   { 0, NULL }
227 };
228
229
230 static int
231 dissect_MAP_DialoguePDU_ResourceUnavailable(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
232   offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index, NULL);
233
234   return offset;
235 }
236 static int dissect_resourceUnavailable_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
237   return dissect_MAP_DialoguePDU_ResourceUnavailable(TRUE, tvb, offset, pinfo, tree, hf_MAP_DialoguePDU_resourceUnavailable);
238 }
239
240
241 static const value_string MAP_DialoguePDU_ApplicationProcedureCancellation_vals[] = {
242   {   0, "handoverCancellation" },
243   {   1, "radioChannelRelease" },
244   {   2, "networkPathRelease" },
245   {   3, "callRelease" },
246   {   4, "associatedProcedureFailure" },
247   {   5, "tandemDialogueRelease" },
248   {   6, "remoteOperationsFailure" },
249   { 0, NULL }
250 };
251
252
253 static int
254 dissect_MAP_DialoguePDU_ApplicationProcedureCancellation(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
255   offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index, NULL);
256
257   return offset;
258 }
259 static int dissect_applicationProcedureCancellation_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
260   return dissect_MAP_DialoguePDU_ApplicationProcedureCancellation(TRUE, tvb, offset, pinfo, tree, hf_MAP_DialoguePDU_applicationProcedureCancellation);
261 }
262
263
264 static const value_string MAP_DialoguePDU_MAP_UserAbortChoice_vals[] = {
265   {   0, "userSpecificReason" },
266   {   1, "userResourceLimitation" },
267   {   2, "resourceUnavailable" },
268   {   3, "applicationProcedureCancellation" },
269   { 0, NULL }
270 };
271
272 static const ber_choice_t MAP_UserAbortChoice_choice[] = {
273   {   0, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_userSpecificReason_impl },
274   {   1, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_userResourceLimitation_impl },
275   {   2, BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_resourceUnavailable_impl },
276   {   3, BER_CLASS_CON, 3, BER_FLAGS_IMPLTAG, dissect_applicationProcedureCancellation_impl },
277   { 0, 0, 0, 0, NULL }
278 };
279
280 static int
281 dissect_MAP_DialoguePDU_MAP_UserAbortChoice(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
282   offset = dissect_ber_CHOICE(pinfo, tree, tvb, offset,
283                               MAP_UserAbortChoice_choice, hf_index, ett_MAP_DialoguePDU_MAP_UserAbortChoice, NULL);
284
285   return offset;
286 }
287 static int dissect_map_UserAbortChoice(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
288   return dissect_MAP_DialoguePDU_MAP_UserAbortChoice(FALSE, tvb, offset, pinfo, tree, hf_MAP_DialoguePDU_map_UserAbortChoice);
289 }
290
291 static const ber_sequence_t T_map_userAbort_sequence[] = {
292   { BER_CLASS_CON, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_map_UserAbortChoice },
293   { 0, 0, 0, NULL }
294 };
295
296 static int
297 dissect_MAP_DialoguePDU_T_map_userAbort(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
298   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
299                                 T_map_userAbort_sequence, hf_index, ett_MAP_DialoguePDU_T_map_userAbort);
300
301   return offset;
302 }
303 static int dissect_map_userAbort_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
304   return dissect_MAP_DialoguePDU_T_map_userAbort(TRUE, tvb, offset, pinfo, tree, hf_MAP_DialoguePDU_map_userAbort);
305 }
306
307
308 static const value_string MAP_DialoguePDU_MAP_ProviderAbortReason_vals[] = {
309   {   0, "abnormalDialogue" },
310   {   1, "invalidPDU" },
311   { 0, NULL }
312 };
313
314
315 static int
316 dissect_MAP_DialoguePDU_MAP_ProviderAbortReason(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
317   offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index, NULL);
318
319   return offset;
320 }
321 static int dissect_map_ProviderAbortReason(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
322   return dissect_MAP_DialoguePDU_MAP_ProviderAbortReason(FALSE, tvb, offset, pinfo, tree, hf_MAP_DialoguePDU_map_ProviderAbortReason);
323 }
324
325 static const ber_sequence_t T_map_providerAbort_sequence[] = {
326   { BER_CLASS_UNI, BER_UNI_TAG_ENUMERATED, BER_FLAGS_NOOWNTAG, dissect_map_ProviderAbortReason },
327   { 0, 0, 0, NULL }
328 };
329
330 static int
331 dissect_MAP_DialoguePDU_T_map_providerAbort(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
332   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
333                                 T_map_providerAbort_sequence, hf_index, ett_MAP_DialoguePDU_T_map_providerAbort);
334
335   return offset;
336 }
337 static int dissect_map_providerAbort_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
338   return dissect_MAP_DialoguePDU_T_map_providerAbort(TRUE, tvb, offset, pinfo, tree, hf_MAP_DialoguePDU_map_providerAbort);
339 }
340
341
342 static const value_string MAP_DialoguePDU_MAP_DialoguePDU_vals[] = {
343   {   0, "map-open" },
344   {   1, "map-accept" },
345   {   2, "map-close" },
346   {   3, "map-refuse" },
347   {   4, "map-userAbort" },
348   {   5, "map-providerAbort" },
349   { 0, NULL }
350 };
351
352 static const ber_choice_t MAP_DialoguePDU_choice[] = {
353   {   0, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_map_open_impl },
354   {   1, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_map_accept_impl },
355   {   2, BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_map_close_impl },
356   {   3, BER_CLASS_CON, 3, BER_FLAGS_IMPLTAG, dissect_map_refuse_impl },
357   {   4, BER_CLASS_CON, 4, BER_FLAGS_IMPLTAG, dissect_map_userAbort_impl },
358   {   5, BER_CLASS_CON, 5, BER_FLAGS_IMPLTAG, dissect_map_providerAbort_impl },
359   { 0, 0, 0, 0, NULL }
360 };
361
362 static int
363 dissect_MAP_DialoguePDU_MAP_DialoguePDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
364   offset = dissect_ber_CHOICE(pinfo, tree, tvb, offset,
365                               MAP_DialoguePDU_choice, hf_index, ett_MAP_DialoguePDU_MAP_DialoguePDU, NULL);
366
367   return offset;
368 }
369
370 static const ber_sequence_t MAP_OpenInfo_sequence[] = {
371   { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_destinationReference_impl },
372   { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_originationReference_impl },
373   { 0, 0, 0, NULL }
374 };
375
376 static int
377 dissect_MAP_DialoguePDU_MAP_OpenInfo(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
378   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
379                                 MAP_OpenInfo_sequence, hf_index, ett_MAP_DialoguePDU_MAP_OpenInfo);
380
381   return offset;
382 }
383
384 static const ber_sequence_t MAP_AcceptInfo_sequence[] = {
385   { 0, 0, 0, NULL }
386 };
387
388 static int
389 dissect_MAP_DialoguePDU_MAP_AcceptInfo(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
390   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
391                                 MAP_AcceptInfo_sequence, hf_index, ett_MAP_DialoguePDU_MAP_AcceptInfo);
392
393   return offset;
394 }
395
396 static const ber_sequence_t MAP_CloseInfo_sequence[] = {
397   { 0, 0, 0, NULL }
398 };
399
400 static int
401 dissect_MAP_DialoguePDU_MAP_CloseInfo(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
402   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
403                                 MAP_CloseInfo_sequence, hf_index, ett_MAP_DialoguePDU_MAP_CloseInfo);
404
405   return offset;
406 }
407
408 static const ber_sequence_t MAP_RefuseInfo_sequence[] = {
409   { BER_CLASS_UNI, BER_UNI_TAG_ENUMERATED, BER_FLAGS_NOOWNTAG, dissect_reason },
410   { 0, 0, 0, NULL }
411 };
412
413 static int
414 dissect_MAP_DialoguePDU_MAP_RefuseInfo(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
415   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
416                                 MAP_RefuseInfo_sequence, hf_index, ett_MAP_DialoguePDU_MAP_RefuseInfo);
417
418   return offset;
419 }
420
421 static const ber_sequence_t MAP_UserAbortInfo_sequence[] = {
422   { BER_CLASS_CON, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_map_UserAbortChoice },
423   { 0, 0, 0, NULL }
424 };
425
426 static int
427 dissect_MAP_DialoguePDU_MAP_UserAbortInfo(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
428   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
429                                 MAP_UserAbortInfo_sequence, hf_index, ett_MAP_DialoguePDU_MAP_UserAbortInfo);
430
431   return offset;
432 }
433
434
435 static const value_string MAP_DialoguePDU_ResourceUnavailableReason_vals[] = {
436   {   0, "shortTermResourceLimitation" },
437   {   1, "longTermResourceLimitation" },
438   { 0, NULL }
439 };
440
441
442 static int
443 dissect_MAP_DialoguePDU_ResourceUnavailableReason(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
444   offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index, NULL);
445
446   return offset;
447 }
448
449
450 static const value_string MAP_DialoguePDU_ProcedureCancellationReason_vals[] = {
451   {   0, "handoverCancellation" },
452   {   1, "radioChannelRelease" },
453   {   2, "networkPathRelease" },
454   {   3, "callRelease" },
455   {   4, "associatedProcedureFailure" },
456   {   5, "tandemDialogueRelease" },
457   {   6, "remoteOperationsFailure" },
458   { 0, NULL }
459 };
460
461
462 static int
463 dissect_MAP_DialoguePDU_ProcedureCancellationReason(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
464   offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index, NULL);
465
466   return offset;
467 }
468
469 static const ber_sequence_t MAP_ProviderAbortInfo_sequence[] = {
470   { BER_CLASS_UNI, BER_UNI_TAG_ENUMERATED, BER_FLAGS_NOOWNTAG, dissect_map_ProviderAbortReason },
471   { 0, 0, 0, NULL }
472 };
473
474 static int
475 dissect_MAP_DialoguePDU_MAP_ProviderAbortInfo(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
476   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
477                                 MAP_ProviderAbortInfo_sequence, hf_index, ett_MAP_DialoguePDU_MAP_ProviderAbortInfo);
478
479   return offset;
480 }
481
482
483 /*--- End of included file: packet-MAP_DialoguePDU-fn.c ---*/
484
485
486 void
487 dissect_MAP_Dialogue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
488 {
489   dissect_MAP_DialoguePDU_MAP_DialoguePDU(FALSE, tvb, 0, pinfo, parent_tree, -1);
490 }
491
492 /*--- proto_register_MAP_DialoguePDU -------------------------------------------*/
493 void proto_register_MAP_DialoguePDU(void) {
494
495   /* List of fields */
496   static hf_register_info hf[] = {
497
498 /*--- Included file: packet-MAP_DialoguePDU-hfarr.c ---*/
499
500     { &hf_MAP_DialoguePDU_map_open,
501       { "map-open", "MAP_DialoguePDU.map_open",
502         FT_NONE, BASE_NONE, NULL, 0,
503         "MAP-DialoguePDU/map-open", HFILL }},
504     { &hf_MAP_DialoguePDU_destinationReference,
505       { "destinationReference", "MAP_DialoguePDU.destinationReference",
506         FT_BYTES, BASE_HEX, NULL, 0,
507         "", HFILL }},
508     { &hf_MAP_DialoguePDU_originationReference,
509       { "originationReference", "MAP_DialoguePDU.originationReference",
510         FT_BYTES, BASE_HEX, NULL, 0,
511         "", HFILL }},
512     { &hf_MAP_DialoguePDU_map_accept,
513       { "map-accept", "MAP_DialoguePDU.map_accept",
514         FT_NONE, BASE_NONE, NULL, 0,
515         "MAP-DialoguePDU/map-accept", HFILL }},
516     { &hf_MAP_DialoguePDU_map_close,
517       { "map-close", "MAP_DialoguePDU.map_close",
518         FT_NONE, BASE_NONE, NULL, 0,
519         "MAP-DialoguePDU/map-close", HFILL }},
520     { &hf_MAP_DialoguePDU_map_refuse,
521       { "map-refuse", "MAP_DialoguePDU.map_refuse",
522         FT_NONE, BASE_NONE, NULL, 0,
523         "MAP-DialoguePDU/map-refuse", HFILL }},
524     { &hf_MAP_DialoguePDU_reason,
525       { "reason", "MAP_DialoguePDU.reason",
526         FT_UINT32, BASE_DEC, VALS(MAP_DialoguePDU_Reason_vals), 0,
527         "", HFILL }},
528     { &hf_MAP_DialoguePDU_map_userAbort,
529       { "map-userAbort", "MAP_DialoguePDU.map_userAbort",
530         FT_NONE, BASE_NONE, NULL, 0,
531         "MAP-DialoguePDU/map-userAbort", HFILL }},
532     { &hf_MAP_DialoguePDU_map_UserAbortChoice,
533       { "map-UserAbortChoice", "MAP_DialoguePDU.map_UserAbortChoice",
534         FT_UINT32, BASE_DEC, VALS(MAP_DialoguePDU_MAP_UserAbortChoice_vals), 0,
535         "", HFILL }},
536     { &hf_MAP_DialoguePDU_map_providerAbort,
537       { "map-providerAbort", "MAP_DialoguePDU.map_providerAbort",
538         FT_NONE, BASE_NONE, NULL, 0,
539         "MAP-DialoguePDU/map-providerAbort", HFILL }},
540     { &hf_MAP_DialoguePDU_map_ProviderAbortReason,
541       { "map-ProviderAbortReason", "MAP_DialoguePDU.map_ProviderAbortReason",
542         FT_UINT32, BASE_DEC, VALS(MAP_DialoguePDU_MAP_ProviderAbortReason_vals), 0,
543         "", HFILL }},
544     { &hf_MAP_DialoguePDU_userSpecificReason,
545       { "userSpecificReason", "MAP_DialoguePDU.userSpecificReason",
546         FT_NONE, BASE_NONE, NULL, 0,
547         "MAP-UserAbortChoice/userSpecificReason", HFILL }},
548     { &hf_MAP_DialoguePDU_userResourceLimitation,
549       { "userResourceLimitation", "MAP_DialoguePDU.userResourceLimitation",
550         FT_NONE, BASE_NONE, NULL, 0,
551         "MAP-UserAbortChoice/userResourceLimitation", HFILL }},
552     { &hf_MAP_DialoguePDU_resourceUnavailable,
553       { "resourceUnavailable", "MAP_DialoguePDU.resourceUnavailable",
554         FT_UINT32, BASE_DEC, VALS(MAP_DialoguePDU_ResourceUnavailable_vals), 0,
555         "MAP-UserAbortChoice/resourceUnavailable", HFILL }},
556     { &hf_MAP_DialoguePDU_applicationProcedureCancellation,
557       { "applicationProcedureCancellation", "MAP_DialoguePDU.applicationProcedureCancellation",
558         FT_UINT32, BASE_DEC, VALS(MAP_DialoguePDU_ApplicationProcedureCancellation_vals), 0,
559         "MAP-UserAbortChoice/applicationProcedureCancellation", HFILL }},
560
561 /*--- End of included file: packet-MAP_DialoguePDU-hfarr.c ---*/
562
563   };
564
565   /* List of subtrees */
566   static gint *ett[] = {
567
568 /*--- Included file: packet-MAP_DialoguePDU-ettarr.c ---*/
569
570     &ett_MAP_DialoguePDU_MAP_DialoguePDU,
571     &ett_MAP_DialoguePDU_T_map_open,
572     &ett_MAP_DialoguePDU_T_map_accept,
573     &ett_MAP_DialoguePDU_T_map_close,
574     &ett_MAP_DialoguePDU_T_map_refuse,
575     &ett_MAP_DialoguePDU_T_map_userAbort,
576     &ett_MAP_DialoguePDU_T_map_providerAbort,
577     &ett_MAP_DialoguePDU_MAP_OpenInfo,
578     &ett_MAP_DialoguePDU_MAP_AcceptInfo,
579     &ett_MAP_DialoguePDU_MAP_CloseInfo,
580     &ett_MAP_DialoguePDU_MAP_RefuseInfo,
581     &ett_MAP_DialoguePDU_MAP_UserAbortInfo,
582     &ett_MAP_DialoguePDU_MAP_UserAbortChoice,
583     &ett_MAP_DialoguePDU_MAP_ProviderAbortInfo,
584
585 /*--- End of included file: packet-MAP_DialoguePDU-ettarr.c ---*/
586
587   };
588
589   /* Register protocol */
590   proto_MAP_DialoguePDU = proto_register_protocol(PNAME, PSNAME, PFNAME);
591   register_dissector("MAP_DialoguePDU", dissect_MAP_Dialogue, proto_MAP_DialoguePDU);
592   /* Register fields and subtrees */
593   proto_register_field_array(proto_MAP_DialoguePDU, hf, array_length(hf));
594   proto_register_subtree_array(ett, array_length(ett));
595
596 }
597
598
599 /*--- proto_reg_handoff_MAP_DialoguePDU ---------------------------------------*/
600 void proto_reg_handoff_MAP_DialoguePDU(void) {
601         register_ber_oid_dissector("0.4.0.0.1.1.1.1", dissect_MAP_Dialogue, proto_MAP_DialoguePDU, 
602           "itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) abstractSyntax(1) map-DialoguePDU(1) version1(1)");
603
604 }