HACK: pinfo->private_data points to smb_info again
[wireshark-wip.git] / epan / dissectors / packet-acse.c
blobdc37ecf9fbe34e378983f8fa62e0f8e5c76623d1
1 /* Do not modify this file. Changes will be overwritten. */
2 /* Generated automatically by the ASN.1 to Wireshark dissector compiler */
3 /* packet-acse.c */
4 /* ../../tools/asn2wrs.py -b -C -p acse -c ./acse.cnf -s ./packet-acse-template -D . -O ../../epan/dissectors acse.asn */
6 /* Input file: packet-acse-template.c */
8 #line 1 "../../asn1/acse/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 {
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
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>
24 * $Id$
26 * Wireshark - Network traffic analyzer
27 * By Gerald Combs <gerald@wireshark.org>
28 * Copyright 1998 Gerald Combs
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.
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.
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
45 #include "config.h"
47 #include <glib.h>
48 #include <epan/packet.h>
49 #include <epan/exceptions.h>
50 #include <epan/wmem/wmem.h>
51 #include <epan/expert.h>
52 #include <epan/oids.h>
53 #include <epan/asn1.h>
55 #include <string.h>
57 #include "packet-ber.h"
58 #include "packet-acse.h"
59 #include "packet-ses.h"
60 #include "packet-pres.h"
61 #include "packet-x509if.h"
63 #define PNAME "ISO 8650-1 OSI Association Control Service"
64 #define PSNAME "ACSE"
65 #define PFNAME "acse"
67 #define CLPNAME "ISO 10035-1 OSI Connectionless Association Control Service"
68 #define CLPSNAME "CLACSE"
69 #define CLPFNAME "clacse"
72 #define ACSE_APDU_OID "2.2.1.0.1"
74 /* Initialize the protocol and registered fields */
75 int proto_acse = -1;
76 int proto_clacse = -1;
81 /*--- Included file: packet-acse-hf.c ---*/
82 #line 1 "../../asn1/acse/packet-acse-hf.c"
83 static int hf_acse_direct_reference = -1; /* T_direct_reference */
84 static int hf_acse_indirect_reference = -1; /* T_indirect_reference */
85 static int hf_acse_data_value_descriptor = -1; /* ObjectDescriptor */
86 static int hf_acse_encoding = -1; /* T_encoding */
87 static int hf_acse_single_ASN1_type = -1; /* T_single_ASN1_type */
88 static int hf_acse_octet_aligned = -1; /* T_octet_aligned */
89 static int hf_acse_arbitrary = -1; /* BIT_STRING */
90 static int hf_acse_aarq = -1; /* AARQ_apdu */
91 static int hf_acse_aare = -1; /* AARE_apdu */
92 static int hf_acse_rlrq = -1; /* RLRQ_apdu */
93 static int hf_acse_rlre = -1; /* RLRE_apdu */
94 static int hf_acse_abrt = -1; /* ABRT_apdu */
95 static int hf_acse_adt = -1; /* A_DT_apdu */
96 static int hf_acse_acrq = -1; /* ACRQ_apdu */
97 static int hf_acse_acrp = -1; /* ACRP_apdu */
98 static int hf_acse_aARQ_protocol_version = -1; /* T_AARQ_protocol_version */
99 static int hf_acse_aARQ_aSO_context_name = -1; /* T_AARQ_aSO_context_name */
100 static int hf_acse_called_AP_title = -1; /* AP_title */
101 static int hf_acse_called_AE_qualifier = -1; /* AE_qualifier */
102 static int hf_acse_called_AP_invocation_identifier = -1; /* AP_invocation_identifier */
103 static int hf_acse_called_AE_invocation_identifier = -1; /* AE_invocation_identifier */
104 static int hf_acse_calling_AP_title = -1; /* AP_title */
105 static int hf_acse_calling_AE_qualifier = -1; /* AE_qualifier */
106 static int hf_acse_calling_AP_invocation_identifier = -1; /* AP_invocation_identifier */
107 static int hf_acse_calling_AE_invocation_identifier = -1; /* AE_invocation_identifier */
108 static int hf_acse_sender_acse_requirements = -1; /* ACSE_requirements */
109 static int hf_acse_mechanism_name = -1; /* Mechanism_name */
110 static int hf_acse_calling_authentication_value = -1; /* Authentication_value */
111 static int hf_acse_aSO_context_name_list = -1; /* ASO_context_name_list */
112 static int hf_acse_implementation_information = -1; /* Implementation_data */
113 static int hf_acse_p_context_definition_list = -1; /* Syntactic_context_list */
114 static int hf_acse_called_asoi_tag = -1; /* ASOI_tag */
115 static int hf_acse_calling_asoi_tag = -1; /* ASOI_tag */
116 static int hf_acse_aARQ_user_information = -1; /* Association_data */
117 static int hf_acse_aARE_protocol_version = -1; /* T_AARE_protocol_version */
118 static int hf_acse_aARE_aSO_context_name = -1; /* T_AARE_aSO_context_name */
119 static int hf_acse_result = -1; /* Associate_result */
120 static int hf_acse_result_source_diagnostic = -1; /* Associate_source_diagnostic */
121 static int hf_acse_responding_AP_title = -1; /* AP_title */
122 static int hf_acse_responding_AE_qualifier = -1; /* AE_qualifier */
123 static int hf_acse_responding_AP_invocation_identifier = -1; /* AP_invocation_identifier */
124 static int hf_acse_responding_AE_invocation_identifier = -1; /* AE_invocation_identifier */
125 static int hf_acse_responder_acse_requirements = -1; /* ACSE_requirements */
126 static int hf_acse_responding_authentication_value = -1; /* Authentication_value */
127 static int hf_acse_p_context_result_list = -1; /* P_context_result_list */
128 static int hf_acse_aARE_user_information = -1; /* Association_data */
129 static int hf_acse_rLRQ_reason = -1; /* Release_request_reason */
130 static int hf_acse_aso_qualifier = -1; /* ASO_qualifier */
131 static int hf_acse_asoi_identifier = -1; /* ASOI_identifier */
132 static int hf_acse_rLRQ_user_information = -1; /* Association_data */
133 static int hf_acse_rLRE_reason = -1; /* Release_response_reason */
134 static int hf_acse_rLRE_user_information = -1; /* Association_data */
135 static int hf_acse_abort_source = -1; /* ABRT_source */
136 static int hf_acse_abort_diagnostic = -1; /* ABRT_diagnostic */
137 static int hf_acse_aBRT_user_information = -1; /* Association_data */
138 static int hf_acse_a_user_data = -1; /* User_Data */
139 static int hf_acse_aCRQ_aSO_context_name = -1; /* T_ACRQ_aSO_context_name */
140 static int hf_acse_user_information = -1; /* User_information */
141 static int hf_acse_aSO_context_name = -1; /* T_ACRP_aSO_context_name */
142 static int hf_acse_ap_title_form1 = -1; /* AP_title_form1 */
143 static int hf_acse_ap_title_form2 = -1; /* AP_title_form2 */
144 static int hf_acse_ap_title_form3 = -1; /* AP_title_form3 */
145 static int hf_acse_aso_qualifier_form1 = -1; /* ASO_qualifier_form1 */
146 static int hf_acse_aso_qualifier_form2 = -1; /* ASO_qualifier_form2 */
147 static int hf_acse_aso_qualifier_form3 = -1; /* ASO_qualifier_form3 */
148 static int hf_acse_aso_qualifier_form_any_octets = -1; /* ASO_qualifier_form_octets */
149 static int hf_acse_ae_title_form1 = -1; /* AE_title_form1 */
150 static int hf_acse_ae_title_form2 = -1; /* AE_title_form2 */
151 static int hf_acse_ASOI_tag_item = -1; /* ASOI_tag_item */
152 static int hf_acse_qualifier = -1; /* ASO_qualifier */
153 static int hf_acse_identifier = -1; /* ASOI_identifier */
154 static int hf_acse_ASO_context_name_list_item = -1; /* ASO_context_name */
155 static int hf_acse_context_list = -1; /* Context_list */
156 static int hf_acse_default_contact_list = -1; /* Default_Context_List */
157 static int hf_acse_Context_list_item = -1; /* Context_list_item */
158 static int hf_acse_pci = -1; /* Presentation_context_identifier */
159 static int hf_acse_abstract_syntax = -1; /* Abstract_syntax_name */
160 static int hf_acse_transfer_syntaxes = -1; /* SEQUENCE_OF_TransferSyntaxName */
161 static int hf_acse_transfer_syntaxes_item = -1; /* TransferSyntaxName */
162 static int hf_acse_Default_Context_List_item = -1; /* Default_Context_List_item */
163 static int hf_acse_abstract_syntax_name = -1; /* Abstract_syntax_name */
164 static int hf_acse_transfer_syntax_name = -1; /* TransferSyntaxName */
165 static int hf_acse_P_context_result_list_item = -1; /* P_context_result_list_item */
166 static int hf_acse_pcontext_result = -1; /* Result */
167 static int hf_acse_concrete_syntax_name = -1; /* Concrete_syntax_name */
168 static int hf_acse_provider_reason = -1; /* T_provider_reason */
169 static int hf_acse_service_user = -1; /* T_service_user */
170 static int hf_acse_service_provider = -1; /* T_service_provider */
171 static int hf_acse_Association_data_item = -1; /* EXTERNALt */
172 static int hf_acse_simply_encoded_data = -1; /* Simply_encoded_data */
173 static int hf_acse_fully_encoded_data = -1; /* PDV_list */
174 static int hf_acse_presentation_context_identifier = -1; /* Presentation_context_identifier */
175 static int hf_acse_presentation_data_values = -1; /* T_presentation_data_values */
176 static int hf_acse_simple_ASN1_type = -1; /* T_simple_ASN1_type */
177 static int hf_acse_pDVList_octet_aligned = -1; /* OCTET_STRING */
178 static int hf_acse_other_mechanism_name = -1; /* T_other_mechanism_name */
179 static int hf_acse_other_mechanism_value = -1; /* T_other_mechanism_value */
180 static int hf_acse_charstring = -1; /* GraphicString */
181 static int hf_acse_bitstring = -1; /* BIT_STRING */
182 static int hf_acse_external = -1; /* EXTERNALt */
183 static int hf_acse_other = -1; /* Authentication_value_other */
184 /* named bits */
185 static int hf_acse_T_AARQ_protocol_version_version1 = -1;
186 static int hf_acse_T_AARE_protocol_version_version1 = -1;
187 static int hf_acse_ACSE_requirements_authentication = -1;
188 static int hf_acse_ACSE_requirements_aSO_context_negotiation = -1;
189 static int hf_acse_ACSE_requirements_higher_level_association = -1;
190 static int hf_acse_ACSE_requirements_nested_association = -1;
192 /*--- End of included file: packet-acse-hf.c ---*/
193 #line 73 "../../asn1/acse/packet-acse-template.c"
195 /* Initialize the subtree pointers */
196 static gint ett_acse = -1;
198 /*--- Included file: packet-acse-ett.c ---*/
199 #line 1 "../../asn1/acse/packet-acse-ett.c"
200 static gint ett_acse_EXTERNALt_U = -1;
201 static gint ett_acse_T_encoding = -1;
202 static gint ett_acse_ACSE_apdu = -1;
203 static gint ett_acse_AARQ_apdu_U = -1;
204 static gint ett_acse_T_AARQ_protocol_version = -1;
205 static gint ett_acse_AARE_apdu_U = -1;
206 static gint ett_acse_T_AARE_protocol_version = -1;
207 static gint ett_acse_RLRQ_apdu_U = -1;
208 static gint ett_acse_RLRE_apdu_U = -1;
209 static gint ett_acse_ABRT_apdu_U = -1;
210 static gint ett_acse_A_DT_apdu_U = -1;
211 static gint ett_acse_ACRQ_apdu_U = -1;
212 static gint ett_acse_ACRP_apdu_U = -1;
213 static gint ett_acse_ACSE_requirements = -1;
214 static gint ett_acse_AP_title = -1;
215 static gint ett_acse_ASO_qualifier = -1;
216 static gint ett_acse_AE_title = -1;
217 static gint ett_acse_ASOI_tag = -1;
218 static gint ett_acse_ASOI_tag_item = -1;
219 static gint ett_acse_ASO_context_name_list = -1;
220 static gint ett_acse_Syntactic_context_list = -1;
221 static gint ett_acse_Context_list = -1;
222 static gint ett_acse_Context_list_item = -1;
223 static gint ett_acse_SEQUENCE_OF_TransferSyntaxName = -1;
224 static gint ett_acse_Default_Context_List = -1;
225 static gint ett_acse_Default_Context_List_item = -1;
226 static gint ett_acse_P_context_result_list = -1;
227 static gint ett_acse_P_context_result_list_item = -1;
228 static gint ett_acse_Associate_source_diagnostic = -1;
229 static gint ett_acse_Association_data = -1;
230 static gint ett_acse_User_Data = -1;
231 static gint ett_acse_PDV_list = -1;
232 static gint ett_acse_T_presentation_data_values = -1;
233 static gint ett_acse_Authentication_value_other = -1;
234 static gint ett_acse_Authentication_value = -1;
236 /*--- End of included file: packet-acse-ett.c ---*/
237 #line 77 "../../asn1/acse/packet-acse-template.c"
239 static expert_field ei_acse_dissector_not_available = EI_INIT;
241 static const char *object_identifier_id;
242 /* indirect_reference, used to pick up the signalling so we know what
243 kind of data is transferred in SES_DATA_TRANSFER_PDUs */
244 static guint32 indir_ref=0;
246 static proto_tree *top_tree=NULL;
248 #if NOT_NEEDED
249 /* to keep track of presentation context identifiers and protocol-oids */
250 typedef struct _acse_ctx_oid_t {
251 /* XXX here we should keep track of ADDRESS/PORT as well */
252 guint32 ctx_id;
253 char *oid;
254 } acse_ctx_oid_t;
255 static GHashTable *acse_ctx_oid_table = NULL;
257 static guint
258 acse_ctx_oid_hash(gconstpointer k)
260 acse_ctx_oid_t *aco=(acse_ctx_oid_t *)k;
261 return aco->ctx_id;
263 /* XXX this one should be made ADDRESS/PORT aware */
264 static gint
265 acse_ctx_oid_equal(gconstpointer k1, gconstpointer k2)
267 acse_ctx_oid_t *aco1=(acse_ctx_oid_t *)k1;
268 acse_ctx_oid_t *aco2=(acse_ctx_oid_t *)k2;
269 return aco1->ctx_id==aco2->ctx_id;
272 static void
273 acse_init(void)
275 if( acse_ctx_oid_table ){
276 g_hash_table_destroy(acse_ctx_oid_table);
277 acse_ctx_oid_table = NULL;
279 acse_ctx_oid_table = g_hash_table_new(acse_ctx_oid_hash,
280 acse_ctx_oid_equal);
284 static void
285 register_ctx_id_and_oid(packet_info *pinfo _U_, guint32 idx, char *oid)
287 acse_ctx_oid_t *aco, *tmpaco;
288 aco=wmem_new(wmem_file_scope(), acse_ctx_oid_t);
289 aco->ctx_id=idx;
290 aco->oid=wmem_strdup(wmem_file_scope(), oid);
292 /* if this ctx already exists, remove the old one first */
293 tmpaco=(acse_ctx_oid_t *)g_hash_table_lookup(acse_ctx_oid_table, aco);
294 if(tmpaco){
295 g_hash_table_remove(acse_ctx_oid_table, tmpaco);
297 g_hash_table_insert(acse_ctx_oid_table, aco, aco);
299 static char *
300 find_oid_by_ctx_id(packet_info *pinfo _U_, guint32 idx)
302 acse_ctx_oid_t aco, *tmpaco;
303 aco.ctx_id=idx;
304 tmpaco=(acse_ctx_oid_t *)g_hash_table_lookup(acse_ctx_oid_table, &aco);
305 if(tmpaco){
306 return tmpaco->oid;
308 return NULL;
311 # endif /* NOT_NEEDED */
314 /*--- Included file: packet-acse-fn.c ---*/
315 #line 1 "../../asn1/acse/packet-acse-fn.c"
318 static int
319 dissect_acse_T_direct_reference(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
320 offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_index, &object_identifier_id);
322 return offset;
327 static int
328 dissect_acse_T_indirect_reference(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
329 #line 71 "../../asn1/acse/acse.cnf"
330 char *oid;
331 struct SESSION_DATA_STRUCTURE* session = (struct SESSION_DATA_STRUCTURE*) actx->private_data;
333 offset = dissect_ber_integer(FALSE, actx, tree, tvb, offset,
334 hf_acse_indirect_reference,
335 &indir_ref);
337 /* look up the indirect reference */
338 if((oid = find_oid_by_pres_ctx_id(actx->pinfo, indir_ref)) != NULL) {
339 object_identifier_id = wmem_strdup(wmem_packet_scope(), oid);
342 if(session)
343 session->pres_ctx_id = indir_ref;
347 return offset;
352 static int
353 dissect_acse_ObjectDescriptor(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
354 offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_ObjectDescriptor,
355 actx, tree, tvb, offset, hf_index,
356 NULL);
358 return offset;
363 static int
364 dissect_acse_T_single_ASN1_type(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
365 #line 90 "../../asn1/acse/acse.cnf"
366 offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, top_tree ? top_tree : tree, actx->private_data);
370 return offset;
375 static int
376 dissect_acse_T_octet_aligned(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
377 #line 93 "../../asn1/acse/acse.cnf"
378 offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, top_tree ? top_tree : tree, actx->private_data);
382 return offset;
387 static int
388 dissect_acse_BIT_STRING(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
389 offset = dissect_ber_bitstring(implicit_tag, actx, tree, tvb, offset,
390 NULL, hf_index, -1,
391 NULL);
393 return offset;
397 static const value_string acse_T_encoding_vals[] = {
398 { 0, "single-ASN1-type" },
399 { 1, "octet-aligned" },
400 { 2, "arbitrary" },
401 { 0, NULL }
404 static const ber_choice_t T_encoding_choice[] = {
405 { 0, &hf_acse_single_ASN1_type, BER_CLASS_CON, 0, 0, dissect_acse_T_single_ASN1_type },
406 { 1, &hf_acse_octet_aligned , BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_acse_T_octet_aligned },
407 { 2, &hf_acse_arbitrary , BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_acse_BIT_STRING },
408 { 0, NULL, 0, 0, 0, NULL }
411 static int
412 dissect_acse_T_encoding(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
413 offset = dissect_ber_choice(actx, tree, tvb, offset,
414 T_encoding_choice, hf_index, ett_acse_T_encoding,
415 NULL);
417 return offset;
421 static const ber_sequence_t EXTERNALt_U_sequence[] = {
422 { &hf_acse_direct_reference, BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_acse_T_direct_reference },
423 { &hf_acse_indirect_reference, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_acse_T_indirect_reference },
424 { &hf_acse_data_value_descriptor, BER_CLASS_UNI, BER_UNI_TAG_ObjectDescriptor, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_acse_ObjectDescriptor },
425 { &hf_acse_encoding , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_acse_T_encoding },
426 { NULL, 0, 0, 0, NULL }
429 static int
430 dissect_acse_EXTERNALt_U(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
431 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
432 EXTERNALt_U_sequence, hf_index, ett_acse_EXTERNALt_U);
434 return offset;
440 dissect_acse_EXTERNALt(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
441 offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
442 hf_index, BER_CLASS_UNI, 8, TRUE, dissect_acse_EXTERNALt_U);
444 return offset;
448 static const asn_namedbit T_AARQ_protocol_version_bits[] = {
449 { 0, &hf_acse_T_AARQ_protocol_version_version1, -1, -1, "version1", NULL },
450 { 0, NULL, 0, 0, NULL, NULL }
453 static int
454 dissect_acse_T_AARQ_protocol_version(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
455 offset = dissect_ber_bitstring(implicit_tag, actx, tree, tvb, offset,
456 T_AARQ_protocol_version_bits, hf_index, ett_acse_T_AARQ_protocol_version,
457 NULL);
459 return offset;
464 static int
465 dissect_acse_ASO_context_name(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
466 offset = dissect_ber_object_identifier(implicit_tag, actx, tree, tvb, offset, hf_index, NULL);
468 return offset;
473 static int
474 dissect_acse_T_AARQ_aSO_context_name(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
475 #line 55 "../../asn1/acse/acse.cnf"
476 offset = dissect_ber_object_identifier_str(FALSE, actx, tree, tvb, offset,
477 hf_index, &object_identifier_id);
481 return offset;
486 static int
487 dissect_acse_AP_title_form1(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
488 offset = dissect_x509if_Name(implicit_tag, tvb, offset, actx, tree, hf_index);
490 return offset;
495 static int
496 dissect_acse_AP_title_form2(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
497 offset = dissect_ber_object_identifier(implicit_tag, actx, tree, tvb, offset, hf_index, NULL);
499 return offset;
504 static int
505 dissect_acse_AP_title_form3(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
506 offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_PrintableString,
507 actx, tree, tvb, offset, hf_index,
508 NULL);
510 return offset;
514 const value_string acse_AP_title_vals[] = {
515 { 0, "ap-title-form1" },
516 { 1, "ap-title-form2" },
517 { 2, "ap-title-form3" },
518 { 0, NULL }
521 static const ber_choice_t AP_title_choice[] = {
522 { 0, &hf_acse_ap_title_form1 , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_acse_AP_title_form1 },
523 { 1, &hf_acse_ap_title_form2 , BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_acse_AP_title_form2 },
524 { 2, &hf_acse_ap_title_form3 , BER_CLASS_UNI, BER_UNI_TAG_PrintableString, BER_FLAGS_NOOWNTAG, dissect_acse_AP_title_form3 },
525 { 0, NULL, 0, 0, 0, NULL }
529 dissect_acse_AP_title(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
530 offset = dissect_ber_choice(actx, tree, tvb, offset,
531 AP_title_choice, hf_index, ett_acse_AP_title,
532 NULL);
534 return offset;
539 static int
540 dissect_acse_ASO_qualifier_form1(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
541 offset = dissect_x509if_RelativeDistinguishedName(implicit_tag, tvb, offset, actx, tree, hf_index);
543 return offset;
548 static int
549 dissect_acse_ASO_qualifier_form2(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
550 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
551 NULL);
553 return offset;
558 static int
559 dissect_acse_ASO_qualifier_form3(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
560 offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_PrintableString,
561 actx, tree, tvb, offset, hf_index,
562 NULL);
564 return offset;
569 static int
570 dissect_acse_ASO_qualifier_form_octets(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
571 offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
572 NULL);
574 return offset;
578 const value_string acse_ASO_qualifier_vals[] = {
579 { 0, "aso-qualifier-form1" },
580 { 1, "aso-qualifier-form2" },
581 { 2, "aso-qualifier-form3" },
582 { 3, "aso-qualifier-form-any-octets" },
583 { 0, NULL }
586 static const ber_choice_t ASO_qualifier_choice[] = {
587 { 0, &hf_acse_aso_qualifier_form1, BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_acse_ASO_qualifier_form1 },
588 { 1, &hf_acse_aso_qualifier_form2, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_acse_ASO_qualifier_form2 },
589 { 2, &hf_acse_aso_qualifier_form3, BER_CLASS_UNI, BER_UNI_TAG_PrintableString, BER_FLAGS_NOOWNTAG, dissect_acse_ASO_qualifier_form3 },
590 { 3, &hf_acse_aso_qualifier_form_any_octets, BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_acse_ASO_qualifier_form_octets },
591 { 0, NULL, 0, 0, 0, NULL }
595 dissect_acse_ASO_qualifier(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
596 offset = dissect_ber_choice(actx, tree, tvb, offset,
597 ASO_qualifier_choice, hf_index, ett_acse_ASO_qualifier,
598 NULL);
600 return offset;
606 dissect_acse_AE_qualifier(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
607 offset = dissect_acse_ASO_qualifier(implicit_tag, tvb, offset, actx, tree, hf_index);
609 return offset;
615 dissect_acse_AP_invocation_identifier(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
616 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
617 NULL);
619 return offset;
625 dissect_acse_AE_invocation_identifier(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
626 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
627 NULL);
629 return offset;
633 static const asn_namedbit ACSE_requirements_bits[] = {
634 { 0, &hf_acse_ACSE_requirements_authentication, -1, -1, "authentication", NULL },
635 { 1, &hf_acse_ACSE_requirements_aSO_context_negotiation, -1, -1, "aSO-context-negotiation", NULL },
636 { 2, &hf_acse_ACSE_requirements_higher_level_association, -1, -1, "higher-level-association", NULL },
637 { 3, &hf_acse_ACSE_requirements_nested_association, -1, -1, "nested-association", NULL },
638 { 0, NULL, 0, 0, NULL, NULL }
641 static int
642 dissect_acse_ACSE_requirements(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
643 offset = dissect_ber_bitstring(implicit_tag, actx, tree, tvb, offset,
644 ACSE_requirements_bits, hf_index, ett_acse_ACSE_requirements,
645 NULL);
647 return offset;
652 static int
653 dissect_acse_Mechanism_name(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
654 offset = dissect_ber_object_identifier(implicit_tag, actx, tree, tvb, offset, hf_index, NULL);
656 return offset;
661 static int
662 dissect_acse_GraphicString(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
663 offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_GraphicString,
664 actx, tree, tvb, offset, hf_index,
665 NULL);
667 return offset;
672 static int
673 dissect_acse_T_other_mechanism_name(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
674 offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_index, &object_identifier_id);
676 return offset;
681 static int
682 dissect_acse_T_other_mechanism_value(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
683 #line 49 "../../asn1/acse/acse.cnf"
684 offset=call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, top_tree, actx->private_data);
688 return offset;
692 static const ber_sequence_t Authentication_value_other_sequence[] = {
693 { &hf_acse_other_mechanism_name, BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_acse_T_other_mechanism_name },
694 { &hf_acse_other_mechanism_value, BER_CLASS_ANY, 0, BER_FLAGS_NOOWNTAG, dissect_acse_T_other_mechanism_value },
695 { NULL, 0, 0, 0, NULL }
698 static int
699 dissect_acse_Authentication_value_other(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
700 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
701 Authentication_value_other_sequence, hf_index, ett_acse_Authentication_value_other);
703 return offset;
707 static const value_string acse_Authentication_value_vals[] = {
708 { 0, "charstring" },
709 { 1, "bitstring" },
710 { 2, "external" },
711 { 3, "other" },
712 { 0, NULL }
715 static const ber_choice_t Authentication_value_choice[] = {
716 { 0, &hf_acse_charstring , BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_acse_GraphicString },
717 { 1, &hf_acse_bitstring , BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_acse_BIT_STRING },
718 { 2, &hf_acse_external , BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_acse_EXTERNALt },
719 { 3, &hf_acse_other , BER_CLASS_CON, 3, BER_FLAGS_IMPLTAG, dissect_acse_Authentication_value_other },
720 { 0, NULL, 0, 0, 0, NULL }
723 static int
724 dissect_acse_Authentication_value(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
725 offset = dissect_ber_choice(actx, tree, tvb, offset,
726 Authentication_value_choice, hf_index, ett_acse_Authentication_value,
727 NULL);
729 return offset;
733 static const ber_sequence_t ASO_context_name_list_sequence_of[1] = {
734 { &hf_acse_ASO_context_name_list_item, BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_acse_ASO_context_name },
737 static int
738 dissect_acse_ASO_context_name_list(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
739 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
740 ASO_context_name_list_sequence_of, hf_index, ett_acse_ASO_context_name_list);
742 return offset;
747 static int
748 dissect_acse_Implementation_data(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
749 offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_GraphicString,
750 actx, tree, tvb, offset, hf_index,
751 NULL);
753 return offset;
758 static int
759 dissect_acse_Presentation_context_identifier(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
760 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
761 NULL);
763 return offset;
768 static int
769 dissect_acse_Abstract_syntax_name(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
770 offset = dissect_ber_object_identifier(implicit_tag, actx, tree, tvb, offset, hf_index, NULL);
772 return offset;
777 static int
778 dissect_acse_TransferSyntaxName(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
779 offset = dissect_ber_object_identifier(implicit_tag, actx, tree, tvb, offset, hf_index, NULL);
781 return offset;
785 static const ber_sequence_t SEQUENCE_OF_TransferSyntaxName_sequence_of[1] = {
786 { &hf_acse_transfer_syntaxes_item, BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_acse_TransferSyntaxName },
789 static int
790 dissect_acse_SEQUENCE_OF_TransferSyntaxName(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
791 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
792 SEQUENCE_OF_TransferSyntaxName_sequence_of, hf_index, ett_acse_SEQUENCE_OF_TransferSyntaxName);
794 return offset;
798 static const ber_sequence_t Context_list_item_sequence[] = {
799 { &hf_acse_pci , BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_acse_Presentation_context_identifier },
800 { &hf_acse_abstract_syntax, BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_acse_Abstract_syntax_name },
801 { &hf_acse_transfer_syntaxes, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_acse_SEQUENCE_OF_TransferSyntaxName },
802 { NULL, 0, 0, 0, NULL }
805 static int
806 dissect_acse_Context_list_item(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
807 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
808 Context_list_item_sequence, hf_index, ett_acse_Context_list_item);
810 return offset;
814 static const ber_sequence_t Context_list_sequence_of[1] = {
815 { &hf_acse_Context_list_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_acse_Context_list_item },
818 static int
819 dissect_acse_Context_list(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
820 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
821 Context_list_sequence_of, hf_index, ett_acse_Context_list);
823 return offset;
827 static const ber_sequence_t Default_Context_List_item_sequence[] = {
828 { &hf_acse_abstract_syntax_name, BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_acse_Abstract_syntax_name },
829 { &hf_acse_transfer_syntax_name, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_acse_TransferSyntaxName },
830 { NULL, 0, 0, 0, NULL }
833 static int
834 dissect_acse_Default_Context_List_item(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
835 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
836 Default_Context_List_item_sequence, hf_index, ett_acse_Default_Context_List_item);
838 return offset;
842 static const ber_sequence_t Default_Context_List_sequence_of[1] = {
843 { &hf_acse_Default_Context_List_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_acse_Default_Context_List_item },
846 static int
847 dissect_acse_Default_Context_List(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
848 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
849 Default_Context_List_sequence_of, hf_index, ett_acse_Default_Context_List);
851 return offset;
855 static const value_string acse_Syntactic_context_list_vals[] = {
856 { 0, "context-list" },
857 { 1, "default-contact-list" },
858 { 0, NULL }
861 static const ber_choice_t Syntactic_context_list_choice[] = {
862 { 0, &hf_acse_context_list , BER_CLASS_CON, 0, 0, dissect_acse_Context_list },
863 { 1, &hf_acse_default_contact_list, BER_CLASS_CON, 1, 0, dissect_acse_Default_Context_List },
864 { 0, NULL, 0, 0, 0, NULL }
867 static int
868 dissect_acse_Syntactic_context_list(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
869 offset = dissect_ber_choice(actx, tree, tvb, offset,
870 Syntactic_context_list_choice, hf_index, ett_acse_Syntactic_context_list,
871 NULL);
873 return offset;
878 static int
879 dissect_acse_ASOI_identifier(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
880 offset = dissect_ber_constrained_integer(implicit_tag, actx, tree, tvb, offset,
881 1U, 128U, hf_index, NULL);
883 return offset;
887 static const ber_sequence_t ASOI_tag_item_sequence[] = {
888 { &hf_acse_qualifier , BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_acse_ASO_qualifier },
889 { &hf_acse_identifier , BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL, dissect_acse_ASOI_identifier },
890 { NULL, 0, 0, 0, NULL }
893 static int
894 dissect_acse_ASOI_tag_item(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
895 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
896 ASOI_tag_item_sequence, hf_index, ett_acse_ASOI_tag_item);
898 return offset;
902 static const ber_sequence_t ASOI_tag_sequence_of[1] = {
903 { &hf_acse_ASOI_tag_item , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_acse_ASOI_tag_item },
906 static int
907 dissect_acse_ASOI_tag(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
908 offset = dissect_ber_constrained_sequence_of(implicit_tag, actx, tree, tvb, offset,
909 0, 7, ASOI_tag_sequence_of, hf_index, ett_acse_ASOI_tag);
911 return offset;
915 static const ber_sequence_t Association_data_sequence_of[1] = {
916 { &hf_acse_Association_data_item, BER_CLASS_UNI, 8, BER_FLAGS_NOOWNTAG, dissect_acse_EXTERNALt },
919 static int
920 dissect_acse_Association_data(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
921 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
922 Association_data_sequence_of, hf_index, ett_acse_Association_data);
924 return offset;
928 static const ber_sequence_t AARQ_apdu_U_sequence[] = {
929 { &hf_acse_aARQ_protocol_version, BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_acse_T_AARQ_protocol_version },
930 { &hf_acse_aARQ_aSO_context_name, BER_CLASS_CON, 1, 0, dissect_acse_T_AARQ_aSO_context_name },
931 { &hf_acse_called_AP_title, BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_acse_AP_title },
932 { &hf_acse_called_AE_qualifier, BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_acse_AE_qualifier },
933 { &hf_acse_called_AP_invocation_identifier, BER_CLASS_CON, 4, BER_FLAGS_OPTIONAL, dissect_acse_AP_invocation_identifier },
934 { &hf_acse_called_AE_invocation_identifier, BER_CLASS_CON, 5, BER_FLAGS_OPTIONAL, dissect_acse_AE_invocation_identifier },
935 { &hf_acse_calling_AP_title, BER_CLASS_CON, 6, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_acse_AP_title },
936 { &hf_acse_calling_AE_qualifier, BER_CLASS_CON, 7, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_acse_AE_qualifier },
937 { &hf_acse_calling_AP_invocation_identifier, BER_CLASS_CON, 8, BER_FLAGS_OPTIONAL, dissect_acse_AP_invocation_identifier },
938 { &hf_acse_calling_AE_invocation_identifier, BER_CLASS_CON, 9, BER_FLAGS_OPTIONAL, dissect_acse_AE_invocation_identifier },
939 { &hf_acse_sender_acse_requirements, BER_CLASS_CON, 10, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_acse_ACSE_requirements },
940 { &hf_acse_mechanism_name , BER_CLASS_CON, 11, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_acse_Mechanism_name },
941 { &hf_acse_calling_authentication_value, BER_CLASS_CON, 12, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_acse_Authentication_value },
942 { &hf_acse_aSO_context_name_list, BER_CLASS_CON, 13, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_acse_ASO_context_name_list },
943 { &hf_acse_implementation_information, BER_CLASS_CON, 29, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_acse_Implementation_data },
944 { &hf_acse_p_context_definition_list, BER_CLASS_CON, 14, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_acse_Syntactic_context_list },
945 { &hf_acse_called_asoi_tag, BER_CLASS_CON, 15, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_acse_ASOI_tag },
946 { &hf_acse_calling_asoi_tag, BER_CLASS_CON, 16, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_acse_ASOI_tag },
947 { &hf_acse_aARQ_user_information, BER_CLASS_CON, 30, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_acse_Association_data },
948 { NULL, 0, 0, 0, NULL }
951 static int
952 dissect_acse_AARQ_apdu_U(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
953 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
954 AARQ_apdu_U_sequence, hf_index, ett_acse_AARQ_apdu_U);
956 return offset;
961 static int
962 dissect_acse_AARQ_apdu(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
963 #line 96 "../../asn1/acse/acse.cnf"
964 col_append_str(actx->pinfo->cinfo, COL_INFO, "A-Associate-Request");
966 offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
967 hf_index, BER_CLASS_APP, 0, TRUE, dissect_acse_AARQ_apdu_U);
972 return offset;
976 static const asn_namedbit T_AARE_protocol_version_bits[] = {
977 { 0, &hf_acse_T_AARE_protocol_version_version1, -1, -1, "version1", NULL },
978 { 0, NULL, 0, 0, NULL, NULL }
981 static int
982 dissect_acse_T_AARE_protocol_version(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
983 offset = dissect_ber_bitstring(implicit_tag, actx, tree, tvb, offset,
984 T_AARE_protocol_version_bits, hf_index, ett_acse_T_AARE_protocol_version,
985 NULL);
987 return offset;
992 static int
993 dissect_acse_T_AARE_aSO_context_name(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
994 #line 59 "../../asn1/acse/acse.cnf"
995 offset = dissect_ber_object_identifier_str(FALSE, actx, tree, tvb, offset,
996 hf_index, &object_identifier_id);
1000 return offset;
1004 static const value_string acse_Associate_result_vals[] = {
1005 { 0, "accepted" },
1006 { 1, "rejected-permanent" },
1007 { 2, "rejected-transient" },
1008 { 0, NULL }
1012 static int
1013 dissect_acse_Associate_result(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1014 offset = dissect_ber_constrained_integer(implicit_tag, actx, tree, tvb, offset,
1015 0U, 2U, hf_index, NULL);
1017 return offset;
1021 static const value_string acse_T_service_user_vals[] = {
1022 { 0, "null" },
1023 { 1, "no-reason-given" },
1024 { 2, "application-context-name-not-supported" },
1025 { 3, "calling-AP-title-not-recognized" },
1026 { 4, "calling-AP-invocation-identifier-not-recognized" },
1027 { 5, "calling-AE-qualifier-not-recognized" },
1028 { 6, "calling-AE-invocation-identifier-not-recognized" },
1029 { 7, "called-AP-title-not-recognized" },
1030 { 8, "called-AP-invocation-identifier-not-recognized" },
1031 { 9, "called-AE-qualifier-not-recognized" },
1032 { 10, "called-AE-invocation-identifier-not-recognized" },
1033 { 11, "authentication-mechanism-name-not-recognized" },
1034 { 12, "authentication-mechanism-name-required" },
1035 { 13, "authentication-failure" },
1036 { 14, "authentication-required" },
1037 { 0, NULL }
1041 static int
1042 dissect_acse_T_service_user(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1043 offset = dissect_ber_constrained_integer(implicit_tag, actx, tree, tvb, offset,
1044 0U, 14U, hf_index, NULL);
1046 return offset;
1050 static const value_string acse_T_service_provider_vals[] = {
1051 { 0, "null" },
1052 { 1, "no-reason-given" },
1053 { 2, "no-common-acse-version" },
1054 { 0, NULL }
1058 static int
1059 dissect_acse_T_service_provider(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1060 offset = dissect_ber_constrained_integer(implicit_tag, actx, tree, tvb, offset,
1061 0U, 2U, hf_index, NULL);
1063 return offset;
1067 static const value_string acse_Associate_source_diagnostic_vals[] = {
1068 { 1, "service-user" },
1069 { 2, "service-provider" },
1070 { 0, NULL }
1073 static const ber_choice_t Associate_source_diagnostic_choice[] = {
1074 { 1, &hf_acse_service_user , BER_CLASS_CON, 1, 0, dissect_acse_T_service_user },
1075 { 2, &hf_acse_service_provider, BER_CLASS_CON, 2, 0, dissect_acse_T_service_provider },
1076 { 0, NULL, 0, 0, 0, NULL }
1079 static int
1080 dissect_acse_Associate_source_diagnostic(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1081 offset = dissect_ber_choice(actx, tree, tvb, offset,
1082 Associate_source_diagnostic_choice, hf_index, ett_acse_Associate_source_diagnostic,
1083 NULL);
1085 return offset;
1089 static const value_string acse_Result_vals[] = {
1090 { 0, "acceptance" },
1091 { 1, "user-rejection" },
1092 { 2, "provider-rejection" },
1093 { 0, NULL }
1097 static int
1098 dissect_acse_Result(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1099 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
1100 NULL);
1102 return offset;
1107 static int
1108 dissect_acse_Concrete_syntax_name(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1109 offset = dissect_acse_TransferSyntaxName(implicit_tag, tvb, offset, actx, tree, hf_index);
1111 return offset;
1115 static const value_string acse_T_provider_reason_vals[] = {
1116 { 0, "reason-not-specified" },
1117 { 1, "abstract-syntax-not-supported" },
1118 { 2, "proposed-transfer-syntaxes-not-supported" },
1119 { 3, "local-limit-on-DCS-exceeded" },
1120 { 0, NULL }
1124 static int
1125 dissect_acse_T_provider_reason(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1126 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
1127 NULL);
1129 return offset;
1133 static const ber_sequence_t P_context_result_list_item_sequence[] = {
1134 { &hf_acse_pcontext_result, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_acse_Result },
1135 { &hf_acse_concrete_syntax_name, BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_acse_Concrete_syntax_name },
1136 { &hf_acse_provider_reason, BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_acse_T_provider_reason },
1137 { NULL, 0, 0, 0, NULL }
1140 static int
1141 dissect_acse_P_context_result_list_item(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1142 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
1143 P_context_result_list_item_sequence, hf_index, ett_acse_P_context_result_list_item);
1145 return offset;
1149 static const ber_sequence_t P_context_result_list_sequence_of[1] = {
1150 { &hf_acse_P_context_result_list_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_acse_P_context_result_list_item },
1153 static int
1154 dissect_acse_P_context_result_list(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1155 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
1156 P_context_result_list_sequence_of, hf_index, ett_acse_P_context_result_list);
1158 return offset;
1162 static const ber_sequence_t AARE_apdu_U_sequence[] = {
1163 { &hf_acse_aARE_protocol_version, BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_acse_T_AARE_protocol_version },
1164 { &hf_acse_aARE_aSO_context_name, BER_CLASS_CON, 1, 0, dissect_acse_T_AARE_aSO_context_name },
1165 { &hf_acse_result , BER_CLASS_CON, 2, 0, dissect_acse_Associate_result },
1166 { &hf_acse_result_source_diagnostic, BER_CLASS_CON, 3, BER_FLAGS_NOTCHKTAG, dissect_acse_Associate_source_diagnostic },
1167 { &hf_acse_responding_AP_title, BER_CLASS_CON, 4, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_acse_AP_title },
1168 { &hf_acse_responding_AE_qualifier, BER_CLASS_CON, 5, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_acse_AE_qualifier },
1169 { &hf_acse_responding_AP_invocation_identifier, BER_CLASS_CON, 6, BER_FLAGS_OPTIONAL, dissect_acse_AP_invocation_identifier },
1170 { &hf_acse_responding_AE_invocation_identifier, BER_CLASS_CON, 7, BER_FLAGS_OPTIONAL, dissect_acse_AE_invocation_identifier },
1171 { &hf_acse_responder_acse_requirements, BER_CLASS_CON, 8, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_acse_ACSE_requirements },
1172 { &hf_acse_mechanism_name , BER_CLASS_CON, 9, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_acse_Mechanism_name },
1173 { &hf_acse_responding_authentication_value, BER_CLASS_CON, 10, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_acse_Authentication_value },
1174 { &hf_acse_aSO_context_name_list, BER_CLASS_CON, 11, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_acse_ASO_context_name_list },
1175 { &hf_acse_implementation_information, BER_CLASS_CON, 29, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_acse_Implementation_data },
1176 { &hf_acse_p_context_result_list, BER_CLASS_CON, 12, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_acse_P_context_result_list },
1177 { &hf_acse_called_asoi_tag, BER_CLASS_CON, 13, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_acse_ASOI_tag },
1178 { &hf_acse_calling_asoi_tag, BER_CLASS_CON, 14, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_acse_ASOI_tag },
1179 { &hf_acse_aARE_user_information, BER_CLASS_CON, 30, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_acse_Association_data },
1180 { NULL, 0, 0, 0, NULL }
1183 static int
1184 dissect_acse_AARE_apdu_U(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1185 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
1186 AARE_apdu_U_sequence, hf_index, ett_acse_AARE_apdu_U);
1188 return offset;
1193 static int
1194 dissect_acse_AARE_apdu(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1195 #line 101 "../../asn1/acse/acse.cnf"
1196 col_append_str(actx->pinfo->cinfo, COL_INFO, "A-Associate-Response");
1198 offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
1199 hf_index, BER_CLASS_APP, 1, TRUE, dissect_acse_AARE_apdu_U);
1204 return offset;
1208 static const value_string acse_Release_request_reason_vals[] = {
1209 { 0, "normal" },
1210 { 1, "urgent" },
1211 { 30, "user-defined" },
1212 { 0, NULL }
1216 static int
1217 dissect_acse_Release_request_reason(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1218 #line 114 "../../asn1/acse/acse.cnf"
1219 int reason = -1;
1221 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
1222 &reason);
1225 if(reason != -1)
1226 col_append_fstr(actx->pinfo->cinfo, COL_INFO, " (%s)", val_to_str(reason, acse_Release_request_reason_vals, "reason(%d)"));
1230 return offset;
1234 static const ber_sequence_t RLRQ_apdu_U_sequence[] = {
1235 { &hf_acse_rLRQ_reason , BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_acse_Release_request_reason },
1236 { &hf_acse_aso_qualifier , BER_CLASS_CON, 13, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_acse_ASO_qualifier },
1237 { &hf_acse_asoi_identifier, BER_CLASS_CON, 14, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_acse_ASOI_identifier },
1238 { &hf_acse_rLRQ_user_information, BER_CLASS_CON, 30, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_acse_Association_data },
1239 { NULL, 0, 0, 0, NULL }
1242 static int
1243 dissect_acse_RLRQ_apdu_U(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1244 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
1245 RLRQ_apdu_U_sequence, hf_index, ett_acse_RLRQ_apdu_U);
1247 return offset;
1252 static int
1253 dissect_acse_RLRQ_apdu(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1254 #line 106 "../../asn1/acse/acse.cnf"
1255 col_append_str(actx->pinfo->cinfo, COL_INFO, "Release-Request");
1257 offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
1258 hf_index, BER_CLASS_APP, 2, TRUE, dissect_acse_RLRQ_apdu_U);
1263 return offset;
1267 static const value_string acse_Release_response_reason_vals[] = {
1268 { 0, "normal" },
1269 { 1, "not-finished" },
1270 { 30, "user-defined" },
1271 { 0, NULL }
1275 static int
1276 dissect_acse_Release_response_reason(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1277 #line 130 "../../asn1/acse/acse.cnf"
1278 int reason = -1;
1280 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
1281 &reason);
1284 if(reason != -1)
1285 col_append_fstr(actx->pinfo->cinfo, COL_INFO, " (%s)", val_to_str(reason, acse_Release_response_reason_vals, "reason(%d)"));
1289 return offset;
1293 static const ber_sequence_t RLRE_apdu_U_sequence[] = {
1294 { &hf_acse_rLRE_reason , BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_acse_Release_response_reason },
1295 { &hf_acse_aso_qualifier , BER_CLASS_CON, 13, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_acse_ASO_qualifier },
1296 { &hf_acse_asoi_identifier, BER_CLASS_CON, 14, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_acse_ASOI_identifier },
1297 { &hf_acse_rLRE_user_information, BER_CLASS_CON, 30, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_acse_Association_data },
1298 { NULL, 0, 0, 0, NULL }
1301 static int
1302 dissect_acse_RLRE_apdu_U(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1303 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
1304 RLRE_apdu_U_sequence, hf_index, ett_acse_RLRE_apdu_U);
1306 return offset;
1311 static int
1312 dissect_acse_RLRE_apdu(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1313 #line 122 "../../asn1/acse/acse.cnf"
1314 col_append_str(actx->pinfo->cinfo, COL_INFO, "Release-Response");
1316 offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
1317 hf_index, BER_CLASS_APP, 3, TRUE, dissect_acse_RLRE_apdu_U);
1322 return offset;
1326 static const value_string acse_ABRT_source_vals[] = {
1327 { 0, "service-user" },
1328 { 1, "service-provider" },
1329 { 0, NULL }
1333 static int
1334 dissect_acse_ABRT_source(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1335 #line 143 "../../asn1/acse/acse.cnf"
1336 int source = -1;
1338 offset = dissect_ber_constrained_integer(implicit_tag, actx, tree, tvb, offset,
1339 0U, 1U, hf_index, &source);
1342 if(source != -1)
1343 col_append_fstr(actx->pinfo->cinfo, COL_INFO, " (%s)", val_to_str(source, acse_ABRT_source_vals, "source(%d)"));
1347 return offset;
1351 static const value_string acse_ABRT_diagnostic_vals[] = {
1352 { 1, "no-reason-given" },
1353 { 2, "protocol-error" },
1354 { 3, "authentication-mechanism-name-not-recognized" },
1355 { 4, "authentication-mechanism-name-required" },
1356 { 5, "authentication-failure" },
1357 { 6, "authentication-required" },
1358 { 0, NULL }
1362 static int
1363 dissect_acse_ABRT_diagnostic(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1364 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
1365 NULL);
1367 return offset;
1371 static const ber_sequence_t ABRT_apdu_U_sequence[] = {
1372 { &hf_acse_abort_source , BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_acse_ABRT_source },
1373 { &hf_acse_abort_diagnostic, BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_acse_ABRT_diagnostic },
1374 { &hf_acse_aso_qualifier , BER_CLASS_CON, 13, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_acse_ASO_qualifier },
1375 { &hf_acse_asoi_identifier, BER_CLASS_CON, 14, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_acse_ASOI_identifier },
1376 { &hf_acse_aBRT_user_information, BER_CLASS_CON, 30, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_acse_Association_data },
1377 { NULL, 0, 0, 0, NULL }
1380 static int
1381 dissect_acse_ABRT_apdu_U(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1382 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
1383 ABRT_apdu_U_sequence, hf_index, ett_acse_ABRT_apdu_U);
1385 return offset;
1390 static int
1391 dissect_acse_ABRT_apdu(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1392 #line 138 "../../asn1/acse/acse.cnf"
1393 col_append_str(actx->pinfo->cinfo, COL_INFO, "Abort");
1395 offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
1396 hf_index, BER_CLASS_APP, 4, TRUE, dissect_acse_ABRT_apdu_U);
1401 return offset;
1406 static int
1407 dissect_acse_User_information(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1408 offset = dissect_acse_Association_data(implicit_tag, tvb, offset, actx, tree, hf_index);
1410 return offset;
1415 static int
1416 dissect_acse_Simply_encoded_data(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1417 offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
1418 NULL);
1420 return offset;
1425 static int
1426 dissect_acse_T_simple_ASN1_type(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1427 #line 52 "../../asn1/acse/acse.cnf"
1428 /*XXX not implemented yet */
1432 return offset;
1437 static int
1438 dissect_acse_OCTET_STRING(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1439 offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
1440 NULL);
1442 return offset;
1446 static const value_string acse_T_presentation_data_values_vals[] = {
1447 { 0, "simple-ASN1-type" },
1448 { 1, "octet-aligned" },
1449 { 2, "arbitrary" },
1450 { 0, NULL }
1453 static const ber_choice_t T_presentation_data_values_choice[] = {
1454 { 0, &hf_acse_simple_ASN1_type, BER_CLASS_CON, 0, 0, dissect_acse_T_simple_ASN1_type },
1455 { 1, &hf_acse_pDVList_octet_aligned, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_acse_OCTET_STRING },
1456 { 2, &hf_acse_arbitrary , BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_acse_BIT_STRING },
1457 { 0, NULL, 0, 0, 0, NULL }
1460 static int
1461 dissect_acse_T_presentation_data_values(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1462 offset = dissect_ber_choice(actx, tree, tvb, offset,
1463 T_presentation_data_values_choice, hf_index, ett_acse_T_presentation_data_values,
1464 NULL);
1466 return offset;
1470 static const ber_sequence_t PDV_list_sequence[] = {
1471 { &hf_acse_transfer_syntax_name, BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_acse_TransferSyntaxName },
1472 { &hf_acse_presentation_context_identifier, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_acse_Presentation_context_identifier },
1473 { &hf_acse_presentation_data_values, BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_acse_T_presentation_data_values },
1474 { NULL, 0, 0, 0, NULL }
1477 static int
1478 dissect_acse_PDV_list(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1479 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
1480 PDV_list_sequence, hf_index, ett_acse_PDV_list);
1482 return offset;
1486 static const value_string acse_User_Data_vals[] = {
1487 { 0, "user-information" },
1488 { 1, "simply-encoded-data" },
1489 { 2, "fully-encoded-data" },
1490 { 0, NULL }
1493 static const ber_choice_t User_Data_choice[] = {
1494 { 0, &hf_acse_user_information, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_acse_User_information },
1495 { 1, &hf_acse_simply_encoded_data, BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_acse_Simply_encoded_data },
1496 { 2, &hf_acse_fully_encoded_data, BER_CLASS_CON, 0, 0, dissect_acse_PDV_list },
1497 { 0, NULL, 0, 0, 0, NULL }
1500 static int
1501 dissect_acse_User_Data(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1502 offset = dissect_ber_choice(actx, tree, tvb, offset,
1503 User_Data_choice, hf_index, ett_acse_User_Data,
1504 NULL);
1506 return offset;
1510 static const ber_sequence_t A_DT_apdu_U_sequence[] = {
1511 { &hf_acse_aso_qualifier , BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_acse_ASO_qualifier },
1512 { &hf_acse_asoi_identifier, BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_acse_ASOI_identifier },
1513 { &hf_acse_a_user_data , BER_CLASS_CON, 30, BER_FLAGS_NOTCHKTAG, dissect_acse_User_Data },
1514 { NULL, 0, 0, 0, NULL }
1517 static int
1518 dissect_acse_A_DT_apdu_U(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1519 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
1520 A_DT_apdu_U_sequence, hf_index, ett_acse_A_DT_apdu_U);
1522 return offset;
1527 static int
1528 dissect_acse_A_DT_apdu(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1529 offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
1530 hf_index, BER_CLASS_APP, 5, TRUE, dissect_acse_A_DT_apdu_U);
1532 return offset;
1537 static int
1538 dissect_acse_T_ACRQ_aSO_context_name(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1539 #line 63 "../../asn1/acse/acse.cnf"
1540 offset = dissect_ber_object_identifier_str(FALSE, actx, tree, tvb, offset,
1541 hf_index, &object_identifier_id);
1545 return offset;
1549 static const ber_sequence_t ACRQ_apdu_U_sequence[] = {
1550 { &hf_acse_aso_qualifier , BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_acse_ASO_qualifier },
1551 { &hf_acse_asoi_identifier, BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_acse_ASOI_identifier },
1552 { &hf_acse_aCRQ_aSO_context_name, BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_acse_T_ACRQ_aSO_context_name },
1553 { &hf_acse_aSO_context_name_list, BER_CLASS_CON, 4, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_acse_ASO_context_name_list },
1554 { &hf_acse_p_context_definition_list, BER_CLASS_CON, 5, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_acse_Syntactic_context_list },
1555 { &hf_acse_user_information, BER_CLASS_CON, 30, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_acse_User_information },
1556 { NULL, 0, 0, 0, NULL }
1559 static int
1560 dissect_acse_ACRQ_apdu_U(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1561 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
1562 ACRQ_apdu_U_sequence, hf_index, ett_acse_ACRQ_apdu_U);
1564 return offset;
1569 static int
1570 dissect_acse_ACRQ_apdu(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1571 offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
1572 hf_index, BER_CLASS_APP, 6, TRUE, dissect_acse_ACRQ_apdu_U);
1574 return offset;
1579 static int
1580 dissect_acse_T_ACRP_aSO_context_name(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1581 #line 67 "../../asn1/acse/acse.cnf"
1582 offset = dissect_ber_object_identifier_str(FALSE, actx, tree, tvb, offset,
1583 hf_index, &object_identifier_id);
1587 return offset;
1591 static const ber_sequence_t ACRP_apdu_U_sequence[] = {
1592 { &hf_acse_aso_qualifier , BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_NOTCHKTAG, dissect_acse_ASO_qualifier },
1593 { &hf_acse_asoi_identifier, BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_acse_ASOI_identifier },
1594 { &hf_acse_aSO_context_name, BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_acse_T_ACRP_aSO_context_name },
1595 { &hf_acse_p_context_result_list, BER_CLASS_CON, 4, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_acse_P_context_result_list },
1596 { &hf_acse_user_information, BER_CLASS_CON, 30, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_acse_User_information },
1597 { NULL, 0, 0, 0, NULL }
1600 static int
1601 dissect_acse_ACRP_apdu_U(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1602 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
1603 ACRP_apdu_U_sequence, hf_index, ett_acse_ACRP_apdu_U);
1605 return offset;
1610 static int
1611 dissect_acse_ACRP_apdu(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1612 offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
1613 hf_index, BER_CLASS_APP, 7, TRUE, dissect_acse_ACRP_apdu_U);
1615 return offset;
1619 static const value_string acse_ACSE_apdu_vals[] = {
1620 { 0, "aarq" },
1621 { 1, "aare" },
1622 { 2, "rlrq" },
1623 { 3, "rlre" },
1624 { 4, "abrt" },
1625 { 5, "adt" },
1626 { 6, "acrq" },
1627 { 7, "acrp" },
1628 { 0, NULL }
1631 static const ber_choice_t ACSE_apdu_choice[] = {
1632 { 0, &hf_acse_aarq , BER_CLASS_APP, 0, BER_FLAGS_IMPLTAG, dissect_acse_AARQ_apdu },
1633 { 1, &hf_acse_aare , BER_CLASS_APP, 1, BER_FLAGS_IMPLTAG, dissect_acse_AARE_apdu },
1634 { 2, &hf_acse_rlrq , BER_CLASS_APP, 2, BER_FLAGS_IMPLTAG, dissect_acse_RLRQ_apdu },
1635 { 3, &hf_acse_rlre , BER_CLASS_APP, 3, BER_FLAGS_IMPLTAG, dissect_acse_RLRE_apdu },
1636 { 4, &hf_acse_abrt , BER_CLASS_APP, 4, BER_FLAGS_IMPLTAG, dissect_acse_ABRT_apdu },
1637 { 5, &hf_acse_adt , BER_CLASS_APP, 5, BER_FLAGS_IMPLTAG, dissect_acse_A_DT_apdu },
1638 { 6, &hf_acse_acrq , BER_CLASS_APP, 6, BER_FLAGS_IMPLTAG, dissect_acse_ACRQ_apdu },
1639 { 7, &hf_acse_acrp , BER_CLASS_APP, 7, BER_FLAGS_IMPLTAG, dissect_acse_ACRP_apdu },
1640 { 0, NULL, 0, 0, 0, NULL }
1643 static int
1644 dissect_acse_ACSE_apdu(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1645 offset = dissect_ber_choice(actx, tree, tvb, offset,
1646 ACSE_apdu_choice, hf_index, ett_acse_ACSE_apdu,
1647 NULL);
1649 return offset;
1654 static int
1655 dissect_acse_AE_title_form1(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1656 offset = dissect_x509if_Name(implicit_tag, tvb, offset, actx, tree, hf_index);
1658 return offset;
1663 static int
1664 dissect_acse_AE_title_form2(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1665 offset = dissect_ber_object_identifier(implicit_tag, actx, tree, tvb, offset, hf_index, NULL);
1667 return offset;
1671 const value_string acse_AE_title_vals[] = {
1672 { 0, "ae-title-form1" },
1673 { 1, "ae-title-form2" },
1674 { 0, NULL }
1677 static const ber_choice_t AE_title_choice[] = {
1678 { 0, &hf_acse_ae_title_form1 , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_acse_AE_title_form1 },
1679 { 1, &hf_acse_ae_title_form2 , BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_acse_AE_title_form2 },
1680 { 0, NULL, 0, 0, 0, NULL }
1684 dissect_acse_AE_title(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1685 offset = dissect_ber_choice(actx, tree, tvb, offset,
1686 AE_title_choice, hf_index, ett_acse_AE_title,
1687 NULL);
1689 return offset;
1693 /*--- End of included file: packet-acse-fn.c ---*/
1694 #line 153 "../../asn1/acse/packet-acse-template.c"
1698 * Dissect ACSE PDUs inside a PPDU.
1700 static int
1701 dissect_acse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* data)
1703 int offset = 0;
1704 proto_item *item;
1705 proto_tree *tree;
1706 char *oid;
1707 struct SESSION_DATA_STRUCTURE* session;
1708 asn1_ctx_t asn1_ctx;
1709 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
1712 /* first, try to check length */
1713 /* do we have at least 2 bytes */
1714 if (!tvb_bytes_exist(tvb, 0, 2)){
1715 proto_tree_add_text(parent_tree, tvb, offset,
1716 tvb_reported_length_remaining(tvb,offset),
1717 "User data");
1718 return 0; /* no, it isn't a ACSE PDU */
1720 /* do we have spdu type from the session dissector? */
1721 if( data == NULL){
1722 if(parent_tree){
1723 REPORT_DISSECTOR_BUG("Can't get SPDU type from session dissector.");
1725 return 0;
1728 session = ( (struct SESSION_DATA_STRUCTURE*)data);
1729 if(session->spdu_type == 0 ) {
1730 if(parent_tree){
1731 REPORT_DISSECTOR_BUG(
1732 wmem_strdup_printf(wmem_packet_scope(), "Wrong spdu type %x from session dissector.",session->spdu_type));
1733 return 0;
1737 asn1_ctx.private_data = session;
1738 /* save parent_tree so subdissectors can create new top nodes */
1739 top_tree=parent_tree;
1741 /* ACSE has only AARQ,AARE,RLRQ,RLRE,ABRT type of pdu */
1742 /* reject everything else */
1743 /* data pdu is not ACSE pdu and has to go directly to app dissector */
1744 switch(session->spdu_type){
1745 case SES_CONNECTION_REQUEST: /* AARQ */
1746 case SES_CONNECTION_ACCEPT: /* AARE */
1747 case SES_REFUSE: /* RLRE */
1748 case SES_DISCONNECT: /* RLRQ */
1749 case SES_FINISH: /* RLRE */
1750 case SES_ABORT: /* ABRT */
1751 case CLSES_UNIT_DATA: /* AARQ Connetctionless session */
1752 break;
1753 case SES_DATA_TRANSFER:
1754 oid=find_oid_by_pres_ctx_id(pinfo, indir_ref);
1755 if(oid){
1756 if(strcmp(oid, ACSE_APDU_OID) == 0){
1757 proto_tree_add_text(parent_tree, tvb, offset, -1,
1758 "Invalid OID: %s", ACSE_APDU_OID);
1759 THROW(ReportedBoundsError);
1761 call_ber_oid_callback(oid, tvb, offset, pinfo, parent_tree, NULL);
1762 } else {
1763 proto_tree_add_expert(parent_tree, pinfo, &ei_acse_dissector_not_available,
1764 tvb, offset, -1);
1766 top_tree = NULL;
1767 return 0;
1768 default:
1769 top_tree = NULL;
1770 return 0;
1773 if(session->spdu_type == CLSES_UNIT_DATA)
1775 /* create display subtree for the connectionless protocol */
1776 item = proto_tree_add_item(parent_tree, proto_clacse, tvb, 0, -1, ENC_NA);
1777 tree = proto_item_add_subtree(item, ett_acse);
1779 col_set_str(pinfo->cinfo, COL_PROTOCOL, "CL-ACSE");
1780 col_clear(pinfo->cinfo, COL_INFO);
1782 else
1784 /* create display subtree for the protocol */
1785 item = proto_tree_add_item(parent_tree, proto_acse, tvb, 0, -1, ENC_NA);
1786 tree = proto_item_add_subtree(item, ett_acse);
1788 col_set_str(pinfo->cinfo, COL_PROTOCOL, "ACSE");
1789 col_clear(pinfo->cinfo, COL_INFO);
1792 /* we can't make any additional checking here */
1793 /* postpone it before dissector will have more information */
1794 while (tvb_reported_length_remaining(tvb, offset) > 0){
1795 int old_offset=offset;
1796 offset = dissect_acse_ACSE_apdu(FALSE, tvb, offset, &asn1_ctx, tree, -1);
1797 if(offset == old_offset ){
1798 proto_tree_add_text(tree, tvb, offset, -1,"Malformed packet");
1799 break;
1803 top_tree = NULL;
1804 return tvb_length(tvb);
1807 /*--- proto_register_acse ----------------------------------------------*/
1808 void proto_register_acse(void) {
1810 /* List of fields */
1811 static hf_register_info hf[] = {
1813 /*--- Included file: packet-acse-hfarr.c ---*/
1814 #line 1 "../../asn1/acse/packet-acse-hfarr.c"
1815 { &hf_acse_direct_reference,
1816 { "direct-reference", "acse.direct_reference",
1817 FT_OID, BASE_NONE, NULL, 0,
1818 "T_direct_reference", HFILL }},
1819 { &hf_acse_indirect_reference,
1820 { "indirect-reference", "acse.indirect_reference",
1821 FT_INT32, BASE_DEC, NULL, 0,
1822 "T_indirect_reference", HFILL }},
1823 { &hf_acse_data_value_descriptor,
1824 { "data-value-descriptor", "acse.data_value_descriptor",
1825 FT_STRING, BASE_NONE, NULL, 0,
1826 "ObjectDescriptor", HFILL }},
1827 { &hf_acse_encoding,
1828 { "encoding", "acse.encoding",
1829 FT_UINT32, BASE_DEC, VALS(acse_T_encoding_vals), 0,
1830 NULL, HFILL }},
1831 { &hf_acse_single_ASN1_type,
1832 { "single-ASN1-type", "acse.single_ASN1_type_element",
1833 FT_NONE, BASE_NONE, NULL, 0,
1834 NULL, HFILL }},
1835 { &hf_acse_octet_aligned,
1836 { "octet-aligned", "acse.octet_aligned",
1837 FT_BYTES, BASE_NONE, NULL, 0,
1838 "T_octet_aligned", HFILL }},
1839 { &hf_acse_arbitrary,
1840 { "arbitrary", "acse.arbitrary",
1841 FT_BYTES, BASE_NONE, NULL, 0,
1842 "BIT_STRING", HFILL }},
1843 { &hf_acse_aarq,
1844 { "aarq", "acse.aarq_element",
1845 FT_NONE, BASE_NONE, NULL, 0,
1846 "AARQ_apdu", HFILL }},
1847 { &hf_acse_aare,
1848 { "aare", "acse.aare_element",
1849 FT_NONE, BASE_NONE, NULL, 0,
1850 "AARE_apdu", HFILL }},
1851 { &hf_acse_rlrq,
1852 { "rlrq", "acse.rlrq_element",
1853 FT_NONE, BASE_NONE, NULL, 0,
1854 "RLRQ_apdu", HFILL }},
1855 { &hf_acse_rlre,
1856 { "rlre", "acse.rlre_element",
1857 FT_NONE, BASE_NONE, NULL, 0,
1858 "RLRE_apdu", HFILL }},
1859 { &hf_acse_abrt,
1860 { "abrt", "acse.abrt_element",
1861 FT_NONE, BASE_NONE, NULL, 0,
1862 "ABRT_apdu", HFILL }},
1863 { &hf_acse_adt,
1864 { "adt", "acse.adt_element",
1865 FT_NONE, BASE_NONE, NULL, 0,
1866 "A_DT_apdu", HFILL }},
1867 { &hf_acse_acrq,
1868 { "acrq", "acse.acrq_element",
1869 FT_NONE, BASE_NONE, NULL, 0,
1870 "ACRQ_apdu", HFILL }},
1871 { &hf_acse_acrp,
1872 { "acrp", "acse.acrp_element",
1873 FT_NONE, BASE_NONE, NULL, 0,
1874 "ACRP_apdu", HFILL }},
1875 { &hf_acse_aARQ_protocol_version,
1876 { "protocol-version", "acse.protocol_version",
1877 FT_BYTES, BASE_NONE, NULL, 0,
1878 "T_AARQ_protocol_version", HFILL }},
1879 { &hf_acse_aARQ_aSO_context_name,
1880 { "aSO-context-name", "acse.aSO_context_name",
1881 FT_OID, BASE_NONE, NULL, 0,
1882 "T_AARQ_aSO_context_name", HFILL }},
1883 { &hf_acse_called_AP_title,
1884 { "called-AP-title", "acse.called_AP_title",
1885 FT_UINT32, BASE_DEC, VALS(acse_AP_title_vals), 0,
1886 "AP_title", HFILL }},
1887 { &hf_acse_called_AE_qualifier,
1888 { "called-AE-qualifier", "acse.called_AE_qualifier",
1889 FT_UINT32, BASE_DEC, VALS(acse_ASO_qualifier_vals), 0,
1890 "AE_qualifier", HFILL }},
1891 { &hf_acse_called_AP_invocation_identifier,
1892 { "called-AP-invocation-identifier", "acse.called_AP_invocation_identifier",
1893 FT_INT32, BASE_DEC, NULL, 0,
1894 "AP_invocation_identifier", HFILL }},
1895 { &hf_acse_called_AE_invocation_identifier,
1896 { "called-AE-invocation-identifier", "acse.called_AE_invocation_identifier",
1897 FT_INT32, BASE_DEC, NULL, 0,
1898 "AE_invocation_identifier", HFILL }},
1899 { &hf_acse_calling_AP_title,
1900 { "calling-AP-title", "acse.calling_AP_title",
1901 FT_UINT32, BASE_DEC, VALS(acse_AP_title_vals), 0,
1902 "AP_title", HFILL }},
1903 { &hf_acse_calling_AE_qualifier,
1904 { "calling-AE-qualifier", "acse.calling_AE_qualifier",
1905 FT_UINT32, BASE_DEC, VALS(acse_ASO_qualifier_vals), 0,
1906 "AE_qualifier", HFILL }},
1907 { &hf_acse_calling_AP_invocation_identifier,
1908 { "calling-AP-invocation-identifier", "acse.calling_AP_invocation_identifier",
1909 FT_INT32, BASE_DEC, NULL, 0,
1910 "AP_invocation_identifier", HFILL }},
1911 { &hf_acse_calling_AE_invocation_identifier,
1912 { "calling-AE-invocation-identifier", "acse.calling_AE_invocation_identifier",
1913 FT_INT32, BASE_DEC, NULL, 0,
1914 "AE_invocation_identifier", HFILL }},
1915 { &hf_acse_sender_acse_requirements,
1916 { "sender-acse-requirements", "acse.sender_acse_requirements",
1917 FT_BYTES, BASE_NONE, NULL, 0,
1918 "ACSE_requirements", HFILL }},
1919 { &hf_acse_mechanism_name,
1920 { "mechanism-name", "acse.mechanism_name",
1921 FT_OID, BASE_NONE, NULL, 0,
1922 NULL, HFILL }},
1923 { &hf_acse_calling_authentication_value,
1924 { "calling-authentication-value", "acse.calling_authentication_value",
1925 FT_UINT32, BASE_DEC, VALS(acse_Authentication_value_vals), 0,
1926 "Authentication_value", HFILL }},
1927 { &hf_acse_aSO_context_name_list,
1928 { "aSO-context-name-list", "acse.aSO_context_name_list",
1929 FT_UINT32, BASE_DEC, NULL, 0,
1930 NULL, HFILL }},
1931 { &hf_acse_implementation_information,
1932 { "implementation-information", "acse.implementation_information",
1933 FT_STRING, BASE_NONE, NULL, 0,
1934 "Implementation_data", HFILL }},
1935 { &hf_acse_p_context_definition_list,
1936 { "p-context-definition-list", "acse.p_context_definition_list",
1937 FT_UINT32, BASE_DEC, VALS(acse_Syntactic_context_list_vals), 0,
1938 "Syntactic_context_list", HFILL }},
1939 { &hf_acse_called_asoi_tag,
1940 { "called-asoi-tag", "acse.called_asoi_tag",
1941 FT_UINT32, BASE_DEC, NULL, 0,
1942 "ASOI_tag", HFILL }},
1943 { &hf_acse_calling_asoi_tag,
1944 { "calling-asoi-tag", "acse.calling_asoi_tag",
1945 FT_UINT32, BASE_DEC, NULL, 0,
1946 "ASOI_tag", HFILL }},
1947 { &hf_acse_aARQ_user_information,
1948 { "user-information", "acse.user_information",
1949 FT_UINT32, BASE_DEC, NULL, 0,
1950 "Association_data", HFILL }},
1951 { &hf_acse_aARE_protocol_version,
1952 { "protocol-version", "acse.protocol_version",
1953 FT_BYTES, BASE_NONE, NULL, 0,
1954 "T_AARE_protocol_version", HFILL }},
1955 { &hf_acse_aARE_aSO_context_name,
1956 { "aSO-context-name", "acse.aSO_context_name",
1957 FT_OID, BASE_NONE, NULL, 0,
1958 "T_AARE_aSO_context_name", HFILL }},
1959 { &hf_acse_result,
1960 { "result", "acse.result",
1961 FT_UINT32, BASE_DEC, VALS(acse_Associate_result_vals), 0,
1962 "Associate_result", HFILL }},
1963 { &hf_acse_result_source_diagnostic,
1964 { "result-source-diagnostic", "acse.result_source_diagnostic",
1965 FT_UINT32, BASE_DEC, VALS(acse_Associate_source_diagnostic_vals), 0,
1966 "Associate_source_diagnostic", HFILL }},
1967 { &hf_acse_responding_AP_title,
1968 { "responding-AP-title", "acse.responding_AP_title",
1969 FT_UINT32, BASE_DEC, VALS(acse_AP_title_vals), 0,
1970 "AP_title", HFILL }},
1971 { &hf_acse_responding_AE_qualifier,
1972 { "responding-AE-qualifier", "acse.responding_AE_qualifier",
1973 FT_UINT32, BASE_DEC, VALS(acse_ASO_qualifier_vals), 0,
1974 "AE_qualifier", HFILL }},
1975 { &hf_acse_responding_AP_invocation_identifier,
1976 { "responding-AP-invocation-identifier", "acse.responding_AP_invocation_identifier",
1977 FT_INT32, BASE_DEC, NULL, 0,
1978 "AP_invocation_identifier", HFILL }},
1979 { &hf_acse_responding_AE_invocation_identifier,
1980 { "responding-AE-invocation-identifier", "acse.responding_AE_invocation_identifier",
1981 FT_INT32, BASE_DEC, NULL, 0,
1982 "AE_invocation_identifier", HFILL }},
1983 { &hf_acse_responder_acse_requirements,
1984 { "responder-acse-requirements", "acse.responder_acse_requirements",
1985 FT_BYTES, BASE_NONE, NULL, 0,
1986 "ACSE_requirements", HFILL }},
1987 { &hf_acse_responding_authentication_value,
1988 { "responding-authentication-value", "acse.responding_authentication_value",
1989 FT_UINT32, BASE_DEC, VALS(acse_Authentication_value_vals), 0,
1990 "Authentication_value", HFILL }},
1991 { &hf_acse_p_context_result_list,
1992 { "p-context-result-list", "acse.p_context_result_list",
1993 FT_UINT32, BASE_DEC, NULL, 0,
1994 NULL, HFILL }},
1995 { &hf_acse_aARE_user_information,
1996 { "user-information", "acse.user_information",
1997 FT_UINT32, BASE_DEC, NULL, 0,
1998 "Association_data", HFILL }},
1999 { &hf_acse_rLRQ_reason,
2000 { "reason", "acse.reason",
2001 FT_INT32, BASE_DEC, VALS(acse_Release_request_reason_vals), 0,
2002 "Release_request_reason", HFILL }},
2003 { &hf_acse_aso_qualifier,
2004 { "aso-qualifier", "acse.aso_qualifier",
2005 FT_UINT32, BASE_DEC, VALS(acse_ASO_qualifier_vals), 0,
2006 NULL, HFILL }},
2007 { &hf_acse_asoi_identifier,
2008 { "asoi-identifier", "acse.asoi_identifier",
2009 FT_UINT32, BASE_DEC, NULL, 0,
2010 NULL, HFILL }},
2011 { &hf_acse_rLRQ_user_information,
2012 { "user-information", "acse.user_information",
2013 FT_UINT32, BASE_DEC, NULL, 0,
2014 "Association_data", HFILL }},
2015 { &hf_acse_rLRE_reason,
2016 { "reason", "acse.reason",
2017 FT_INT32, BASE_DEC, VALS(acse_Release_response_reason_vals), 0,
2018 "Release_response_reason", HFILL }},
2019 { &hf_acse_rLRE_user_information,
2020 { "user-information", "acse.user_information",
2021 FT_UINT32, BASE_DEC, NULL, 0,
2022 "Association_data", HFILL }},
2023 { &hf_acse_abort_source,
2024 { "abort-source", "acse.abort_source",
2025 FT_UINT32, BASE_DEC, VALS(acse_ABRT_source_vals), 0,
2026 "ABRT_source", HFILL }},
2027 { &hf_acse_abort_diagnostic,
2028 { "abort-diagnostic", "acse.abort_diagnostic",
2029 FT_UINT32, BASE_DEC, VALS(acse_ABRT_diagnostic_vals), 0,
2030 "ABRT_diagnostic", HFILL }},
2031 { &hf_acse_aBRT_user_information,
2032 { "user-information", "acse.user_information",
2033 FT_UINT32, BASE_DEC, NULL, 0,
2034 "Association_data", HFILL }},
2035 { &hf_acse_a_user_data,
2036 { "a-user-data", "acse.a_user_data",
2037 FT_UINT32, BASE_DEC, VALS(acse_User_Data_vals), 0,
2038 "User_Data", HFILL }},
2039 { &hf_acse_aCRQ_aSO_context_name,
2040 { "aSO-context-name", "acse.aSO_context_name",
2041 FT_OID, BASE_NONE, NULL, 0,
2042 "T_ACRQ_aSO_context_name", HFILL }},
2043 { &hf_acse_user_information,
2044 { "user-information", "acse.user_information",
2045 FT_UINT32, BASE_DEC, NULL, 0,
2046 NULL, HFILL }},
2047 { &hf_acse_aSO_context_name,
2048 { "aSO-context-name", "acse.aSO_context_name",
2049 FT_OID, BASE_NONE, NULL, 0,
2050 "T_ACRP_aSO_context_name", HFILL }},
2051 { &hf_acse_ap_title_form1,
2052 { "ap-title-form1", "acse.ap_title_form1",
2053 FT_UINT32, BASE_DEC, VALS(x509if_Name_vals), 0,
2054 NULL, HFILL }},
2055 { &hf_acse_ap_title_form2,
2056 { "ap-title-form2", "acse.ap_title_form2",
2057 FT_OID, BASE_NONE, NULL, 0,
2058 NULL, HFILL }},
2059 { &hf_acse_ap_title_form3,
2060 { "ap-title-form3", "acse.ap_title_form3",
2061 FT_STRING, BASE_NONE, NULL, 0,
2062 NULL, HFILL }},
2063 { &hf_acse_aso_qualifier_form1,
2064 { "aso-qualifier-form1", "acse.aso_qualifier_form1",
2065 FT_UINT32, BASE_DEC, NULL, 0,
2066 NULL, HFILL }},
2067 { &hf_acse_aso_qualifier_form2,
2068 { "aso-qualifier-form2", "acse.aso_qualifier_form2",
2069 FT_INT32, BASE_DEC, NULL, 0,
2070 NULL, HFILL }},
2071 { &hf_acse_aso_qualifier_form3,
2072 { "aso-qualifier-form3", "acse.aso_qualifier_form3",
2073 FT_STRING, BASE_NONE, NULL, 0,
2074 NULL, HFILL }},
2075 { &hf_acse_aso_qualifier_form_any_octets,
2076 { "aso-qualifier-form-any-octets", "acse.aso_qualifier_form_any_octets",
2077 FT_BYTES, BASE_NONE, NULL, 0,
2078 "ASO_qualifier_form_octets", HFILL }},
2079 { &hf_acse_ae_title_form1,
2080 { "ae-title-form1", "acse.ae_title_form1",
2081 FT_UINT32, BASE_DEC, VALS(x509if_Name_vals), 0,
2082 NULL, HFILL }},
2083 { &hf_acse_ae_title_form2,
2084 { "ae-title-form2", "acse.ae_title_form2",
2085 FT_OID, BASE_NONE, NULL, 0,
2086 NULL, HFILL }},
2087 { &hf_acse_ASOI_tag_item,
2088 { "ASOI-tag item", "acse.ASOI_tag_item_element",
2089 FT_NONE, BASE_NONE, NULL, 0,
2090 NULL, HFILL }},
2091 { &hf_acse_qualifier,
2092 { "qualifier", "acse.qualifier",
2093 FT_UINT32, BASE_DEC, VALS(acse_ASO_qualifier_vals), 0,
2094 "ASO_qualifier", HFILL }},
2095 { &hf_acse_identifier,
2096 { "identifier", "acse.identifier",
2097 FT_UINT32, BASE_DEC, NULL, 0,
2098 "ASOI_identifier", HFILL }},
2099 { &hf_acse_ASO_context_name_list_item,
2100 { "ASO-context-name", "acse.ASO_context_name",
2101 FT_OID, BASE_NONE, NULL, 0,
2102 NULL, HFILL }},
2103 { &hf_acse_context_list,
2104 { "context-list", "acse.context_list",
2105 FT_UINT32, BASE_DEC, NULL, 0,
2106 NULL, HFILL }},
2107 { &hf_acse_default_contact_list,
2108 { "default-contact-list", "acse.default_contact_list",
2109 FT_UINT32, BASE_DEC, NULL, 0,
2110 "Default_Context_List", HFILL }},
2111 { &hf_acse_Context_list_item,
2112 { "Context-list item", "acse.Context_list_item_element",
2113 FT_NONE, BASE_NONE, NULL, 0,
2114 NULL, HFILL }},
2115 { &hf_acse_pci,
2116 { "pci", "acse.pci",
2117 FT_INT32, BASE_DEC, NULL, 0,
2118 "Presentation_context_identifier", HFILL }},
2119 { &hf_acse_abstract_syntax,
2120 { "abstract-syntax", "acse.abstract_syntax",
2121 FT_OID, BASE_NONE, NULL, 0,
2122 "Abstract_syntax_name", HFILL }},
2123 { &hf_acse_transfer_syntaxes,
2124 { "transfer-syntaxes", "acse.transfer_syntaxes",
2125 FT_UINT32, BASE_DEC, NULL, 0,
2126 "SEQUENCE_OF_TransferSyntaxName", HFILL }},
2127 { &hf_acse_transfer_syntaxes_item,
2128 { "TransferSyntaxName", "acse.TransferSyntaxName",
2129 FT_OID, BASE_NONE, NULL, 0,
2130 NULL, HFILL }},
2131 { &hf_acse_Default_Context_List_item,
2132 { "Default-Context-List item", "acse.Default_Context_List_item_element",
2133 FT_NONE, BASE_NONE, NULL, 0,
2134 NULL, HFILL }},
2135 { &hf_acse_abstract_syntax_name,
2136 { "abstract-syntax-name", "acse.abstract_syntax_name",
2137 FT_OID, BASE_NONE, NULL, 0,
2138 NULL, HFILL }},
2139 { &hf_acse_transfer_syntax_name,
2140 { "transfer-syntax-name", "acse.transfer_syntax_name",
2141 FT_OID, BASE_NONE, NULL, 0,
2142 "TransferSyntaxName", HFILL }},
2143 { &hf_acse_P_context_result_list_item,
2144 { "P-context-result-list item", "acse.P_context_result_list_item_element",
2145 FT_NONE, BASE_NONE, NULL, 0,
2146 NULL, HFILL }},
2147 { &hf_acse_pcontext_result,
2148 { "result", "acse.result",
2149 FT_INT32, BASE_DEC, VALS(acse_Result_vals), 0,
2150 NULL, HFILL }},
2151 { &hf_acse_concrete_syntax_name,
2152 { "concrete-syntax-name", "acse.concrete_syntax_name",
2153 FT_OID, BASE_NONE, NULL, 0,
2154 NULL, HFILL }},
2155 { &hf_acse_provider_reason,
2156 { "provider-reason", "acse.provider_reason",
2157 FT_INT32, BASE_DEC, VALS(acse_T_provider_reason_vals), 0,
2158 NULL, HFILL }},
2159 { &hf_acse_service_user,
2160 { "service-user", "acse.service_user",
2161 FT_UINT32, BASE_DEC, VALS(acse_T_service_user_vals), 0,
2162 NULL, HFILL }},
2163 { &hf_acse_service_provider,
2164 { "service-provider", "acse.service_provider",
2165 FT_UINT32, BASE_DEC, VALS(acse_T_service_provider_vals), 0,
2166 NULL, HFILL }},
2167 { &hf_acse_Association_data_item,
2168 { "Association-data", "acse.EXTERNALt_element",
2169 FT_NONE, BASE_NONE, NULL, 0,
2170 "EXTERNALt", HFILL }},
2171 { &hf_acse_simply_encoded_data,
2172 { "simply-encoded-data", "acse.simply_encoded_data",
2173 FT_BYTES, BASE_NONE, NULL, 0,
2174 NULL, HFILL }},
2175 { &hf_acse_fully_encoded_data,
2176 { "fully-encoded-data", "acse.fully_encoded_data_element",
2177 FT_NONE, BASE_NONE, NULL, 0,
2178 "PDV_list", HFILL }},
2179 { &hf_acse_presentation_context_identifier,
2180 { "presentation-context-identifier", "acse.presentation_context_identifier",
2181 FT_INT32, BASE_DEC, NULL, 0,
2182 NULL, HFILL }},
2183 { &hf_acse_presentation_data_values,
2184 { "presentation-data-values", "acse.presentation_data_values",
2185 FT_UINT32, BASE_DEC, VALS(acse_T_presentation_data_values_vals), 0,
2186 NULL, HFILL }},
2187 { &hf_acse_simple_ASN1_type,
2188 { "simple-ASN1-type", "acse.simple_ASN1_type_element",
2189 FT_NONE, BASE_NONE, NULL, 0,
2190 NULL, HFILL }},
2191 { &hf_acse_pDVList_octet_aligned,
2192 { "octet-aligned", "acse.octet_aligned",
2193 FT_BYTES, BASE_NONE, NULL, 0,
2194 "OCTET_STRING", HFILL }},
2195 { &hf_acse_other_mechanism_name,
2196 { "other-mechanism-name", "acse.other_mechanism_name",
2197 FT_OID, BASE_NONE, NULL, 0,
2198 NULL, HFILL }},
2199 { &hf_acse_other_mechanism_value,
2200 { "other-mechanism-value", "acse.other_mechanism_value_element",
2201 FT_NONE, BASE_NONE, NULL, 0,
2202 NULL, HFILL }},
2203 { &hf_acse_charstring,
2204 { "charstring", "acse.charstring",
2205 FT_STRING, BASE_NONE, NULL, 0,
2206 "GraphicString", HFILL }},
2207 { &hf_acse_bitstring,
2208 { "bitstring", "acse.bitstring",
2209 FT_BYTES, BASE_NONE, NULL, 0,
2210 "BIT_STRING", HFILL }},
2211 { &hf_acse_external,
2212 { "external", "acse.external_element",
2213 FT_NONE, BASE_NONE, NULL, 0,
2214 "EXTERNALt", HFILL }},
2215 { &hf_acse_other,
2216 { "other", "acse.other_element",
2217 FT_NONE, BASE_NONE, NULL, 0,
2218 "Authentication_value_other", HFILL }},
2219 { &hf_acse_T_AARQ_protocol_version_version1,
2220 { "version1", "acse.version1",
2221 FT_BOOLEAN, 8, NULL, 0x80,
2222 NULL, HFILL }},
2223 { &hf_acse_T_AARE_protocol_version_version1,
2224 { "version1", "acse.version1",
2225 FT_BOOLEAN, 8, NULL, 0x80,
2226 NULL, HFILL }},
2227 { &hf_acse_ACSE_requirements_authentication,
2228 { "authentication", "acse.authentication",
2229 FT_BOOLEAN, 8, NULL, 0x80,
2230 NULL, HFILL }},
2231 { &hf_acse_ACSE_requirements_aSO_context_negotiation,
2232 { "aSO-context-negotiation", "acse.aSO-context-negotiation",
2233 FT_BOOLEAN, 8, NULL, 0x40,
2234 NULL, HFILL }},
2235 { &hf_acse_ACSE_requirements_higher_level_association,
2236 { "higher-level-association", "acse.higher-level-association",
2237 FT_BOOLEAN, 8, NULL, 0x20,
2238 NULL, HFILL }},
2239 { &hf_acse_ACSE_requirements_nested_association,
2240 { "nested-association", "acse.nested-association",
2241 FT_BOOLEAN, 8, NULL, 0x10,
2242 NULL, HFILL }},
2244 /*--- End of included file: packet-acse-hfarr.c ---*/
2245 #line 271 "../../asn1/acse/packet-acse-template.c"
2248 /* List of subtrees */
2249 static gint *ett[] = {
2250 &ett_acse,
2252 /*--- Included file: packet-acse-ettarr.c ---*/
2253 #line 1 "../../asn1/acse/packet-acse-ettarr.c"
2254 &ett_acse_EXTERNALt_U,
2255 &ett_acse_T_encoding,
2256 &ett_acse_ACSE_apdu,
2257 &ett_acse_AARQ_apdu_U,
2258 &ett_acse_T_AARQ_protocol_version,
2259 &ett_acse_AARE_apdu_U,
2260 &ett_acse_T_AARE_protocol_version,
2261 &ett_acse_RLRQ_apdu_U,
2262 &ett_acse_RLRE_apdu_U,
2263 &ett_acse_ABRT_apdu_U,
2264 &ett_acse_A_DT_apdu_U,
2265 &ett_acse_ACRQ_apdu_U,
2266 &ett_acse_ACRP_apdu_U,
2267 &ett_acse_ACSE_requirements,
2268 &ett_acse_AP_title,
2269 &ett_acse_ASO_qualifier,
2270 &ett_acse_AE_title,
2271 &ett_acse_ASOI_tag,
2272 &ett_acse_ASOI_tag_item,
2273 &ett_acse_ASO_context_name_list,
2274 &ett_acse_Syntactic_context_list,
2275 &ett_acse_Context_list,
2276 &ett_acse_Context_list_item,
2277 &ett_acse_SEQUENCE_OF_TransferSyntaxName,
2278 &ett_acse_Default_Context_List,
2279 &ett_acse_Default_Context_List_item,
2280 &ett_acse_P_context_result_list,
2281 &ett_acse_P_context_result_list_item,
2282 &ett_acse_Associate_source_diagnostic,
2283 &ett_acse_Association_data,
2284 &ett_acse_User_Data,
2285 &ett_acse_PDV_list,
2286 &ett_acse_T_presentation_data_values,
2287 &ett_acse_Authentication_value_other,
2288 &ett_acse_Authentication_value,
2290 /*--- End of included file: packet-acse-ettarr.c ---*/
2291 #line 277 "../../asn1/acse/packet-acse-template.c"
2294 static ei_register_info ei[] = {
2295 { &ei_acse_dissector_not_available, { "acse.dissector_not_available", PI_UNDECODED, PI_WARN, "Dissector is not available", EXPFILL }},
2298 expert_module_t* expert_acse;
2300 /* Register protocol */
2301 proto_acse = proto_register_protocol(PNAME, PSNAME, PFNAME);
2302 new_register_dissector("acse", dissect_acse, proto_acse);
2304 /* Register connectionless protocol */
2305 proto_clacse = proto_register_protocol(CLPNAME, CLPSNAME, CLPFNAME);
2308 /* Register fields and subtrees */
2309 proto_register_field_array(proto_acse, hf, array_length(hf));
2310 proto_register_subtree_array(ett, array_length(ett));
2311 expert_acse = expert_register_protocol(proto_acse);
2312 expert_register_field_array(expert_acse, ei, array_length(ei));
2316 /*--- proto_reg_handoff_acse -------------------------------------------*/
2317 void proto_reg_handoff_acse(void) {
2318 /*#include "packet-acse-dis-tab.c"*/
2319 dissector_handle_t acse_handle = find_dissector("acse");
2321 oid_add_from_string("id-aCSE","2.2.3.1.1");
2322 register_ber_oid_dissector_handle(ACSE_APDU_OID, acse_handle, proto_acse, "id-as-acse");