ASN.1 dissectors regenerated with new asn2wrs to get updated field blurb
[obnox/wireshark/wip.git] / epan / dissectors / packet-acse.c
1 /* Do not modify this file.                                                   */
2 /* It is created automatically by the ASN.1 to Wireshark dissector compiler   */
3 /* .\packet-acse.c                                                            */
4 /* ../../tools/asn2wrs.py -b -e -p acse -c acse.cnf -s packet-acse-template acse.asn */
5
6 /* Input file: packet-acse-template.c */
7
8 #line 1 "packet-acse-template.c"
9 /*XXX
10   There is a bug in asn2wrs that it can not yet handle tagged assignments such
11   as EXTERNAL  ::=  [UNIVERSAL 8] IMPLICIT SEQUENCE {
12
13   This bug is workedaround by some .cnf magic but this should be cleaned up
14   once asn2wrs learns how to deal with tagged assignments
15 */
16
17 /* packet-acse.c
18  * Routines for ACSE packet dissection
19  *   Ronnie Sahlberg 2005
20  * dissect_acse() based original handwritten dissector by Sid
21  *   Yuriy Sidelnikov <YSidelnikov@hotmail.com>
22  *
23  *
24  * $Id$
25  *
26  * Wireshark - Network traffic analyzer
27  * By Gerald Combs <gerald@wireshark.org>
28  * Copyright 1998 Gerald Combs
29  *
30  * This program is free software; you can redistribute it and/or
31  * modify it under the terms of the GNU General Public License
32  * as published by the Free Software Foundation; either version 2
33  * of the License, or (at your option) any later version.
34  *
35  * This program is distributed in the hope that it will be useful,
36  * but WITHOUT ANY WARRANTY; without even the implied warranty of
37  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
38  * GNU General Public License for more details.
39  *
40  * You should have received a copy of the GNU General Public License
41  * along with this program; if not, write to the Free Software
42  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
43  */
44
45 #ifdef HAVE_CONFIG_H
46 # include "config.h"
47 #endif
48
49 #include <glib.h>
50 #include <epan/packet.h>
51 #include <epan/emem.h>
52 #include <epan/conversation.h>
53 #include <epan/oid_resolv.h>
54
55 #include <stdio.h>
56 #include <string.h>
57
58 #include "packet-ber.h"
59 #include "packet-acse.h"
60 #include "packet-ses.h"
61 #include "packet-pres.h"
62 #include "packet-x509if.h"
63
64 #define PNAME  "ISO 8650-1 OSI Association Control Service"
65 #define PSNAME "ACSE"
66 #define PFNAME "acse"
67
68 #define ACSE_APDU_OID "2.2.1.0.1"
69
70 /* Initialize the protocol and registered fields */
71 int proto_acse = -1;
72
73 /*--- Included file: packet-acse-hf.c ---*/
74 #line 1 "packet-acse-hf.c"
75 static int hf_acse_direct_reference = -1;         /* T_direct_reference */
76 static int hf_acse_indirect_reference = -1;       /* T_indirect_reference */
77 static int hf_acse_data_value_descriptor = -1;    /* ObjectDescriptor */
78 static int hf_acse_encoding = -1;                 /* T_encoding */
79 static int hf_acse_single_ASN1_type = -1;         /* T_single_ASN1_type */
80 static int hf_acse_octet_aligned = -1;            /* OCTET_STRING */
81 static int hf_acse_arbitrary = -1;                /* BIT_STRING */
82 static int hf_acse_aarq = -1;                     /* AARQ_apdu */
83 static int hf_acse_aare = -1;                     /* AARE_apdu */
84 static int hf_acse_rlrq = -1;                     /* RLRQ_apdu */
85 static int hf_acse_rlre = -1;                     /* RLRE_apdu */
86 static int hf_acse_abrt = -1;                     /* ABRT_apdu */
87 static int hf_acse_adt = -1;                      /* A_DT_apdu */
88 static int hf_acse_acrq = -1;                     /* ACRQ_apdu */
89 static int hf_acse_acrp = -1;                     /* ACRP_apdu */
90 static int hf_acse_aARQ_protocol_version = -1;    /* T_AARQ_protocol_version */
91 static int hf_acse_aARQ_aSO_context_name = -1;    /* T_AARQ_aSO_context_name */
92 static int hf_acse_called_AP_title = -1;          /* AP_title */
93 static int hf_acse_called_AE_qualifier = -1;      /* AE_qualifier */
94 static int hf_acse_called_AP_invocation_identifier = -1;  /* AP_invocation_identifier */
95 static int hf_acse_called_AE_invocation_identifier = -1;  /* AE_invocation_identifier */
96 static int hf_acse_calling_AP_title = -1;         /* AP_title */
97 static int hf_acse_calling_AE_qualifier = -1;     /* AE_qualifier */
98 static int hf_acse_calling_AP_invocation_identifier = -1;  /* AP_invocation_identifier */
99 static int hf_acse_calling_AE_invocation_identifier = -1;  /* AE_invocation_identifier */
100 static int hf_acse_sender_acse_requirements = -1;  /* ACSE_requirements */
101 static int hf_acse_mechanism_name = -1;           /* Mechanism_name */
102 static int hf_acse_calling_authentication_value = -1;  /* Authentication_value */
103 static int hf_acse_aSO_context_name_list = -1;    /* ASO_context_name_list */
104 static int hf_acse_implementation_information = -1;  /* Implementation_data */
105 static int hf_acse_p_context_definition_list = -1;  /* Syntactic_context_list */
106 static int hf_acse_called_asoi_tag = -1;          /* ASOI_tag */
107 static int hf_acse_calling_asoi_tag = -1;         /* ASOI_tag */
108 static int hf_acse_aARQ_user_information = -1;    /* Association_data */
109 static int hf_acse_aARE_protocol_version = -1;    /* T_AARE_protocol_version */
110 static int hf_acse_aARE_aSO_context_name = -1;    /* T_AARE_aSO_context_name */
111 static int hf_acse_aARE_result = -1;              /* Associate_result */
112 static int hf_acse_result_source_diagnostic = -1;  /* Associate_source_diagnostic */
113 static int hf_acse_responding_AP_title = -1;      /* AP_title */
114 static int hf_acse_responding_AE_qualifier = -1;  /* AE_qualifier */
115 static int hf_acse_responding_AP_invocation_identifier = -1;  /* AP_invocation_identifier */
116 static int hf_acse_responding_AE_invocation_identifier = -1;  /* AE_invocation_identifier */
117 static int hf_acse_responder_acse_requirements = -1;  /* ACSE_requirements */
118 static int hf_acse_responding_authentication_value = -1;  /* Authentication_value */
119 static int hf_acse_p_context_result_list = -1;    /* P_context_result_list */
120 static int hf_acse_aARE_user_information = -1;    /* Association_data */
121 static int hf_acse_rLRQ_reason = -1;              /* Release_request_reason */
122 static int hf_acse_aso_qualifier = -1;            /* ASO_qualifier */
123 static int hf_acse_asoi_identifier = -1;          /* ASOI_identifier */
124 static int hf_acse_rLRQ_user_information = -1;    /* Association_data */
125 static int hf_acse_rLRE_reason = -1;              /* Release_response_reason */
126 static int hf_acse_rLRE_user_information = -1;    /* Association_data */
127 static int hf_acse_abort_source = -1;             /* ABRT_source */
128 static int hf_acse_abort_diagnostic = -1;         /* ABRT_diagnostic */
129 static int hf_acse_aBRT_user_information = -1;    /* Association_data */
130 static int hf_acse_a_user_data = -1;              /* User_Data */
131 static int hf_acse_aCRQ_aSO_context_name = -1;    /* T_ACRQ_aSO_context_name */
132 static int hf_acse_user_information = -1;         /* User_information */
133 static int hf_acse_aSO_context_name = -1;         /* T_ACRP_aSO_context_name */
134 static int hf_acse_ap_title_form1 = -1;           /* AP_title_form1 */
135 static int hf_acse_ap_title_form2 = -1;           /* AP_title_form2 */
136 static int hf_acse_ap_title_form3 = -1;           /* AP_title_form3 */
137 static int hf_acse_aso_qualifier_form1 = -1;      /* ASO_qualifier_form1 */
138 static int hf_acse_aso_qualifier_form2 = -1;      /* ASO_qualifier_form2 */
139 static int hf_acse_aso_qualifier_form3 = -1;      /* ASO_qualifier_form3 */
140 static int hf_acse_ae_title_form1 = -1;           /* AE_title_form1 */
141 static int hf_acse_ae_title_form2 = -1;           /* AE_title_form2 */
142 static int hf_acse_ASOI_tag_item = -1;            /* ASOI_tag_item */
143 static int hf_acse_qualifier = -1;                /* ASO_qualifier */
144 static int hf_acse_identifier = -1;               /* ASOI_identifier */
145 static int hf_acse_ASO_context_name_list_item = -1;  /* ASO_context_name */
146 static int hf_acse_context_list = -1;             /* Context_list */
147 static int hf_acse_default_contact_list = -1;     /* Default_Context_List */
148 static int hf_acse_Context_list_item = -1;        /* Context_list_item */
149 static int hf_acse_pci = -1;                      /* Presentation_context_identifier */
150 static int hf_acse_abstract_syntax = -1;          /* Abstract_syntax_name */
151 static int hf_acse_transfer_syntaxes = -1;        /* SEQUENCE_OF_TransferSyntaxName */
152 static int hf_acse_transfer_syntaxes_item = -1;   /* TransferSyntaxName */
153 static int hf_acse_Default_Context_List_item = -1;  /* Default_Context_List_item */
154 static int hf_acse_abstract_syntax_name = -1;     /* Abstract_syntax_name */
155 static int hf_acse_transfer_syntax_name = -1;     /* TransferSyntaxName */
156 static int hf_acse_P_context_result_list_item = -1;  /* P_context_result_list_item */
157 static int hf_acse_pcontext_result = -1;          /* Result */
158 static int hf_acse_concrete_syntax_name = -1;     /* Concrete_syntax_name */
159 static int hf_acse_provider_reason = -1;          /* T_provider_reason */
160 static int hf_acse_acse_service_user = -1;        /* T_acse_service_user */
161 static int hf_acse_acse_service_provider = -1;    /* T_acse_service_provider */
162 static int hf_acse_Association_data_item = -1;    /* EXTERNAL */
163 static int hf_acse_simply_encoded_data = -1;      /* Simply_encoded_data */
164 static int hf_acse_fully_encoded_data = -1;       /* PDV_list */
165 static int hf_acse_presentation_context_identifier = -1;  /* Presentation_context_identifier */
166 static int hf_acse_presentation_data_values = -1;  /* T_presentation_data_values */
167 static int hf_acse_simple_ASN1_type = -1;         /* T_simple_ASN1_type */
168 static int hf_acse_other_mechanism_name = -1;     /* T_other_mechanism_name */
169 static int hf_acse_other_mechanism_value = -1;    /* T_other_mechanism_value */
170 static int hf_acse_charstring = -1;               /* GraphicString */
171 static int hf_acse_bitstring = -1;                /* BIT_STRING */
172 static int hf_acse_external = -1;                 /* EXTERNAL */
173 static int hf_acse_other = -1;                    /* Authentication_value_other */
174 /* named bits */
175 static int hf_acse_T_AARQ_protocol_version_version1 = -1;
176 static int hf_acse_T_AARE_protocol_version_version1 = -1;
177 static int hf_acse_ACSE_requirements_authentication = -1;
178 static int hf_acse_ACSE_requirements_aSO_context_negotiation = -1;
179 static int hf_acse_ACSE_requirements_higher_level_association = -1;
180 static int hf_acse_ACSE_requirements_nested_association = -1;
181
182 /*--- End of included file: packet-acse-hf.c ---*/
183 #line 65 "packet-acse-template.c"
184
185 /* Initialize the subtree pointers */
186 static gint ett_acse = -1;
187
188 /*--- Included file: packet-acse-ett.c ---*/
189 #line 1 "packet-acse-ett.c"
190 static gint ett_acse_EXTERNAL = -1;
191 static gint ett_acse_T_encoding = -1;
192 static gint ett_acse_ACSE_apdu = -1;
193 static gint ett_acse_AARQ_apdu = -1;
194 static gint ett_acse_T_AARQ_protocol_version = -1;
195 static gint ett_acse_AARE_apdu = -1;
196 static gint ett_acse_T_AARE_protocol_version = -1;
197 static gint ett_acse_RLRQ_apdu = -1;
198 static gint ett_acse_RLRE_apdu = -1;
199 static gint ett_acse_ABRT_apdu = -1;
200 static gint ett_acse_A_DT_apdu = -1;
201 static gint ett_acse_ACRQ_apdu = -1;
202 static gint ett_acse_ACRP_apdu = -1;
203 static gint ett_acse_ACSE_requirements = -1;
204 static gint ett_acse_AP_title = -1;
205 static gint ett_acse_ASO_qualifier = -1;
206 static gint ett_acse_AE_title = -1;
207 static gint ett_acse_ASOI_tag = -1;
208 static gint ett_acse_ASOI_tag_item = -1;
209 static gint ett_acse_ASO_context_name_list = -1;
210 static gint ett_acse_Syntactic_context_list = -1;
211 static gint ett_acse_Context_list = -1;
212 static gint ett_acse_Context_list_item = -1;
213 static gint ett_acse_SEQUENCE_OF_TransferSyntaxName = -1;
214 static gint ett_acse_Default_Context_List = -1;
215 static gint ett_acse_Default_Context_List_item = -1;
216 static gint ett_acse_P_context_result_list = -1;
217 static gint ett_acse_P_context_result_list_item = -1;
218 static gint ett_acse_Associate_source_diagnostic = -1;
219 static gint ett_acse_Association_data = -1;
220 static gint ett_acse_User_Data = -1;
221 static gint ett_acse_PDV_list = -1;
222 static gint ett_acse_T_presentation_data_values = -1;
223 static gint ett_acse_Authentication_value_other = -1;
224 static gint ett_acse_Authentication_value = -1;
225
226 /*--- End of included file: packet-acse-ett.c ---*/
227 #line 69 "packet-acse-template.c"
228
229 static struct SESSION_DATA_STRUCTURE* session = NULL;
230
231 static const char *object_identifier_id;
232 /* indirect_reference, used to pick up the signalling so we know what
233    kind of data is transferred in SES_DATA_TRANSFER_PDUs */
234 static guint32 indir_ref=0;
235
236 static proto_tree *top_tree=NULL;
237
238 #if NOT_NEEDED
239 /* to keep track of presentation context identifiers and protocol-oids */
240 typedef struct _acse_ctx_oid_t {
241         /* XXX here we should keep track of ADDRESS/PORT as well */
242         guint32 ctx_id;
243         char *oid;
244 } acse_ctx_oid_t;
245 static GHashTable *acse_ctx_oid_table = NULL;
246
247 static guint
248 acse_ctx_oid_hash(gconstpointer k)
249 {
250         acse_ctx_oid_t *aco=(acse_ctx_oid_t *)k;
251         return aco->ctx_id;
252 }
253 /* XXX this one should be made ADDRESS/PORT aware */
254 static gint
255 acse_ctx_oid_equal(gconstpointer k1, gconstpointer k2)
256 {
257         acse_ctx_oid_t *aco1=(acse_ctx_oid_t *)k1;
258         acse_ctx_oid_t *aco2=(acse_ctx_oid_t *)k2;
259         return aco1->ctx_id==aco2->ctx_id;
260 }
261
262 static void
263 acse_init(void)
264 {
265         if( acse_ctx_oid_table ){
266                 g_hash_table_destroy(acse_ctx_oid_table);
267                 acse_ctx_oid_table = NULL;
268         }
269         acse_ctx_oid_table = g_hash_table_new(acse_ctx_oid_hash,
270                         acse_ctx_oid_equal);
271
272 }
273
274 static void
275 register_ctx_id_and_oid(packet_info *pinfo _U_, guint32 idx, char *oid)
276 {
277         acse_ctx_oid_t *aco, *tmpaco;
278         aco=se_alloc(sizeof(acse_ctx_oid_t));
279         aco->ctx_id=idx;
280         aco->oid=se_strdup(oid);
281
282         /* if this ctx already exists, remove the old one first */
283         tmpaco=(acse_ctx_oid_t *)g_hash_table_lookup(acse_ctx_oid_table, aco);
284         if(tmpaco){
285                 g_hash_table_remove(acse_ctx_oid_table, tmpaco);
286         }
287         g_hash_table_insert(acse_ctx_oid_table, aco, aco);
288 }
289 static char *
290 find_oid_by_ctx_id(packet_info *pinfo _U_, guint32 idx)
291 {
292         acse_ctx_oid_t aco, *tmpaco;
293         aco.ctx_id=idx;
294         tmpaco=(acse_ctx_oid_t *)g_hash_table_lookup(acse_ctx_oid_table, &aco);
295         if(tmpaco){
296                 return tmpaco->oid;
297         }
298         return NULL;
299 }
300
301 # endif /* NOT_NEEDED */
302
303
304 /*--- Included file: packet-acse-fn.c ---*/
305 #line 1 "packet-acse-fn.c"
306 /*--- Fields for imported types ---*/
307
308
309
310
311 static int
312 dissect_acse_T_direct_reference(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
313   offset = dissect_ber_object_identifier_str(implicit_tag, pinfo, tree, tvb, offset, hf_index, &object_identifier_id);
314
315   return offset;
316 }
317 static int dissect_direct_reference(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
318   return dissect_acse_T_direct_reference(FALSE, tvb, offset, pinfo, tree, hf_acse_direct_reference);
319 }
320
321
322
323 static int
324 dissect_acse_T_indirect_reference(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
325 #line 83 "acse.cnf"
326   char *oid;
327   offset = dissect_ber_integer(FALSE, pinfo, tree, tvb, offset,
328                 hf_acse_indirect_reference,
329                 &indir_ref);
330
331   /* look up the indirect reference */
332   if((oid = find_oid_by_pres_ctx_id(pinfo, indir_ref)) != NULL) {
333     object_identifier_id = ep_strdup(oid);
334   }
335
336   if(session)
337         session->pres_ctx_id = indir_ref;
338
339
340
341   return offset;
342 }
343 static int dissect_indirect_reference(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
344   return dissect_acse_T_indirect_reference(FALSE, tvb, offset, pinfo, tree, hf_acse_indirect_reference);
345 }
346
347
348
349 static int
350 dissect_acse_ObjectDescriptor(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
351   offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_ObjectDescriptor,
352                                             pinfo, tree, tvb, offset, hf_index,
353                                             NULL);
354
355   return offset;
356 }
357 static int dissect_data_value_descriptor(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
358   return dissect_acse_ObjectDescriptor(FALSE, tvb, offset, pinfo, tree, hf_acse_data_value_descriptor);
359 }
360
361
362
363 static int
364 dissect_acse_T_single_ASN1_type(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
365 #line 100 "acse.cnf"
366   offset=call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, top_tree ? top_tree : tree);
367
368
369
370   return offset;
371 }
372 static int dissect_single_ASN1_type(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
373   return dissect_acse_T_single_ASN1_type(FALSE, tvb, offset, pinfo, tree, hf_acse_single_ASN1_type);
374 }
375
376
377
378 static int
379 dissect_acse_OCTET_STRING(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
380   offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index,
381                                        NULL);
382
383   return offset;
384 }
385 static int dissect_octet_aligned_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
386   return dissect_acse_OCTET_STRING(TRUE, tvb, offset, pinfo, tree, hf_acse_octet_aligned);
387 }
388
389
390
391 static int
392 dissect_acse_BIT_STRING(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
393   offset = dissect_ber_bitstring(implicit_tag, pinfo, tree, tvb, offset,
394                                     NULL, hf_index, -1,
395                                     NULL);
396
397   return offset;
398 }
399 static int dissect_arbitrary_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
400   return dissect_acse_BIT_STRING(TRUE, tvb, offset, pinfo, tree, hf_acse_arbitrary);
401 }
402 static int dissect_bitstring_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
403   return dissect_acse_BIT_STRING(TRUE, tvb, offset, pinfo, tree, hf_acse_bitstring);
404 }
405
406
407 static const value_string acse_T_encoding_vals[] = {
408   {   0, "single-ASN1-type" },
409   {   1, "octet-aligned" },
410   {   2, "arbitrary" },
411   { 0, NULL }
412 };
413
414 static const ber_choice_t T_encoding_choice[] = {
415   {   0, BER_CLASS_CON, 0, 0, dissect_single_ASN1_type },
416   {   1, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_octet_aligned_impl },
417   {   2, BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_arbitrary_impl },
418   { 0, 0, 0, 0, NULL }
419 };
420
421 static int
422 dissect_acse_T_encoding(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
423   offset = dissect_ber_choice(pinfo, tree, tvb, offset,
424                                  T_encoding_choice, hf_index, ett_acse_T_encoding,
425                                  NULL);
426
427   return offset;
428 }
429 static int dissect_encoding(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
430   return dissect_acse_T_encoding(FALSE, tvb, offset, pinfo, tree, hf_acse_encoding);
431 }
432
433
434 static const ber_sequence_t EXTERNAL_sequence[] = {
435   { BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_direct_reference },
436   { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_indirect_reference },
437   { BER_CLASS_UNI, BER_UNI_TAG_ObjectDescriptor, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_data_value_descriptor },
438   { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_encoding },
439   { 0, 0, 0, NULL }
440 };
441
442 int
443 dissect_acse_EXTERNAL(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
444 #line 41 "acse.cnf"
445   gint8 class;
446   gboolean pc, ind_field;
447   gint32 tag;
448   guint32 len1;
449
450   if(!implicit_tag) {
451     /* XXX  asn2wrs can not yet handle tagged assignment so for the
452      * time being  just remove this tag manually inside the EXTERNAL
453      * dissector.
454      */
455      offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
456      offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
457    }
458    offset = dissect_ber_sequence(TRUE, pinfo, tree, tvb, offset,
459                                 EXTERNAL_sequence, hf_index, ett_acse_EXTERNAL);
460
461
462
463   return offset;
464 }
465 static int dissect_Association_data_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
466   return dissect_acse_EXTERNAL(FALSE, tvb, offset, pinfo, tree, hf_acse_Association_data_item);
467 }
468 static int dissect_external_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
469   return dissect_acse_EXTERNAL(TRUE, tvb, offset, pinfo, tree, hf_acse_external);
470 }
471
472
473 static const asn_namedbit T_AARQ_protocol_version_bits[] = {
474   {  0, &hf_acse_T_AARQ_protocol_version_version1, -1, -1, "version1", NULL },
475   { 0, NULL, 0, 0, NULL, NULL }
476 };
477
478 static int
479 dissect_acse_T_AARQ_protocol_version(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
480   offset = dissect_ber_bitstring(implicit_tag, pinfo, tree, tvb, offset,
481                                     T_AARQ_protocol_version_bits, hf_index, ett_acse_T_AARQ_protocol_version,
482                                     NULL);
483
484   return offset;
485 }
486 static int dissect_aARQ_protocol_version_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
487   return dissect_acse_T_AARQ_protocol_version(TRUE, tvb, offset, pinfo, tree, hf_acse_aARQ_protocol_version);
488 }
489
490
491
492 static int
493 dissect_acse_ASO_context_name(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
494   offset = dissect_ber_object_identifier(implicit_tag, pinfo, tree, tvb, offset, hf_index, NULL);
495
496   return offset;
497 }
498 static int dissect_ASO_context_name_list_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
499   return dissect_acse_ASO_context_name(FALSE, tvb, offset, pinfo, tree, hf_acse_ASO_context_name_list_item);
500 }
501
502
503
504 static int
505 dissect_acse_T_AARQ_aSO_context_name(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
506 #line 67 "acse.cnf"
507   offset = dissect_ber_object_identifier_str(FALSE, pinfo, tree, tvb, offset,
508                                          hf_index, &object_identifier_id);
509
510
511
512   return offset;
513 }
514 static int dissect_aARQ_aSO_context_name(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
515   return dissect_acse_T_AARQ_aSO_context_name(FALSE, tvb, offset, pinfo, tree, hf_acse_aARQ_aSO_context_name);
516 }
517
518
519
520 static int
521 dissect_acse_AP_title_form1(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
522   offset = dissect_x509if_Name(implicit_tag, tvb, offset, pinfo, tree, hf_index);
523
524   return offset;
525 }
526 static int dissect_ap_title_form1(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
527   return dissect_acse_AP_title_form1(FALSE, tvb, offset, pinfo, tree, hf_acse_ap_title_form1);
528 }
529
530
531
532 static int
533 dissect_acse_AP_title_form2(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
534   offset = dissect_ber_object_identifier(implicit_tag, pinfo, tree, tvb, offset, hf_index, NULL);
535
536   return offset;
537 }
538 static int dissect_ap_title_form2(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
539   return dissect_acse_AP_title_form2(FALSE, tvb, offset, pinfo, tree, hf_acse_ap_title_form2);
540 }
541
542
543
544 static int
545 dissect_acse_AP_title_form3(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
546   offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_PrintableString,
547                                             pinfo, tree, tvb, offset, hf_index,
548                                             NULL);
549
550   return offset;
551 }
552 static int dissect_ap_title_form3(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
553   return dissect_acse_AP_title_form3(FALSE, tvb, offset, pinfo, tree, hf_acse_ap_title_form3);
554 }
555
556
557 const value_string acse_AP_title_vals[] = {
558   {   0, "ap-title-form1" },
559   {   1, "ap-title-form2" },
560   {   2, "ap-title-form3" },
561   {   3, "ap-title-form3" },
562   { 0, NULL }
563 };
564
565 static const ber_choice_t AP_title_choice[] = {
566   {   0, BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_ap_title_form1 },
567   {   1, BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_ap_title_form2 },
568   {   2, BER_CLASS_UNI, BER_UNI_TAG_PrintableString, BER_FLAGS_NOOWNTAG, dissect_ap_title_form3 },
569   {   3, BER_CLASS_UNI, BER_UNI_TAG_PrintableString, BER_FLAGS_NOOWNTAG, dissect_ap_title_form3 },
570   {   4, BER_CLASS_UNI, BER_UNI_TAG_PrintableString, BER_FLAGS_NOOWNTAG, dissect_ap_title_form3 },
571   { 0, 0, 0, 0, NULL }
572 };
573
574 int
575 dissect_acse_AP_title(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
576   offset = dissect_ber_choice(pinfo, tree, tvb, offset,
577                                  AP_title_choice, hf_index, ett_acse_AP_title,
578                                  NULL);
579
580   return offset;
581 }
582 static int dissect_called_AP_title(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
583   return dissect_acse_AP_title(FALSE, tvb, offset, pinfo, tree, hf_acse_called_AP_title);
584 }
585 static int dissect_calling_AP_title(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
586   return dissect_acse_AP_title(FALSE, tvb, offset, pinfo, tree, hf_acse_calling_AP_title);
587 }
588 static int dissect_responding_AP_title(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
589   return dissect_acse_AP_title(FALSE, tvb, offset, pinfo, tree, hf_acse_responding_AP_title);
590 }
591
592
593
594 static int
595 dissect_acse_ASO_qualifier_form1(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
596   offset = dissect_x509if_RelativeDistinguishedName(implicit_tag, tvb, offset, pinfo, tree, hf_index);
597
598   return offset;
599 }
600 static int dissect_aso_qualifier_form1(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
601   return dissect_acse_ASO_qualifier_form1(FALSE, tvb, offset, pinfo, tree, hf_acse_aso_qualifier_form1);
602 }
603
604
605
606 static int
607 dissect_acse_ASO_qualifier_form2(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
608   offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
609                                   NULL);
610
611   return offset;
612 }
613 static int dissect_aso_qualifier_form2(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
614   return dissect_acse_ASO_qualifier_form2(FALSE, tvb, offset, pinfo, tree, hf_acse_aso_qualifier_form2);
615 }
616
617
618
619 static int
620 dissect_acse_ASO_qualifier_form3(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
621   offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_PrintableString,
622                                             pinfo, tree, tvb, offset, hf_index,
623                                             NULL);
624
625   return offset;
626 }
627 static int dissect_aso_qualifier_form3(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
628   return dissect_acse_ASO_qualifier_form3(FALSE, tvb, offset, pinfo, tree, hf_acse_aso_qualifier_form3);
629 }
630
631
632 const value_string acse_ASO_qualifier_vals[] = {
633   {   0, "aso-qualifier-form1" },
634   {   1, "aso-qualifier-form2" },
635   {   2, "aso-qualifier-form3" },
636   {   3, "aso-qualifier-form3" },
637   { 0, NULL }
638 };
639
640 static const ber_choice_t ASO_qualifier_choice[] = {
641   {   0, BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_aso_qualifier_form1 },
642   {   1, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_aso_qualifier_form2 },
643   {   2, BER_CLASS_UNI, BER_UNI_TAG_PrintableString, BER_FLAGS_NOOWNTAG, dissect_aso_qualifier_form3 },
644   {   3, BER_CLASS_UNI, BER_UNI_TAG_PrintableString, BER_FLAGS_NOOWNTAG, dissect_aso_qualifier_form3 },
645   {   4, BER_CLASS_UNI, BER_UNI_TAG_PrintableString, BER_FLAGS_NOOWNTAG, dissect_aso_qualifier_form3 },
646   { 0, 0, 0, 0, NULL }
647 };
648
649 int
650 dissect_acse_ASO_qualifier(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
651   offset = dissect_ber_choice(pinfo, tree, tvb, offset,
652                                  ASO_qualifier_choice, hf_index, ett_acse_ASO_qualifier,
653                                  NULL);
654
655   return offset;
656 }
657 static int dissect_aso_qualifier(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
658   return dissect_acse_ASO_qualifier(FALSE, tvb, offset, pinfo, tree, hf_acse_aso_qualifier);
659 }
660 static int dissect_qualifier(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
661   return dissect_acse_ASO_qualifier(FALSE, tvb, offset, pinfo, tree, hf_acse_qualifier);
662 }
663
664
665
666 int
667 dissect_acse_AE_qualifier(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
668   offset = dissect_acse_ASO_qualifier(implicit_tag, tvb, offset, pinfo, tree, hf_index);
669
670   return offset;
671 }
672 static int dissect_called_AE_qualifier(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
673   return dissect_acse_AE_qualifier(FALSE, tvb, offset, pinfo, tree, hf_acse_called_AE_qualifier);
674 }
675 static int dissect_calling_AE_qualifier(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
676   return dissect_acse_AE_qualifier(FALSE, tvb, offset, pinfo, tree, hf_acse_calling_AE_qualifier);
677 }
678 static int dissect_responding_AE_qualifier(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
679   return dissect_acse_AE_qualifier(FALSE, tvb, offset, pinfo, tree, hf_acse_responding_AE_qualifier);
680 }
681
682
683
684 int
685 dissect_acse_AP_invocation_identifier(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
686   offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
687                                   NULL);
688
689   return offset;
690 }
691 static int dissect_called_AP_invocation_identifier(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
692   return dissect_acse_AP_invocation_identifier(FALSE, tvb, offset, pinfo, tree, hf_acse_called_AP_invocation_identifier);
693 }
694 static int dissect_calling_AP_invocation_identifier(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
695   return dissect_acse_AP_invocation_identifier(FALSE, tvb, offset, pinfo, tree, hf_acse_calling_AP_invocation_identifier);
696 }
697 static int dissect_responding_AP_invocation_identifier(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
698   return dissect_acse_AP_invocation_identifier(FALSE, tvb, offset, pinfo, tree, hf_acse_responding_AP_invocation_identifier);
699 }
700
701
702
703 int
704 dissect_acse_AE_invocation_identifier(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
705   offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
706                                   NULL);
707
708   return offset;
709 }
710 static int dissect_called_AE_invocation_identifier(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
711   return dissect_acse_AE_invocation_identifier(FALSE, tvb, offset, pinfo, tree, hf_acse_called_AE_invocation_identifier);
712 }
713 static int dissect_calling_AE_invocation_identifier(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
714   return dissect_acse_AE_invocation_identifier(FALSE, tvb, offset, pinfo, tree, hf_acse_calling_AE_invocation_identifier);
715 }
716 static int dissect_responding_AE_invocation_identifier(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
717   return dissect_acse_AE_invocation_identifier(FALSE, tvb, offset, pinfo, tree, hf_acse_responding_AE_invocation_identifier);
718 }
719
720
721 static const asn_namedbit ACSE_requirements_bits[] = {
722   {  0, &hf_acse_ACSE_requirements_authentication, -1, -1, "authentication", NULL },
723   {  1, &hf_acse_ACSE_requirements_aSO_context_negotiation, -1, -1, "aSO-context-negotiation", NULL },
724   {  2, &hf_acse_ACSE_requirements_higher_level_association, -1, -1, "higher-level-association", NULL },
725   {  3, &hf_acse_ACSE_requirements_nested_association, -1, -1, "nested-association", NULL },
726   { 0, NULL, 0, 0, NULL, NULL }
727 };
728
729 static int
730 dissect_acse_ACSE_requirements(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
731   offset = dissect_ber_bitstring(implicit_tag, pinfo, tree, tvb, offset,
732                                     ACSE_requirements_bits, hf_index, ett_acse_ACSE_requirements,
733                                     NULL);
734
735   return offset;
736 }
737 static int dissect_sender_acse_requirements_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
738   return dissect_acse_ACSE_requirements(TRUE, tvb, offset, pinfo, tree, hf_acse_sender_acse_requirements);
739 }
740 static int dissect_responder_acse_requirements_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
741   return dissect_acse_ACSE_requirements(TRUE, tvb, offset, pinfo, tree, hf_acse_responder_acse_requirements);
742 }
743
744
745
746 static int
747 dissect_acse_Mechanism_name(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
748   offset = dissect_ber_object_identifier(implicit_tag, pinfo, tree, tvb, offset, hf_index, NULL);
749
750   return offset;
751 }
752 static int dissect_mechanism_name_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
753   return dissect_acse_Mechanism_name(TRUE, tvb, offset, pinfo, tree, hf_acse_mechanism_name);
754 }
755
756
757
758 static int
759 dissect_acse_GraphicString(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
760   offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_GraphicString,
761                                             pinfo, tree, tvb, offset, hf_index,
762                                             NULL);
763
764   return offset;
765 }
766 static int dissect_charstring_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
767   return dissect_acse_GraphicString(TRUE, tvb, offset, pinfo, tree, hf_acse_charstring);
768 }
769
770
771
772 static int
773 dissect_acse_T_other_mechanism_name(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
774   offset = dissect_ber_object_identifier_str(implicit_tag, pinfo, tree, tvb, offset, hf_index, &object_identifier_id);
775
776   return offset;
777 }
778 static int dissect_other_mechanism_name(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
779   return dissect_acse_T_other_mechanism_name(FALSE, tvb, offset, pinfo, tree, hf_acse_other_mechanism_name);
780 }
781
782
783
784 static int
785 dissect_acse_T_other_mechanism_value(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
786 #line 61 "acse.cnf"
787   offset=call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, top_tree);
788
789
790
791   return offset;
792 }
793 static int dissect_other_mechanism_value(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
794   return dissect_acse_T_other_mechanism_value(FALSE, tvb, offset, pinfo, tree, hf_acse_other_mechanism_value);
795 }
796
797
798 static const ber_sequence_t Authentication_value_other_sequence[] = {
799   { BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_other_mechanism_name },
800   { BER_CLASS_ANY, 0, BER_FLAGS_NOOWNTAG, dissect_other_mechanism_value },
801   { 0, 0, 0, NULL }
802 };
803
804 static int
805 dissect_acse_Authentication_value_other(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
806   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
807                                    Authentication_value_other_sequence, hf_index, ett_acse_Authentication_value_other);
808
809   return offset;
810 }
811 static int dissect_other_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
812   return dissect_acse_Authentication_value_other(TRUE, tvb, offset, pinfo, tree, hf_acse_other);
813 }
814
815
816 static const value_string acse_Authentication_value_vals[] = {
817   {   0, "charstring" },
818   {   1, "bitstring" },
819   {   2, "external" },
820   {   3, "other" },
821   { 0, NULL }
822 };
823
824 static const ber_choice_t Authentication_value_choice[] = {
825   {   0, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_charstring_impl },
826   {   1, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_bitstring_impl },
827   {   2, BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_external_impl },
828   {   3, BER_CLASS_CON, 3, BER_FLAGS_IMPLTAG, dissect_other_impl },
829   { 0, 0, 0, 0, NULL }
830 };
831
832 static int
833 dissect_acse_Authentication_value(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
834   offset = dissect_ber_choice(pinfo, tree, tvb, offset,
835                                  Authentication_value_choice, hf_index, ett_acse_Authentication_value,
836                                  NULL);
837
838   return offset;
839 }
840 static int dissect_calling_authentication_value(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
841   return dissect_acse_Authentication_value(FALSE, tvb, offset, pinfo, tree, hf_acse_calling_authentication_value);
842 }
843 static int dissect_responding_authentication_value(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
844   return dissect_acse_Authentication_value(FALSE, tvb, offset, pinfo, tree, hf_acse_responding_authentication_value);
845 }
846
847
848 static const ber_sequence_t ASO_context_name_list_sequence_of[1] = {
849   { BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_ASO_context_name_list_item },
850 };
851
852 static int
853 dissect_acse_ASO_context_name_list(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
854   offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
855                                       ASO_context_name_list_sequence_of, hf_index, ett_acse_ASO_context_name_list);
856
857   return offset;
858 }
859 static int dissect_aSO_context_name_list_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
860   return dissect_acse_ASO_context_name_list(TRUE, tvb, offset, pinfo, tree, hf_acse_aSO_context_name_list);
861 }
862
863
864
865 static int
866 dissect_acse_Implementation_data(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
867   offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_GraphicString,
868                                             pinfo, tree, tvb, offset, hf_index,
869                                             NULL);
870
871   return offset;
872 }
873 static int dissect_implementation_information_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
874   return dissect_acse_Implementation_data(TRUE, tvb, offset, pinfo, tree, hf_acse_implementation_information);
875 }
876
877
878
879 static int
880 dissect_acse_Presentation_context_identifier(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
881   offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
882                                   NULL);
883
884   return offset;
885 }
886 static int dissect_pci(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
887   return dissect_acse_Presentation_context_identifier(FALSE, tvb, offset, pinfo, tree, hf_acse_pci);
888 }
889 static int dissect_presentation_context_identifier(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
890   return dissect_acse_Presentation_context_identifier(FALSE, tvb, offset, pinfo, tree, hf_acse_presentation_context_identifier);
891 }
892
893
894
895 static int
896 dissect_acse_Abstract_syntax_name(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
897   offset = dissect_ber_object_identifier(implicit_tag, pinfo, tree, tvb, offset, hf_index, NULL);
898
899   return offset;
900 }
901 static int dissect_abstract_syntax(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
902   return dissect_acse_Abstract_syntax_name(FALSE, tvb, offset, pinfo, tree, hf_acse_abstract_syntax);
903 }
904 static int dissect_abstract_syntax_name_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
905   return dissect_acse_Abstract_syntax_name(TRUE, tvb, offset, pinfo, tree, hf_acse_abstract_syntax_name);
906 }
907
908
909
910 static int
911 dissect_acse_TransferSyntaxName(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
912   offset = dissect_ber_object_identifier(implicit_tag, pinfo, tree, tvb, offset, hf_index, NULL);
913
914   return offset;
915 }
916 static int dissect_transfer_syntaxes_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
917   return dissect_acse_TransferSyntaxName(FALSE, tvb, offset, pinfo, tree, hf_acse_transfer_syntaxes_item);
918 }
919 static int dissect_transfer_syntax_name(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
920   return dissect_acse_TransferSyntaxName(FALSE, tvb, offset, pinfo, tree, hf_acse_transfer_syntax_name);
921 }
922 static int dissect_transfer_syntax_name_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
923   return dissect_acse_TransferSyntaxName(TRUE, tvb, offset, pinfo, tree, hf_acse_transfer_syntax_name);
924 }
925
926
927 static const ber_sequence_t SEQUENCE_OF_TransferSyntaxName_sequence_of[1] = {
928   { BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_transfer_syntaxes_item },
929 };
930
931 static int
932 dissect_acse_SEQUENCE_OF_TransferSyntaxName(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
933   offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
934                                       SEQUENCE_OF_TransferSyntaxName_sequence_of, hf_index, ett_acse_SEQUENCE_OF_TransferSyntaxName);
935
936   return offset;
937 }
938 static int dissect_transfer_syntaxes(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
939   return dissect_acse_SEQUENCE_OF_TransferSyntaxName(FALSE, tvb, offset, pinfo, tree, hf_acse_transfer_syntaxes);
940 }
941
942
943 static const ber_sequence_t Context_list_item_sequence[] = {
944   { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_pci },
945   { BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_abstract_syntax },
946   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_transfer_syntaxes },
947   { 0, 0, 0, NULL }
948 };
949
950 static int
951 dissect_acse_Context_list_item(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
952   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
953                                    Context_list_item_sequence, hf_index, ett_acse_Context_list_item);
954
955   return offset;
956 }
957 static int dissect_Context_list_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
958   return dissect_acse_Context_list_item(FALSE, tvb, offset, pinfo, tree, hf_acse_Context_list_item);
959 }
960
961
962 static const ber_sequence_t Context_list_sequence_of[1] = {
963   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_Context_list_item },
964 };
965
966 static int
967 dissect_acse_Context_list(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
968   offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
969                                       Context_list_sequence_of, hf_index, ett_acse_Context_list);
970
971   return offset;
972 }
973 static int dissect_context_list(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
974   return dissect_acse_Context_list(FALSE, tvb, offset, pinfo, tree, hf_acse_context_list);
975 }
976
977
978 static const ber_sequence_t Default_Context_List_item_sequence[] = {
979   { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_abstract_syntax_name_impl },
980   { BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_transfer_syntax_name_impl },
981   { 0, 0, 0, NULL }
982 };
983
984 static int
985 dissect_acse_Default_Context_List_item(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
986   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
987                                    Default_Context_List_item_sequence, hf_index, ett_acse_Default_Context_List_item);
988
989   return offset;
990 }
991 static int dissect_Default_Context_List_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
992   return dissect_acse_Default_Context_List_item(FALSE, tvb, offset, pinfo, tree, hf_acse_Default_Context_List_item);
993 }
994
995
996 static const ber_sequence_t Default_Context_List_sequence_of[1] = {
997   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_Default_Context_List_item },
998 };
999
1000 static int
1001 dissect_acse_Default_Context_List(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1002   offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
1003                                       Default_Context_List_sequence_of, hf_index, ett_acse_Default_Context_List);
1004
1005   return offset;
1006 }
1007 static int dissect_default_contact_list(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1008   return dissect_acse_Default_Context_List(FALSE, tvb, offset, pinfo, tree, hf_acse_default_contact_list);
1009 }
1010
1011
1012 static const value_string acse_Syntactic_context_list_vals[] = {
1013   {   0, "context-list" },
1014   {   1, "default-contact-list" },
1015   { 0, NULL }
1016 };
1017
1018 static const ber_choice_t Syntactic_context_list_choice[] = {
1019   {   0, BER_CLASS_CON, 0, 0, dissect_context_list },
1020   {   1, BER_CLASS_CON, 1, 0, dissect_default_contact_list },
1021   { 0, 0, 0, 0, NULL }
1022 };
1023
1024 static int
1025 dissect_acse_Syntactic_context_list(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1026   offset = dissect_ber_choice(pinfo, tree, tvb, offset,
1027                                  Syntactic_context_list_choice, hf_index, ett_acse_Syntactic_context_list,
1028                                  NULL);
1029
1030   return offset;
1031 }
1032 static int dissect_p_context_definition_list(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1033   return dissect_acse_Syntactic_context_list(FALSE, tvb, offset, pinfo, tree, hf_acse_p_context_definition_list);
1034 }
1035
1036
1037
1038 static int
1039 dissect_acse_ASOI_identifier(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1040   offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
1041                                   NULL);
1042
1043   return offset;
1044 }
1045 static int dissect_asoi_identifier_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1046   return dissect_acse_ASOI_identifier(TRUE, tvb, offset, pinfo, tree, hf_acse_asoi_identifier);
1047 }
1048 static int dissect_identifier(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1049   return dissect_acse_ASOI_identifier(FALSE, tvb, offset, pinfo, tree, hf_acse_identifier);
1050 }
1051
1052
1053 static const ber_sequence_t ASOI_tag_item_sequence[] = {
1054   { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_qualifier },
1055   { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL, dissect_identifier },
1056   { 0, 0, 0, NULL }
1057 };
1058
1059 static int
1060 dissect_acse_ASOI_tag_item(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1061   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
1062                                    ASOI_tag_item_sequence, hf_index, ett_acse_ASOI_tag_item);
1063
1064   return offset;
1065 }
1066 static int dissect_ASOI_tag_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1067   return dissect_acse_ASOI_tag_item(FALSE, tvb, offset, pinfo, tree, hf_acse_ASOI_tag_item);
1068 }
1069
1070
1071 static const ber_sequence_t ASOI_tag_sequence_of[1] = {
1072   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_ASOI_tag_item },
1073 };
1074
1075 static int
1076 dissect_acse_ASOI_tag(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1077   offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
1078                                       ASOI_tag_sequence_of, hf_index, ett_acse_ASOI_tag);
1079
1080   return offset;
1081 }
1082 static int dissect_called_asoi_tag_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1083   return dissect_acse_ASOI_tag(TRUE, tvb, offset, pinfo, tree, hf_acse_called_asoi_tag);
1084 }
1085 static int dissect_calling_asoi_tag_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1086   return dissect_acse_ASOI_tag(TRUE, tvb, offset, pinfo, tree, hf_acse_calling_asoi_tag);
1087 }
1088
1089
1090 static const ber_sequence_t Association_data_sequence_of[1] = {
1091   { BER_CLASS_UNI, 8, BER_FLAGS_NOOWNTAG, dissect_Association_data_item },
1092 };
1093
1094 static int
1095 dissect_acse_Association_data(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1096   offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
1097                                       Association_data_sequence_of, hf_index, ett_acse_Association_data);
1098
1099   return offset;
1100 }
1101 static int dissect_aARQ_user_information_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1102   return dissect_acse_Association_data(TRUE, tvb, offset, pinfo, tree, hf_acse_aARQ_user_information);
1103 }
1104 static int dissect_aARE_user_information_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1105   return dissect_acse_Association_data(TRUE, tvb, offset, pinfo, tree, hf_acse_aARE_user_information);
1106 }
1107 static int dissect_rLRQ_user_information_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1108   return dissect_acse_Association_data(TRUE, tvb, offset, pinfo, tree, hf_acse_rLRQ_user_information);
1109 }
1110 static int dissect_rLRE_user_information_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1111   return dissect_acse_Association_data(TRUE, tvb, offset, pinfo, tree, hf_acse_rLRE_user_information);
1112 }
1113 static int dissect_aBRT_user_information_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1114   return dissect_acse_Association_data(TRUE, tvb, offset, pinfo, tree, hf_acse_aBRT_user_information);
1115 }
1116
1117
1118 static const ber_sequence_t AARQ_apdu_sequence[] = {
1119   { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_aARQ_protocol_version_impl },
1120   { BER_CLASS_CON, 1, 0, dissect_aARQ_aSO_context_name },
1121   { BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_called_AP_title },
1122   { BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_called_AE_qualifier },
1123   { BER_CLASS_CON, 4, BER_FLAGS_OPTIONAL, dissect_called_AP_invocation_identifier },
1124   { BER_CLASS_CON, 5, BER_FLAGS_OPTIONAL, dissect_called_AE_invocation_identifier },
1125   { BER_CLASS_CON, 6, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_calling_AP_title },
1126   { BER_CLASS_CON, 7, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_calling_AE_qualifier },
1127   { BER_CLASS_CON, 8, BER_FLAGS_OPTIONAL, dissect_calling_AP_invocation_identifier },
1128   { BER_CLASS_CON, 9, BER_FLAGS_OPTIONAL, dissect_calling_AE_invocation_identifier },
1129   { BER_CLASS_CON, 10, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_sender_acse_requirements_impl },
1130   { BER_CLASS_CON, 11, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_mechanism_name_impl },
1131   { BER_CLASS_CON, 12, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_calling_authentication_value },
1132   { BER_CLASS_CON, 13, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_aSO_context_name_list_impl },
1133   { BER_CLASS_CON, 29, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_implementation_information_impl },
1134   { BER_CLASS_CON, 14, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_p_context_definition_list },
1135   { BER_CLASS_CON, 15, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_called_asoi_tag_impl },
1136   { BER_CLASS_CON, 16, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_calling_asoi_tag_impl },
1137   { BER_CLASS_CON, 30, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_aARQ_user_information_impl },
1138   { 0, 0, 0, NULL }
1139 };
1140
1141 static int
1142 dissect_acse_AARQ_apdu(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1143   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
1144                                    AARQ_apdu_sequence, hf_index, ett_acse_AARQ_apdu);
1145
1146   return offset;
1147 }
1148 static int dissect_aarq_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1149   return dissect_acse_AARQ_apdu(TRUE, tvb, offset, pinfo, tree, hf_acse_aarq);
1150 }
1151
1152
1153 static const asn_namedbit T_AARE_protocol_version_bits[] = {
1154   {  0, &hf_acse_T_AARE_protocol_version_version1, -1, -1, "version1", NULL },
1155   { 0, NULL, 0, 0, NULL, NULL }
1156 };
1157
1158 static int
1159 dissect_acse_T_AARE_protocol_version(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1160   offset = dissect_ber_bitstring(implicit_tag, pinfo, tree, tvb, offset,
1161                                     T_AARE_protocol_version_bits, hf_index, ett_acse_T_AARE_protocol_version,
1162                                     NULL);
1163
1164   return offset;
1165 }
1166 static int dissect_aARE_protocol_version_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1167   return dissect_acse_T_AARE_protocol_version(TRUE, tvb, offset, pinfo, tree, hf_acse_aARE_protocol_version);
1168 }
1169
1170
1171
1172 static int
1173 dissect_acse_T_AARE_aSO_context_name(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1174 #line 71 "acse.cnf"
1175   offset = dissect_ber_object_identifier_str(FALSE, pinfo, tree, tvb, offset,
1176                                          hf_index, &object_identifier_id);
1177
1178
1179
1180   return offset;
1181 }
1182 static int dissect_aARE_aSO_context_name(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1183   return dissect_acse_T_AARE_aSO_context_name(FALSE, tvb, offset, pinfo, tree, hf_acse_aARE_aSO_context_name);
1184 }
1185
1186
1187 static const value_string acse_Associate_result_vals[] = {
1188   {   0, "accepted" },
1189   {   1, "rejected-permanent" },
1190   {   2, "rejected-transient" },
1191   { 0, NULL }
1192 };
1193
1194
1195 static int
1196 dissect_acse_Associate_result(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1197   offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
1198                                   NULL);
1199
1200   return offset;
1201 }
1202 static int dissect_aARE_result(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1203   return dissect_acse_Associate_result(FALSE, tvb, offset, pinfo, tree, hf_acse_aARE_result);
1204 }
1205
1206
1207 static const value_string acse_T_acse_service_user_vals[] = {
1208   {   0, "null" },
1209   {   1, "no-reason-given" },
1210   {   2, "application-context-name-not-supported" },
1211   {   3, "calling-AP-title-not-recognized" },
1212   {   4, "calling-AP-invocation-identifier-not-recognized" },
1213   {   5, "calling-AE-qualifier-not-recognized" },
1214   {   6, "calling-AE-invocation-identifier-not-recognized" },
1215   {   7, "called-AP-title-not-recognized" },
1216   {   8, "called-AP-invocation-identifier-not-recognized" },
1217   {   9, "called-AE-qualifier-not-recognized" },
1218   {  10, "called-AE-invocation-identifier-not-recognized" },
1219   {  11, "authentication-mechanism-name-not-recognized" },
1220   {  12, "authentication-mechanism-name-required" },
1221   {  13, "authentication-failure" },
1222   {  14, "authentication-required" },
1223   { 0, NULL }
1224 };
1225
1226
1227 static int
1228 dissect_acse_T_acse_service_user(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1229   offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
1230                                   NULL);
1231
1232   return offset;
1233 }
1234 static int dissect_acse_service_user(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1235   return dissect_acse_T_acse_service_user(FALSE, tvb, offset, pinfo, tree, hf_acse_acse_service_user);
1236 }
1237
1238
1239 static const value_string acse_T_acse_service_provider_vals[] = {
1240   {   0, "null" },
1241   {   1, "no-reason-given" },
1242   {   2, "no-common-acse-version" },
1243   { 0, NULL }
1244 };
1245
1246
1247 static int
1248 dissect_acse_T_acse_service_provider(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1249   offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
1250                                   NULL);
1251
1252   return offset;
1253 }
1254 static int dissect_acse_service_provider(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1255   return dissect_acse_T_acse_service_provider(FALSE, tvb, offset, pinfo, tree, hf_acse_acse_service_provider);
1256 }
1257
1258
1259 static const value_string acse_Associate_source_diagnostic_vals[] = {
1260   {   1, "acse-service-user" },
1261   {   2, "acse-service-provider" },
1262   { 0, NULL }
1263 };
1264
1265 static const ber_choice_t Associate_source_diagnostic_choice[] = {
1266   {   1, BER_CLASS_CON, 1, 0, dissect_acse_service_user },
1267   {   2, BER_CLASS_CON, 2, 0, dissect_acse_service_provider },
1268   { 0, 0, 0, 0, NULL }
1269 };
1270
1271 static int
1272 dissect_acse_Associate_source_diagnostic(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1273   offset = dissect_ber_choice(pinfo, tree, tvb, offset,
1274                                  Associate_source_diagnostic_choice, hf_index, ett_acse_Associate_source_diagnostic,
1275                                  NULL);
1276
1277   return offset;
1278 }
1279 static int dissect_result_source_diagnostic(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1280   return dissect_acse_Associate_source_diagnostic(FALSE, tvb, offset, pinfo, tree, hf_acse_result_source_diagnostic);
1281 }
1282
1283
1284 static const value_string acse_Result_vals[] = {
1285   {   0, "acceptance" },
1286   {   1, "user-rejection" },
1287   {   2, "provider-rejection" },
1288   { 0, NULL }
1289 };
1290
1291
1292 static int
1293 dissect_acse_Result(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1294   offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
1295                                   NULL);
1296
1297   return offset;
1298 }
1299 static int dissect_pcontext_result_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1300   return dissect_acse_Result(TRUE, tvb, offset, pinfo, tree, hf_acse_pcontext_result);
1301 }
1302
1303
1304
1305 static int
1306 dissect_acse_Concrete_syntax_name(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1307   offset = dissect_acse_TransferSyntaxName(implicit_tag, tvb, offset, pinfo, tree, hf_index);
1308
1309   return offset;
1310 }
1311 static int dissect_concrete_syntax_name_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1312   return dissect_acse_Concrete_syntax_name(TRUE, tvb, offset, pinfo, tree, hf_acse_concrete_syntax_name);
1313 }
1314
1315
1316 static const value_string acse_T_provider_reason_vals[] = {
1317   {   0, "reason-not-specified" },
1318   {   1, "abstract-syntax-not-supported" },
1319   {   2, "proposed-transfer-syntaxes-not-supported" },
1320   {   3, "local-limit-on-DCS-exceeded" },
1321   { 0, NULL }
1322 };
1323
1324
1325 static int
1326 dissect_acse_T_provider_reason(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1327   offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
1328                                   NULL);
1329
1330   return offset;
1331 }
1332 static int dissect_provider_reason_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1333   return dissect_acse_T_provider_reason(TRUE, tvb, offset, pinfo, tree, hf_acse_provider_reason);
1334 }
1335
1336
1337 static const ber_sequence_t P_context_result_list_item_sequence[] = {
1338   { BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_pcontext_result_impl },
1339   { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_concrete_syntax_name_impl },
1340   { BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_provider_reason_impl },
1341   { 0, 0, 0, NULL }
1342 };
1343
1344 static int
1345 dissect_acse_P_context_result_list_item(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1346   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
1347                                    P_context_result_list_item_sequence, hf_index, ett_acse_P_context_result_list_item);
1348
1349   return offset;
1350 }
1351 static int dissect_P_context_result_list_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1352   return dissect_acse_P_context_result_list_item(FALSE, tvb, offset, pinfo, tree, hf_acse_P_context_result_list_item);
1353 }
1354
1355
1356 static const ber_sequence_t P_context_result_list_sequence_of[1] = {
1357   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_P_context_result_list_item },
1358 };
1359
1360 static int
1361 dissect_acse_P_context_result_list(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1362   offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
1363                                       P_context_result_list_sequence_of, hf_index, ett_acse_P_context_result_list);
1364
1365   return offset;
1366 }
1367 static int dissect_p_context_result_list_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1368   return dissect_acse_P_context_result_list(TRUE, tvb, offset, pinfo, tree, hf_acse_p_context_result_list);
1369 }
1370
1371
1372 static const ber_sequence_t AARE_apdu_sequence[] = {
1373   { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_aARE_protocol_version_impl },
1374   { BER_CLASS_CON, 1, 0, dissect_aARE_aSO_context_name },
1375   { BER_CLASS_CON, 2, 0, dissect_aARE_result },
1376   { BER_CLASS_CON, 3, BER_FLAGS_NOTCHKTAG, dissect_result_source_diagnostic },
1377   { BER_CLASS_CON, 4, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_responding_AP_title },
1378   { BER_CLASS_CON, 5, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_responding_AE_qualifier },
1379   { BER_CLASS_CON, 6, BER_FLAGS_OPTIONAL, dissect_responding_AP_invocation_identifier },
1380   { BER_CLASS_CON, 7, BER_FLAGS_OPTIONAL, dissect_responding_AE_invocation_identifier },
1381   { BER_CLASS_CON, 8, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_responder_acse_requirements_impl },
1382   { BER_CLASS_CON, 9, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_mechanism_name_impl },
1383   { BER_CLASS_CON, 10, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_responding_authentication_value },
1384   { BER_CLASS_CON, 11, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_aSO_context_name_list_impl },
1385   { BER_CLASS_CON, 29, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_implementation_information_impl },
1386   { BER_CLASS_CON, 12, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_p_context_result_list_impl },
1387   { BER_CLASS_CON, 13, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_called_asoi_tag_impl },
1388   { BER_CLASS_CON, 14, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_calling_asoi_tag_impl },
1389   { BER_CLASS_CON, 30, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_aARE_user_information_impl },
1390   { 0, 0, 0, NULL }
1391 };
1392
1393 static int
1394 dissect_acse_AARE_apdu(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1395   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
1396                                    AARE_apdu_sequence, hf_index, ett_acse_AARE_apdu);
1397
1398   return offset;
1399 }
1400 static int dissect_aare_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1401   return dissect_acse_AARE_apdu(TRUE, tvb, offset, pinfo, tree, hf_acse_aare);
1402 }
1403
1404
1405 static const value_string acse_Release_request_reason_vals[] = {
1406   {   0, "normal" },
1407   {   1, "urgent" },
1408   {  30, "user-defined" },
1409   { 0, NULL }
1410 };
1411
1412
1413 static int
1414 dissect_acse_Release_request_reason(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1415 #line 106 "acse.cnf"
1416   int reason = -1;
1417  
1418     offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
1419                                   &reason);
1420
1421
1422   if((reason != -1) && check_col(pinfo->cinfo, COL_INFO))
1423    col_append_fstr(pinfo->cinfo, COL_INFO, "Release-Request (%s)", val_to_str(reason, acse_Release_request_reason_vals, "reason(%d)"));
1424
1425
1426
1427
1428   return offset;
1429 }
1430 static int dissect_rLRQ_reason_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1431   return dissect_acse_Release_request_reason(TRUE, tvb, offset, pinfo, tree, hf_acse_rLRQ_reason);
1432 }
1433
1434
1435 static const ber_sequence_t RLRQ_apdu_sequence[] = {
1436   { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_rLRQ_reason_impl },
1437   { BER_CLASS_CON, 13, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_aso_qualifier },
1438   { BER_CLASS_CON, 14, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_asoi_identifier_impl },
1439   { BER_CLASS_CON, 30, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_rLRQ_user_information_impl },
1440   { 0, 0, 0, NULL }
1441 };
1442
1443 static int
1444 dissect_acse_RLRQ_apdu(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1445   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
1446                                    RLRQ_apdu_sequence, hf_index, ett_acse_RLRQ_apdu);
1447
1448   return offset;
1449 }
1450 static int dissect_rlrq_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1451   return dissect_acse_RLRQ_apdu(TRUE, tvb, offset, pinfo, tree, hf_acse_rlrq);
1452 }
1453
1454
1455 static const value_string acse_Release_response_reason_vals[] = {
1456   {   0, "normal" },
1457   {   1, "not-finished" },
1458   {  30, "user-defined" },
1459   { 0, NULL }
1460 };
1461
1462
1463 static int
1464 dissect_acse_Release_response_reason(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1465 #line 118 "acse.cnf"
1466   int reason = -1;
1467  
1468     offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
1469                                   &reason);
1470
1471
1472   if((reason != -1) && check_col(pinfo->cinfo, COL_INFO))
1473    col_append_fstr(pinfo->cinfo, COL_INFO, "Release-Response (%s)", val_to_str(reason, acse_Release_request_reason_vals, "reason(%d)"));
1474
1475
1476
1477
1478
1479
1480   return offset;
1481 }
1482 static int dissect_rLRE_reason_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1483   return dissect_acse_Release_response_reason(TRUE, tvb, offset, pinfo, tree, hf_acse_rLRE_reason);
1484 }
1485
1486
1487 static const ber_sequence_t RLRE_apdu_sequence[] = {
1488   { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_rLRE_reason_impl },
1489   { BER_CLASS_CON, 13, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_aso_qualifier },
1490   { BER_CLASS_CON, 14, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_asoi_identifier_impl },
1491   { BER_CLASS_CON, 30, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_rLRE_user_information_impl },
1492   { 0, 0, 0, NULL }
1493 };
1494
1495 static int
1496 dissect_acse_RLRE_apdu(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1497   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
1498                                    RLRE_apdu_sequence, hf_index, ett_acse_RLRE_apdu);
1499
1500   return offset;
1501 }
1502 static int dissect_rlre_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1503   return dissect_acse_RLRE_apdu(TRUE, tvb, offset, pinfo, tree, hf_acse_rlre);
1504 }
1505
1506
1507 static const value_string acse_ABRT_source_vals[] = {
1508   {   0, "acse-service-user" },
1509   {   1, "acse-service-provider" },
1510   { 0, NULL }
1511 };
1512
1513
1514 static int
1515 dissect_acse_ABRT_source(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1516   offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
1517                                   NULL);
1518
1519   return offset;
1520 }
1521 static int dissect_abort_source_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1522   return dissect_acse_ABRT_source(TRUE, tvb, offset, pinfo, tree, hf_acse_abort_source);
1523 }
1524
1525
1526 static const value_string acse_ABRT_diagnostic_vals[] = {
1527   {   1, "no-reason-given" },
1528   {   2, "protocol-error" },
1529   {   3, "authentication-mechanism-name-not-recognized" },
1530   {   4, "authentication-mechanism-name-required" },
1531   {   5, "authentication-failure" },
1532   {   6, "authentication-required" },
1533   { 0, NULL }
1534 };
1535
1536
1537 static int
1538 dissect_acse_ABRT_diagnostic(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1539   offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
1540                                   NULL);
1541
1542   return offset;
1543 }
1544 static int dissect_abort_diagnostic_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1545   return dissect_acse_ABRT_diagnostic(TRUE, tvb, offset, pinfo, tree, hf_acse_abort_diagnostic);
1546 }
1547
1548
1549 static const ber_sequence_t ABRT_apdu_sequence[] = {
1550   { BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_abort_source_impl },
1551   { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_abort_diagnostic_impl },
1552   { BER_CLASS_CON, 13, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_aso_qualifier },
1553   { BER_CLASS_CON, 14, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_asoi_identifier_impl },
1554   { BER_CLASS_CON, 30, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_aBRT_user_information_impl },
1555   { 0, 0, 0, NULL }
1556 };
1557
1558 static int
1559 dissect_acse_ABRT_apdu(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1560   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
1561                                    ABRT_apdu_sequence, hf_index, ett_acse_ABRT_apdu);
1562
1563   return offset;
1564 }
1565 static int dissect_abrt_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1566   return dissect_acse_ABRT_apdu(TRUE, tvb, offset, pinfo, tree, hf_acse_abrt);
1567 }
1568
1569
1570
1571 static int
1572 dissect_acse_User_information(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1573   offset = dissect_acse_Association_data(implicit_tag, tvb, offset, pinfo, tree, hf_index);
1574
1575   return offset;
1576 }
1577 static int dissect_user_information(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1578   return dissect_acse_User_information(FALSE, tvb, offset, pinfo, tree, hf_acse_user_information);
1579 }
1580 static int dissect_user_information_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1581   return dissect_acse_User_information(TRUE, tvb, offset, pinfo, tree, hf_acse_user_information);
1582 }
1583
1584
1585
1586 static int
1587 dissect_acse_Simply_encoded_data(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1588   offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index,
1589                                        NULL);
1590
1591   return offset;
1592 }
1593 static int dissect_simply_encoded_data(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1594   return dissect_acse_Simply_encoded_data(FALSE, tvb, offset, pinfo, tree, hf_acse_simply_encoded_data);
1595 }
1596
1597
1598
1599 static int
1600 dissect_acse_T_simple_ASN1_type(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1601 #line 64 "acse.cnf"
1602 /*XXX not implemented yet */
1603
1604
1605
1606   return offset;
1607 }
1608 static int dissect_simple_ASN1_type(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1609   return dissect_acse_T_simple_ASN1_type(FALSE, tvb, offset, pinfo, tree, hf_acse_simple_ASN1_type);
1610 }
1611
1612
1613 static const value_string acse_T_presentation_data_values_vals[] = {
1614   {   0, "simple-ASN1-type" },
1615   {   1, "octet-aligned" },
1616   {   2, "arbitrary" },
1617   { 0, NULL }
1618 };
1619
1620 static const ber_choice_t T_presentation_data_values_choice[] = {
1621   {   0, BER_CLASS_CON, 0, 0, dissect_simple_ASN1_type },
1622   {   1, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_octet_aligned_impl },
1623   {   2, BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_arbitrary_impl },
1624   { 0, 0, 0, 0, NULL }
1625 };
1626
1627 static int
1628 dissect_acse_T_presentation_data_values(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1629   offset = dissect_ber_choice(pinfo, tree, tvb, offset,
1630                                  T_presentation_data_values_choice, hf_index, ett_acse_T_presentation_data_values,
1631                                  NULL);
1632
1633   return offset;
1634 }
1635 static int dissect_presentation_data_values(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1636   return dissect_acse_T_presentation_data_values(FALSE, tvb, offset, pinfo, tree, hf_acse_presentation_data_values);
1637 }
1638
1639
1640 static const ber_sequence_t PDV_list_sequence[] = {
1641   { BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_transfer_syntax_name },
1642   { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_presentation_context_identifier },
1643   { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_presentation_data_values },
1644   { 0, 0, 0, NULL }
1645 };
1646
1647 static int
1648 dissect_acse_PDV_list(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1649   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
1650                                    PDV_list_sequence, hf_index, ett_acse_PDV_list);
1651
1652   return offset;
1653 }
1654 static int dissect_fully_encoded_data(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1655   return dissect_acse_PDV_list(FALSE, tvb, offset, pinfo, tree, hf_acse_fully_encoded_data);
1656 }
1657
1658
1659 static const value_string acse_User_Data_vals[] = {
1660   {   0, "user-information" },
1661   {   1, "simply-encoded-data" },
1662   {   2, "fully-encoded-data" },
1663   { 0, NULL }
1664 };
1665
1666 static const ber_choice_t User_Data_choice[] = {
1667   {   0, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_user_information },
1668   {   1, BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_simply_encoded_data },
1669   {   2, BER_CLASS_CON, 0, 0, dissect_fully_encoded_data },
1670   { 0, 0, 0, 0, NULL }
1671 };
1672
1673 static int
1674 dissect_acse_User_Data(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1675   offset = dissect_ber_choice(pinfo, tree, tvb, offset,
1676                                  User_Data_choice, hf_index, ett_acse_User_Data,
1677                                  NULL);
1678
1679   return offset;
1680 }
1681 static int dissect_a_user_data(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1682   return dissect_acse_User_Data(FALSE, tvb, offset, pinfo, tree, hf_acse_a_user_data);
1683 }
1684
1685
1686 static const ber_sequence_t A_DT_apdu_sequence[] = {
1687   { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_aso_qualifier },
1688   { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_asoi_identifier_impl },
1689   { BER_CLASS_CON, 30, BER_FLAGS_NOTCHKTAG, dissect_a_user_data },
1690   { 0, 0, 0, NULL }
1691 };
1692
1693 static int
1694 dissect_acse_A_DT_apdu(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1695   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
1696                                    A_DT_apdu_sequence, hf_index, ett_acse_A_DT_apdu);
1697
1698   return offset;
1699 }
1700 static int dissect_adt_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1701   return dissect_acse_A_DT_apdu(TRUE, tvb, offset, pinfo, tree, hf_acse_adt);
1702 }
1703
1704
1705
1706 static int
1707 dissect_acse_T_ACRQ_aSO_context_name(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1708 #line 75 "acse.cnf"
1709   offset = dissect_ber_object_identifier_str(FALSE, pinfo, tree, tvb, offset,
1710                                          hf_index, &object_identifier_id);
1711
1712
1713
1714   return offset;
1715 }
1716 static int dissect_aCRQ_aSO_context_name_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1717   return dissect_acse_T_ACRQ_aSO_context_name(TRUE, tvb, offset, pinfo, tree, hf_acse_aCRQ_aSO_context_name);
1718 }
1719
1720
1721 static const ber_sequence_t ACRQ_apdu_sequence[] = {
1722   { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_aso_qualifier },
1723   { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_asoi_identifier_impl },
1724   { BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_aCRQ_aSO_context_name_impl },
1725   { BER_CLASS_CON, 4, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_aSO_context_name_list_impl },
1726   { BER_CLASS_CON, 5, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_p_context_definition_list },
1727   { BER_CLASS_CON, 30, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_user_information_impl },
1728   { 0, 0, 0, NULL }
1729 };
1730
1731 static int
1732 dissect_acse_ACRQ_apdu(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1733   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
1734                                    ACRQ_apdu_sequence, hf_index, ett_acse_ACRQ_apdu);
1735
1736   return offset;
1737 }
1738 static int dissect_acrq_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1739   return dissect_acse_ACRQ_apdu(TRUE, tvb, offset, pinfo, tree, hf_acse_acrq);
1740 }
1741
1742
1743
1744 static int
1745 dissect_acse_T_ACRP_aSO_context_name(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1746 #line 79 "acse.cnf"
1747   offset = dissect_ber_object_identifier_str(FALSE, pinfo, tree, tvb, offset,
1748                                          hf_index, &object_identifier_id);
1749
1750
1751
1752   return offset;
1753 }
1754 static int dissect_aSO_context_name_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1755   return dissect_acse_T_ACRP_aSO_context_name(TRUE, tvb, offset, pinfo, tree, hf_acse_aSO_context_name);
1756 }
1757
1758
1759 static const ber_sequence_t ACRP_apdu_sequence[] = {
1760   { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_aso_qualifier },
1761   { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_asoi_identifier_impl },
1762   { BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_aSO_context_name_impl },
1763   { BER_CLASS_CON, 4, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_p_context_result_list_impl },
1764   { BER_CLASS_CON, 30, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_user_information_impl },
1765   { 0, 0, 0, NULL }
1766 };
1767
1768 static int
1769 dissect_acse_ACRP_apdu(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1770   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
1771                                    ACRP_apdu_sequence, hf_index, ett_acse_ACRP_apdu);
1772
1773   return offset;
1774 }
1775 static int dissect_acrp_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1776   return dissect_acse_ACRP_apdu(TRUE, tvb, offset, pinfo, tree, hf_acse_acrp);
1777 }
1778
1779
1780 static const value_string acse_ACSE_apdu_vals[] = {
1781   {   0, "aarq" },
1782   {   1, "aare" },
1783   {   2, "rlrq" },
1784   {   3, "rlre" },
1785   {   4, "abrt" },
1786   {   5, "adt" },
1787   {   6, "acrq" },
1788   {   7, "acrp" },
1789   {   5, "adt" },
1790   {   6, "acrq" },
1791   {   7, "acrp" },
1792   { 0, NULL }
1793 };
1794
1795 static const ber_choice_t ACSE_apdu_choice[] = {
1796   {   0, BER_CLASS_APP, 0, BER_FLAGS_IMPLTAG, dissect_aarq_impl },
1797   {   1, BER_CLASS_APP, 1, BER_FLAGS_IMPLTAG, dissect_aare_impl },
1798   {   2, BER_CLASS_APP, 2, BER_FLAGS_IMPLTAG, dissect_rlrq_impl },
1799   {   3, BER_CLASS_APP, 3, BER_FLAGS_IMPLTAG, dissect_rlre_impl },
1800   {   4, BER_CLASS_APP, 4, BER_FLAGS_IMPLTAG, dissect_abrt_impl },
1801   {   5, BER_CLASS_APP, 5, BER_FLAGS_IMPLTAG, dissect_adt_impl },
1802   {   6, BER_CLASS_APP, 6, BER_FLAGS_IMPLTAG, dissect_acrq_impl },
1803   {   7, BER_CLASS_APP, 7, BER_FLAGS_IMPLTAG, dissect_acrp_impl },
1804   {   5, BER_CLASS_APP, 5, BER_FLAGS_IMPLTAG, dissect_adt_impl },
1805   {   6, BER_CLASS_APP, 6, BER_FLAGS_IMPLTAG, dissect_acrq_impl },
1806   {   7, BER_CLASS_APP, 7, BER_FLAGS_IMPLTAG, dissect_acrp_impl },
1807   {   5, BER_CLASS_APP, 5, BER_FLAGS_IMPLTAG, dissect_adt_impl },
1808   {   6, BER_CLASS_APP, 6, BER_FLAGS_IMPLTAG, dissect_acrq_impl },
1809   {   7, BER_CLASS_APP, 7, BER_FLAGS_IMPLTAG, dissect_acrp_impl },
1810   { 0, 0, 0, 0, NULL }
1811 };
1812
1813 static int
1814 dissect_acse_ACSE_apdu(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1815   offset = dissect_ber_choice(pinfo, tree, tvb, offset,
1816                                  ACSE_apdu_choice, hf_index, ett_acse_ACSE_apdu,
1817                                  NULL);
1818
1819   return offset;
1820 }
1821
1822
1823
1824 static int
1825 dissect_acse_Application_context_name(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1826   offset = dissect_acse_ASO_context_name(implicit_tag, tvb, offset, pinfo, tree, hf_index);
1827
1828   return offset;
1829 }
1830
1831
1832
1833 static int
1834 dissect_acse_AE_title_form1(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1835   offset = dissect_x509if_Name(implicit_tag, tvb, offset, pinfo, tree, hf_index);
1836
1837   return offset;
1838 }
1839 static int dissect_ae_title_form1(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1840   return dissect_acse_AE_title_form1(FALSE, tvb, offset, pinfo, tree, hf_acse_ae_title_form1);
1841 }
1842
1843
1844
1845 static int
1846 dissect_acse_AE_title_form2(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1847   offset = dissect_ber_object_identifier(implicit_tag, pinfo, tree, tvb, offset, hf_index, NULL);
1848
1849   return offset;
1850 }
1851 static int dissect_ae_title_form2(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1852   return dissect_acse_AE_title_form2(FALSE, tvb, offset, pinfo, tree, hf_acse_ae_title_form2);
1853 }
1854
1855
1856 static const value_string acse_AE_title_vals[] = {
1857   {   0, "ae-title-form1" },
1858   {   1, "ae-title-form2" },
1859   { 0, NULL }
1860 };
1861
1862 static const ber_choice_t AE_title_choice[] = {
1863   {   0, BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_ae_title_form1 },
1864   {   1, BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_ae_title_form2 },
1865   { 0, 0, 0, 0, NULL }
1866 };
1867
1868 static int
1869 dissect_acse_AE_title(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1870   offset = dissect_ber_choice(pinfo, tree, tvb, offset,
1871                                  AE_title_choice, hf_index, ett_acse_AE_title,
1872                                  NULL);
1873
1874   return offset;
1875 }
1876
1877
1878 /*--- End of included file: packet-acse-fn.c ---*/
1879 #line 145 "packet-acse-template.c"
1880
1881
1882 /*
1883 * Dissect ACSE PDUs inside a PPDU.
1884 */
1885 static void
1886 dissect_acse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
1887 {
1888         int offset = 0;
1889         proto_item    *item=NULL;
1890         proto_tree    *tree=NULL;
1891         char *oid;
1892
1893
1894         /* first, try to check length   */
1895         /* do we have at least 2 bytes  */
1896         if (!tvb_bytes_exist(tvb, 0, 2)){
1897                 proto_tree_add_text(parent_tree, tvb, offset,
1898                         tvb_reported_length_remaining(tvb,offset),
1899                         "User data");
1900                 return;  /* no, it isn't a ACSE PDU */
1901         }
1902         /* do we have spdu type from the session dissector?  */
1903         if( !pinfo->private_data ){
1904                 if(parent_tree){
1905                         REPORT_DISSECTOR_BUG("Can't get SPDU type from session dissector.");
1906                 }
1907                 return  ;
1908         } else {
1909                 session  = ( (struct SESSION_DATA_STRUCTURE*)(pinfo->private_data) );
1910                 if(session->spdu_type == 0 ) {
1911                         if(parent_tree){
1912                                 REPORT_DISSECTOR_BUG(
1913                                         ep_strdup_printf("Wrong spdu type %x from session dissector.",session->spdu_type));
1914                                 return  ;
1915                         }
1916                 }
1917         }
1918         /* save parent_tree so subdissectors can create new top nodes */
1919         top_tree=parent_tree;
1920
1921         /*  ACSE has only AARQ,AARE,RLRQ,RLRE,ABRT type of pdu */
1922         /*  reject everything else                              */
1923         /*  data pdu is not ACSE pdu and has to go directly to app dissector */
1924         switch(session->spdu_type){
1925         case SES_CONNECTION_REQUEST:            /*   AARQ   */
1926         case SES_CONNECTION_ACCEPT:             /*   AARE   */
1927         case SES_REFUSE:                        /*   RLRE   */
1928         case SES_DISCONNECT:                    /*   RLRQ   */
1929         case SES_FINISH:                        /*   RLRE   */
1930         case SES_ABORT:                         /*   ABRT   */
1931                 break;
1932         case SES_DATA_TRANSFER:
1933                 oid=find_oid_by_pres_ctx_id(pinfo, indir_ref);
1934                 if(oid){
1935                         if(strcmp(oid, ACSE_APDU_OID) == 0){
1936                                 proto_tree_add_text(parent_tree, tvb, offset, -1,
1937                                     "Invalid OID: %s", ACSE_APDU_OID);
1938                                 THROW(ReportedBoundsError);
1939                         }
1940                         call_ber_oid_callback(oid, tvb, offset, pinfo, parent_tree);
1941                 } else {
1942                         proto_tree_add_text(parent_tree, tvb, offset, -1,
1943                             "dissector is not available");
1944                 }
1945                 top_tree = NULL;
1946                 return;
1947         default:
1948                 top_tree = NULL;
1949                 return;
1950         }
1951
1952         /* create display subtree for the protocol */
1953         if(parent_tree){
1954                 item = proto_tree_add_item(parent_tree, proto_acse, tvb, 0, -1, FALSE);
1955                 tree = proto_item_add_subtree(item, ett_acse);
1956         }
1957         if (check_col(pinfo->cinfo, COL_PROTOCOL))
1958                 col_set_str(pinfo->cinfo, COL_PROTOCOL, "ACSE");
1959         if (check_col(pinfo->cinfo, COL_INFO))
1960                 col_clear(pinfo->cinfo, COL_INFO);
1961
1962
1963         /*  we can't make any additional checking here   */
1964         /*  postpone it before dissector will have more information */
1965         while (tvb_reported_length_remaining(tvb, offset) > 0){
1966                 int old_offset=offset;
1967                 offset = dissect_acse_ACSE_apdu(FALSE, tvb, offset, pinfo, tree, -1);
1968                 if(offset == old_offset ){
1969                         proto_tree_add_text(tree, tvb, offset, -1,"Malformed packet");
1970                         offset = tvb_length(tvb);
1971                         break;
1972                 }
1973         }
1974         
1975 top_tree = NULL;
1976 }
1977
1978 /*--- proto_register_acse ----------------------------------------------*/
1979 void proto_register_acse(void) {
1980
1981   /* List of fields */
1982   static hf_register_info hf[] = {
1983
1984 /*--- Included file: packet-acse-hfarr.c ---*/
1985 #line 1 "packet-acse-hfarr.c"
1986     { &hf_acse_direct_reference,
1987       { "direct-reference", "acse.direct_reference",
1988         FT_OID, BASE_NONE, NULL, 0,
1989         "acse.T_direct_reference", HFILL }},
1990     { &hf_acse_indirect_reference,
1991       { "indirect-reference", "acse.indirect_reference",
1992         FT_INT32, BASE_DEC, NULL, 0,
1993         "acse.T_indirect_reference", HFILL }},
1994     { &hf_acse_data_value_descriptor,
1995       { "data-value-descriptor", "acse.data_value_descriptor",
1996         FT_STRING, BASE_NONE, NULL, 0,
1997         "acse.ObjectDescriptor", HFILL }},
1998     { &hf_acse_encoding,
1999       { "encoding", "acse.encoding",
2000         FT_UINT32, BASE_DEC, VALS(acse_T_encoding_vals), 0,
2001         "acse.T_encoding", HFILL }},
2002     { &hf_acse_single_ASN1_type,
2003       { "single-ASN1-type", "acse.single_ASN1_type",
2004         FT_NONE, BASE_NONE, NULL, 0,
2005         "acse.T_single_ASN1_type", HFILL }},
2006     { &hf_acse_octet_aligned,
2007       { "octet-aligned", "acse.octet_aligned",
2008         FT_BYTES, BASE_HEX, NULL, 0,
2009         "acse.OCTET_STRING", HFILL }},
2010     { &hf_acse_arbitrary,
2011       { "arbitrary", "acse.arbitrary",
2012         FT_BYTES, BASE_HEX, NULL, 0,
2013         "acse.BIT_STRING", HFILL }},
2014     { &hf_acse_aarq,
2015       { "aarq", "acse.aarq",
2016         FT_NONE, BASE_NONE, NULL, 0,
2017         "acse.AARQ_apdu", HFILL }},
2018     { &hf_acse_aare,
2019       { "aare", "acse.aare",
2020         FT_NONE, BASE_NONE, NULL, 0,
2021         "acse.AARE_apdu", HFILL }},
2022     { &hf_acse_rlrq,
2023       { "rlrq", "acse.rlrq",
2024         FT_NONE, BASE_NONE, NULL, 0,
2025         "acse.RLRQ_apdu", HFILL }},
2026     { &hf_acse_rlre,
2027       { "rlre", "acse.rlre",
2028         FT_NONE, BASE_NONE, NULL, 0,
2029         "acse.RLRE_apdu", HFILL }},
2030     { &hf_acse_abrt,
2031       { "abrt", "acse.abrt",
2032         FT_NONE, BASE_NONE, NULL, 0,
2033         "acse.ABRT_apdu", HFILL }},
2034     { &hf_acse_adt,
2035       { "adt", "acse.adt",
2036         FT_NONE, BASE_NONE, NULL, 0,
2037         "acse.A_DT_apdu", HFILL }},
2038     { &hf_acse_acrq,
2039       { "acrq", "acse.acrq",
2040         FT_NONE, BASE_NONE, NULL, 0,
2041         "acse.ACRQ_apdu", HFILL }},
2042     { &hf_acse_acrp,
2043       { "acrp", "acse.acrp",
2044         FT_NONE, BASE_NONE, NULL, 0,
2045         "acse.ACRP_apdu", HFILL }},
2046     { &hf_acse_aARQ_protocol_version,
2047       { "protocol-version", "acse.protocol_version",
2048         FT_BYTES, BASE_HEX, NULL, 0,
2049         "acse.T_AARQ_protocol_version", HFILL }},
2050     { &hf_acse_aARQ_aSO_context_name,
2051       { "aSO-context-name", "acse.aSO_context_name",
2052         FT_OID, BASE_NONE, NULL, 0,
2053         "acse.T_AARQ_aSO_context_name", HFILL }},
2054     { &hf_acse_called_AP_title,
2055       { "called-AP-title", "acse.called_AP_title",
2056         FT_UINT32, BASE_DEC, VALS(acse_AP_title_vals), 0,
2057         "acse.AP_title", HFILL }},
2058     { &hf_acse_called_AE_qualifier,
2059       { "called-AE-qualifier", "acse.called_AE_qualifier",
2060         FT_UINT32, BASE_DEC, VALS(acse_ASO_qualifier_vals), 0,
2061         "acse.AE_qualifier", HFILL }},
2062     { &hf_acse_called_AP_invocation_identifier,
2063       { "called-AP-invocation-identifier", "acse.called_AP_invocation_identifier",
2064         FT_INT32, BASE_DEC, NULL, 0,
2065         "acse.AP_invocation_identifier", HFILL }},
2066     { &hf_acse_called_AE_invocation_identifier,
2067       { "called-AE-invocation-identifier", "acse.called_AE_invocation_identifier",
2068         FT_INT32, BASE_DEC, NULL, 0,
2069         "acse.AE_invocation_identifier", HFILL }},
2070     { &hf_acse_calling_AP_title,
2071       { "calling-AP-title", "acse.calling_AP_title",
2072         FT_UINT32, BASE_DEC, VALS(acse_AP_title_vals), 0,
2073         "acse.AP_title", HFILL }},
2074     { &hf_acse_calling_AE_qualifier,
2075       { "calling-AE-qualifier", "acse.calling_AE_qualifier",
2076         FT_UINT32, BASE_DEC, VALS(acse_ASO_qualifier_vals), 0,
2077         "acse.AE_qualifier", HFILL }},
2078     { &hf_acse_calling_AP_invocation_identifier,
2079       { "calling-AP-invocation-identifier", "acse.calling_AP_invocation_identifier",
2080         FT_INT32, BASE_DEC, NULL, 0,
2081         "acse.AP_invocation_identifier", HFILL }},
2082     { &hf_acse_calling_AE_invocation_identifier,
2083       { "calling-AE-invocation-identifier", "acse.calling_AE_invocation_identifier",
2084         FT_INT32, BASE_DEC, NULL, 0,
2085         "acse.AE_invocation_identifier", HFILL }},
2086     { &hf_acse_sender_acse_requirements,
2087       { "sender-acse-requirements", "acse.sender_acse_requirements",
2088         FT_BYTES, BASE_HEX, NULL, 0,
2089         "acse.ACSE_requirements", HFILL }},
2090     { &hf_acse_mechanism_name,
2091       { "mechanism-name", "acse.mechanism_name",
2092         FT_OID, BASE_NONE, NULL, 0,
2093         "acse.Mechanism_name", HFILL }},
2094     { &hf_acse_calling_authentication_value,
2095       { "calling-authentication-value", "acse.calling_authentication_value",
2096         FT_UINT32, BASE_DEC, VALS(acse_Authentication_value_vals), 0,
2097         "acse.Authentication_value", HFILL }},
2098     { &hf_acse_aSO_context_name_list,
2099       { "aSO-context-name-list", "acse.aSO_context_name_list",
2100         FT_UINT32, BASE_DEC, NULL, 0,
2101         "acse.ASO_context_name_list", HFILL }},
2102     { &hf_acse_implementation_information,
2103       { "implementation-information", "acse.implementation_information",
2104         FT_STRING, BASE_NONE, NULL, 0,
2105         "acse.Implementation_data", HFILL }},
2106     { &hf_acse_p_context_definition_list,
2107       { "p-context-definition-list", "acse.p_context_definition_list",
2108         FT_UINT32, BASE_DEC, VALS(acse_Syntactic_context_list_vals), 0,
2109         "acse.Syntactic_context_list", HFILL }},
2110     { &hf_acse_called_asoi_tag,
2111       { "called-asoi-tag", "acse.called_asoi_tag",
2112         FT_UINT32, BASE_DEC, NULL, 0,
2113         "acse.ASOI_tag", HFILL }},
2114     { &hf_acse_calling_asoi_tag,
2115       { "calling-asoi-tag", "acse.calling_asoi_tag",
2116         FT_UINT32, BASE_DEC, NULL, 0,
2117         "acse.ASOI_tag", HFILL }},
2118     { &hf_acse_aARQ_user_information,
2119       { "user-information", "acse.user_information",
2120         FT_UINT32, BASE_DEC, NULL, 0,
2121         "acse.Association_data", HFILL }},
2122     { &hf_acse_aARE_protocol_version,
2123       { "protocol-version", "acse.protocol_version",
2124         FT_BYTES, BASE_HEX, NULL, 0,
2125         "acse.T_AARE_protocol_version", HFILL }},
2126     { &hf_acse_aARE_aSO_context_name,
2127       { "aSO-context-name", "acse.aSO_context_name",
2128         FT_OID, BASE_NONE, NULL, 0,
2129         "acse.T_AARE_aSO_context_name", HFILL }},
2130     { &hf_acse_aARE_result,
2131       { "result", "acse.result",
2132         FT_UINT32, BASE_DEC, VALS(acse_Associate_result_vals), 0,
2133         "acse.Associate_result", HFILL }},
2134     { &hf_acse_result_source_diagnostic,
2135       { "result-source-diagnostic", "acse.result_source_diagnostic",
2136         FT_UINT32, BASE_DEC, VALS(acse_Associate_source_diagnostic_vals), 0,
2137         "acse.Associate_source_diagnostic", HFILL }},
2138     { &hf_acse_responding_AP_title,
2139       { "responding-AP-title", "acse.responding_AP_title",
2140         FT_UINT32, BASE_DEC, VALS(acse_AP_title_vals), 0,
2141         "acse.AP_title", HFILL }},
2142     { &hf_acse_responding_AE_qualifier,
2143       { "responding-AE-qualifier", "acse.responding_AE_qualifier",
2144         FT_UINT32, BASE_DEC, VALS(acse_ASO_qualifier_vals), 0,
2145         "acse.AE_qualifier", HFILL }},
2146     { &hf_acse_responding_AP_invocation_identifier,
2147       { "responding-AP-invocation-identifier", "acse.responding_AP_invocation_identifier",
2148         FT_INT32, BASE_DEC, NULL, 0,
2149         "acse.AP_invocation_identifier", HFILL }},
2150     { &hf_acse_responding_AE_invocation_identifier,
2151       { "responding-AE-invocation-identifier", "acse.responding_AE_invocation_identifier",
2152         FT_INT32, BASE_DEC, NULL, 0,
2153         "acse.AE_invocation_identifier", HFILL }},
2154     { &hf_acse_responder_acse_requirements,
2155       { "responder-acse-requirements", "acse.responder_acse_requirements",
2156         FT_BYTES, BASE_HEX, NULL, 0,
2157         "acse.ACSE_requirements", HFILL }},
2158     { &hf_acse_responding_authentication_value,
2159       { "responding-authentication-value", "acse.responding_authentication_value",
2160         FT_UINT32, BASE_DEC, VALS(acse_Authentication_value_vals), 0,
2161         "acse.Authentication_value", HFILL }},
2162     { &hf_acse_p_context_result_list,
2163       { "p-context-result-list", "acse.p_context_result_list",
2164         FT_UINT32, BASE_DEC, NULL, 0,
2165         "acse.P_context_result_list", HFILL }},
2166     { &hf_acse_aARE_user_information,
2167       { "user-information", "acse.user_information",
2168         FT_UINT32, BASE_DEC, NULL, 0,
2169         "acse.Association_data", HFILL }},
2170     { &hf_acse_rLRQ_reason,
2171       { "reason", "acse.reason",
2172         FT_INT32, BASE_DEC, VALS(acse_Release_request_reason_vals), 0,
2173         "acse.Release_request_reason", HFILL }},
2174     { &hf_acse_aso_qualifier,
2175       { "aso-qualifier", "acse.aso_qualifier",
2176         FT_UINT32, BASE_DEC, VALS(acse_ASO_qualifier_vals), 0,
2177         "acse.ASO_qualifier", HFILL }},
2178     { &hf_acse_asoi_identifier,
2179       { "asoi-identifier", "acse.asoi_identifier",
2180         FT_UINT32, BASE_DEC, NULL, 0,
2181         "acse.ASOI_identifier", HFILL }},
2182     { &hf_acse_rLRQ_user_information,
2183       { "user-information", "acse.user_information",
2184         FT_UINT32, BASE_DEC, NULL, 0,
2185         "acse.Association_data", HFILL }},
2186     { &hf_acse_rLRE_reason,
2187       { "reason", "acse.reason",
2188         FT_INT32, BASE_DEC, VALS(acse_Release_response_reason_vals), 0,
2189         "acse.Release_response_reason", HFILL }},
2190     { &hf_acse_rLRE_user_information,
2191       { "user-information", "acse.user_information",
2192         FT_UINT32, BASE_DEC, NULL, 0,
2193         "acse.Association_data", HFILL }},
2194     { &hf_acse_abort_source,
2195       { "abort-source", "acse.abort_source",
2196         FT_UINT32, BASE_DEC, VALS(acse_ABRT_source_vals), 0,
2197         "acse.ABRT_source", HFILL }},
2198     { &hf_acse_abort_diagnostic,
2199       { "abort-diagnostic", "acse.abort_diagnostic",
2200         FT_UINT32, BASE_DEC, VALS(acse_ABRT_diagnostic_vals), 0,
2201         "acse.ABRT_diagnostic", HFILL }},
2202     { &hf_acse_aBRT_user_information,
2203       { "user-information", "acse.user_information",
2204         FT_UINT32, BASE_DEC, NULL, 0,
2205         "acse.Association_data", HFILL }},
2206     { &hf_acse_a_user_data,
2207       { "a-user-data", "acse.a_user_data",
2208         FT_UINT32, BASE_DEC, VALS(acse_User_Data_vals), 0,
2209         "acse.User_Data", HFILL }},
2210     { &hf_acse_aCRQ_aSO_context_name,
2211       { "aSO-context-name", "acse.aSO_context_name",
2212         FT_OID, BASE_NONE, NULL, 0,
2213         "acse.T_ACRQ_aSO_context_name", HFILL }},
2214     { &hf_acse_user_information,
2215       { "user-information", "acse.user_information",
2216         FT_UINT32, BASE_DEC, NULL, 0,
2217         "acse.User_information", HFILL }},
2218     { &hf_acse_aSO_context_name,
2219       { "aSO-context-name", "acse.aSO_context_name",
2220         FT_UINT32, BASE_DEC, NULL, 0,
2221         "acse.T_ACRP_aSO_context_name", HFILL }},
2222     { &hf_acse_ap_title_form1,
2223       { "ap-title-form1", "acse.ap_title_form1",
2224         FT_UINT32, BASE_DEC, VALS(x509if_Name_vals), 0,
2225         "acse.AP_title_form1", HFILL }},
2226     { &hf_acse_ap_title_form2,
2227       { "ap-title-form2", "acse.ap_title_form2",
2228         FT_OID, BASE_NONE, NULL, 0,
2229         "acse.AP_title_form2", HFILL }},
2230     { &hf_acse_ap_title_form3,
2231       { "ap-title-form3", "acse.ap_title_form3",
2232         FT_STRING, BASE_NONE, NULL, 0,
2233         "acse.AP_title_form3", HFILL }},
2234     { &hf_acse_aso_qualifier_form1,
2235       { "aso-qualifier-form1", "acse.aso_qualifier_form1",
2236         FT_UINT32, BASE_DEC, NULL, 0,
2237         "acse.ASO_qualifier_form1", HFILL }},
2238     { &hf_acse_aso_qualifier_form2,
2239       { "aso-qualifier-form2", "acse.aso_qualifier_form2",
2240         FT_INT32, BASE_DEC, NULL, 0,
2241         "acse.ASO_qualifier_form2", HFILL }},
2242     { &hf_acse_aso_qualifier_form3,
2243       { "aso-qualifier-form3", "acse.aso_qualifier_form3",
2244         FT_STRING, BASE_NONE, NULL, 0,
2245         "acse.ASO_qualifier_form3", HFILL }},
2246     { &hf_acse_ae_title_form1,
2247       { "ae-title-form1", "acse.ae_title_form1",
2248         FT_UINT32, BASE_DEC, VALS(x509if_Name_vals), 0,
2249         "acse.AE_title_form1", HFILL }},
2250     { &hf_acse_ae_title_form2,
2251       { "ae-title-form2", "acse.ae_title_form2",
2252         FT_OID, BASE_NONE, NULL, 0,
2253         "acse.AE_title_form2", HFILL }},
2254     { &hf_acse_ASOI_tag_item,
2255       { "Item", "acse.ASOI_tag_item",
2256         FT_NONE, BASE_NONE, NULL, 0,
2257         "acse.ASOI_tag_item", HFILL }},
2258     { &hf_acse_qualifier,
2259       { "qualifier", "acse.qualifier",
2260         FT_UINT32, BASE_DEC, VALS(acse_ASO_qualifier_vals), 0,
2261         "acse.ASO_qualifier", HFILL }},
2262     { &hf_acse_identifier,
2263       { "identifier", "acse.identifier",
2264         FT_UINT32, BASE_DEC, NULL, 0,
2265         "acse.ASOI_identifier", HFILL }},
2266     { &hf_acse_ASO_context_name_list_item,
2267       { "Item", "acse.ASO_context_name_list_item",
2268         FT_OID, BASE_NONE, NULL, 0,
2269         "acse.ASO_context_name", HFILL }},
2270     { &hf_acse_context_list,
2271       { "context-list", "acse.context_list",
2272         FT_UINT32, BASE_DEC, NULL, 0,
2273         "acse.Context_list", HFILL }},
2274     { &hf_acse_default_contact_list,
2275       { "default-contact-list", "acse.default_contact_list",
2276         FT_UINT32, BASE_DEC, NULL, 0,
2277         "acse.Default_Context_List", HFILL }},
2278     { &hf_acse_Context_list_item,
2279       { "Item", "acse.Context_list_item",
2280         FT_NONE, BASE_NONE, NULL, 0,
2281         "acse.Context_list_item", HFILL }},
2282     { &hf_acse_pci,
2283       { "pci", "acse.pci",
2284         FT_INT32, BASE_DEC, NULL, 0,
2285         "acse.Presentation_context_identifier", HFILL }},
2286     { &hf_acse_abstract_syntax,
2287       { "abstract-syntax", "acse.abstract_syntax",
2288         FT_OID, BASE_NONE, NULL, 0,
2289         "acse.Abstract_syntax_name", HFILL }},
2290     { &hf_acse_transfer_syntaxes,
2291       { "transfer-syntaxes", "acse.transfer_syntaxes",
2292         FT_UINT32, BASE_DEC, NULL, 0,
2293         "acse.SEQUENCE_OF_TransferSyntaxName", HFILL }},
2294     { &hf_acse_transfer_syntaxes_item,
2295       { "Item", "acse.transfer_syntaxes_item",
2296         FT_OID, BASE_NONE, NULL, 0,
2297         "acse.TransferSyntaxName", HFILL }},
2298     { &hf_acse_Default_Context_List_item,
2299       { "Item", "acse.Default_Context_List_item",
2300         FT_NONE, BASE_NONE, NULL, 0,
2301         "acse.Default_Context_List_item", HFILL }},
2302     { &hf_acse_abstract_syntax_name,
2303       { "abstract-syntax-name", "acse.abstract_syntax_name",
2304         FT_OID, BASE_NONE, NULL, 0,
2305         "acse.Abstract_syntax_name", HFILL }},
2306     { &hf_acse_transfer_syntax_name,
2307       { "transfer-syntax-name", "acse.transfer_syntax_name",
2308         FT_OID, BASE_NONE, NULL, 0,
2309         "acse.TransferSyntaxName", HFILL }},
2310     { &hf_acse_P_context_result_list_item,
2311       { "Item", "acse.P_context_result_list_item",
2312         FT_NONE, BASE_NONE, NULL, 0,
2313         "acse.P_context_result_list_item", HFILL }},
2314     { &hf_acse_pcontext_result,
2315       { "result", "acse.result",
2316         FT_INT32, BASE_DEC, VALS(acse_Result_vals), 0,
2317         "acse.Result", HFILL }},
2318     { &hf_acse_concrete_syntax_name,
2319       { "concrete-syntax-name", "acse.concrete_syntax_name",
2320         FT_OID, BASE_NONE, NULL, 0,
2321         "acse.Concrete_syntax_name", HFILL }},
2322     { &hf_acse_provider_reason,
2323       { "provider-reason", "acse.provider_reason",
2324         FT_INT32, BASE_DEC, VALS(acse_T_provider_reason_vals), 0,
2325         "acse.T_provider_reason", HFILL }},
2326     { &hf_acse_acse_service_user,
2327       { "acse-service-user", "acse.acse_service_user",
2328         FT_UINT32, BASE_DEC, VALS(acse_T_acse_service_user_vals), 0,
2329         "acse.T_acse_service_user", HFILL }},
2330     { &hf_acse_acse_service_provider,
2331       { "acse-service-provider", "acse.acse_service_provider",
2332         FT_UINT32, BASE_DEC, VALS(acse_T_acse_service_provider_vals), 0,
2333         "acse.T_acse_service_provider", HFILL }},
2334     { &hf_acse_Association_data_item,
2335       { "Item", "acse.Association_data_item",
2336         FT_NONE, BASE_NONE, NULL, 0,
2337         "acse.EXTERNAL", HFILL }},
2338     { &hf_acse_simply_encoded_data,
2339       { "simply-encoded-data", "acse.simply_encoded_data",
2340         FT_BYTES, BASE_HEX, NULL, 0,
2341         "acse.Simply_encoded_data", HFILL }},
2342     { &hf_acse_fully_encoded_data,
2343       { "fully-encoded-data", "acse.fully_encoded_data",
2344         FT_NONE, BASE_NONE, NULL, 0,
2345         "acse.PDV_list", HFILL }},
2346     { &hf_acse_presentation_context_identifier,
2347       { "presentation-context-identifier", "acse.presentation_context_identifier",
2348         FT_INT32, BASE_DEC, NULL, 0,
2349         "acse.Presentation_context_identifier", HFILL }},
2350     { &hf_acse_presentation_data_values,
2351       { "presentation-data-values", "acse.presentation_data_values",
2352         FT_UINT32, BASE_DEC, VALS(acse_T_presentation_data_values_vals), 0,
2353         "acse.T_presentation_data_values", HFILL }},
2354     { &hf_acse_simple_ASN1_type,
2355       { "simple-ASN1-type", "acse.simple_ASN1_type",
2356         FT_NONE, BASE_NONE, NULL, 0,
2357         "acse.T_simple_ASN1_type", HFILL }},
2358     { &hf_acse_other_mechanism_name,
2359       { "other-mechanism-name", "acse.other_mechanism_name",
2360         FT_OID, BASE_NONE, NULL, 0,
2361         "acse.T_other_mechanism_name", HFILL }},
2362     { &hf_acse_other_mechanism_value,
2363       { "other-mechanism-value", "acse.other_mechanism_value",
2364         FT_NONE, BASE_NONE, NULL, 0,
2365         "acse.T_other_mechanism_value", HFILL }},
2366     { &hf_acse_charstring,
2367       { "charstring", "acse.charstring",
2368         FT_STRING, BASE_NONE, NULL, 0,
2369         "acse.GraphicString", HFILL }},
2370     { &hf_acse_bitstring,
2371       { "bitstring", "acse.bitstring",
2372         FT_BYTES, BASE_HEX, NULL, 0,
2373         "acse.BIT_STRING", HFILL }},
2374     { &hf_acse_external,
2375       { "external", "acse.external",
2376         FT_NONE, BASE_NONE, NULL, 0,
2377         "acse.EXTERNAL", HFILL }},
2378     { &hf_acse_other,
2379       { "other", "acse.other",
2380         FT_NONE, BASE_NONE, NULL, 0,
2381         "acse.Authentication_value_other", HFILL }},
2382     { &hf_acse_T_AARQ_protocol_version_version1,
2383       { "version1", "acse.version1",
2384         FT_BOOLEAN, 8, NULL, 0x80,
2385         "", HFILL }},
2386     { &hf_acse_T_AARE_protocol_version_version1,
2387       { "version1", "acse.version1",
2388         FT_BOOLEAN, 8, NULL, 0x80,
2389         "", HFILL }},
2390     { &hf_acse_ACSE_requirements_authentication,
2391       { "authentication", "acse.authentication",
2392         FT_BOOLEAN, 8, NULL, 0x80,
2393         "", HFILL }},
2394     { &hf_acse_ACSE_requirements_aSO_context_negotiation,
2395       { "aSO-context-negotiation", "acse.aSO-context-negotiation",
2396         FT_BOOLEAN, 8, NULL, 0x40,
2397         "", HFILL }},
2398     { &hf_acse_ACSE_requirements_higher_level_association,
2399       { "higher-level-association", "acse.higher-level-association",
2400         FT_BOOLEAN, 8, NULL, 0x20,
2401         "", HFILL }},
2402     { &hf_acse_ACSE_requirements_nested_association,
2403       { "nested-association", "acse.nested-association",
2404         FT_BOOLEAN, 8, NULL, 0x10,
2405         "", HFILL }},
2406
2407 /*--- End of included file: packet-acse-hfarr.c ---*/
2408 #line 249 "packet-acse-template.c"
2409   };
2410
2411   /* List of subtrees */
2412   static gint *ett[] = {
2413     &ett_acse,
2414
2415 /*--- Included file: packet-acse-ettarr.c ---*/
2416 #line 1 "packet-acse-ettarr.c"
2417     &ett_acse_EXTERNAL,
2418     &ett_acse_T_encoding,
2419     &ett_acse_ACSE_apdu,
2420     &ett_acse_AARQ_apdu,
2421     &ett_acse_T_AARQ_protocol_version,
2422     &ett_acse_AARE_apdu,
2423     &ett_acse_T_AARE_protocol_version,
2424     &ett_acse_RLRQ_apdu,
2425     &ett_acse_RLRE_apdu,
2426     &ett_acse_ABRT_apdu,
2427     &ett_acse_A_DT_apdu,
2428     &ett_acse_ACRQ_apdu,
2429     &ett_acse_ACRP_apdu,
2430     &ett_acse_ACSE_requirements,
2431     &ett_acse_AP_title,
2432     &ett_acse_ASO_qualifier,
2433     &ett_acse_AE_title,
2434     &ett_acse_ASOI_tag,
2435     &ett_acse_ASOI_tag_item,
2436     &ett_acse_ASO_context_name_list,
2437     &ett_acse_Syntactic_context_list,
2438     &ett_acse_Context_list,
2439     &ett_acse_Context_list_item,
2440     &ett_acse_SEQUENCE_OF_TransferSyntaxName,
2441     &ett_acse_Default_Context_List,
2442     &ett_acse_Default_Context_List_item,
2443     &ett_acse_P_context_result_list,
2444     &ett_acse_P_context_result_list_item,
2445     &ett_acse_Associate_source_diagnostic,
2446     &ett_acse_Association_data,
2447     &ett_acse_User_Data,
2448     &ett_acse_PDV_list,
2449     &ett_acse_T_presentation_data_values,
2450     &ett_acse_Authentication_value_other,
2451     &ett_acse_Authentication_value,
2452
2453 /*--- End of included file: packet-acse-ettarr.c ---*/
2454 #line 255 "packet-acse-template.c"
2455   };
2456
2457   /* Register protocol */
2458   proto_acse = proto_register_protocol(PNAME, PSNAME, PFNAME);
2459   register_dissector("acse", dissect_acse, proto_acse);
2460
2461   /* Register fields and subtrees */
2462   proto_register_field_array(proto_acse, hf, array_length(hf));
2463   proto_register_subtree_array(ett, array_length(ett));
2464
2465 }
2466
2467
2468 /*--- proto_reg_handoff_acse -------------------------------------------*/
2469 void proto_reg_handoff_acse(void) {
2470 /*#include "packet-acse-dis-tab.c"*/
2471
2472         add_oid_str_name("2.2.3.1.1","aCSE-id");
2473         register_ber_oid_dissector(ACSE_APDU_OID, dissect_acse, proto_acse, "acse-as-id");
2474
2475
2476 }
2477