1 /* Do not modify this file. Changes will be overwritten. */
2 /* Generated automatically by the ASN.1 to Wireshark dissector compiler */
4 /* asn2wrs.py -b -q -L -p pres -c ./pres.cnf -s ./packet-pres-template -D . -O ../.. ISO8823-PRESENTATION.asn ISO9576-PRESENTATION.asn */
7 * Routine to dissect ISO 8823 OSI Presentation Protocol packets
8 * Based on the dissector by
9 * Yuriy Sidelnikov <YSidelnikov@hotmail.com>
11 * Wireshark - Network traffic analyzer
12 * By Gerald Combs <gerald@wireshark.org>
13 * Copyright 1998 Gerald Combs
15 * SPDX-License-Identifier: GPL-2.0-or-later
20 #include <epan/packet.h>
21 #include <epan/exceptions.h>
22 #include <epan/prefs.h>
23 #include <epan/conversation.h>
24 #include <epan/expert.h>
26 #include <wsutil/array.h>
28 #include <epan/asn1.h>
29 #include <epan/oids.h>
30 #include "packet-ber.h"
31 #include "packet-ses.h"
32 #include "packet-pres.h"
33 #include "packet-rtse.h"
36 #define PNAME "ISO 8823 OSI Presentation Protocol"
40 #define CLPNAME "ISO 9576-1 OSI Connectionless Presentation Protocol"
41 #define CLPSNAME "CLPRES"
42 #define CLPFNAME "clpres"
44 void proto_register_pres(void);
45 void proto_reg_handoff_pres(void);
47 /* Initialize the protocol and registered fields */
48 static int proto_pres
;
50 /* Initialize the connectionless protocol */
51 static int proto_clpres
;
53 /* pointers for acse dissector */
54 proto_tree
*global_tree
;
55 packet_info
*global_pinfo
;
57 static const char *abstract_syntax_name_oid
;
58 static uint32_t presentation_context_identifier
;
60 /* to keep track of presentation context identifiers and protocol-oids */
61 typedef struct _pres_ctx_oid_t
{
66 static wmem_map_t
*pres_ctx_oid_table
;
68 typedef struct _pres_user_t
{
73 static pres_user_t
*pres_users
;
74 static unsigned num_pres_users
;
76 static int hf_pres_CP_type
;
77 static int hf_pres_CPA_PPDU
;
78 static int hf_pres_Abort_type
;
79 static int hf_pres_CPR_PPDU
;
80 static int hf_pres_Typed_data_type
;
82 static int hf_pres_UD_type_PDU
; /* UD_type */
83 static int hf_pres_mode_selector
; /* Mode_selector */
84 static int hf_pres_x410_mode_parameters
; /* RTORQapdu */
85 static int hf_pres_normal_mode_parameters
; /* T_normal_mode_parameters */
86 static int hf_pres_protocol_version
; /* Protocol_version */
87 static int hf_pres_calling_presentation_selector
; /* Calling_presentation_selector */
88 static int hf_pres_called_presentation_selector
; /* Called_presentation_selector */
89 static int hf_pres_presentation_context_definition_list
; /* Presentation_context_definition_list */
90 static int hf_pres_default_context_name
; /* Default_context_name */
91 static int hf_pres_presentation_requirements
; /* Presentation_requirements */
92 static int hf_pres_user_session_requirements
; /* User_session_requirements */
93 static int hf_pres_protocol_options
; /* Protocol_options */
94 static int hf_pres_initiators_nominated_context
; /* Presentation_context_identifier */
95 static int hf_pres_extensions
; /* T_extensions */
96 static int hf_pres_user_data
; /* User_data */
97 static int hf_pres_cPR_PPDU_x400_mode_parameters
; /* RTOACapdu */
98 static int hf_pres_cPU_PPDU_normal_mode_parameters
; /* T_CPA_PPDU_normal_mode_parameters */
99 static int hf_pres_responding_presentation_selector
; /* Responding_presentation_selector */
100 static int hf_pres_presentation_context_definition_result_list
; /* Presentation_context_definition_result_list */
101 static int hf_pres_responders_nominated_context
; /* Presentation_context_identifier */
102 static int hf_pres_cPU_PPDU_x400_mode_parameters
; /* RTORJapdu */
103 static int hf_pres_cPR_PPDU_normal_mode_parameters
; /* T_CPR_PPDU_normal_mode_parameters */
104 static int hf_pres_default_context_result
; /* Default_context_result */
105 static int hf_pres_cPR_PPDU__provider_reason
; /* Provider_reason */
106 static int hf_pres_aru_ppdu
; /* ARU_PPDU */
107 static int hf_pres_arp_ppdu
; /* ARP_PPDU */
108 static int hf_pres_aRU_PPDU_x400_mode_parameters
; /* RTABapdu */
109 static int hf_pres_aRU_PPDU_normal_mode_parameters
; /* T_ARU_PPDU_normal_mode_parameters */
110 static int hf_pres_presentation_context_identifier_list
; /* Presentation_context_identifier_list */
111 static int hf_pres_aRU_PPDU_provider_reason
; /* Abort_reason */
112 static int hf_pres_event_identifier
; /* Event_identifier */
113 static int hf_pres_acPPDU
; /* AC_PPDU */
114 static int hf_pres_acaPPDU
; /* ACA_PPDU */
115 static int hf_pres_ttdPPDU
; /* User_data */
116 static int hf_pres_presentation_context_addition_list
; /* Presentation_context_addition_list */
117 static int hf_pres_presentation_context_deletion_list
; /* Presentation_context_deletion_list */
118 static int hf_pres_presentation_context_addition_result_list
; /* Presentation_context_addition_result_list */
119 static int hf_pres_presentation_context_deletion_result_list
; /* Presentation_context_deletion_result_list */
120 static int hf_pres_Context_list_item
; /* Context_list_item */
121 static int hf_pres_presentation_context_identifier
; /* Presentation_context_identifier */
122 static int hf_pres_abstract_syntax_name
; /* Abstract_syntax_name */
123 static int hf_pres_transfer_syntax_name_list
; /* SEQUENCE_OF_Transfer_syntax_name */
124 static int hf_pres_transfer_syntax_name_list_item
; /* Transfer_syntax_name */
125 static int hf_pres_transfer_syntax_name
; /* Transfer_syntax_name */
126 static int hf_pres_mode_value
; /* T_mode_value */
127 static int hf_pres_Presentation_context_deletion_list_item
; /* Presentation_context_identifier */
128 static int hf_pres_Presentation_context_deletion_result_list_item
; /* Presentation_context_deletion_result_list_item */
129 static int hf_pres_Presentation_context_identifier_list_item
; /* Presentation_context_identifier_list_item */
130 static int hf_pres_Result_list_item
; /* Result_list_item */
131 static int hf_pres_result
; /* Result */
132 static int hf_pres_provider_reason
; /* T_provider_reason */
133 static int hf_pres_simply_encoded_data
; /* Simply_encoded_data */
134 static int hf_pres_fully_encoded_data
; /* Fully_encoded_data */
135 static int hf_pres_Fully_encoded_data_item
; /* PDV_list */
136 static int hf_pres_presentation_data_values
; /* T_presentation_data_values */
137 static int hf_pres_single_ASN1_type
; /* T_single_ASN1_type */
138 static int hf_pres_octet_aligned
; /* T_octet_aligned */
139 static int hf_pres_arbitrary
; /* BIT_STRING */
141 static int hf_pres_Presentation_requirements_context_management
;
142 static int hf_pres_Presentation_requirements_restoration
;
143 static int hf_pres_Protocol_options_nominated_context
;
144 static int hf_pres_Protocol_options_short_encoding
;
145 static int hf_pres_Protocol_options_packed_encoding_rules
;
146 static int hf_pres_Protocol_version_version_1
;
147 static int hf_pres_User_session_requirements_half_duplex
;
148 static int hf_pres_User_session_requirements_duplex
;
149 static int hf_pres_User_session_requirements_expedited_data
;
150 static int hf_pres_User_session_requirements_minor_synchronize
;
151 static int hf_pres_User_session_requirements_major_synchronize
;
152 static int hf_pres_User_session_requirements_resynchronize
;
153 static int hf_pres_User_session_requirements_activity_management
;
154 static int hf_pres_User_session_requirements_negotiated_release
;
155 static int hf_pres_User_session_requirements_capability_data
;
156 static int hf_pres_User_session_requirements_exceptions
;
157 static int hf_pres_User_session_requirements_typed_data
;
158 static int hf_pres_User_session_requirements_symmetric_synchronize
;
159 static int hf_pres_User_session_requirements_data_separation
;
161 /* Initialize the subtree pointers */
164 static int ett_pres_CP_type
;
165 static int ett_pres_T_normal_mode_parameters
;
166 static int ett_pres_T_extensions
;
167 static int ett_pres_CPA_PPDU
;
168 static int ett_pres_T_CPA_PPDU_normal_mode_parameters
;
169 static int ett_pres_CPR_PPDU
;
170 static int ett_pres_T_CPR_PPDU_normal_mode_parameters
;
171 static int ett_pres_Abort_type
;
172 static int ett_pres_ARU_PPDU
;
173 static int ett_pres_T_ARU_PPDU_normal_mode_parameters
;
174 static int ett_pres_ARP_PPDU
;
175 static int ett_pres_Typed_data_type
;
176 static int ett_pres_AC_PPDU
;
177 static int ett_pres_ACA_PPDU
;
178 static int ett_pres_RS_PPDU
;
179 static int ett_pres_RSA_PPDU
;
180 static int ett_pres_Context_list
;
181 static int ett_pres_Context_list_item
;
182 static int ett_pres_SEQUENCE_OF_Transfer_syntax_name
;
183 static int ett_pres_Default_context_name
;
184 static int ett_pres_Mode_selector
;
185 static int ett_pres_Presentation_context_deletion_list
;
186 static int ett_pres_Presentation_context_deletion_result_list
;
187 static int ett_pres_Presentation_context_identifier_list
;
188 static int ett_pres_Presentation_context_identifier_list_item
;
189 static int ett_pres_Presentation_requirements
;
190 static int ett_pres_Protocol_options
;
191 static int ett_pres_Protocol_version
;
192 static int ett_pres_Result_list
;
193 static int ett_pres_Result_list_item
;
194 static int ett_pres_User_data
;
195 static int ett_pres_Fully_encoded_data
;
196 static int ett_pres_PDV_list
;
197 static int ett_pres_T_presentation_data_values
;
198 static int ett_pres_User_session_requirements
;
199 static int ett_pres_UD_type
;
201 static expert_field ei_pres_dissector_not_available
;
202 static expert_field ei_pres_wrong_spdu_type
;
203 static expert_field ei_pres_invalid_offset
;
205 UAT_DEC_CB_DEF(pres_users
, ctx_id
, pres_user_t
)
206 UAT_CSTRING_CB_DEF(pres_users
, oid
, pres_user_t
)
209 pres_ctx_oid_hash(const void *k
)
211 const pres_ctx_oid_t
*pco
=(const pres_ctx_oid_t
*)k
;
216 pres_ctx_oid_equal(const void *k1
, const void *k2
)
218 const pres_ctx_oid_t
*pco1
=(const pres_ctx_oid_t
*)k1
;
219 const pres_ctx_oid_t
*pco2
=(const pres_ctx_oid_t
*)k2
;
220 return (pco1
->ctx_id
==pco2
->ctx_id
&& pco1
->idx
==pco2
->idx
);
224 register_ctx_id_and_oid(packet_info
*pinfo _U_
, uint32_t idx
, const char *oid
)
226 pres_ctx_oid_t
*pco
, *tmppco
;
227 conversation_t
*conversation
;
230 /* we did not get any oid name, malformed packet? */
234 pco
=wmem_new(wmem_file_scope(), pres_ctx_oid_t
);
236 pco
->oid
=wmem_strdup(wmem_file_scope(), oid
);
237 conversation
=find_conversation_pinfo(pinfo
, 0);
239 pco
->idx
= conversation
->conv_index
;
244 /* if this ctx already exists, remove the old one first */
245 tmppco
=(pres_ctx_oid_t
*)wmem_map_lookup(pres_ctx_oid_table
, pco
);
247 wmem_map_remove(pres_ctx_oid_table
, tmppco
);
249 wmem_map_insert(pres_ctx_oid_table
, pco
, pco
);
253 find_oid_in_users_table(packet_info
*pinfo
, uint32_t ctx_id
)
257 for (i
= 0; i
< num_pres_users
; i
++) {
258 pres_user_t
*u
= &(pres_users
[i
]);
260 if (u
->ctx_id
== ctx_id
) {
261 /* Register oid so other dissectors can find this connection */
262 register_ctx_id_and_oid(pinfo
, u
->ctx_id
, u
->oid
);
271 find_oid_by_pres_ctx_id(packet_info
*pinfo
, uint32_t idx
)
273 pres_ctx_oid_t pco
, *tmppco
;
274 conversation_t
*conversation
;
277 conversation
=find_conversation_pinfo(pinfo
, 0);
279 pco
.idx
= conversation
->conv_index
;
284 tmppco
=(pres_ctx_oid_t
*)wmem_map_lookup(pres_ctx_oid_table
, &pco
);
289 return find_oid_in_users_table(pinfo
, idx
);
293 pres_copy_cb(void *dest
, const void *orig
, size_t len _U_
)
295 pres_user_t
*u
= (pres_user_t
*)dest
;
296 const pres_user_t
*o
= (const pres_user_t
*)orig
;
298 u
->ctx_id
= o
->ctx_id
;
299 u
->oid
= g_strdup(o
->oid
);
305 pres_free_cb(void *r
)
307 pres_user_t
*u
= (pres_user_t
*)r
;
314 static const value_string pres_T_mode_value_vals
[] = {
315 { 0, "x410-1984-mode" },
316 { 1, "normal-mode" },
322 dissect_pres_T_mode_value(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
323 offset
= dissect_ber_integer(implicit_tag
, actx
, tree
, tvb
, offset
, hf_index
,
330 static const ber_sequence_t Mode_selector_set
[] = {
331 { &hf_pres_mode_value
, BER_CLASS_CON
, 0, BER_FLAGS_IMPLTAG
, dissect_pres_T_mode_value
},
332 { NULL
, 0, 0, 0, NULL
}
336 dissect_pres_Mode_selector(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
337 offset
= dissect_ber_set(implicit_tag
, actx
, tree
, tvb
, offset
,
338 Mode_selector_set
, hf_index
, ett_pres_Mode_selector
);
344 static int * const Protocol_version_bits
[] = {
345 &hf_pres_Protocol_version_version_1
,
350 dissect_pres_Protocol_version(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
351 offset
= dissect_ber_bitstring(implicit_tag
, actx
, tree
, tvb
, offset
,
352 Protocol_version_bits
, 1, hf_index
, ett_pres_Protocol_version
,
361 dissect_pres_Presentation_selector(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
362 offset
= dissect_ber_octet_string(implicit_tag
, actx
, tree
, tvb
, offset
, hf_index
,
371 dissect_pres_Calling_presentation_selector(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
372 offset
= dissect_pres_Presentation_selector(implicit_tag
, tvb
, offset
, actx
, tree
, hf_index
);
380 dissect_pres_Called_presentation_selector(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
381 offset
= dissect_pres_Presentation_selector(implicit_tag
, tvb
, offset
, actx
, tree
, hf_index
);
389 dissect_pres_Presentation_context_identifier(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
392 struct SESSION_DATA_STRUCTURE
* session
= (struct SESSION_DATA_STRUCTURE
*)actx
->private_data
;
394 offset
= dissect_ber_integer(implicit_tag
, actx
, tree
, tvb
, offset
, hf_index
,
395 &presentation_context_identifier
);
399 session
->pres_ctx_id
= presentation_context_identifier
;
401 oid
= find_oid_by_pres_ctx_id(actx
->pinfo
, presentation_context_identifier
);
403 if(oid
&& (name
= oid_resolved_from_string(actx
->pinfo
->pool
, oid
))) {
404 proto_item_append_text(actx
->created_item
, " (%s)", name
);
414 dissect_pres_Abstract_syntax_name(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
415 offset
= dissect_ber_object_identifier_str(implicit_tag
, actx
, tree
, tvb
, offset
, hf_index
, &abstract_syntax_name_oid
);
423 dissect_pres_Transfer_syntax_name(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
424 offset
= dissect_ber_object_identifier(implicit_tag
, actx
, tree
, tvb
, offset
, hf_index
, NULL
);
430 static const ber_sequence_t SEQUENCE_OF_Transfer_syntax_name_sequence_of
[1] = {
431 { &hf_pres_transfer_syntax_name_list_item
, BER_CLASS_UNI
, BER_UNI_TAG_OID
, BER_FLAGS_NOOWNTAG
, dissect_pres_Transfer_syntax_name
},
435 dissect_pres_SEQUENCE_OF_Transfer_syntax_name(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
436 offset
= dissect_ber_sequence_of(implicit_tag
, actx
, tree
, tvb
, offset
,
437 SEQUENCE_OF_Transfer_syntax_name_sequence_of
, hf_index
, ett_pres_SEQUENCE_OF_Transfer_syntax_name
);
443 static const ber_sequence_t Context_list_item_sequence
[] = {
444 { &hf_pres_presentation_context_identifier
, BER_CLASS_UNI
, BER_UNI_TAG_INTEGER
, BER_FLAGS_NOOWNTAG
, dissect_pres_Presentation_context_identifier
},
445 { &hf_pres_abstract_syntax_name
, BER_CLASS_UNI
, BER_UNI_TAG_OID
, BER_FLAGS_NOOWNTAG
, dissect_pres_Abstract_syntax_name
},
446 { &hf_pres_transfer_syntax_name_list
, BER_CLASS_UNI
, BER_UNI_TAG_SEQUENCE
, BER_FLAGS_NOOWNTAG
, dissect_pres_SEQUENCE_OF_Transfer_syntax_name
},
447 { NULL
, 0, 0, 0, NULL
}
451 dissect_pres_Context_list_item(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
452 abstract_syntax_name_oid
=NULL
;
453 offset
= dissect_ber_sequence(implicit_tag
, actx
, tree
, tvb
, offset
,
454 Context_list_item_sequence
, hf_index
, ett_pres_Context_list_item
);
456 register_ctx_id_and_oid(actx
->pinfo
, presentation_context_identifier
, abstract_syntax_name_oid
);
461 static const ber_sequence_t Context_list_sequence_of
[1] = {
462 { &hf_pres_Context_list_item
, BER_CLASS_UNI
, BER_UNI_TAG_SEQUENCE
, BER_FLAGS_NOOWNTAG
, dissect_pres_Context_list_item
},
466 dissect_pres_Context_list(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
467 offset
= dissect_ber_sequence_of(implicit_tag
, actx
, tree
, tvb
, offset
,
468 Context_list_sequence_of
, hf_index
, ett_pres_Context_list
);
476 dissect_pres_Presentation_context_definition_list(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
477 offset
= dissect_pres_Context_list(implicit_tag
, tvb
, offset
, actx
, tree
, hf_index
);
483 static const ber_sequence_t Default_context_name_sequence
[] = {
484 { &hf_pres_abstract_syntax_name
, BER_CLASS_CON
, 0, BER_FLAGS_IMPLTAG
, dissect_pres_Abstract_syntax_name
},
485 { &hf_pres_transfer_syntax_name
, BER_CLASS_CON
, 1, BER_FLAGS_IMPLTAG
, dissect_pres_Transfer_syntax_name
},
486 { NULL
, 0, 0, 0, NULL
}
490 dissect_pres_Default_context_name(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
491 offset
= dissect_ber_sequence(implicit_tag
, actx
, tree
, tvb
, offset
,
492 Default_context_name_sequence
, hf_index
, ett_pres_Default_context_name
);
498 static int * const Presentation_requirements_bits
[] = {
499 &hf_pres_Presentation_requirements_context_management
,
500 &hf_pres_Presentation_requirements_restoration
,
505 dissect_pres_Presentation_requirements(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
506 offset
= dissect_ber_bitstring(implicit_tag
, actx
, tree
, tvb
, offset
,
507 Presentation_requirements_bits
, 2, hf_index
, ett_pres_Presentation_requirements
,
514 static int * const User_session_requirements_bits
[] = {
515 &hf_pres_User_session_requirements_half_duplex
,
516 &hf_pres_User_session_requirements_duplex
,
517 &hf_pres_User_session_requirements_expedited_data
,
518 &hf_pres_User_session_requirements_minor_synchronize
,
519 &hf_pres_User_session_requirements_major_synchronize
,
520 &hf_pres_User_session_requirements_resynchronize
,
521 &hf_pres_User_session_requirements_activity_management
,
522 &hf_pres_User_session_requirements_negotiated_release
,
523 &hf_pres_User_session_requirements_capability_data
,
524 &hf_pres_User_session_requirements_exceptions
,
525 &hf_pres_User_session_requirements_typed_data
,
526 &hf_pres_User_session_requirements_symmetric_synchronize
,
527 &hf_pres_User_session_requirements_data_separation
,
532 dissect_pres_User_session_requirements(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
533 offset
= dissect_ber_bitstring(implicit_tag
, actx
, tree
, tvb
, offset
,
534 User_session_requirements_bits
, 13, hf_index
, ett_pres_User_session_requirements
,
541 static int * const Protocol_options_bits
[] = {
542 &hf_pres_Protocol_options_nominated_context
,
543 &hf_pres_Protocol_options_short_encoding
,
544 &hf_pres_Protocol_options_packed_encoding_rules
,
549 dissect_pres_Protocol_options(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
550 offset
= dissect_ber_bitstring(implicit_tag
, actx
, tree
, tvb
, offset
,
551 Protocol_options_bits
, 3, hf_index
, ett_pres_Protocol_options
,
558 static const ber_sequence_t T_extensions_sequence
[] = {
559 { NULL
, 0, 0, 0, NULL
}
563 dissect_pres_T_extensions(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
564 offset
= dissect_ber_sequence(implicit_tag
, actx
, tree
, tvb
, offset
,
565 T_extensions_sequence
, hf_index
, ett_pres_T_extensions
);
573 dissect_pres_Simply_encoded_data(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
574 offset
= dissect_ber_octet_string(implicit_tag
, actx
, tree
, tvb
, offset
, hf_index
,
583 dissect_pres_T_single_ASN1_type(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
588 oid
=find_oid_by_pres_ctx_id(actx
->pinfo
, presentation_context_identifier
);
590 next_tvb
= tvb_new_subset_remaining(tvb
, offset
);
591 call_ber_oid_callback(oid
, next_tvb
, offset
, actx
->pinfo
, global_tree
, actx
->private_data
);
593 proto_tree_add_expert(tree
, actx
->pinfo
, &ei_pres_dissector_not_available
,
604 dissect_pres_T_octet_aligned(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
609 oid
=find_oid_by_pres_ctx_id(actx
->pinfo
, presentation_context_identifier
);
611 dissect_ber_octet_string(implicit_tag
, actx
, tree
, tvb
, offset
, hf_index
, &next_tvb
);
612 call_ber_oid_callback(oid
, next_tvb
, offset
, actx
->pinfo
, global_tree
, actx
->private_data
);
614 proto_tree_add_expert(tree
, actx
->pinfo
, &ei_pres_dissector_not_available
,
616 offset
= dissect_ber_octet_string(implicit_tag
, actx
, tree
, tvb
, offset
, hf_index
,
629 dissect_pres_BIT_STRING(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
630 offset
= dissect_ber_bitstring(implicit_tag
, actx
, tree
, tvb
, offset
,
631 NULL
, 0, hf_index
, -1,
638 static const value_string pres_T_presentation_data_values_vals
[] = {
639 { 0, "single-ASN1-type" },
640 { 1, "octet-aligned" },
645 static const ber_choice_t T_presentation_data_values_choice
[] = {
646 { 0, &hf_pres_single_ASN1_type
, BER_CLASS_CON
, 0, 0, dissect_pres_T_single_ASN1_type
},
647 { 1, &hf_pres_octet_aligned
, BER_CLASS_CON
, 1, BER_FLAGS_IMPLTAG
, dissect_pres_T_octet_aligned
},
648 { 2, &hf_pres_arbitrary
, BER_CLASS_CON
, 2, BER_FLAGS_IMPLTAG
, dissect_pres_BIT_STRING
},
649 { 0, NULL
, 0, 0, 0, NULL
}
653 dissect_pres_T_presentation_data_values(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
654 offset
= dissect_ber_choice(actx
, tree
, tvb
, offset
,
655 T_presentation_data_values_choice
, hf_index
, ett_pres_T_presentation_data_values
,
662 static const ber_sequence_t PDV_list_sequence
[] = {
663 { &hf_pres_transfer_syntax_name
, BER_CLASS_UNI
, BER_UNI_TAG_OID
, BER_FLAGS_OPTIONAL
|BER_FLAGS_NOOWNTAG
, dissect_pres_Transfer_syntax_name
},
664 { &hf_pres_presentation_context_identifier
, BER_CLASS_UNI
, BER_UNI_TAG_INTEGER
, BER_FLAGS_NOOWNTAG
, dissect_pres_Presentation_context_identifier
},
665 { &hf_pres_presentation_data_values
, BER_CLASS_ANY
/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG
|BER_FLAGS_NOTCHKTAG
, dissect_pres_T_presentation_data_values
},
666 { NULL
, 0, 0, 0, NULL
}
670 dissect_pres_PDV_list(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
671 offset
= dissect_ber_sequence(implicit_tag
, actx
, tree
, tvb
, offset
,
672 PDV_list_sequence
, hf_index
, ett_pres_PDV_list
);
678 static const ber_sequence_t Fully_encoded_data_sequence_of
[1] = {
679 { &hf_pres_Fully_encoded_data_item
, BER_CLASS_UNI
, BER_UNI_TAG_SEQUENCE
, BER_FLAGS_NOOWNTAG
, dissect_pres_PDV_list
},
683 dissect_pres_Fully_encoded_data(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
684 offset
= dissect_ber_sequence_of(implicit_tag
, actx
, tree
, tvb
, offset
,
685 Fully_encoded_data_sequence_of
, hf_index
, ett_pres_Fully_encoded_data
);
691 static const value_string pres_User_data_vals
[] = {
692 { 0, "simply-encoded-data" },
693 { 1, "fully-encoded-data" },
697 static const ber_choice_t User_data_choice
[] = {
698 { 0, &hf_pres_simply_encoded_data
, BER_CLASS_APP
, 0, BER_FLAGS_IMPLTAG
, dissect_pres_Simply_encoded_data
},
699 { 1, &hf_pres_fully_encoded_data
, BER_CLASS_APP
, 1, BER_FLAGS_IMPLTAG
, dissect_pres_Fully_encoded_data
},
700 { 0, NULL
, 0, 0, 0, NULL
}
704 dissect_pres_User_data(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
705 offset
= dissect_ber_choice(actx
, tree
, tvb
, offset
,
706 User_data_choice
, hf_index
, ett_pres_User_data
,
713 static const ber_sequence_t T_normal_mode_parameters_sequence
[] = {
714 { &hf_pres_protocol_version
, BER_CLASS_CON
, 0, BER_FLAGS_OPTIONAL
|BER_FLAGS_IMPLTAG
, dissect_pres_Protocol_version
},
715 { &hf_pres_calling_presentation_selector
, BER_CLASS_CON
, 1, BER_FLAGS_OPTIONAL
|BER_FLAGS_IMPLTAG
, dissect_pres_Calling_presentation_selector
},
716 { &hf_pres_called_presentation_selector
, BER_CLASS_CON
, 2, BER_FLAGS_OPTIONAL
|BER_FLAGS_IMPLTAG
, dissect_pres_Called_presentation_selector
},
717 { &hf_pres_presentation_context_definition_list
, BER_CLASS_CON
, 4, BER_FLAGS_OPTIONAL
|BER_FLAGS_IMPLTAG
, dissect_pres_Presentation_context_definition_list
},
718 { &hf_pres_default_context_name
, BER_CLASS_CON
, 6, BER_FLAGS_OPTIONAL
|BER_FLAGS_IMPLTAG
, dissect_pres_Default_context_name
},
719 { &hf_pres_presentation_requirements
, BER_CLASS_CON
, 8, BER_FLAGS_OPTIONAL
|BER_FLAGS_IMPLTAG
, dissect_pres_Presentation_requirements
},
720 { &hf_pres_user_session_requirements
, BER_CLASS_CON
, 9, BER_FLAGS_OPTIONAL
|BER_FLAGS_IMPLTAG
, dissect_pres_User_session_requirements
},
721 { &hf_pres_protocol_options
, BER_CLASS_CON
, 11, BER_FLAGS_OPTIONAL
, dissect_pres_Protocol_options
},
722 { &hf_pres_initiators_nominated_context
, BER_CLASS_CON
, 12, BER_FLAGS_OPTIONAL
, dissect_pres_Presentation_context_identifier
},
723 { &hf_pres_extensions
, BER_CLASS_CON
, 14, BER_FLAGS_OPTIONAL
, dissect_pres_T_extensions
},
724 { &hf_pres_user_data
, BER_CLASS_ANY
/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL
|BER_FLAGS_NOOWNTAG
|BER_FLAGS_NOTCHKTAG
, dissect_pres_User_data
},
725 { NULL
, 0, 0, 0, NULL
}
729 dissect_pres_T_normal_mode_parameters(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
730 offset
= dissect_ber_sequence(implicit_tag
, actx
, tree
, tvb
, offset
,
731 T_normal_mode_parameters_sequence
, hf_index
, ett_pres_T_normal_mode_parameters
);
737 static const ber_sequence_t CP_type_set
[] = {
738 { &hf_pres_mode_selector
, BER_CLASS_CON
, 0, BER_FLAGS_IMPLTAG
, dissect_pres_Mode_selector
},
739 { &hf_pres_x410_mode_parameters
, BER_CLASS_CON
, 1, BER_FLAGS_OPTIONAL
|BER_FLAGS_IMPLTAG
, dissect_rtse_RTORQapdu
},
740 { &hf_pres_normal_mode_parameters
, BER_CLASS_CON
, 2, BER_FLAGS_OPTIONAL
|BER_FLAGS_IMPLTAG
, dissect_pres_T_normal_mode_parameters
},
741 { NULL
, 0, 0, 0, NULL
}
745 dissect_pres_CP_type(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
746 offset
= dissect_ber_set(implicit_tag
, actx
, tree
, tvb
, offset
,
747 CP_type_set
, hf_index
, ett_pres_CP_type
);
755 dissect_pres_CPC_type(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
756 offset
= dissect_pres_User_data(implicit_tag
, tvb
, offset
, actx
, tree
, hf_index
);
764 dissect_pres_Responding_presentation_selector(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
765 offset
= dissect_pres_Presentation_selector(implicit_tag
, tvb
, offset
, actx
, tree
, hf_index
);
771 static const value_string pres_Result_vals
[] = {
773 { 1, "user-rejection" },
774 { 2, "provider-rejection" },
780 dissect_pres_Result(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
781 offset
= dissect_ber_integer(implicit_tag
, actx
, tree
, tvb
, offset
, hf_index
,
788 static const value_string pres_T_provider_reason_vals
[] = {
789 { 0, "reason-not-specified" },
790 { 1, "abstract-syntax-not-supported" },
791 { 2, "proposed-transfer-syntaxes-not-supported" },
792 { 3, "local-limit-on-DCS-exceeded" },
798 dissect_pres_T_provider_reason(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
799 offset
= dissect_ber_integer(implicit_tag
, actx
, tree
, tvb
, offset
, hf_index
,
806 static const ber_sequence_t Result_list_item_sequence
[] = {
807 { &hf_pres_result
, BER_CLASS_CON
, 0, BER_FLAGS_IMPLTAG
, dissect_pres_Result
},
808 { &hf_pres_transfer_syntax_name
, BER_CLASS_CON
, 1, BER_FLAGS_OPTIONAL
|BER_FLAGS_IMPLTAG
, dissect_pres_Transfer_syntax_name
},
809 { &hf_pres_provider_reason
, BER_CLASS_CON
, 2, BER_FLAGS_OPTIONAL
|BER_FLAGS_IMPLTAG
, dissect_pres_T_provider_reason
},
810 { NULL
, 0, 0, 0, NULL
}
814 dissect_pres_Result_list_item(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
815 offset
= dissect_ber_sequence(implicit_tag
, actx
, tree
, tvb
, offset
,
816 Result_list_item_sequence
, hf_index
, ett_pres_Result_list_item
);
822 static const ber_sequence_t Result_list_sequence_of
[1] = {
823 { &hf_pres_Result_list_item
, BER_CLASS_UNI
, BER_UNI_TAG_SEQUENCE
, BER_FLAGS_NOOWNTAG
, dissect_pres_Result_list_item
},
827 dissect_pres_Result_list(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
828 offset
= dissect_ber_sequence_of(implicit_tag
, actx
, tree
, tvb
, offset
,
829 Result_list_sequence_of
, hf_index
, ett_pres_Result_list
);
837 dissect_pres_Presentation_context_definition_result_list(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
838 offset
= dissect_pres_Result_list(implicit_tag
, tvb
, offset
, actx
, tree
, hf_index
);
844 static const ber_sequence_t T_CPA_PPDU_normal_mode_parameters_sequence
[] = {
845 { &hf_pres_protocol_version
, BER_CLASS_CON
, 0, BER_FLAGS_OPTIONAL
|BER_FLAGS_IMPLTAG
, dissect_pres_Protocol_version
},
846 { &hf_pres_responding_presentation_selector
, BER_CLASS_CON
, 3, BER_FLAGS_OPTIONAL
|BER_FLAGS_IMPLTAG
, dissect_pres_Responding_presentation_selector
},
847 { &hf_pres_presentation_context_definition_result_list
, BER_CLASS_CON
, 5, BER_FLAGS_OPTIONAL
|BER_FLAGS_IMPLTAG
, dissect_pres_Presentation_context_definition_result_list
},
848 { &hf_pres_presentation_requirements
, BER_CLASS_CON
, 8, BER_FLAGS_OPTIONAL
|BER_FLAGS_IMPLTAG
, dissect_pres_Presentation_requirements
},
849 { &hf_pres_user_session_requirements
, BER_CLASS_CON
, 9, BER_FLAGS_OPTIONAL
|BER_FLAGS_IMPLTAG
, dissect_pres_User_session_requirements
},
850 { &hf_pres_protocol_options
, BER_CLASS_CON
, 11, BER_FLAGS_OPTIONAL
, dissect_pres_Protocol_options
},
851 { &hf_pres_responders_nominated_context
, BER_CLASS_CON
, 13, BER_FLAGS_OPTIONAL
, dissect_pres_Presentation_context_identifier
},
852 { &hf_pres_user_data
, BER_CLASS_ANY
/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL
|BER_FLAGS_NOOWNTAG
|BER_FLAGS_NOTCHKTAG
, dissect_pres_User_data
},
853 { NULL
, 0, 0, 0, NULL
}
857 dissect_pres_T_CPA_PPDU_normal_mode_parameters(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
858 offset
= dissect_ber_sequence(implicit_tag
, actx
, tree
, tvb
, offset
,
859 T_CPA_PPDU_normal_mode_parameters_sequence
, hf_index
, ett_pres_T_CPA_PPDU_normal_mode_parameters
);
865 static const ber_sequence_t CPA_PPDU_set
[] = {
866 { &hf_pres_mode_selector
, BER_CLASS_CON
, 0, BER_FLAGS_IMPLTAG
, dissect_pres_Mode_selector
},
867 { &hf_pres_cPR_PPDU_x400_mode_parameters
, BER_CLASS_CON
, 1, BER_FLAGS_OPTIONAL
|BER_FLAGS_IMPLTAG
, dissect_rtse_RTOACapdu
},
868 { &hf_pres_cPU_PPDU_normal_mode_parameters
, BER_CLASS_CON
, 2, BER_FLAGS_OPTIONAL
|BER_FLAGS_IMPLTAG
, dissect_pres_T_CPA_PPDU_normal_mode_parameters
},
869 { NULL
, 0, 0, 0, NULL
}
873 dissect_pres_CPA_PPDU(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
874 offset
= dissect_ber_set(implicit_tag
, actx
, tree
, tvb
, offset
,
875 CPA_PPDU_set
, hf_index
, ett_pres_CPA_PPDU
);
883 dissect_pres_Default_context_result(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
884 offset
= dissect_pres_Result(implicit_tag
, tvb
, offset
, actx
, tree
, hf_index
);
890 static const value_string pres_Provider_reason_vals
[] = {
891 { 0, "reason-not-specified" },
892 { 1, "temporary-congestion" },
893 { 2, "local-limit-exceeded" },
894 { 3, "called-presentation-address-unknown" },
895 { 4, "protocol-version-not-supported" },
896 { 5, "default-context-not-supported" },
897 { 6, "user-data-not-readable" },
898 { 7, "no-PSAP-available" },
904 dissect_pres_Provider_reason(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
905 offset
= dissect_ber_integer(implicit_tag
, actx
, tree
, tvb
, offset
, hf_index
,
912 static const ber_sequence_t T_CPR_PPDU_normal_mode_parameters_sequence
[] = {
913 { &hf_pres_protocol_version
, BER_CLASS_CON
, 0, BER_FLAGS_OPTIONAL
|BER_FLAGS_IMPLTAG
, dissect_pres_Protocol_version
},
914 { &hf_pres_responding_presentation_selector
, BER_CLASS_CON
, 3, BER_FLAGS_OPTIONAL
|BER_FLAGS_IMPLTAG
, dissect_pres_Responding_presentation_selector
},
915 { &hf_pres_presentation_context_definition_result_list
, BER_CLASS_CON
, 5, BER_FLAGS_OPTIONAL
|BER_FLAGS_IMPLTAG
, dissect_pres_Presentation_context_definition_result_list
},
916 { &hf_pres_default_context_result
, BER_CLASS_CON
, 7, BER_FLAGS_OPTIONAL
|BER_FLAGS_IMPLTAG
, dissect_pres_Default_context_result
},
917 { &hf_pres_cPR_PPDU__provider_reason
, BER_CLASS_CON
, 10, BER_FLAGS_OPTIONAL
|BER_FLAGS_IMPLTAG
, dissect_pres_Provider_reason
},
918 { &hf_pres_user_data
, BER_CLASS_ANY
/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL
|BER_FLAGS_NOOWNTAG
|BER_FLAGS_NOTCHKTAG
, dissect_pres_User_data
},
919 { NULL
, 0, 0, 0, NULL
}
923 dissect_pres_T_CPR_PPDU_normal_mode_parameters(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
924 offset
= dissect_ber_sequence(implicit_tag
, actx
, tree
, tvb
, offset
,
925 T_CPR_PPDU_normal_mode_parameters_sequence
, hf_index
, ett_pres_T_CPR_PPDU_normal_mode_parameters
);
931 static const value_string pres_CPR_PPDU_vals
[] = {
932 { 0, "x400-mode-parameters" },
933 { 1, "normal-mode-parameters" },
937 static const ber_choice_t CPR_PPDU_choice
[] = {
938 { 0, &hf_pres_cPU_PPDU_x400_mode_parameters
, BER_CLASS_UNI
, BER_UNI_TAG_SET
, BER_FLAGS_NOOWNTAG
, dissect_rtse_RTORJapdu
},
939 { 1, &hf_pres_cPR_PPDU_normal_mode_parameters
, BER_CLASS_UNI
, BER_UNI_TAG_SEQUENCE
, BER_FLAGS_NOOWNTAG
, dissect_pres_T_CPR_PPDU_normal_mode_parameters
},
940 { 0, NULL
, 0, 0, 0, NULL
}
944 dissect_pres_CPR_PPDU(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
945 offset
= dissect_ber_choice(actx
, tree
, tvb
, offset
,
946 CPR_PPDU_choice
, hf_index
, ett_pres_CPR_PPDU
,
953 static const ber_sequence_t Presentation_context_identifier_list_item_sequence
[] = {
954 { &hf_pres_presentation_context_identifier
, BER_CLASS_UNI
, BER_UNI_TAG_INTEGER
, BER_FLAGS_NOOWNTAG
, dissect_pres_Presentation_context_identifier
},
955 { &hf_pres_transfer_syntax_name
, BER_CLASS_UNI
, BER_UNI_TAG_OID
, BER_FLAGS_NOOWNTAG
, dissect_pres_Transfer_syntax_name
},
956 { NULL
, 0, 0, 0, NULL
}
960 dissect_pres_Presentation_context_identifier_list_item(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
961 offset
= dissect_ber_sequence(implicit_tag
, actx
, tree
, tvb
, offset
,
962 Presentation_context_identifier_list_item_sequence
, hf_index
, ett_pres_Presentation_context_identifier_list_item
);
968 static const ber_sequence_t Presentation_context_identifier_list_sequence_of
[1] = {
969 { &hf_pres_Presentation_context_identifier_list_item
, BER_CLASS_UNI
, BER_UNI_TAG_SEQUENCE
, BER_FLAGS_NOOWNTAG
, dissect_pres_Presentation_context_identifier_list_item
},
973 dissect_pres_Presentation_context_identifier_list(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
974 offset
= dissect_ber_sequence_of(implicit_tag
, actx
, tree
, tvb
, offset
,
975 Presentation_context_identifier_list_sequence_of
, hf_index
, ett_pres_Presentation_context_identifier_list
);
981 static const ber_sequence_t T_ARU_PPDU_normal_mode_parameters_sequence
[] = {
982 { &hf_pres_presentation_context_identifier_list
, BER_CLASS_CON
, 0, BER_FLAGS_OPTIONAL
|BER_FLAGS_IMPLTAG
, dissect_pres_Presentation_context_identifier_list
},
983 { &hf_pres_user_data
, BER_CLASS_ANY
/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL
|BER_FLAGS_NOOWNTAG
|BER_FLAGS_NOTCHKTAG
, dissect_pres_User_data
},
984 { NULL
, 0, 0, 0, NULL
}
988 dissect_pres_T_ARU_PPDU_normal_mode_parameters(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
989 offset
= dissect_ber_sequence(implicit_tag
, actx
, tree
, tvb
, offset
,
990 T_ARU_PPDU_normal_mode_parameters_sequence
, hf_index
, ett_pres_T_ARU_PPDU_normal_mode_parameters
);
996 static const value_string pres_ARU_PPDU_vals
[] = {
997 { 0, "x400-mode-parameters" },
998 { 1, "normal-mode-parameters" },
1002 static const ber_choice_t ARU_PPDU_choice
[] = {
1003 { 0, &hf_pres_aRU_PPDU_x400_mode_parameters
, BER_CLASS_UNI
, BER_UNI_TAG_SET
, BER_FLAGS_NOOWNTAG
, dissect_rtse_RTABapdu
},
1004 { 1, &hf_pres_aRU_PPDU_normal_mode_parameters
, BER_CLASS_CON
, 0, BER_FLAGS_IMPLTAG
, dissect_pres_T_ARU_PPDU_normal_mode_parameters
},
1005 { 0, NULL
, 0, 0, 0, NULL
}
1009 dissect_pres_ARU_PPDU(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
1010 offset
= dissect_ber_choice(actx
, tree
, tvb
, offset
,
1011 ARU_PPDU_choice
, hf_index
, ett_pres_ARU_PPDU
,
1018 static const value_string pres_Abort_reason_vals
[] = {
1019 { 0, "reason-not-specified" },
1020 { 1, "unrecognized-ppdu" },
1021 { 2, "unexpected-ppdu" },
1022 { 3, "unexpected-session-service-primitive" },
1023 { 4, "unrecognized-ppdu-parameter" },
1024 { 5, "unexpected-ppdu-parameter" },
1025 { 6, "invalid-ppdu-parameter-value" },
1031 dissect_pres_Abort_reason(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
1034 offset
= dissect_ber_integer(implicit_tag
, actx
, tree
, tvb
, offset
, hf_index
,
1038 col_append_fstr(actx
->pinfo
->cinfo
, COL_INFO
, " (%s)", val_to_str(reason
, pres_Abort_reason_vals
, "unknown: %d"));
1045 static const value_string pres_Event_identifier_vals
[] = {
1060 { 14, "s-release-indication" },
1061 { 15, "s-release-confirm" },
1062 { 16, "s-token-give-indication" },
1063 { 17, "s-token-please-indication" },
1064 { 18, "s-control-give-indication" },
1065 { 19, "s-sync-minor-indication" },
1066 { 20, "s-sync-minor-confirm" },
1067 { 21, "s-sync-major-indication" },
1068 { 22, "s-sync-major-confirm" },
1069 { 23, "s-p-exception-report-indication" },
1070 { 24, "s-u-exception-report-indication" },
1071 { 25, "s-activity-start-indication" },
1072 { 26, "s-activity-resume-indication" },
1073 { 27, "s-activity-interrupt-indication" },
1074 { 28, "s-activity-interrupt-confirm" },
1075 { 29, "s-activity-discard-indication" },
1076 { 30, "s-activity-discard-confirm" },
1077 { 31, "s-activity-end-indication" },
1078 { 32, "s-activity-end-confirm" },
1084 dissect_pres_Event_identifier(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
1085 offset
= dissect_ber_integer(implicit_tag
, actx
, tree
, tvb
, offset
, hf_index
,
1092 static const ber_sequence_t ARP_PPDU_sequence
[] = {
1093 { &hf_pres_aRU_PPDU_provider_reason
, BER_CLASS_CON
, 0, BER_FLAGS_OPTIONAL
|BER_FLAGS_IMPLTAG
, dissect_pres_Abort_reason
},
1094 { &hf_pres_event_identifier
, BER_CLASS_CON
, 1, BER_FLAGS_OPTIONAL
|BER_FLAGS_IMPLTAG
, dissect_pres_Event_identifier
},
1095 { NULL
, 0, 0, 0, NULL
}
1099 dissect_pres_ARP_PPDU(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
1100 offset
= dissect_ber_sequence(implicit_tag
, actx
, tree
, tvb
, offset
,
1101 ARP_PPDU_sequence
, hf_index
, ett_pres_ARP_PPDU
);
1107 static const value_string pres_Abort_type_vals
[] = {
1113 static const ber_choice_t Abort_type_choice
[] = {
1114 { 0, &hf_pres_aru_ppdu
, BER_CLASS_ANY
/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG
, dissect_pres_ARU_PPDU
},
1115 { 1, &hf_pres_arp_ppdu
, BER_CLASS_UNI
, BER_UNI_TAG_SEQUENCE
, BER_FLAGS_NOOWNTAG
, dissect_pres_ARP_PPDU
},
1116 { 0, NULL
, 0, 0, 0, NULL
}
1120 dissect_pres_Abort_type(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
1121 offset
= dissect_ber_choice(actx
, tree
, tvb
, offset
,
1122 Abort_type_choice
, hf_index
, ett_pres_Abort_type
,
1131 dissect_pres_Presentation_context_addition_list(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
1132 offset
= dissect_pres_Context_list(implicit_tag
, tvb
, offset
, actx
, tree
, hf_index
);
1138 static const ber_sequence_t Presentation_context_deletion_list_sequence_of
[1] = {
1139 { &hf_pres_Presentation_context_deletion_list_item
, BER_CLASS_UNI
, BER_UNI_TAG_INTEGER
, BER_FLAGS_NOOWNTAG
, dissect_pres_Presentation_context_identifier
},
1143 dissect_pres_Presentation_context_deletion_list(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
1144 offset
= dissect_ber_sequence_of(implicit_tag
, actx
, tree
, tvb
, offset
,
1145 Presentation_context_deletion_list_sequence_of
, hf_index
, ett_pres_Presentation_context_deletion_list
);
1151 static const ber_sequence_t AC_PPDU_sequence
[] = {
1152 { &hf_pres_presentation_context_addition_list
, BER_CLASS_CON
, 0, BER_FLAGS_OPTIONAL
|BER_FLAGS_IMPLTAG
, dissect_pres_Presentation_context_addition_list
},
1153 { &hf_pres_presentation_context_deletion_list
, BER_CLASS_CON
, 1, BER_FLAGS_OPTIONAL
|BER_FLAGS_IMPLTAG
, dissect_pres_Presentation_context_deletion_list
},
1154 { &hf_pres_user_data
, BER_CLASS_ANY
/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL
|BER_FLAGS_NOOWNTAG
|BER_FLAGS_NOTCHKTAG
, dissect_pres_User_data
},
1155 { NULL
, 0, 0, 0, NULL
}
1159 dissect_pres_AC_PPDU(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
1160 offset
= dissect_ber_sequence(implicit_tag
, actx
, tree
, tvb
, offset
,
1161 AC_PPDU_sequence
, hf_index
, ett_pres_AC_PPDU
);
1169 dissect_pres_Presentation_context_addition_result_list(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
1170 offset
= dissect_pres_Result_list(implicit_tag
, tvb
, offset
, actx
, tree
, hf_index
);
1176 static const value_string pres_Presentation_context_deletion_result_list_item_vals
[] = {
1177 { 0, "acceptance" },
1178 { 1, "user-rejection" },
1184 dissect_pres_Presentation_context_deletion_result_list_item(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
1185 offset
= dissect_ber_integer(implicit_tag
, actx
, tree
, tvb
, offset
, hf_index
,
1192 static const ber_sequence_t Presentation_context_deletion_result_list_sequence_of
[1] = {
1193 { &hf_pres_Presentation_context_deletion_result_list_item
, BER_CLASS_UNI
, BER_UNI_TAG_INTEGER
, BER_FLAGS_NOOWNTAG
, dissect_pres_Presentation_context_deletion_result_list_item
},
1197 dissect_pres_Presentation_context_deletion_result_list(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
1198 offset
= dissect_ber_sequence_of(implicit_tag
, actx
, tree
, tvb
, offset
,
1199 Presentation_context_deletion_result_list_sequence_of
, hf_index
, ett_pres_Presentation_context_deletion_result_list
);
1205 static const ber_sequence_t ACA_PPDU_sequence
[] = {
1206 { &hf_pres_presentation_context_addition_result_list
, BER_CLASS_CON
, 0, BER_FLAGS_OPTIONAL
|BER_FLAGS_IMPLTAG
, dissect_pres_Presentation_context_addition_result_list
},
1207 { &hf_pres_presentation_context_deletion_result_list
, BER_CLASS_CON
, 1, BER_FLAGS_OPTIONAL
|BER_FLAGS_IMPLTAG
, dissect_pres_Presentation_context_deletion_result_list
},
1208 { &hf_pres_user_data
, BER_CLASS_ANY
/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL
|BER_FLAGS_NOOWNTAG
|BER_FLAGS_NOTCHKTAG
, dissect_pres_User_data
},
1209 { NULL
, 0, 0, 0, NULL
}
1213 dissect_pres_ACA_PPDU(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
1214 offset
= dissect_ber_sequence(implicit_tag
, actx
, tree
, tvb
, offset
,
1215 ACA_PPDU_sequence
, hf_index
, ett_pres_ACA_PPDU
);
1221 static const value_string pres_Typed_data_type_vals
[] = {
1228 static const ber_choice_t Typed_data_type_choice
[] = {
1229 { 0, &hf_pres_acPPDU
, BER_CLASS_CON
, 0, BER_FLAGS_IMPLTAG
, dissect_pres_AC_PPDU
},
1230 { 1, &hf_pres_acaPPDU
, BER_CLASS_CON
, 1, BER_FLAGS_IMPLTAG
, dissect_pres_ACA_PPDU
},
1231 { 2, &hf_pres_ttdPPDU
, BER_CLASS_ANY
/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG
, dissect_pres_User_data
},
1232 { 0, NULL
, 0, 0, 0, NULL
}
1236 dissect_pres_Typed_data_type(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
1237 offset
= dissect_ber_choice(actx
, tree
, tvb
, offset
,
1238 Typed_data_type_choice
, hf_index
, ett_pres_Typed_data_type
,
1245 static const ber_sequence_t RS_PPDU_sequence
[] = {
1246 { &hf_pres_presentation_context_identifier_list
, BER_CLASS_CON
, 0, BER_FLAGS_OPTIONAL
|BER_FLAGS_IMPLTAG
, dissect_pres_Presentation_context_identifier_list
},
1247 { &hf_pres_user_data
, BER_CLASS_ANY
/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL
|BER_FLAGS_NOOWNTAG
|BER_FLAGS_NOTCHKTAG
, dissect_pres_User_data
},
1248 { NULL
, 0, 0, 0, NULL
}
1252 dissect_pres_RS_PPDU(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
1253 offset
= dissect_ber_sequence(implicit_tag
, actx
, tree
, tvb
, offset
,
1254 RS_PPDU_sequence
, hf_index
, ett_pres_RS_PPDU
);
1260 static const ber_sequence_t RSA_PPDU_sequence
[] = {
1261 { &hf_pres_presentation_context_identifier_list
, BER_CLASS_CON
, 0, BER_FLAGS_OPTIONAL
|BER_FLAGS_IMPLTAG
, dissect_pres_Presentation_context_identifier_list
},
1262 { &hf_pres_user_data
, BER_CLASS_ANY
/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL
|BER_FLAGS_NOOWNTAG
|BER_FLAGS_NOTCHKTAG
, dissect_pres_User_data
},
1263 { NULL
, 0, 0, 0, NULL
}
1267 dissect_pres_RSA_PPDU(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
1268 offset
= dissect_ber_sequence(implicit_tag
, actx
, tree
, tvb
, offset
,
1269 RSA_PPDU_sequence
, hf_index
, ett_pres_RSA_PPDU
);
1275 static const ber_sequence_t UD_type_sequence
[] = {
1276 { &hf_pres_protocol_version
, BER_CLASS_CON
, 0, BER_FLAGS_OPTIONAL
|BER_FLAGS_IMPLTAG
, dissect_pres_Protocol_version
},
1277 { &hf_pres_calling_presentation_selector
, BER_CLASS_CON
, 1, BER_FLAGS_OPTIONAL
|BER_FLAGS_IMPLTAG
, dissect_pres_Calling_presentation_selector
},
1278 { &hf_pres_called_presentation_selector
, BER_CLASS_CON
, 2, BER_FLAGS_OPTIONAL
|BER_FLAGS_IMPLTAG
, dissect_pres_Called_presentation_selector
},
1279 { &hf_pres_presentation_context_definition_list
, BER_CLASS_CON
, 4, BER_FLAGS_OPTIONAL
|BER_FLAGS_IMPLTAG
, dissect_pres_Presentation_context_definition_list
},
1280 { &hf_pres_user_data
, BER_CLASS_ANY
/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG
|BER_FLAGS_NOTCHKTAG
, dissect_pres_User_data
},
1281 { NULL
, 0, 0, 0, NULL
}
1285 dissect_pres_UD_type(bool implicit_tag _U_
, tvbuff_t
*tvb _U_
, int offset _U_
, asn1_ctx_t
*actx _U_
, proto_tree
*tree _U_
, int hf_index _U_
) {
1286 offset
= dissect_ber_sequence(implicit_tag
, actx
, tree
, tvb
, offset
,
1287 UD_type_sequence
, hf_index
, ett_pres_UD_type
);
1295 static int dissect_UD_type_PDU(tvbuff_t
*tvb _U_
, packet_info
*pinfo _U_
, proto_tree
*tree _U_
, void *data _U_
) {
1297 asn1_ctx_t asn1_ctx
;
1298 asn1_ctx_init(&asn1_ctx
, ASN1_ENC_BER
, true, pinfo
);
1299 offset
= dissect_pres_UD_type(false, tvb
, offset
, &asn1_ctx
, tree
, hf_pres_UD_type_PDU
);
1309 dissect_ppdu(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo
, proto_tree
*tree
, struct SESSION_DATA_STRUCTURE
* local_session
)
1312 proto_tree
*pres_tree
;
1313 struct SESSION_DATA_STRUCTURE
* session
;
1314 asn1_ctx_t asn1_ctx
;
1315 asn1_ctx_init(&asn1_ctx
, ASN1_ENC_BER
, true, pinfo
);
1317 /* do we have spdu type from the session dissector? */
1318 if (local_session
== NULL
) {
1319 proto_tree_add_expert(tree
, pinfo
, &ei_pres_wrong_spdu_type
, tvb
, offset
, -1);
1323 session
= local_session
;
1324 if (session
->spdu_type
== 0) {
1325 proto_tree_add_expert_format(tree
, pinfo
, &ei_pres_wrong_spdu_type
, tvb
, offset
, -1,
1326 "Internal error:wrong spdu type %x from session dissector.",session
->spdu_type
);
1330 /* set up type of PPDU */
1331 col_add_str(pinfo
->cinfo
, COL_INFO
,
1332 val_to_str_ext(session
->spdu_type
, &ses_vals_ext
, "Unknown PPDU type (0x%02x)"));
1334 asn1_ctx
.private_data
= session
;
1336 ti
= proto_tree_add_item(tree
, proto_pres
, tvb
, offset
, -1, ENC_NA
);
1337 pres_tree
= proto_item_add_subtree(ti
, ett_pres
);
1339 switch (session
->spdu_type
) {
1340 case SES_CONNECTION_REQUEST
:
1341 offset
= dissect_pres_CP_type(false, tvb
, offset
, &asn1_ctx
, pres_tree
, hf_pres_CP_type
);
1343 case SES_CONNECTION_ACCEPT
:
1344 offset
= dissect_pres_CPA_PPDU(false, tvb
, offset
, &asn1_ctx
, pres_tree
, hf_pres_CPA_PPDU
);
1347 case SES_ABORT_ACCEPT
:
1348 offset
= dissect_pres_Abort_type(false, tvb
, offset
, &asn1_ctx
, pres_tree
, hf_pres_Abort_type
);
1350 case SES_DATA_TRANSFER
:
1351 offset
= dissect_pres_CPC_type(false, tvb
, offset
, &asn1_ctx
, pres_tree
, hf_pres_user_data
);
1353 case SES_TYPED_DATA
:
1354 offset
= dissect_pres_Typed_data_type(false, tvb
, offset
, &asn1_ctx
, pres_tree
, hf_pres_Typed_data_type
);
1356 case SES_RESYNCHRONIZE
:
1357 offset
= dissect_pres_RS_PPDU(false, tvb
, offset
, &asn1_ctx
, pres_tree
, -1);
1359 case SES_RESYNCHRONIZE_ACK
:
1360 offset
= dissect_pres_RSA_PPDU(false, tvb
, offset
, &asn1_ctx
, pres_tree
, -1);
1363 offset
= dissect_pres_CPR_PPDU(false, tvb
, offset
, &asn1_ctx
, pres_tree
, hf_pres_CPR_PPDU
);
1366 offset
= dissect_pres_CPC_type(false, tvb
, offset
, &asn1_ctx
, pres_tree
, hf_pres_user_data
);
1374 dissect_pres(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*parent_tree
, void* data
)
1376 int offset
= 0, old_offset
;
1377 struct SESSION_DATA_STRUCTURE
* session
;
1379 session
= ((struct SESSION_DATA_STRUCTURE
*)data
);
1381 /* first, try to check length */
1382 /* do we have at least 4 bytes */
1383 if (!tvb_bytes_exist(tvb
, 0, 4)) {
1384 if (session
&& session
->spdu_type
!= SES_MAJOR_SYNC_POINT
) {
1385 proto_tree_add_item(parent_tree
, hf_pres_user_data
, tvb
, offset
,
1386 tvb_reported_length_remaining(tvb
,offset
), ENC_NA
);
1387 return 0; /* no, it isn't a presentation PDU */
1391 /* save pointers for calling the acse dissector */
1392 global_tree
= parent_tree
;
1393 global_pinfo
= pinfo
;
1395 /* if the session unit-data packet then we process it */
1396 /* as a connectionless presentation protocol unit data */
1397 if (session
&& session
->spdu_type
== CLSES_UNIT_DATA
) {
1398 proto_tree
* clpres_tree
= NULL
;
1401 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "CL-PRES");
1402 col_clear(pinfo
->cinfo
, COL_INFO
);
1405 ti
= proto_tree_add_item(parent_tree
, proto_clpres
, tvb
, offset
, -1, ENC_NA
);
1406 clpres_tree
= proto_item_add_subtree(ti
, ett_pres
);
1409 /* dissect the packet */
1410 dissect_UD_type_PDU(tvb
, pinfo
, clpres_tree
, NULL
);
1411 return tvb_captured_length(tvb
);
1414 /* we can't make any additional checking here */
1415 /* postpone it before dissector will have more information */
1417 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "PRES");
1418 col_clear(pinfo
->cinfo
, COL_INFO
);
1420 if (session
&& session
->spdu_type
== SES_MAJOR_SYNC_POINT
) {
1421 /* This is a reassembly initiated in packet-ses */
1422 char *oid
= find_oid_by_pres_ctx_id (pinfo
, session
->pres_ctx_id
);
1424 call_ber_oid_callback (oid
, tvb
, offset
, pinfo
, parent_tree
, session
);
1426 proto_tree_add_item(parent_tree
, hf_pres_user_data
, tvb
, offset
,
1427 tvb_reported_length_remaining(tvb
,offset
), ENC_NA
);
1429 return tvb_captured_length(tvb
);
1432 while (tvb_reported_length_remaining(tvb
, offset
) > 0) {
1433 old_offset
= offset
;
1434 offset
= dissect_ppdu(tvb
, offset
, pinfo
, parent_tree
, session
);
1435 if (offset
<= old_offset
) {
1436 proto_tree_add_expert(parent_tree
, pinfo
, &ei_pres_invalid_offset
, tvb
, offset
, -1);
1441 return tvb_captured_length(tvb
);
1445 /*--- proto_register_pres -------------------------------------------*/
1446 void proto_register_pres(void) {
1448 /* List of fields */
1449 static hf_register_info hf
[] = {
1451 { "CP-type", "pres.cptype",
1452 FT_NONE
, BASE_NONE
, NULL
, 0,
1454 { &hf_pres_CPA_PPDU
,
1455 { "CPA-PPDU", "pres.cpapdu",
1456 FT_NONE
, BASE_NONE
, NULL
, 0,
1458 { &hf_pres_Abort_type
,
1459 { "Abort type", "pres.aborttype",
1460 FT_UINT32
, BASE_DEC
, VALS(pres_Abort_type_vals
), 0,
1462 { &hf_pres_CPR_PPDU
,
1463 { "CPR-PPDU", "pres.cprtype",
1464 FT_UINT32
, BASE_DEC
, VALS(pres_CPR_PPDU_vals
), 0,
1466 { &hf_pres_Typed_data_type
,
1467 { "Typed data type", "pres.Typed_data_type",
1468 FT_UINT32
, BASE_DEC
, VALS(pres_Typed_data_type_vals
), 0,
1471 { &hf_pres_UD_type_PDU
,
1472 { "UD-type", "pres.UD_type_element",
1473 FT_NONE
, BASE_NONE
, NULL
, 0,
1475 { &hf_pres_mode_selector
,
1476 { "mode-selector", "pres.mode_selector_element",
1477 FT_NONE
, BASE_NONE
, NULL
, 0,
1479 { &hf_pres_x410_mode_parameters
,
1480 { "x410-mode-parameters", "pres.x410_mode_parameters_element",
1481 FT_NONE
, BASE_NONE
, NULL
, 0,
1482 "RTORQapdu", HFILL
}},
1483 { &hf_pres_normal_mode_parameters
,
1484 { "normal-mode-parameters", "pres.normal_mode_parameters_element",
1485 FT_NONE
, BASE_NONE
, NULL
, 0,
1487 { &hf_pres_protocol_version
,
1488 { "protocol-version", "pres.protocol_version",
1489 FT_BYTES
, BASE_NONE
, NULL
, 0,
1491 { &hf_pres_calling_presentation_selector
,
1492 { "calling-presentation-selector", "pres.calling_presentation_selector",
1493 FT_BYTES
, BASE_NONE
, NULL
, 0,
1495 { &hf_pres_called_presentation_selector
,
1496 { "called-presentation-selector", "pres.called_presentation_selector",
1497 FT_BYTES
, BASE_NONE
, NULL
, 0,
1499 { &hf_pres_presentation_context_definition_list
,
1500 { "presentation-context-definition-list", "pres.presentation_context_definition_list",
1501 FT_UINT32
, BASE_DEC
, NULL
, 0,
1503 { &hf_pres_default_context_name
,
1504 { "default-context-name", "pres.default_context_name_element",
1505 FT_NONE
, BASE_NONE
, NULL
, 0,
1507 { &hf_pres_presentation_requirements
,
1508 { "presentation-requirements", "pres.presentation_requirements",
1509 FT_BYTES
, BASE_NONE
, NULL
, 0,
1511 { &hf_pres_user_session_requirements
,
1512 { "user-session-requirements", "pres.user_session_requirements",
1513 FT_BYTES
, BASE_NONE
, NULL
, 0,
1515 { &hf_pres_protocol_options
,
1516 { "protocol-options", "pres.protocol_options",
1517 FT_BYTES
, BASE_NONE
, NULL
, 0,
1519 { &hf_pres_initiators_nominated_context
,
1520 { "initiators-nominated-context", "pres.initiators_nominated_context",
1521 FT_INT32
, BASE_DEC
, NULL
, 0,
1522 "Presentation_context_identifier", HFILL
}},
1523 { &hf_pres_extensions
,
1524 { "extensions", "pres.extensions_element",
1525 FT_NONE
, BASE_NONE
, NULL
, 0,
1527 { &hf_pres_user_data
,
1528 { "user-data", "pres.user_data",
1529 FT_UINT32
, BASE_DEC
, VALS(pres_User_data_vals
), 0,
1531 { &hf_pres_cPR_PPDU_x400_mode_parameters
,
1532 { "x410-mode-parameters", "pres.x410_mode_parameters_element",
1533 FT_NONE
, BASE_NONE
, NULL
, 0,
1534 "RTOACapdu", HFILL
}},
1535 { &hf_pres_cPU_PPDU_normal_mode_parameters
,
1536 { "normal-mode-parameters", "pres.normal_mode_parameters_element",
1537 FT_NONE
, BASE_NONE
, NULL
, 0,
1538 "T_CPA_PPDU_normal_mode_parameters", HFILL
}},
1539 { &hf_pres_responding_presentation_selector
,
1540 { "responding-presentation-selector", "pres.responding_presentation_selector",
1541 FT_BYTES
, BASE_NONE
, NULL
, 0,
1543 { &hf_pres_presentation_context_definition_result_list
,
1544 { "presentation-context-definition-result-list", "pres.presentation_context_definition_result_list",
1545 FT_UINT32
, BASE_DEC
, NULL
, 0,
1547 { &hf_pres_responders_nominated_context
,
1548 { "responders-nominated-context", "pres.responders_nominated_context",
1549 FT_INT32
, BASE_DEC
, NULL
, 0,
1550 "Presentation_context_identifier", HFILL
}},
1551 { &hf_pres_cPU_PPDU_x400_mode_parameters
,
1552 { "x400-mode-parameters", "pres.x400_mode_parameters_element",
1553 FT_NONE
, BASE_NONE
, NULL
, 0,
1554 "RTORJapdu", HFILL
}},
1555 { &hf_pres_cPR_PPDU_normal_mode_parameters
,
1556 { "normal-mode-parameters", "pres.normal_mode_parameters_element",
1557 FT_NONE
, BASE_NONE
, NULL
, 0,
1558 "T_CPR_PPDU_normal_mode_parameters", HFILL
}},
1559 { &hf_pres_default_context_result
,
1560 { "default-context-result", "pres.default_context_result",
1561 FT_INT32
, BASE_DEC
, VALS(pres_Result_vals
), 0,
1563 { &hf_pres_cPR_PPDU__provider_reason
,
1564 { "provider-reason", "pres.provider_reason",
1565 FT_INT32
, BASE_DEC
, VALS(pres_Provider_reason_vals
), 0,
1567 { &hf_pres_aru_ppdu
,
1568 { "aru-ppdu", "pres.aru_ppdu",
1569 FT_UINT32
, BASE_DEC
, VALS(pres_ARU_PPDU_vals
), 0,
1571 { &hf_pres_arp_ppdu
,
1572 { "arp-ppdu", "pres.arp_ppdu_element",
1573 FT_NONE
, BASE_NONE
, NULL
, 0,
1575 { &hf_pres_aRU_PPDU_x400_mode_parameters
,
1576 { "x400-mode-parameters", "pres.x400_mode_parameters_element",
1577 FT_NONE
, BASE_NONE
, NULL
, 0,
1578 "RTABapdu", HFILL
}},
1579 { &hf_pres_aRU_PPDU_normal_mode_parameters
,
1580 { "normal-mode-parameters", "pres.normal_mode_parameters_element",
1581 FT_NONE
, BASE_NONE
, NULL
, 0,
1582 "T_ARU_PPDU_normal_mode_parameters", HFILL
}},
1583 { &hf_pres_presentation_context_identifier_list
,
1584 { "presentation-context-identifier-list", "pres.presentation_context_identifier_list",
1585 FT_UINT32
, BASE_DEC
, NULL
, 0,
1587 { &hf_pres_aRU_PPDU_provider_reason
,
1588 { "provider-reason", "pres.provider_reason",
1589 FT_INT32
, BASE_DEC
, VALS(pres_Abort_reason_vals
), 0,
1590 "Abort_reason", HFILL
}},
1591 { &hf_pres_event_identifier
,
1592 { "event-identifier", "pres.event_identifier",
1593 FT_INT32
, BASE_DEC
, VALS(pres_Event_identifier_vals
), 0,
1596 { "acPPDU", "pres.acPPDU_element",
1597 FT_NONE
, BASE_NONE
, NULL
, 0,
1598 "AC_PPDU", HFILL
}},
1600 { "acaPPDU", "pres.acaPPDU_element",
1601 FT_NONE
, BASE_NONE
, NULL
, 0,
1602 "ACA_PPDU", HFILL
}},
1604 { "ttdPPDU", "pres.ttdPPDU",
1605 FT_UINT32
, BASE_DEC
, VALS(pres_User_data_vals
), 0,
1606 "User_data", HFILL
}},
1607 { &hf_pres_presentation_context_addition_list
,
1608 { "presentation-context-addition-list", "pres.presentation_context_addition_list",
1609 FT_UINT32
, BASE_DEC
, NULL
, 0,
1611 { &hf_pres_presentation_context_deletion_list
,
1612 { "presentation-context-deletion-list", "pres.presentation_context_deletion_list",
1613 FT_UINT32
, BASE_DEC
, NULL
, 0,
1615 { &hf_pres_presentation_context_addition_result_list
,
1616 { "presentation-context-addition-result-list", "pres.presentation_context_addition_result_list",
1617 FT_UINT32
, BASE_DEC
, NULL
, 0,
1619 { &hf_pres_presentation_context_deletion_result_list
,
1620 { "presentation-context-deletion-result-list", "pres.presentation_context_deletion_result_list",
1621 FT_UINT32
, BASE_DEC
, NULL
, 0,
1623 { &hf_pres_Context_list_item
,
1624 { "Context-list item", "pres.Context_list_item_element",
1625 FT_NONE
, BASE_NONE
, NULL
, 0,
1627 { &hf_pres_presentation_context_identifier
,
1628 { "presentation-context-identifier", "pres.presentation_context_identifier",
1629 FT_INT32
, BASE_DEC
, NULL
, 0,
1631 { &hf_pres_abstract_syntax_name
,
1632 { "abstract-syntax-name", "pres.abstract_syntax_name",
1633 FT_OID
, BASE_NONE
, NULL
, 0,
1635 { &hf_pres_transfer_syntax_name_list
,
1636 { "transfer-syntax-name-list", "pres.transfer_syntax_name_list",
1637 FT_UINT32
, BASE_DEC
, NULL
, 0,
1638 "SEQUENCE_OF_Transfer_syntax_name", HFILL
}},
1639 { &hf_pres_transfer_syntax_name_list_item
,
1640 { "Transfer-syntax-name", "pres.Transfer_syntax_name",
1641 FT_OID
, BASE_NONE
, NULL
, 0,
1643 { &hf_pres_transfer_syntax_name
,
1644 { "transfer-syntax-name", "pres.transfer_syntax_name",
1645 FT_OID
, BASE_NONE
, NULL
, 0,
1647 { &hf_pres_mode_value
,
1648 { "mode-value", "pres.mode_value",
1649 FT_INT32
, BASE_DEC
, VALS(pres_T_mode_value_vals
), 0,
1651 { &hf_pres_Presentation_context_deletion_list_item
,
1652 { "Presentation-context-identifier", "pres.Presentation_context_identifier",
1653 FT_INT32
, BASE_DEC
, NULL
, 0,
1655 { &hf_pres_Presentation_context_deletion_result_list_item
,
1656 { "Presentation-context-deletion-result-list item", "pres.Presentation_context_deletion_result_list_item",
1657 FT_INT32
, BASE_DEC
, VALS(pres_Presentation_context_deletion_result_list_item_vals
), 0,
1659 { &hf_pres_Presentation_context_identifier_list_item
,
1660 { "Presentation-context-identifier-list item", "pres.Presentation_context_identifier_list_item_element",
1661 FT_NONE
, BASE_NONE
, NULL
, 0,
1663 { &hf_pres_Result_list_item
,
1664 { "Result-list item", "pres.Result_list_item_element",
1665 FT_NONE
, BASE_NONE
, NULL
, 0,
1668 { "result", "pres.result",
1669 FT_INT32
, BASE_DEC
, VALS(pres_Result_vals
), 0,
1671 { &hf_pres_provider_reason
,
1672 { "provider-reason", "pres.provider_reason",
1673 FT_INT32
, BASE_DEC
, VALS(pres_T_provider_reason_vals
), 0,
1675 { &hf_pres_simply_encoded_data
,
1676 { "simply-encoded-data", "pres.simply_encoded_data",
1677 FT_BYTES
, BASE_NONE
, NULL
, 0,
1679 { &hf_pres_fully_encoded_data
,
1680 { "fully-encoded-data", "pres.fully_encoded_data",
1681 FT_UINT32
, BASE_DEC
, NULL
, 0,
1683 { &hf_pres_Fully_encoded_data_item
,
1684 { "PDV-list", "pres.PDV_list_element",
1685 FT_NONE
, BASE_NONE
, NULL
, 0,
1687 { &hf_pres_presentation_data_values
,
1688 { "presentation-data-values", "pres.presentation_data_values",
1689 FT_UINT32
, BASE_DEC
, VALS(pres_T_presentation_data_values_vals
), 0,
1691 { &hf_pres_single_ASN1_type
,
1692 { "single-ASN1-type", "pres.single_ASN1_type_element",
1693 FT_NONE
, BASE_NONE
, NULL
, 0,
1695 { &hf_pres_octet_aligned
,
1696 { "octet-aligned", "pres.octet_aligned",
1697 FT_BYTES
, BASE_NONE
, NULL
, 0,
1698 "T_octet_aligned", HFILL
}},
1699 { &hf_pres_arbitrary
,
1700 { "arbitrary", "pres.arbitrary",
1701 FT_BYTES
, BASE_NONE
, NULL
, 0,
1702 "BIT_STRING", HFILL
}},
1703 { &hf_pres_Presentation_requirements_context_management
,
1704 { "context-management", "pres.Presentation.requirements.context.management",
1705 FT_BOOLEAN
, 8, NULL
, 0x80,
1707 { &hf_pres_Presentation_requirements_restoration
,
1708 { "restoration", "pres.Presentation.requirements.restoration",
1709 FT_BOOLEAN
, 8, NULL
, 0x40,
1711 { &hf_pres_Protocol_options_nominated_context
,
1712 { "nominated-context", "pres.Protocol.options.nominated.context",
1713 FT_BOOLEAN
, 8, NULL
, 0x80,
1715 { &hf_pres_Protocol_options_short_encoding
,
1716 { "short-encoding", "pres.Protocol.options.short.encoding",
1717 FT_BOOLEAN
, 8, NULL
, 0x40,
1719 { &hf_pres_Protocol_options_packed_encoding_rules
,
1720 { "packed-encoding-rules", "pres.Protocol.options.packed.encoding.rules",
1721 FT_BOOLEAN
, 8, NULL
, 0x20,
1723 { &hf_pres_Protocol_version_version_1
,
1724 { "version-1", "pres.Protocol.version.version.1",
1725 FT_BOOLEAN
, 8, NULL
, 0x80,
1727 { &hf_pres_User_session_requirements_half_duplex
,
1728 { "half-duplex", "pres.User.session.requirements.half.duplex",
1729 FT_BOOLEAN
, 8, NULL
, 0x80,
1731 { &hf_pres_User_session_requirements_duplex
,
1732 { "duplex", "pres.User.session.requirements.duplex",
1733 FT_BOOLEAN
, 8, NULL
, 0x40,
1735 { &hf_pres_User_session_requirements_expedited_data
,
1736 { "expedited-data", "pres.User.session.requirements.expedited.data",
1737 FT_BOOLEAN
, 8, NULL
, 0x20,
1739 { &hf_pres_User_session_requirements_minor_synchronize
,
1740 { "minor-synchronize", "pres.User.session.requirements.minor.synchronize",
1741 FT_BOOLEAN
, 8, NULL
, 0x10,
1743 { &hf_pres_User_session_requirements_major_synchronize
,
1744 { "major-synchronize", "pres.User.session.requirements.major.synchronize",
1745 FT_BOOLEAN
, 8, NULL
, 0x08,
1747 { &hf_pres_User_session_requirements_resynchronize
,
1748 { "resynchronize", "pres.User.session.requirements.resynchronize",
1749 FT_BOOLEAN
, 8, NULL
, 0x04,
1751 { &hf_pres_User_session_requirements_activity_management
,
1752 { "activity-management", "pres.User.session.requirements.activity.management",
1753 FT_BOOLEAN
, 8, NULL
, 0x02,
1755 { &hf_pres_User_session_requirements_negotiated_release
,
1756 { "negotiated-release", "pres.User.session.requirements.negotiated.release",
1757 FT_BOOLEAN
, 8, NULL
, 0x01,
1759 { &hf_pres_User_session_requirements_capability_data
,
1760 { "capability-data", "pres.User.session.requirements.capability.data",
1761 FT_BOOLEAN
, 8, NULL
, 0x80,
1763 { &hf_pres_User_session_requirements_exceptions
,
1764 { "exceptions", "pres.User.session.requirements.exceptions",
1765 FT_BOOLEAN
, 8, NULL
, 0x40,
1767 { &hf_pres_User_session_requirements_typed_data
,
1768 { "typed-data", "pres.User.session.requirements.typed.data",
1769 FT_BOOLEAN
, 8, NULL
, 0x20,
1771 { &hf_pres_User_session_requirements_symmetric_synchronize
,
1772 { "symmetric-synchronize", "pres.User.session.requirements.symmetric.synchronize",
1773 FT_BOOLEAN
, 8, NULL
, 0x10,
1775 { &hf_pres_User_session_requirements_data_separation
,
1776 { "data-separation", "pres.User.session.requirements.data.separation",
1777 FT_BOOLEAN
, 8, NULL
, 0x08,
1781 /* List of subtrees */
1782 static int *ett
[] = {
1785 &ett_pres_T_normal_mode_parameters
,
1786 &ett_pres_T_extensions
,
1788 &ett_pres_T_CPA_PPDU_normal_mode_parameters
,
1790 &ett_pres_T_CPR_PPDU_normal_mode_parameters
,
1791 &ett_pres_Abort_type
,
1793 &ett_pres_T_ARU_PPDU_normal_mode_parameters
,
1795 &ett_pres_Typed_data_type
,
1800 &ett_pres_Context_list
,
1801 &ett_pres_Context_list_item
,
1802 &ett_pres_SEQUENCE_OF_Transfer_syntax_name
,
1803 &ett_pres_Default_context_name
,
1804 &ett_pres_Mode_selector
,
1805 &ett_pres_Presentation_context_deletion_list
,
1806 &ett_pres_Presentation_context_deletion_result_list
,
1807 &ett_pres_Presentation_context_identifier_list
,
1808 &ett_pres_Presentation_context_identifier_list_item
,
1809 &ett_pres_Presentation_requirements
,
1810 &ett_pres_Protocol_options
,
1811 &ett_pres_Protocol_version
,
1812 &ett_pres_Result_list
,
1813 &ett_pres_Result_list_item
,
1814 &ett_pres_User_data
,
1815 &ett_pres_Fully_encoded_data
,
1817 &ett_pres_T_presentation_data_values
,
1818 &ett_pres_User_session_requirements
,
1822 static ei_register_info ei
[] = {
1823 { &ei_pres_dissector_not_available
, { "pres.dissector_not_available", PI_UNDECODED
, PI_WARN
, "Dissector is not available", EXPFILL
}},
1824 { &ei_pres_wrong_spdu_type
, { "pres.wrong_spdu_type", PI_PROTOCOL
, PI_WARN
, "Internal error:can't get spdu type from session dissector", EXPFILL
}},
1825 { &ei_pres_invalid_offset
, { "pres.invalid_offset", PI_MALFORMED
, PI_ERROR
, "Internal error: PPDU made offset go backwards", EXPFILL
}},
1828 static uat_field_t users_flds
[] = {
1829 UAT_FLD_DEC(pres_users
,ctx_id
,"Context Id","Presentation Context Identifier"),
1830 UAT_FLD_CSTRING(pres_users
,oid
,"Syntax Name OID","Abstract Syntax Name (Object Identifier)"),
1834 uat_t
* users_uat
= uat_new("PRES Users Context List",
1835 sizeof(pres_user_t
),
1836 "pres_context_list",
1840 UAT_AFFECTS_DISSECTION
, /* affects dissection of packets, but not set of named fields */
1841 "ChPresContextList",
1849 expert_module_t
* expert_pres
;
1850 module_t
*pres_module
;
1852 /* Register protocol */
1853 proto_pres
= proto_register_protocol(PNAME
, PSNAME
, PFNAME
);
1854 register_dissector("pres", dissect_pres
, proto_pres
);
1856 /* Register connectionless protocol (just for the description) */
1857 proto_clpres
= proto_register_protocol(CLPNAME
, CLPSNAME
, CLPFNAME
);
1859 /* Register fields and subtrees */
1860 proto_register_field_array(proto_pres
, hf
, array_length(hf
));
1861 proto_register_subtree_array(ett
, array_length(ett
));
1862 expert_pres
= expert_register_protocol(proto_pres
);
1863 expert_register_field_array(expert_pres
, ei
, array_length(ei
));
1864 pres_ctx_oid_table
= wmem_map_new_autoreset(wmem_epan_scope(), wmem_file_scope(), pres_ctx_oid_hash
, pres_ctx_oid_equal
);
1866 pres_module
= prefs_register_protocol(proto_pres
, NULL
);
1868 prefs_register_uat_preference(pres_module
, "users_table", "Users Context List",
1869 "A table that enumerates user protocols to be used against"
1870 " specific presentation context identifiers",
1875 /*--- proto_reg_handoff_pres ---------------------------------------*/
1876 void proto_reg_handoff_pres(void) {
1878 /* register_ber_oid_dissector("0.4.0.0.1.1.1.1", dissect_pres, proto_pres,
1879 "itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) abstractSyntax(1) pres(1) version1(1)"); */