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