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