1 /* Do not modify this file. */
2 /* It is created automatically by the ASN.1 to Wireshark dissector compiler */
4 /* ../../tools/asn2eth.py -X -b -e -p pres -c pres.cnf -s packet-pres-template ISO8823-PRESENTATION.asn */
6 /* Input file: packet-pres-template.c */
8 #line 1 "packet-pres-template.c"
10 * Routine to dissect ISO 8823 OSI Presentation Protocol packets
11 * Based on the dissector by
12 * Yuriy Sidelnikov <YSidelnikov@hotmail.com>
16 * Wireshark - Network traffic analyzer
17 * By Gerald Combs <gerald@wireshark.org>
18 * Copyright 1998 Gerald Combs
20 * This program is free software; you can redistribute it and/or
21 * modify it under the terms of the GNU General Public License
22 * as published by the Free Software Foundation; either version 2
23 * of the License, or (at your option) any later version.
25 * This program is distributed in the hope that it will be useful,
26 * but WITHOUT ANY WARRANTY; without even the implied warranty of
27 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 * GNU General Public License for more details.
30 * You should have received a copy of the GNU General Public License
31 * along with this program; if not, write to the Free Software
32 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
40 #include <epan/packet.h>
41 #include <epan/conversation.h>
42 #include <epan/emem.h>
47 #include "packet-ber.h"
48 #include "packet-ses.h"
49 #include "packet-pres.h"
50 #include "packet-rtse.h"
53 #define PNAME "ISO 8823 OSI Presentation Protocol"
57 /* Initialize the protocol and registered fields */
59 /* type of session envelop */
60 static struct SESSION_DATA_STRUCTURE* session = NULL;
62 /* pointers for acse dissector */
63 proto_tree *global_tree = NULL;
64 packet_info *global_pinfo = NULL;
66 /* dissector for data */
67 static dissector_handle_t data_handle;
69 static const char *abstract_syntax_name_oid;
70 static guint32 presentation_context_identifier;
72 /* to keep track of presentation context identifiers and protocol-oids */
73 typedef struct _pres_ctx_oid_t {
74 /* XXX here we should keep track of conversation as well */
78 static GHashTable *pres_ctx_oid_table = NULL;
80 static int hf_pres_CP_type = -1;
81 static int hf_pres_CPA_PPDU = -1;
82 static int hf_pres_Abort_type = -1;
83 static int hf_pres_CPR_PPDU = -1;
84 static int hf_pres_Typed_data_type = -1;
87 /*--- Included file: packet-pres-hf.c ---*/
88 #line 1 "packet-pres-hf.c"
89 static int hf_pres_mode_selector = -1; /* Mode_selector */
90 static int hf_pres_x410_mode_parameters = -1; /* RTORQapdu */
91 static int hf_pres_normal_mode_parameters = -1; /* T_normal_mode_parameters */
92 static int hf_pres_protocol_version = -1; /* Protocol_version */
93 static int hf_pres_calling_presentation_selector = -1; /* Calling_presentation_selector */
94 static int hf_pres_called_presentation_selector = -1; /* Called_presentation_selector */
95 static int hf_pres_presentation_context_definition_list = -1; /* Presentation_context_definition_list */
96 static int hf_pres_default_context_name = -1; /* Default_context_name */
97 static int hf_pres_presentation_requirements = -1; /* Presentation_requirements */
98 static int hf_pres_user_session_requirements = -1; /* User_session_requirements */
99 static int hf_pres_protocol_options = -1; /* Protocol_options */
100 static int hf_pres_initiators_nominated_context = -1; /* Presentation_context_identifier */
101 static int hf_pres_extensions = -1; /* T_extensions */
102 static int hf_pres_user_data = -1; /* User_data */
103 static int hf_pres_cPR_PPDU_x400_mode_parameters = -1; /* RTOACapdu */
104 static int hf_pres_cPU_PPDU_normal_mode_parameters = -1; /* T_CPA_PPDU_normal_mode_parameters */
105 static int hf_pres_responding_presentation_selector = -1; /* Responding_presentation_selector */
106 static int hf_pres_presentation_context_definition_result_list = -1; /* Presentation_context_definition_result_list */
107 static int hf_pres_responders_nominated_context = -1; /* Presentation_context_identifier */
108 static int hf_pres_cPU_PPDU_x400_mode_parameters = -1; /* RTORJapdu */
109 static int hf_pres_cPR_PPDU_normal_mode_parameters = -1; /* T_CPR_PPDU_normal_mode_parameters */
110 static int hf_pres_default_context_result = -1; /* Default_context_result */
111 static int hf_pres_cPR_PPDU__provider_reason = -1; /* Provider_reason */
112 static int hf_pres_aru_ppdu = -1; /* ARU_PPDU */
113 static int hf_pres_arp_ppdu = -1; /* ARP_PPDU */
114 static int hf_pres_aRU_PPDU_x400_mode_parameters = -1; /* RTABapdu */
115 static int hf_pres_aRU_PPDU_normal_mode_parameters = -1; /* T_ARU_PPDU_normal_mode_parameters */
116 static int hf_pres_presentation_context_identifier_list = -1; /* Presentation_context_identifier_list */
117 static int hf_pres_aRU_PPDU_provider_reason = -1; /* Abort_reason */
118 static int hf_pres_event_identifier = -1; /* Event_identifier */
119 static int hf_pres_acPPDU = -1; /* AC_PPDU */
120 static int hf_pres_acaPPDU = -1; /* ACA_PPDU */
121 static int hf_pres_ttdPPDU = -1; /* User_data */
122 static int hf_pres_presentation_context_addition_list = -1; /* Presentation_context_addition_list */
123 static int hf_pres_presentation_context_deletion_list = -1; /* Presentation_context_deletion_list */
124 static int hf_pres_presentation_context_addition_result_list = -1; /* Presentation_context_addition_result_list */
125 static int hf_pres_presentation_context_deletion_result_list = -1; /* Presentation_context_deletion_result_list */
126 static int hf_pres_Context_list_item = -1; /* Context_list_item */
127 static int hf_pres_presentation_context_identifier = -1; /* Presentation_context_identifier */
128 static int hf_pres_abstract_syntax_name = -1; /* Abstract_syntax_name */
129 static int hf_pres_transfer_syntax_name_list = -1; /* SEQUENCE_OF_Transfer_syntax_name */
130 static int hf_pres_transfer_syntax_name_list_item = -1; /* Transfer_syntax_name */
131 static int hf_pres_transfer_syntax_name = -1; /* Transfer_syntax_name */
132 static int hf_pres_mode_value = -1; /* T_mode_value */
133 static int hf_pres_Presentation_context_deletion_list_item = -1; /* Presentation_context_identifier */
134 static int hf_pres_Presentation_context_deletion_result_list_item = -1; /* Presentation_context_deletion_result_list_item */
135 static int hf_pres_Presentation_context_identifier_list_item = -1; /* Presentation_context_identifier_list_item */
136 static int hf_pres_Result_list_item = -1; /* Result_list_item */
137 static int hf_pres_result = -1; /* Result */
138 static int hf_pres_provider_reason = -1; /* T_provider_reason */
139 static int hf_pres_simply_encoded_data = -1; /* Simply_encoded_data */
140 static int hf_pres_fully_encoded_data = -1; /* Fully_encoded_data */
141 static int hf_pres_Fully_encoded_data_item = -1; /* PDV_list */
142 static int hf_pres_presentation_data_values = -1; /* T_presentation_data_values */
143 static int hf_pres_single_ASN1_type = -1; /* T_single_ASN1_type */
144 static int hf_pres_octet_aligned = -1; /* T_octet_aligned */
145 static int hf_pres_arbitrary = -1; /* BIT_STRING */
147 static int hf_pres_Presentation_requirements_context_management = -1;
148 static int hf_pres_Presentation_requirements_restoration = -1;
149 static int hf_pres_Protocol_options_nominated_context = -1;
150 static int hf_pres_Protocol_options_short_encoding = -1;
151 static int hf_pres_Protocol_options_packed_encoding_rules = -1;
152 static int hf_pres_Protocol_version_version_1 = -1;
153 static int hf_pres_User_session_requirements_half_duplex = -1;
154 static int hf_pres_User_session_requirements_duplex = -1;
155 static int hf_pres_User_session_requirements_expedited_data = -1;
156 static int hf_pres_User_session_requirements_minor_synchronize = -1;
157 static int hf_pres_User_session_requirements_major_synchronize = -1;
158 static int hf_pres_User_session_requirements_resynchronize = -1;
159 static int hf_pres_User_session_requirements_activity_management = -1;
160 static int hf_pres_User_session_requirements_negotiated_release = -1;
161 static int hf_pres_User_session_requirements_capability_data = -1;
162 static int hf_pres_User_session_requirements_exceptions = -1;
163 static int hf_pres_User_session_requirements_typed_data = -1;
164 static int hf_pres_User_session_requirements_symmetric_synchronize = -1;
165 static int hf_pres_User_session_requirements_data_separation = -1;
167 /*--- End of included file: packet-pres-hf.c ---*/
168 #line 79 "packet-pres-template.c"
170 /* Initialize the subtree pointers */
171 static gint ett_pres = -1;
174 /*--- Included file: packet-pres-ett.c ---*/
175 #line 1 "packet-pres-ett.c"
176 static gint ett_pres_CP_type = -1;
177 static gint ett_pres_T_normal_mode_parameters = -1;
178 static gint ett_pres_T_extensions = -1;
179 static gint ett_pres_CPA_PPDU = -1;
180 static gint ett_pres_T_CPA_PPDU_normal_mode_parameters = -1;
181 static gint ett_pres_CPR_PPDU = -1;
182 static gint ett_pres_T_CPR_PPDU_normal_mode_parameters = -1;
183 static gint ett_pres_Abort_type = -1;
184 static gint ett_pres_ARU_PPDU = -1;
185 static gint ett_pres_T_ARU_PPDU_normal_mode_parameters = -1;
186 static gint ett_pres_ARP_PPDU = -1;
187 static gint ett_pres_Typed_data_type = -1;
188 static gint ett_pres_AC_PPDU = -1;
189 static gint ett_pres_ACA_PPDU = -1;
190 static gint ett_pres_RS_PPDU = -1;
191 static gint ett_pres_RSA_PPDU = -1;
192 static gint ett_pres_Context_list = -1;
193 static gint ett_pres_Context_list_item = -1;
194 static gint ett_pres_SEQUENCE_OF_Transfer_syntax_name = -1;
195 static gint ett_pres_Default_context_name = -1;
196 static gint ett_pres_Mode_selector = -1;
197 static gint ett_pres_Presentation_context_deletion_list = -1;
198 static gint ett_pres_Presentation_context_deletion_result_list = -1;
199 static gint ett_pres_Presentation_context_identifier_list = -1;
200 static gint ett_pres_Presentation_context_identifier_list_item = -1;
201 static gint ett_pres_Presentation_requirements = -1;
202 static gint ett_pres_Protocol_options = -1;
203 static gint ett_pres_Protocol_version = -1;
204 static gint ett_pres_Result_list = -1;
205 static gint ett_pres_Result_list_item = -1;
206 static gint ett_pres_User_data = -1;
207 static gint ett_pres_Fully_encoded_data = -1;
208 static gint ett_pres_PDV_list = -1;
209 static gint ett_pres_T_presentation_data_values = -1;
210 static gint ett_pres_User_session_requirements = -1;
212 /*--- End of included file: packet-pres-ett.c ---*/
213 #line 84 "packet-pres-template.c"
217 pres_ctx_oid_hash(gconstpointer k)
219 pres_ctx_oid_t *pco=(pres_ctx_oid_t *)k;
222 /* XXX this one should be made ADDRESS/PORT aware */
224 pres_ctx_oid_equal(gconstpointer k1, gconstpointer k2)
226 pres_ctx_oid_t *pco1=(pres_ctx_oid_t *)k1;
227 pres_ctx_oid_t *pco2=(pres_ctx_oid_t *)k2;
228 return pco1->ctx_id==pco2->ctx_id;
234 if( pres_ctx_oid_table ){
235 g_hash_table_destroy(pres_ctx_oid_table);
236 pres_ctx_oid_table = NULL;
238 pres_ctx_oid_table = g_hash_table_new(pres_ctx_oid_hash,
244 register_ctx_id_and_oid(packet_info *pinfo _U_, guint32 idx, const char *oid)
246 pres_ctx_oid_t *pco, *tmppco;
247 pco=se_alloc(sizeof(pres_ctx_oid_t));
251 /* we did not get any oid name, malformed packet? */
256 pco->oid=se_strdup(oid);
258 /* if this ctx already exists, remove the old one first */
259 tmppco=(pres_ctx_oid_t *)g_hash_table_lookup(pres_ctx_oid_table, pco);
261 g_hash_table_remove(pres_ctx_oid_table, tmppco);
264 g_hash_table_insert(pres_ctx_oid_table, pco, pco);
267 find_oid_by_pres_ctx_id(packet_info *pinfo _U_, guint32 idx)
269 pres_ctx_oid_t pco, *tmppco;
271 tmppco=(pres_ctx_oid_t *)g_hash_table_lookup(pres_ctx_oid_table, &pco);
280 /*--- Included file: packet-pres-fn.c ---*/
281 #line 1 "packet-pres-fn.c"
282 /*--- Fields for imported types ---*/
284 static int dissect_x410_mode_parameters_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
285 return dissect_rtse_RTORQapdu(TRUE, tvb, offset, pinfo, tree, hf_pres_x410_mode_parameters);
287 static int dissect_cPR_PPDU_x400_mode_parameters_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
288 return dissect_rtse_RTOACapdu(TRUE, tvb, offset, pinfo, tree, hf_pres_cPR_PPDU_x400_mode_parameters);
290 static int dissect_cPU_PPDU_x400_mode_parameters(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
291 return dissect_rtse_RTORJapdu(FALSE, tvb, offset, pinfo, tree, hf_pres_cPU_PPDU_x400_mode_parameters);
293 static int dissect_aRU_PPDU_x400_mode_parameters(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
294 return dissect_rtse_RTABapdu(FALSE, tvb, offset, pinfo, tree, hf_pres_aRU_PPDU_x400_mode_parameters);
298 static const value_string pres_T_mode_value_vals[] = {
299 { 0, "x410-1984-mode" },
300 { 1, "normal-mode" },
306 dissect_pres_T_mode_value(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
307 offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
312 static int dissect_mode_value_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
313 return dissect_pres_T_mode_value(TRUE, tvb, offset, pinfo, tree, hf_pres_mode_value);
317 static const ber_sequence_t Mode_selector_set[] = {
318 { BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_mode_value_impl },
323 dissect_pres_Mode_selector(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
324 offset = dissect_ber_set(implicit_tag, pinfo, tree, tvb, offset,
325 Mode_selector_set, hf_index, ett_pres_Mode_selector);
329 static int dissect_mode_selector_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
330 return dissect_pres_Mode_selector(TRUE, tvb, offset, pinfo, tree, hf_pres_mode_selector);
334 static const asn_namedbit Protocol_version_bits[] = {
335 { 0, &hf_pres_Protocol_version_version_1, -1, -1, "version-1", NULL },
336 { 0, NULL, 0, 0, NULL, NULL }
340 dissect_pres_Protocol_version(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
341 offset = dissect_ber_bitstring(implicit_tag, pinfo, tree, tvb, offset,
342 Protocol_version_bits, hf_index, ett_pres_Protocol_version,
347 static int dissect_protocol_version_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
348 return dissect_pres_Protocol_version(TRUE, tvb, offset, pinfo, tree, hf_pres_protocol_version);
354 dissect_pres_Presentation_selector(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
355 offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index,
364 dissect_pres_Calling_presentation_selector(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
365 offset = dissect_pres_Presentation_selector(implicit_tag, tvb, offset, pinfo, tree, hf_index);
369 static int dissect_calling_presentation_selector_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
370 return dissect_pres_Calling_presentation_selector(TRUE, tvb, offset, pinfo, tree, hf_pres_calling_presentation_selector);
376 dissect_pres_Called_presentation_selector(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
377 offset = dissect_pres_Presentation_selector(implicit_tag, tvb, offset, pinfo, tree, hf_index);
381 static int dissect_called_presentation_selector_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
382 return dissect_pres_Called_presentation_selector(TRUE, tvb, offset, pinfo, tree, hf_pres_called_presentation_selector);
388 dissect_pres_Presentation_context_identifier(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
391 offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
392 &presentation_context_identifier);
396 session->pres_ctx_id = presentation_context_identifier;
402 static int dissect_initiators_nominated_context(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
403 return dissect_pres_Presentation_context_identifier(FALSE, tvb, offset, pinfo, tree, hf_pres_initiators_nominated_context);
405 static int dissect_responders_nominated_context(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
406 return dissect_pres_Presentation_context_identifier(FALSE, tvb, offset, pinfo, tree, hf_pres_responders_nominated_context);
408 static int dissect_presentation_context_identifier(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
409 return dissect_pres_Presentation_context_identifier(FALSE, tvb, offset, pinfo, tree, hf_pres_presentation_context_identifier);
411 static int dissect_Presentation_context_deletion_list_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
412 return dissect_pres_Presentation_context_identifier(FALSE, tvb, offset, pinfo, tree, hf_pres_Presentation_context_deletion_list_item);
418 dissect_pres_Abstract_syntax_name(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
419 offset = dissect_ber_object_identifier_str(implicit_tag, pinfo, tree, tvb, offset, hf_index, &abstract_syntax_name_oid);
423 static int dissect_abstract_syntax_name(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
424 return dissect_pres_Abstract_syntax_name(FALSE, tvb, offset, pinfo, tree, hf_pres_abstract_syntax_name);
426 static int dissect_abstract_syntax_name_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
427 return dissect_pres_Abstract_syntax_name(TRUE, tvb, offset, pinfo, tree, hf_pres_abstract_syntax_name);
433 dissect_pres_Transfer_syntax_name(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
434 offset = dissect_ber_object_identifier(implicit_tag, pinfo, tree, tvb, offset, hf_index, NULL);
438 static int dissect_transfer_syntax_name_list_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
439 return dissect_pres_Transfer_syntax_name(FALSE, tvb, offset, pinfo, tree, hf_pres_transfer_syntax_name_list_item);
441 static int dissect_transfer_syntax_name(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
442 return dissect_pres_Transfer_syntax_name(FALSE, tvb, offset, pinfo, tree, hf_pres_transfer_syntax_name);
444 static int dissect_transfer_syntax_name_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
445 return dissect_pres_Transfer_syntax_name(TRUE, tvb, offset, pinfo, tree, hf_pres_transfer_syntax_name);
449 static const ber_sequence_t SEQUENCE_OF_Transfer_syntax_name_sequence_of[1] = {
450 { BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_transfer_syntax_name_list_item },
454 dissect_pres_SEQUENCE_OF_Transfer_syntax_name(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
455 offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
456 SEQUENCE_OF_Transfer_syntax_name_sequence_of, hf_index, ett_pres_SEQUENCE_OF_Transfer_syntax_name);
460 static int dissect_transfer_syntax_name_list(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
461 return dissect_pres_SEQUENCE_OF_Transfer_syntax_name(FALSE, tvb, offset, pinfo, tree, hf_pres_transfer_syntax_name_list);
465 static const ber_sequence_t Context_list_item_sequence[] = {
466 { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_presentation_context_identifier },
467 { BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_abstract_syntax_name },
468 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_transfer_syntax_name_list },
473 dissect_pres_Context_list_item(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
475 abstract_syntax_name_oid=NULL;
477 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
478 Context_list_item_sequence, hf_index, ett_pres_Context_list_item);
481 register_ctx_id_and_oid(pinfo, presentation_context_identifier, abstract_syntax_name_oid);
485 static int dissect_Context_list_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
486 return dissect_pres_Context_list_item(FALSE, tvb, offset, pinfo, tree, hf_pres_Context_list_item);
490 static const ber_sequence_t Context_list_sequence_of[1] = {
491 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_Context_list_item },
495 dissect_pres_Context_list(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
496 offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
497 Context_list_sequence_of, hf_index, ett_pres_Context_list);
505 dissect_pres_Presentation_context_definition_list(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
506 offset = dissect_pres_Context_list(implicit_tag, tvb, offset, pinfo, tree, hf_index);
510 static int dissect_presentation_context_definition_list_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
511 return dissect_pres_Presentation_context_definition_list(TRUE, tvb, offset, pinfo, tree, hf_pres_presentation_context_definition_list);
515 static const ber_sequence_t Default_context_name_sequence[] = {
516 { BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_abstract_syntax_name_impl },
517 { BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_transfer_syntax_name_impl },
522 dissect_pres_Default_context_name(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
523 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
524 Default_context_name_sequence, hf_index, ett_pres_Default_context_name);
528 static int dissect_default_context_name_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
529 return dissect_pres_Default_context_name(TRUE, tvb, offset, pinfo, tree, hf_pres_default_context_name);
533 static const asn_namedbit Presentation_requirements_bits[] = {
534 { 0, &hf_pres_Presentation_requirements_context_management, -1, -1, "context-management", NULL },
535 { 1, &hf_pres_Presentation_requirements_restoration, -1, -1, "restoration", NULL },
536 { 0, NULL, 0, 0, NULL, NULL }
540 dissect_pres_Presentation_requirements(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
541 offset = dissect_ber_bitstring(implicit_tag, pinfo, tree, tvb, offset,
542 Presentation_requirements_bits, hf_index, ett_pres_Presentation_requirements,
547 static int dissect_presentation_requirements_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
548 return dissect_pres_Presentation_requirements(TRUE, tvb, offset, pinfo, tree, hf_pres_presentation_requirements);
552 static const asn_namedbit User_session_requirements_bits[] = {
553 { 0, &hf_pres_User_session_requirements_half_duplex, -1, -1, "half-duplex", NULL },
554 { 1, &hf_pres_User_session_requirements_duplex, -1, -1, "duplex", NULL },
555 { 2, &hf_pres_User_session_requirements_expedited_data, -1, -1, "expedited-data", NULL },
556 { 3, &hf_pres_User_session_requirements_minor_synchronize, -1, -1, "minor-synchronize", NULL },
557 { 4, &hf_pres_User_session_requirements_major_synchronize, -1, -1, "major-synchronize", NULL },
558 { 5, &hf_pres_User_session_requirements_resynchronize, -1, -1, "resynchronize", NULL },
559 { 6, &hf_pres_User_session_requirements_activity_management, -1, -1, "activity-management", NULL },
560 { 7, &hf_pres_User_session_requirements_negotiated_release, -1, -1, "negotiated-release", NULL },
561 { 8, &hf_pres_User_session_requirements_capability_data, -1, -1, "capability-data", NULL },
562 { 9, &hf_pres_User_session_requirements_exceptions, -1, -1, "exceptions", NULL },
563 { 10, &hf_pres_User_session_requirements_typed_data, -1, -1, "typed-data", NULL },
564 { 11, &hf_pres_User_session_requirements_symmetric_synchronize, -1, -1, "symmetric-synchronize", NULL },
565 { 12, &hf_pres_User_session_requirements_data_separation, -1, -1, "data-separation", NULL },
566 { 0, NULL, 0, 0, NULL, NULL }
570 dissect_pres_User_session_requirements(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
571 offset = dissect_ber_bitstring(implicit_tag, pinfo, tree, tvb, offset,
572 User_session_requirements_bits, hf_index, ett_pres_User_session_requirements,
577 static int dissect_user_session_requirements_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
578 return dissect_pres_User_session_requirements(TRUE, tvb, offset, pinfo, tree, hf_pres_user_session_requirements);
582 static const asn_namedbit Protocol_options_bits[] = {
583 { 0, &hf_pres_Protocol_options_nominated_context, -1, -1, "nominated-context", NULL },
584 { 1, &hf_pres_Protocol_options_short_encoding, -1, -1, "short-encoding", NULL },
585 { 2, &hf_pres_Protocol_options_packed_encoding_rules, -1, -1, "packed-encoding-rules", NULL },
586 { 0, NULL, 0, 0, NULL, NULL }
590 dissect_pres_Protocol_options(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
591 offset = dissect_ber_bitstring(implicit_tag, pinfo, tree, tvb, offset,
592 Protocol_options_bits, hf_index, ett_pres_Protocol_options,
597 static int dissect_protocol_options(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
598 return dissect_pres_Protocol_options(FALSE, tvb, offset, pinfo, tree, hf_pres_protocol_options);
602 static const ber_sequence_t T_extensions_sequence[] = {
607 dissect_pres_T_extensions(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
608 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
609 T_extensions_sequence, hf_index, ett_pres_T_extensions);
613 static int dissect_extensions(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
614 return dissect_pres_T_extensions(FALSE, tvb, offset, pinfo, tree, hf_pres_extensions);
620 dissect_pres_Simply_encoded_data(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
621 offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index,
626 static int dissect_simply_encoded_data_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
627 return dissect_pres_Simply_encoded_data(TRUE, tvb, offset, pinfo, tree, hf_pres_simply_encoded_data);
633 dissect_pres_T_single_ASN1_type(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
639 oid=find_oid_by_pres_ctx_id(pinfo, presentation_context_identifier);
641 next_tvb = tvb_new_subset(tvb, offset, -1, -1);
642 call_ber_oid_callback(oid, next_tvb, offset, pinfo, global_tree);
644 proto_tree_add_text(tree, tvb, offset, -1,"dissector is not available");
645 offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index,
653 static int dissect_single_ASN1_type_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
654 return dissect_pres_T_single_ASN1_type(TRUE, tvb, offset, pinfo, tree, hf_pres_single_ASN1_type);
660 dissect_pres_T_octet_aligned(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
666 oid=find_oid_by_pres_ctx_id(pinfo, presentation_context_identifier);
668 next_tvb = tvb_new_subset(tvb, offset, -1, -1);
669 call_ber_oid_callback(oid, next_tvb, offset, pinfo, global_tree);
671 proto_tree_add_text(tree, tvb, offset, -1,"dissector is not available");
672 offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index,
682 static int dissect_octet_aligned_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
683 return dissect_pres_T_octet_aligned(TRUE, tvb, offset, pinfo, tree, hf_pres_octet_aligned);
689 dissect_pres_BIT_STRING(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
690 offset = dissect_ber_bitstring(implicit_tag, pinfo, tree, tvb, offset,
696 static int dissect_arbitrary_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
697 return dissect_pres_BIT_STRING(TRUE, tvb, offset, pinfo, tree, hf_pres_arbitrary);
701 static const value_string pres_T_presentation_data_values_vals[] = {
702 { 0, "single-ASN1-type" },
703 { 1, "octet-aligned" },
708 static const ber_choice_t T_presentation_data_values_choice[] = {
709 { 0, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_single_ASN1_type_impl },
710 { 1, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_octet_aligned_impl },
711 { 2, BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_arbitrary_impl },
716 dissect_pres_T_presentation_data_values(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
717 offset = dissect_ber_choice(pinfo, tree, tvb, offset,
718 T_presentation_data_values_choice, hf_index, ett_pres_T_presentation_data_values,
723 static int dissect_presentation_data_values(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
724 return dissect_pres_T_presentation_data_values(FALSE, tvb, offset, pinfo, tree, hf_pres_presentation_data_values);
728 static const ber_sequence_t PDV_list_sequence[] = {
729 { BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_transfer_syntax_name },
730 { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_presentation_context_identifier },
731 { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_presentation_data_values },
736 dissect_pres_PDV_list(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
737 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
738 PDV_list_sequence, hf_index, ett_pres_PDV_list);
742 static int dissect_Fully_encoded_data_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
743 return dissect_pres_PDV_list(FALSE, tvb, offset, pinfo, tree, hf_pres_Fully_encoded_data_item);
747 static const ber_sequence_t Fully_encoded_data_sequence_of[1] = {
748 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_Fully_encoded_data_item },
752 dissect_pres_Fully_encoded_data(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
753 offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
754 Fully_encoded_data_sequence_of, hf_index, ett_pres_Fully_encoded_data);
758 static int dissect_fully_encoded_data_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
759 return dissect_pres_Fully_encoded_data(TRUE, tvb, offset, pinfo, tree, hf_pres_fully_encoded_data);
763 static const value_string pres_User_data_vals[] = {
764 { 0, "simply-encoded-data" },
765 { 1, "fully-encoded-data" },
769 static const ber_choice_t User_data_choice[] = {
770 { 0, BER_CLASS_APP, 0, BER_FLAGS_IMPLTAG, dissect_simply_encoded_data_impl },
771 { 1, BER_CLASS_APP, 1, BER_FLAGS_IMPLTAG, dissect_fully_encoded_data_impl },
776 dissect_pres_User_data(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
777 offset = dissect_ber_choice(pinfo, tree, tvb, offset,
778 User_data_choice, hf_index, ett_pres_User_data,
783 static int dissect_user_data(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
784 return dissect_pres_User_data(FALSE, tvb, offset, pinfo, tree, hf_pres_user_data);
786 static int dissect_ttdPPDU(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
787 return dissect_pres_User_data(FALSE, tvb, offset, pinfo, tree, hf_pres_ttdPPDU);
791 static const ber_sequence_t T_normal_mode_parameters_sequence[] = {
792 { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_protocol_version_impl },
793 { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_calling_presentation_selector_impl },
794 { BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_called_presentation_selector_impl },
795 { BER_CLASS_CON, 4, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_presentation_context_definition_list_impl },
796 { BER_CLASS_CON, 6, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_default_context_name_impl },
797 { BER_CLASS_CON, 8, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_presentation_requirements_impl },
798 { BER_CLASS_CON, 9, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_user_session_requirements_impl },
799 { BER_CLASS_CON, 11, BER_FLAGS_OPTIONAL, dissect_protocol_options },
800 { BER_CLASS_CON, 12, BER_FLAGS_OPTIONAL, dissect_initiators_nominated_context },
801 { BER_CLASS_CON, 14, BER_FLAGS_OPTIONAL, dissect_extensions },
802 { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_user_data },
807 dissect_pres_T_normal_mode_parameters(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
808 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
809 T_normal_mode_parameters_sequence, hf_index, ett_pres_T_normal_mode_parameters);
813 static int dissect_normal_mode_parameters_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
814 return dissect_pres_T_normal_mode_parameters(TRUE, tvb, offset, pinfo, tree, hf_pres_normal_mode_parameters);
818 static const ber_sequence_t CP_type_set[] = {
819 { BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_mode_selector_impl },
820 { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_x410_mode_parameters_impl },
821 { BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_normal_mode_parameters_impl },
826 dissect_pres_CP_type(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
827 offset = dissect_ber_set(implicit_tag, pinfo, tree, tvb, offset,
828 CP_type_set, hf_index, ett_pres_CP_type);
836 dissect_pres_CPC_type(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
837 offset = dissect_pres_User_data(implicit_tag, tvb, offset, pinfo, tree, hf_index);
845 dissect_pres_Responding_presentation_selector(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
846 offset = dissect_pres_Presentation_selector(implicit_tag, tvb, offset, pinfo, tree, hf_index);
850 static int dissect_responding_presentation_selector_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
851 return dissect_pres_Responding_presentation_selector(TRUE, tvb, offset, pinfo, tree, hf_pres_responding_presentation_selector);
855 static const value_string pres_Result_vals[] = {
857 { 1, "user-rejection" },
858 { 2, "provider-rejection" },
864 dissect_pres_Result(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
865 offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
870 static int dissect_result_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
871 return dissect_pres_Result(TRUE, tvb, offset, pinfo, tree, hf_pres_result);
875 static const value_string pres_T_provider_reason_vals[] = {
876 { 0, "reason-not-specified" },
877 { 1, "abstract-syntax-not-supported" },
878 { 2, "proposed-transfer-syntaxes-not-supported" },
879 { 3, "local-limit-on-DCS-exceeded" },
885 dissect_pres_T_provider_reason(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
886 offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
891 static int dissect_provider_reason_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
892 return dissect_pres_T_provider_reason(TRUE, tvb, offset, pinfo, tree, hf_pres_provider_reason);
896 static const ber_sequence_t Result_list_item_sequence[] = {
897 { BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_result_impl },
898 { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_transfer_syntax_name_impl },
899 { BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_provider_reason_impl },
904 dissect_pres_Result_list_item(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
905 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
906 Result_list_item_sequence, hf_index, ett_pres_Result_list_item);
910 static int dissect_Result_list_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
911 return dissect_pres_Result_list_item(FALSE, tvb, offset, pinfo, tree, hf_pres_Result_list_item);
915 static const ber_sequence_t Result_list_sequence_of[1] = {
916 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_Result_list_item },
920 dissect_pres_Result_list(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
921 offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
922 Result_list_sequence_of, hf_index, ett_pres_Result_list);
930 dissect_pres_Presentation_context_definition_result_list(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
931 offset = dissect_pres_Result_list(implicit_tag, tvb, offset, pinfo, tree, hf_index);
935 static int dissect_presentation_context_definition_result_list_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
936 return dissect_pres_Presentation_context_definition_result_list(TRUE, tvb, offset, pinfo, tree, hf_pres_presentation_context_definition_result_list);
940 static const ber_sequence_t T_CPA_PPDU_normal_mode_parameters_sequence[] = {
941 { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_protocol_version_impl },
942 { BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_responding_presentation_selector_impl },
943 { BER_CLASS_CON, 5, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_presentation_context_definition_result_list_impl },
944 { BER_CLASS_CON, 8, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_presentation_requirements_impl },
945 { BER_CLASS_CON, 9, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_user_session_requirements_impl },
946 { BER_CLASS_CON, 11, BER_FLAGS_OPTIONAL, dissect_protocol_options },
947 { BER_CLASS_CON, 13, BER_FLAGS_OPTIONAL, dissect_responders_nominated_context },
948 { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_user_data },
953 dissect_pres_T_CPA_PPDU_normal_mode_parameters(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
954 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
955 T_CPA_PPDU_normal_mode_parameters_sequence, hf_index, ett_pres_T_CPA_PPDU_normal_mode_parameters);
959 static int dissect_cPU_PPDU_normal_mode_parameters_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
960 return dissect_pres_T_CPA_PPDU_normal_mode_parameters(TRUE, tvb, offset, pinfo, tree, hf_pres_cPU_PPDU_normal_mode_parameters);
964 static const ber_sequence_t CPA_PPDU_set[] = {
965 { BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_mode_selector_impl },
966 { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_cPR_PPDU_x400_mode_parameters_impl },
967 { BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_cPU_PPDU_normal_mode_parameters_impl },
972 dissect_pres_CPA_PPDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
973 offset = dissect_ber_set(implicit_tag, pinfo, tree, tvb, offset,
974 CPA_PPDU_set, hf_index, ett_pres_CPA_PPDU);
982 dissect_pres_Default_context_result(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
983 offset = dissect_pres_Result(implicit_tag, tvb, offset, pinfo, tree, hf_index);
987 static int dissect_default_context_result_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
988 return dissect_pres_Default_context_result(TRUE, tvb, offset, pinfo, tree, hf_pres_default_context_result);
992 static const value_string pres_Provider_reason_vals[] = {
993 { 0, "reason-not-specified" },
994 { 1, "temporary-congestion" },
995 { 2, "local-limit-exceeded" },
996 { 3, "called-presentation-address-unknown" },
997 { 4, "protocol-version-not-supported" },
998 { 5, "default-context-not-supported" },
999 { 6, "user-data-not-readable" },
1000 { 7, "no-PSAP-available" },
1006 dissect_pres_Provider_reason(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1007 offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
1012 static int dissect_cPR_PPDU__provider_reason_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1013 return dissect_pres_Provider_reason(TRUE, tvb, offset, pinfo, tree, hf_pres_cPR_PPDU__provider_reason);
1017 static const ber_sequence_t T_CPR_PPDU_normal_mode_parameters_sequence[] = {
1018 { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_protocol_version_impl },
1019 { BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_responding_presentation_selector_impl },
1020 { BER_CLASS_CON, 5, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_presentation_context_definition_result_list_impl },
1021 { BER_CLASS_CON, 7, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_default_context_result_impl },
1022 { BER_CLASS_CON, 10, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_cPR_PPDU__provider_reason_impl },
1023 { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_user_data },
1028 dissect_pres_T_CPR_PPDU_normal_mode_parameters(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1029 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
1030 T_CPR_PPDU_normal_mode_parameters_sequence, hf_index, ett_pres_T_CPR_PPDU_normal_mode_parameters);
1034 static int dissect_cPR_PPDU_normal_mode_parameters(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1035 return dissect_pres_T_CPR_PPDU_normal_mode_parameters(FALSE, tvb, offset, pinfo, tree, hf_pres_cPR_PPDU_normal_mode_parameters);
1039 static const value_string pres_CPR_PPDU_vals[] = {
1040 { 0, "x400-mode-parameters" },
1041 { 1, "normal-mode-parameters" },
1045 static const ber_choice_t CPR_PPDU_choice[] = {
1046 { 0, BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_cPU_PPDU_x400_mode_parameters },
1047 { 1, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cPR_PPDU_normal_mode_parameters },
1048 { 0, 0, 0, 0, NULL }
1052 dissect_pres_CPR_PPDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1053 offset = dissect_ber_choice(pinfo, tree, tvb, offset,
1054 CPR_PPDU_choice, hf_index, ett_pres_CPR_PPDU,
1061 static const ber_sequence_t Presentation_context_identifier_list_item_sequence[] = {
1062 { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_presentation_context_identifier },
1063 { BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_transfer_syntax_name },
1068 dissect_pres_Presentation_context_identifier_list_item(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1069 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
1070 Presentation_context_identifier_list_item_sequence, hf_index, ett_pres_Presentation_context_identifier_list_item);
1074 static int dissect_Presentation_context_identifier_list_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1075 return dissect_pres_Presentation_context_identifier_list_item(FALSE, tvb, offset, pinfo, tree, hf_pres_Presentation_context_identifier_list_item);
1079 static const ber_sequence_t Presentation_context_identifier_list_sequence_of[1] = {
1080 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_Presentation_context_identifier_list_item },
1084 dissect_pres_Presentation_context_identifier_list(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1085 offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
1086 Presentation_context_identifier_list_sequence_of, hf_index, ett_pres_Presentation_context_identifier_list);
1090 static int dissect_presentation_context_identifier_list_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1091 return dissect_pres_Presentation_context_identifier_list(TRUE, tvb, offset, pinfo, tree, hf_pres_presentation_context_identifier_list);
1095 static const ber_sequence_t T_ARU_PPDU_normal_mode_parameters_sequence[] = {
1096 { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_presentation_context_identifier_list_impl },
1097 { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_user_data },
1102 dissect_pres_T_ARU_PPDU_normal_mode_parameters(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1103 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
1104 T_ARU_PPDU_normal_mode_parameters_sequence, hf_index, ett_pres_T_ARU_PPDU_normal_mode_parameters);
1108 static int dissect_aRU_PPDU_normal_mode_parameters_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1109 return dissect_pres_T_ARU_PPDU_normal_mode_parameters(TRUE, tvb, offset, pinfo, tree, hf_pres_aRU_PPDU_normal_mode_parameters);
1113 static const value_string pres_ARU_PPDU_vals[] = {
1114 { 0, "x400-mode-parameters" },
1115 { 1, "normal-mode-parameters" },
1119 static const ber_choice_t ARU_PPDU_choice[] = {
1120 { 0, BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_aRU_PPDU_x400_mode_parameters },
1121 { 1, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_aRU_PPDU_normal_mode_parameters_impl },
1122 { 0, 0, 0, 0, NULL }
1126 dissect_pres_ARU_PPDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1127 offset = dissect_ber_choice(pinfo, tree, tvb, offset,
1128 ARU_PPDU_choice, hf_index, ett_pres_ARU_PPDU,
1133 static int dissect_aru_ppdu(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1134 return dissect_pres_ARU_PPDU(FALSE, tvb, offset, pinfo, tree, hf_pres_aru_ppdu);
1138 static const value_string pres_Abort_reason_vals[] = {
1139 { 0, "reason-not-specified" },
1140 { 1, "unrecognized-ppdu" },
1141 { 2, "unexpected-ppdu" },
1142 { 3, "unexpected-session-service-primitive" },
1143 { 4, "unrecognized-ppdu-parameter" },
1144 { 5, "unexpected-ppdu-parameter" },
1145 { 6, "invalid-ppdu-parameter-value" },
1151 dissect_pres_Abort_reason(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1152 offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
1157 static int dissect_aRU_PPDU_provider_reason_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1158 return dissect_pres_Abort_reason(TRUE, tvb, offset, pinfo, tree, hf_pres_aRU_PPDU_provider_reason);
1162 static const value_string pres_Event_identifier_vals[] = {
1177 { 14, "s-release-indication" },
1178 { 15, "s-release-confirm" },
1179 { 16, "s-token-give-indication" },
1180 { 17, "s-token-please-indication" },
1181 { 18, "s-control-give-indication" },
1182 { 19, "s-sync-minor-indication" },
1183 { 20, "s-sync-minor-confirm" },
1184 { 21, "s-sync-major-indication" },
1185 { 22, "s-sync-major-confirm" },
1186 { 23, "s-p-exception-report-indication" },
1187 { 24, "s-u-exception-report-indication" },
1188 { 25, "s-activity-start-indication" },
1189 { 26, "s-activity-resume-indication" },
1190 { 27, "s-activity-interrupt-indication" },
1191 { 28, "s-activity-interrupt-confirm" },
1192 { 29, "s-activity-discard-indication" },
1193 { 30, "s-activity-discard-confirm" },
1194 { 31, "s-activity-end-indication" },
1195 { 32, "s-activity-end-confirm" },
1201 dissect_pres_Event_identifier(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1202 offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
1207 static int dissect_event_identifier_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1208 return dissect_pres_Event_identifier(TRUE, tvb, offset, pinfo, tree, hf_pres_event_identifier);
1212 static const ber_sequence_t ARP_PPDU_sequence[] = {
1213 { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_aRU_PPDU_provider_reason_impl },
1214 { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_event_identifier_impl },
1219 dissect_pres_ARP_PPDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1220 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
1221 ARP_PPDU_sequence, hf_index, ett_pres_ARP_PPDU);
1225 static int dissect_arp_ppdu(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1226 return dissect_pres_ARP_PPDU(FALSE, tvb, offset, pinfo, tree, hf_pres_arp_ppdu);
1230 static const value_string pres_Abort_type_vals[] = {
1236 static const ber_choice_t Abort_type_choice[] = {
1237 { 0, BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_aru_ppdu },
1238 { 1, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_arp_ppdu },
1239 { 0, 0, 0, 0, NULL }
1243 dissect_pres_Abort_type(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1244 offset = dissect_ber_choice(pinfo, tree, tvb, offset,
1245 Abort_type_choice, hf_index, ett_pres_Abort_type,
1254 dissect_pres_Presentation_context_addition_list(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1255 offset = dissect_pres_Context_list(implicit_tag, tvb, offset, pinfo, tree, hf_index);
1259 static int dissect_presentation_context_addition_list_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1260 return dissect_pres_Presentation_context_addition_list(TRUE, tvb, offset, pinfo, tree, hf_pres_presentation_context_addition_list);
1264 static const ber_sequence_t Presentation_context_deletion_list_sequence_of[1] = {
1265 { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_Presentation_context_deletion_list_item },
1269 dissect_pres_Presentation_context_deletion_list(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1270 offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
1271 Presentation_context_deletion_list_sequence_of, hf_index, ett_pres_Presentation_context_deletion_list);
1275 static int dissect_presentation_context_deletion_list_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1276 return dissect_pres_Presentation_context_deletion_list(TRUE, tvb, offset, pinfo, tree, hf_pres_presentation_context_deletion_list);
1280 static const ber_sequence_t AC_PPDU_sequence[] = {
1281 { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_presentation_context_addition_list_impl },
1282 { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_presentation_context_deletion_list_impl },
1283 { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_user_data },
1288 dissect_pres_AC_PPDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1289 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
1290 AC_PPDU_sequence, hf_index, ett_pres_AC_PPDU);
1294 static int dissect_acPPDU_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1295 return dissect_pres_AC_PPDU(TRUE, tvb, offset, pinfo, tree, hf_pres_acPPDU);
1301 dissect_pres_Presentation_context_addition_result_list(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1302 offset = dissect_pres_Result_list(implicit_tag, tvb, offset, pinfo, tree, hf_index);
1306 static int dissect_presentation_context_addition_result_list_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1307 return dissect_pres_Presentation_context_addition_result_list(TRUE, tvb, offset, pinfo, tree, hf_pres_presentation_context_addition_result_list);
1311 static const value_string pres_Presentation_context_deletion_result_list_item_vals[] = {
1312 { 0, "acceptance" },
1313 { 1, "user-rejection" },
1319 dissect_pres_Presentation_context_deletion_result_list_item(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1320 offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
1325 static int dissect_Presentation_context_deletion_result_list_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1326 return dissect_pres_Presentation_context_deletion_result_list_item(FALSE, tvb, offset, pinfo, tree, hf_pres_Presentation_context_deletion_result_list_item);
1330 static const ber_sequence_t Presentation_context_deletion_result_list_sequence_of[1] = {
1331 { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_Presentation_context_deletion_result_list_item },
1335 dissect_pres_Presentation_context_deletion_result_list(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1336 offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
1337 Presentation_context_deletion_result_list_sequence_of, hf_index, ett_pres_Presentation_context_deletion_result_list);
1341 static int dissect_presentation_context_deletion_result_list_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1342 return dissect_pres_Presentation_context_deletion_result_list(TRUE, tvb, offset, pinfo, tree, hf_pres_presentation_context_deletion_result_list);
1346 static const ber_sequence_t ACA_PPDU_sequence[] = {
1347 { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_presentation_context_addition_result_list_impl },
1348 { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_presentation_context_deletion_result_list_impl },
1349 { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_user_data },
1354 dissect_pres_ACA_PPDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1355 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
1356 ACA_PPDU_sequence, hf_index, ett_pres_ACA_PPDU);
1360 static int dissect_acaPPDU_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1361 return dissect_pres_ACA_PPDU(TRUE, tvb, offset, pinfo, tree, hf_pres_acaPPDU);
1365 static const value_string pres_Typed_data_type_vals[] = {
1372 static const ber_choice_t Typed_data_type_choice[] = {
1373 { 0, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_acPPDU_impl },
1374 { 1, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_acaPPDU_impl },
1375 { 2, BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_ttdPPDU },
1376 { 0, 0, 0, 0, NULL }
1380 dissect_pres_Typed_data_type(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1381 offset = dissect_ber_choice(pinfo, tree, tvb, offset,
1382 Typed_data_type_choice, hf_index, ett_pres_Typed_data_type,
1389 static const ber_sequence_t RS_PPDU_sequence[] = {
1390 { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_presentation_context_identifier_list_impl },
1391 { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_user_data },
1396 dissect_pres_RS_PPDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1397 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
1398 RS_PPDU_sequence, hf_index, ett_pres_RS_PPDU);
1404 static const ber_sequence_t RSA_PPDU_sequence[] = {
1405 { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_presentation_context_identifier_list_impl },
1406 { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_user_data },
1411 dissect_pres_RSA_PPDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1412 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
1413 RSA_PPDU_sequence, hf_index, ett_pres_RSA_PPDU);
1419 /*--- End of included file: packet-pres-fn.c ---*/
1420 #line 150 "packet-pres-template.c"
1427 dissect_ppdu(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
1430 proto_tree *pres_tree = NULL;
1432 /* do we have spdu type from the session dissector? */
1433 if( !pinfo->private_data ){
1435 proto_tree_add_text(tree, tvb, offset, -1,
1436 "Internal error:can't get spdu type from session dissector.");
1440 session = ( (struct SESSION_DATA_STRUCTURE*)(pinfo->private_data) );
1441 if(session->spdu_type == 0 ){
1443 proto_tree_add_text(tree, tvb, offset, -1,
1444 "Internal error:wrong spdu type %x from session dissector.",session->spdu_type);
1449 /* get type of tag */
1450 s_type = tvb_get_guint8(tvb, offset);
1451 /* set up type of Ppdu */
1452 if (check_col(pinfo->cinfo, COL_INFO))
1453 col_add_str(pinfo->cinfo, COL_INFO,
1454 val_to_str(session->spdu_type, ses_vals, "Unknown Ppdu type (0x%02x)"));
1456 ti = proto_tree_add_item(tree, proto_pres, tvb, offset, -1,
1458 pres_tree = proto_item_add_subtree(ti, ett_pres);
1461 switch(session->spdu_type){
1462 case SES_CONNECTION_REQUEST:
1463 offset = dissect_pres_CP_type(FALSE, tvb, offset, pinfo, pres_tree, hf_pres_CP_type);
1465 case SES_CONNECTION_ACCEPT:
1466 offset = dissect_pres_CPA_PPDU(FALSE, tvb, offset, pinfo, pres_tree, hf_pres_CPA_PPDU);
1469 case SES_ABORT_ACCEPT:
1470 offset = dissect_pres_Abort_type(FALSE, tvb, offset, pinfo, pres_tree, hf_pres_Abort_type);
1472 case SES_DATA_TRANSFER:
1473 offset = dissect_pres_CPC_type(FALSE, tvb, offset, pinfo, pres_tree, hf_pres_user_data);
1475 case SES_TYPED_DATA:
1476 offset = dissect_pres_Typed_data_type(FALSE, tvb, offset, pinfo, pres_tree, hf_pres_Typed_data_type);
1478 case SES_RESYNCHRONIZE:
1479 offset = dissect_pres_RS_PPDU(FALSE, tvb, offset, pinfo, pres_tree, -1);
1481 case SES_RESYNCHRONIZE_ACK:
1482 offset = dissect_pres_RSA_PPDU(FALSE, tvb, offset, pinfo, pres_tree, -1);
1485 offset = dissect_pres_CPR_PPDU(FALSE, tvb, offset, pinfo, pres_tree, hf_pres_CPR_PPDU);
1488 offset = dissect_pres_CPC_type(FALSE, tvb, offset, pinfo, pres_tree, hf_pres_user_data);
1496 dissect_pres(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
1498 int offset = 0, old_offset;
1499 /* first, try to check length */
1500 /* do we have at least 4 bytes */
1501 if (!tvb_bytes_exist(tvb, 0, 4)){
1502 proto_tree_add_text(parent_tree, tvb, offset,
1503 tvb_reported_length_remaining(tvb,offset),"User data");
1504 return; /* no, it isn't a presentation PDU */
1507 /* we can't make any additional checking here */
1508 /* postpone it before dissector will have more information */
1510 if (check_col(pinfo->cinfo, COL_PROTOCOL))
1511 col_set_str(pinfo->cinfo, COL_PROTOCOL, "PRES");
1512 if (check_col(pinfo->cinfo, COL_INFO))
1513 col_clear(pinfo->cinfo, COL_INFO);
1514 /* save pointers for calling the acse dissector */
1515 global_tree = parent_tree;
1516 global_pinfo = pinfo;
1518 while (tvb_reported_length_remaining(tvb, offset) > 0){
1519 old_offset = offset;
1520 offset = dissect_ppdu(tvb, offset, pinfo, parent_tree);
1521 if(offset <= old_offset){
1522 proto_tree_add_text(parent_tree, tvb, offset, -1,"Invalid offset");
1523 THROW(ReportedBoundsError);
1529 /*--- proto_register_pres -------------------------------------------*/
1530 void proto_register_pres(void) {
1532 /* List of fields */
1533 static hf_register_info hf[] = {
1535 { "CP-type", "pres.cptype",
1536 FT_NONE, BASE_NONE, NULL, 0,
1538 { &hf_pres_CPA_PPDU,
1539 { "CPA-PPDU", "pres.cpapdu",
1540 FT_NONE, BASE_NONE, NULL, 0,
1542 { &hf_pres_Abort_type,
1543 { "Abort type", "pres.aborttype",
1544 FT_UINT32, BASE_DEC, VALS(pres_Abort_type_vals), 0,
1546 { &hf_pres_CPR_PPDU,
1547 { "CPR-PPDU", "pres.cprtype",
1548 FT_UINT32, BASE_DEC, VALS(pres_CPR_PPDU_vals), 0,
1550 { &hf_pres_Typed_data_type,
1551 { "Typed data type", "pres.Typed_data_type",
1552 FT_UINT32, BASE_DEC, VALS(pres_Typed_data_type_vals), 0,
1557 /*--- Included file: packet-pres-hfarr.c ---*/
1558 #line 1 "packet-pres-hfarr.c"
1559 { &hf_pres_mode_selector,
1560 { "mode-selector", "pres.mode_selector",
1561 FT_NONE, BASE_NONE, NULL, 0,
1563 { &hf_pres_x410_mode_parameters,
1564 { "x410-mode-parameters", "pres.x410_mode_parameters",
1565 FT_NONE, BASE_NONE, NULL, 0,
1566 "CP-type/x410-mode-parameters", HFILL }},
1567 { &hf_pres_normal_mode_parameters,
1568 { "normal-mode-parameters", "pres.normal_mode_parameters",
1569 FT_NONE, BASE_NONE, NULL, 0,
1570 "CP-type/normal-mode-parameters", HFILL }},
1571 { &hf_pres_protocol_version,
1572 { "protocol-version", "pres.protocol_version",
1573 FT_BYTES, BASE_HEX, NULL, 0,
1575 { &hf_pres_calling_presentation_selector,
1576 { "calling-presentation-selector", "pres.calling_presentation_selector",
1577 FT_BYTES, BASE_HEX, NULL, 0,
1578 "CP-type/normal-mode-parameters/calling-presentation-selector", HFILL }},
1579 { &hf_pres_called_presentation_selector,
1580 { "called-presentation-selector", "pres.called_presentation_selector",
1581 FT_BYTES, BASE_HEX, NULL, 0,
1582 "CP-type/normal-mode-parameters/called-presentation-selector", HFILL }},
1583 { &hf_pres_presentation_context_definition_list,
1584 { "presentation-context-definition-list", "pres.presentation_context_definition_list",
1585 FT_UINT32, BASE_DEC, NULL, 0,
1586 "CP-type/normal-mode-parameters/presentation-context-definition-list", HFILL }},
1587 { &hf_pres_default_context_name,
1588 { "default-context-name", "pres.default_context_name",
1589 FT_NONE, BASE_NONE, NULL, 0,
1590 "CP-type/normal-mode-parameters/default-context-name", HFILL }},
1591 { &hf_pres_presentation_requirements,
1592 { "presentation-requirements", "pres.presentation_requirements",
1593 FT_BYTES, BASE_HEX, NULL, 0,
1595 { &hf_pres_user_session_requirements,
1596 { "user-session-requirements", "pres.user_session_requirements",
1597 FT_BYTES, BASE_HEX, NULL, 0,
1599 { &hf_pres_protocol_options,
1600 { "protocol-options", "pres.protocol_options",
1601 FT_BYTES, BASE_HEX, NULL, 0,
1603 { &hf_pres_initiators_nominated_context,
1604 { "initiators-nominated-context", "pres.initiators_nominated_context",
1605 FT_INT32, BASE_DEC, NULL, 0,
1606 "CP-type/normal-mode-parameters/initiators-nominated-context", HFILL }},
1607 { &hf_pres_extensions,
1608 { "extensions", "pres.extensions",
1609 FT_NONE, BASE_NONE, NULL, 0,
1610 "CP-type/normal-mode-parameters/extensions", HFILL }},
1611 { &hf_pres_user_data,
1612 { "user-data", "pres.user_data",
1613 FT_UINT32, BASE_DEC, VALS(pres_User_data_vals), 0,
1615 { &hf_pres_cPR_PPDU_x400_mode_parameters,
1616 { "x410-mode-parameters", "pres.x410_mode_parameters",
1617 FT_NONE, BASE_NONE, NULL, 0,
1618 "CPA-PPDU/x410-mode-parameters", HFILL }},
1619 { &hf_pres_cPU_PPDU_normal_mode_parameters,
1620 { "normal-mode-parameters", "pres.normal_mode_parameters",
1621 FT_NONE, BASE_NONE, NULL, 0,
1622 "CPA-PPDU/normal-mode-parameters", HFILL }},
1623 { &hf_pres_responding_presentation_selector,
1624 { "responding-presentation-selector", "pres.responding_presentation_selector",
1625 FT_BYTES, BASE_HEX, NULL, 0,
1627 { &hf_pres_presentation_context_definition_result_list,
1628 { "presentation-context-definition-result-list", "pres.presentation_context_definition_result_list",
1629 FT_UINT32, BASE_DEC, NULL, 0,
1631 { &hf_pres_responders_nominated_context,
1632 { "responders-nominated-context", "pres.responders_nominated_context",
1633 FT_INT32, BASE_DEC, NULL, 0,
1634 "CPA-PPDU/normal-mode-parameters/responders-nominated-context", HFILL }},
1635 { &hf_pres_cPU_PPDU_x400_mode_parameters,
1636 { "x400-mode-parameters", "pres.x400_mode_parameters",
1637 FT_NONE, BASE_NONE, NULL, 0,
1638 "CPR-PPDU/x400-mode-parameters", HFILL }},
1639 { &hf_pres_cPR_PPDU_normal_mode_parameters,
1640 { "normal-mode-parameters", "pres.normal_mode_parameters",
1641 FT_NONE, BASE_NONE, NULL, 0,
1642 "CPR-PPDU/normal-mode-parameters", HFILL }},
1643 { &hf_pres_default_context_result,
1644 { "default-context-result", "pres.default_context_result",
1645 FT_INT32, BASE_DEC, VALS(pres_Result_vals), 0,
1646 "CPR-PPDU/normal-mode-parameters/default-context-result", HFILL }},
1647 { &hf_pres_cPR_PPDU__provider_reason,
1648 { "provider-reason", "pres.provider_reason",
1649 FT_INT32, BASE_DEC, VALS(pres_Provider_reason_vals), 0,
1650 "CPR-PPDU/normal-mode-parameters/provider-reason", HFILL }},
1651 { &hf_pres_aru_ppdu,
1652 { "aru-ppdu", "pres.aru_ppdu",
1653 FT_UINT32, BASE_DEC, VALS(pres_ARU_PPDU_vals), 0,
1654 "Abort-type/aru-ppdu", HFILL }},
1655 { &hf_pres_arp_ppdu,
1656 { "arp-ppdu", "pres.arp_ppdu",
1657 FT_NONE, BASE_NONE, NULL, 0,
1658 "Abort-type/arp-ppdu", HFILL }},
1659 { &hf_pres_aRU_PPDU_x400_mode_parameters,
1660 { "x400-mode-parameters", "pres.x400_mode_parameters",
1661 FT_NONE, BASE_NONE, NULL, 0,
1662 "ARU-PPDU/x400-mode-parameters", HFILL }},
1663 { &hf_pres_aRU_PPDU_normal_mode_parameters,
1664 { "normal-mode-parameters", "pres.normal_mode_parameters",
1665 FT_NONE, BASE_NONE, NULL, 0,
1666 "ARU-PPDU/normal-mode-parameters", HFILL }},
1667 { &hf_pres_presentation_context_identifier_list,
1668 { "presentation-context-identifier-list", "pres.presentation_context_identifier_list",
1669 FT_UINT32, BASE_DEC, NULL, 0,
1671 { &hf_pres_aRU_PPDU_provider_reason,
1672 { "provider-reason", "pres.provider_reason",
1673 FT_INT32, BASE_DEC, VALS(pres_Abort_reason_vals), 0,
1674 "ARP-PPDU/provider-reason", HFILL }},
1675 { &hf_pres_event_identifier,
1676 { "event-identifier", "pres.event_identifier",
1677 FT_INT32, BASE_DEC, VALS(pres_Event_identifier_vals), 0,
1678 "ARP-PPDU/event-identifier", HFILL }},
1680 { "acPPDU", "pres.acPPDU",
1681 FT_NONE, BASE_NONE, NULL, 0,
1682 "Typed-data-type/acPPDU", HFILL }},
1684 { "acaPPDU", "pres.acaPPDU",
1685 FT_NONE, BASE_NONE, NULL, 0,
1686 "Typed-data-type/acaPPDU", HFILL }},
1688 { "ttdPPDU", "pres.ttdPPDU",
1689 FT_UINT32, BASE_DEC, VALS(pres_User_data_vals), 0,
1690 "Typed-data-type/ttdPPDU", HFILL }},
1691 { &hf_pres_presentation_context_addition_list,
1692 { "presentation-context-addition-list", "pres.presentation_context_addition_list",
1693 FT_UINT32, BASE_DEC, NULL, 0,
1694 "AC-PPDU/presentation-context-addition-list", HFILL }},
1695 { &hf_pres_presentation_context_deletion_list,
1696 { "presentation-context-deletion-list", "pres.presentation_context_deletion_list",
1697 FT_UINT32, BASE_DEC, NULL, 0,
1698 "AC-PPDU/presentation-context-deletion-list", HFILL }},
1699 { &hf_pres_presentation_context_addition_result_list,
1700 { "presentation-context-addition-result-list", "pres.presentation_context_addition_result_list",
1701 FT_UINT32, BASE_DEC, NULL, 0,
1702 "ACA-PPDU/presentation-context-addition-result-list", HFILL }},
1703 { &hf_pres_presentation_context_deletion_result_list,
1704 { "presentation-context-deletion-result-list", "pres.presentation_context_deletion_result_list",
1705 FT_UINT32, BASE_DEC, NULL, 0,
1706 "ACA-PPDU/presentation-context-deletion-result-list", HFILL }},
1707 { &hf_pres_Context_list_item,
1708 { "Item", "pres.Context_list_item",
1709 FT_NONE, BASE_NONE, NULL, 0,
1710 "Context-list/_item", HFILL }},
1711 { &hf_pres_presentation_context_identifier,
1712 { "presentation-context-identifier", "pres.presentation_context_identifier",
1713 FT_INT32, BASE_DEC, NULL, 0,
1715 { &hf_pres_abstract_syntax_name,
1716 { "abstract-syntax-name", "pres.abstract_syntax_name",
1717 FT_OID, BASE_NONE, NULL, 0,
1719 { &hf_pres_transfer_syntax_name_list,
1720 { "transfer-syntax-name-list", "pres.transfer_syntax_name_list",
1721 FT_UINT32, BASE_DEC, NULL, 0,
1722 "Context-list/_item/transfer-syntax-name-list", HFILL }},
1723 { &hf_pres_transfer_syntax_name_list_item,
1724 { "Item", "pres.transfer_syntax_name_list_item",
1725 FT_OID, BASE_NONE, NULL, 0,
1726 "Context-list/_item/transfer-syntax-name-list/_item", HFILL }},
1727 { &hf_pres_transfer_syntax_name,
1728 { "transfer-syntax-name", "pres.transfer_syntax_name",
1729 FT_OID, BASE_NONE, NULL, 0,
1731 { &hf_pres_mode_value,
1732 { "mode-value", "pres.mode_value",
1733 FT_INT32, BASE_DEC, VALS(pres_T_mode_value_vals), 0,
1734 "Mode-selector/mode-value", HFILL }},
1735 { &hf_pres_Presentation_context_deletion_list_item,
1736 { "Item", "pres.Presentation_context_deletion_list_item",
1737 FT_INT32, BASE_DEC, NULL, 0,
1738 "Presentation-context-deletion-list/_item", HFILL }},
1739 { &hf_pres_Presentation_context_deletion_result_list_item,
1740 { "Item", "pres.Presentation_context_deletion_result_list_item",
1741 FT_INT32, BASE_DEC, VALS(pres_Presentation_context_deletion_result_list_item_vals), 0,
1742 "Presentation-context-deletion-result-list/_item", HFILL }},
1743 { &hf_pres_Presentation_context_identifier_list_item,
1744 { "Item", "pres.Presentation_context_identifier_list_item",
1745 FT_NONE, BASE_NONE, NULL, 0,
1746 "Presentation-context-identifier-list/_item", HFILL }},
1747 { &hf_pres_Result_list_item,
1748 { "Item", "pres.Result_list_item",
1749 FT_NONE, BASE_NONE, NULL, 0,
1750 "Result-list/_item", HFILL }},
1752 { "result", "pres.result",
1753 FT_INT32, BASE_DEC, VALS(pres_Result_vals), 0,
1754 "Result-list/_item/result", HFILL }},
1755 { &hf_pres_provider_reason,
1756 { "provider-reason", "pres.provider_reason",
1757 FT_INT32, BASE_DEC, VALS(pres_T_provider_reason_vals), 0,
1758 "Result-list/_item/provider-reason", HFILL }},
1759 { &hf_pres_simply_encoded_data,
1760 { "simply-encoded-data", "pres.simply_encoded_data",
1761 FT_BYTES, BASE_HEX, NULL, 0,
1762 "User-data/simply-encoded-data", HFILL }},
1763 { &hf_pres_fully_encoded_data,
1764 { "fully-encoded-data", "pres.fully_encoded_data",
1765 FT_UINT32, BASE_DEC, NULL, 0,
1766 "User-data/fully-encoded-data", HFILL }},
1767 { &hf_pres_Fully_encoded_data_item,
1768 { "Item", "pres.Fully_encoded_data_item",
1769 FT_NONE, BASE_NONE, NULL, 0,
1770 "Fully-encoded-data/_item", HFILL }},
1771 { &hf_pres_presentation_data_values,
1772 { "presentation-data-values", "pres.presentation_data_values",
1773 FT_UINT32, BASE_DEC, VALS(pres_T_presentation_data_values_vals), 0,
1774 "PDV-list/presentation-data-values", HFILL }},
1775 { &hf_pres_single_ASN1_type,
1776 { "single-ASN1-type", "pres.single_ASN1_type",
1777 FT_BYTES, BASE_HEX, NULL, 0,
1778 "PDV-list/presentation-data-values/single-ASN1-type", HFILL }},
1779 { &hf_pres_octet_aligned,
1780 { "octet-aligned", "pres.octet_aligned",
1781 FT_BYTES, BASE_HEX, NULL, 0,
1782 "PDV-list/presentation-data-values/octet-aligned", HFILL }},
1783 { &hf_pres_arbitrary,
1784 { "arbitrary", "pres.arbitrary",
1785 FT_BYTES, BASE_HEX, NULL, 0,
1786 "PDV-list/presentation-data-values/arbitrary", HFILL }},
1787 { &hf_pres_Presentation_requirements_context_management,
1788 { "context-management", "pres.context-management",
1789 FT_BOOLEAN, 8, NULL, 0x80,
1791 { &hf_pres_Presentation_requirements_restoration,
1792 { "restoration", "pres.restoration",
1793 FT_BOOLEAN, 8, NULL, 0x40,
1795 { &hf_pres_Protocol_options_nominated_context,
1796 { "nominated-context", "pres.nominated-context",
1797 FT_BOOLEAN, 8, NULL, 0x80,
1799 { &hf_pres_Protocol_options_short_encoding,
1800 { "short-encoding", "pres.short-encoding",
1801 FT_BOOLEAN, 8, NULL, 0x40,
1803 { &hf_pres_Protocol_options_packed_encoding_rules,
1804 { "packed-encoding-rules", "pres.packed-encoding-rules",
1805 FT_BOOLEAN, 8, NULL, 0x20,
1807 { &hf_pres_Protocol_version_version_1,
1808 { "version-1", "pres.version-1",
1809 FT_BOOLEAN, 8, NULL, 0x80,
1811 { &hf_pres_User_session_requirements_half_duplex,
1812 { "half-duplex", "pres.half-duplex",
1813 FT_BOOLEAN, 8, NULL, 0x80,
1815 { &hf_pres_User_session_requirements_duplex,
1816 { "duplex", "pres.duplex",
1817 FT_BOOLEAN, 8, NULL, 0x40,
1819 { &hf_pres_User_session_requirements_expedited_data,
1820 { "expedited-data", "pres.expedited-data",
1821 FT_BOOLEAN, 8, NULL, 0x20,
1823 { &hf_pres_User_session_requirements_minor_synchronize,
1824 { "minor-synchronize", "pres.minor-synchronize",
1825 FT_BOOLEAN, 8, NULL, 0x10,
1827 { &hf_pres_User_session_requirements_major_synchronize,
1828 { "major-synchronize", "pres.major-synchronize",
1829 FT_BOOLEAN, 8, NULL, 0x08,
1831 { &hf_pres_User_session_requirements_resynchronize,
1832 { "resynchronize", "pres.resynchronize",
1833 FT_BOOLEAN, 8, NULL, 0x04,
1835 { &hf_pres_User_session_requirements_activity_management,
1836 { "activity-management", "pres.activity-management",
1837 FT_BOOLEAN, 8, NULL, 0x02,
1839 { &hf_pres_User_session_requirements_negotiated_release,
1840 { "negotiated-release", "pres.negotiated-release",
1841 FT_BOOLEAN, 8, NULL, 0x01,
1843 { &hf_pres_User_session_requirements_capability_data,
1844 { "capability-data", "pres.capability-data",
1845 FT_BOOLEAN, 8, NULL, 0x80,
1847 { &hf_pres_User_session_requirements_exceptions,
1848 { "exceptions", "pres.exceptions",
1849 FT_BOOLEAN, 8, NULL, 0x40,
1851 { &hf_pres_User_session_requirements_typed_data,
1852 { "typed-data", "pres.typed-data",
1853 FT_BOOLEAN, 8, NULL, 0x20,
1855 { &hf_pres_User_session_requirements_symmetric_synchronize,
1856 { "symmetric-synchronize", "pres.symmetric-synchronize",
1857 FT_BOOLEAN, 8, NULL, 0x10,
1859 { &hf_pres_User_session_requirements_data_separation,
1860 { "data-separation", "pres.data-separation",
1861 FT_BOOLEAN, 8, NULL, 0x08,
1864 /*--- End of included file: packet-pres-hfarr.c ---*/
1865 #line 286 "packet-pres-template.c"
1868 /* List of subtrees */
1869 static gint *ett[] = {
1872 /*--- Included file: packet-pres-ettarr.c ---*/
1873 #line 1 "packet-pres-ettarr.c"
1875 &ett_pres_T_normal_mode_parameters,
1876 &ett_pres_T_extensions,
1878 &ett_pres_T_CPA_PPDU_normal_mode_parameters,
1880 &ett_pres_T_CPR_PPDU_normal_mode_parameters,
1881 &ett_pres_Abort_type,
1883 &ett_pres_T_ARU_PPDU_normal_mode_parameters,
1885 &ett_pres_Typed_data_type,
1890 &ett_pres_Context_list,
1891 &ett_pres_Context_list_item,
1892 &ett_pres_SEQUENCE_OF_Transfer_syntax_name,
1893 &ett_pres_Default_context_name,
1894 &ett_pres_Mode_selector,
1895 &ett_pres_Presentation_context_deletion_list,
1896 &ett_pres_Presentation_context_deletion_result_list,
1897 &ett_pres_Presentation_context_identifier_list,
1898 &ett_pres_Presentation_context_identifier_list_item,
1899 &ett_pres_Presentation_requirements,
1900 &ett_pres_Protocol_options,
1901 &ett_pres_Protocol_version,
1902 &ett_pres_Result_list,
1903 &ett_pres_Result_list_item,
1904 &ett_pres_User_data,
1905 &ett_pres_Fully_encoded_data,
1907 &ett_pres_T_presentation_data_values,
1908 &ett_pres_User_session_requirements,
1910 /*--- End of included file: packet-pres-ettarr.c ---*/
1911 #line 292 "packet-pres-template.c"
1914 /* Register protocol */
1915 proto_pres = proto_register_protocol(PNAME, PSNAME, PFNAME);
1916 register_dissector("pres", dissect_pres, proto_pres);
1917 /* Register fields and subtrees */
1918 proto_register_field_array(proto_pres, hf, array_length(hf));
1919 proto_register_subtree_array(ett, array_length(ett));
1920 register_init_routine(pres_init);
1925 /*--- proto_reg_handoff_pres ---------------------------------------*/
1926 void proto_reg_handoff_pres(void) {
1928 /* register_ber_oid_dissector("0.4.0.0.1.1.1.1", dissect_pres, proto_pres,
1929 "itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) abstractSyntax(1) pres(1) version1(1)"); */
1931 data_handle = find_dissector("data");