Coverage Report

Created: 2026-09-28 06:52

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