1 /* Do not modify this file. */
2 /* It is created automatically by the ASN.1 to Ethereal 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 */
9 * Routine to dissect ISO 8823 OSI Presentation Protocol packets
10 * Based on the dissector by
11 * Yuriy Sidelnikov <YSidelnikov@hotmail.com>
15 * Ethereal - Network traffic analyzer
16 * By Gerald Combs <gerald@ethereal.com>
17 * Copyright 1998 Gerald Combs
19 * This program is free software; you can redistribute it and/or
20 * modify it under the terms of the GNU General Public License
21 * as published by the Free Software Foundation; either version 2
22 * of the License, or (at your option) any later version.
24 * This program is distributed in the hope that it will be useful,
25 * but WITHOUT ANY WARRANTY; without even the implied warranty of
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 * GNU General Public License for more details.
29 * You should have received a copy of the GNU General Public License
30 * along with this program; if not, write to the Free Software
31 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
39 #include <epan/packet.h>
40 #include <epan/conversation.h>
41 #include <epan/emem.h>
46 #include "packet-ber.h"
47 #include "packet-ses.h"
48 #include "packet-pres.h"
51 #define PNAME "ISO 8823 OSI Presentation Protocol"
55 /* Initialize the protocol and registered fields */
57 /* type of session envelop */
58 static struct SESSION_DATA_STRUCTURE* session = NULL;
60 /* pointers for acse dissector */
61 proto_tree *global_tree = NULL;
62 packet_info *global_pinfo = NULL;
64 /* dissector for data */
65 static dissector_handle_t data_handle;
67 static char abstract_syntax_name_oid[BER_MAX_OID_STR_LEN];
68 static guint32 presentation_context_identifier;
70 /* to keep track of presentation context identifiers and protocol-oids */
71 typedef struct _pres_ctx_oid_t {
72 /* XXX here we should keep track of ADDRESS/PORT as well */
76 static GHashTable *pres_ctx_oid_table = NULL;
79 /*--- Included file: packet-pres-hf.c ---*/
81 static int hf_pres_checkpointSize = -1; /* INTEGER */
82 static int hf_pres_windowSize = -1; /* INTEGER */
83 static int hf_pres_dialogueMode = -1; /* T_dialogueMode */
84 static int hf_pres_connectionDataRQ = -1; /* ConnectionData */
85 static int hf_pres_applicationProtocol = -1; /* INTEGER */
86 static int hf_pres_connectionDataAC = -1; /* ConnectionData */
87 static int hf_pres_refuseReason = -1; /* RefuseReason */
88 static int hf_pres_userDataRJ = -1; /* OPEN */
89 static int hf_pres_abortReason = -1; /* AbortReason */
90 static int hf_pres_reflectedParameter = -1; /* BIT_STRING */
91 static int hf_pres_userdataAB = -1; /* OPEN */
92 static int hf_pres_open = -1; /* OPEN */
93 static int hf_pres_recover = -1; /* SessionConnectionIdentifier */
94 static int hf_pres_callingSSuserReference = -1; /* CallingSSuserReference */
95 static int hf_pres_commonReference = -1; /* CommonReference */
96 static int hf_pres_additionalReferenceInformation = -1; /* AdditionalReferenceInformation */
97 static int hf_pres_t61String = -1; /* T61String */
98 static int hf_pres_octetString = -1; /* OCTET_STRING */
99 static int hf_pres_mode_selector = -1; /* Mode_selector */
100 static int hf_pres_x410_mode_parameters = -1; /* RTORQapdu */
101 static int hf_pres_normal_mode_parameters = -1; /* T_normal_mode_parameters */
102 static int hf_pres_protocol_version = -1; /* Protocol_version */
103 static int hf_pres_calling_presentation_selector = -1; /* Calling_presentation_selector */
104 static int hf_pres_called_presentation_selector = -1; /* Called_presentation_selector */
105 static int hf_pres_presentation_context_definition_list = -1; /* Presentation_context_definition_list */
106 static int hf_pres_default_context_name = -1; /* Default_context_name */
107 static int hf_pres_presentation_requirements = -1; /* Presentation_requirements */
108 static int hf_pres_user_session_requirements = -1; /* User_session_requirements */
109 static int hf_pres_protocol_options = -1; /* Protocol_options */
110 static int hf_pres_initiators_nominated_context = -1; /* Presentation_context_identifier */
111 static int hf_pres_extensions = -1; /* T_extensions */
112 static int hf_pres_user_data = -1; /* User_data */
113 static int hf_pres_cPR_PPDU_x400_mode_parameters = -1; /* RTOACapdu */
114 static int hf_pres_cPU_PPDU_normal_mode_parameters = -1; /* T_CPA_PPDU_normal_mode_parameters */
115 static int hf_pres_responding_presentation_selector = -1; /* Responding_presentation_selector */
116 static int hf_pres_presentation_context_definition_result_list = -1; /* Presentation_context_definition_result_list */
117 static int hf_pres_responders_nominated_context = -1; /* Presentation_context_identifier */
118 static int hf_pres_cPU_PPDU_x400_mode_parameters = -1; /* RTORJapdu */
119 static int hf_pres_cPR_PPDU_normal_mode_parameters = -1; /* T_CPR_PPDU_normal_mode_parameters */
120 static int hf_pres_default_context_result = -1; /* Default_context_result */
121 static int hf_pres_cPR_PPDU__provider_reason = -1; /* Provider_reason */
122 static int hf_pres_aru_ppdu = -1; /* ARU_PPDU */
123 static int hf_pres_arp_ppdu = -1; /* ARP_PPDU */
124 static int hf_pres_aRU_PPDU_x400_mode_parameters = -1; /* RTABapdu */
125 static int hf_pres_aRU_PPDU_normal_mode_parameters = -1; /* T_ARU_PPDU_normal_mode_parameters */
126 static int hf_pres_presentation_context_identifier_list = -1; /* Presentation_context_identifier_list */
127 static int hf_pres_aRU_PPDU_provider_reason = -1; /* Abort_reason */
128 static int hf_pres_event_identifier = -1; /* Event_identifier */
129 static int hf_pres_acPPDU = -1; /* AC_PPDU */
130 static int hf_pres_acaPPDU = -1; /* ACA_PPDU */
131 static int hf_pres_ttdPPDU = -1; /* User_data */
132 static int hf_pres_presentation_context_addition_list = -1; /* Presentation_context_addition_list */
133 static int hf_pres_presentation_context_deletion_list = -1; /* Presentation_context_deletion_list */
134 static int hf_pres_presentation_context_addition_result_list = -1; /* Presentation_context_addition_result_list */
135 static int hf_pres_presentation_context_deletion_result_list = -1; /* Presentation_context_deletion_result_list */
136 static int hf_pres_Context_list_item = -1; /* Context_list_item */
137 static int hf_pres_presentation_context_identifier = -1; /* Presentation_context_identifier */
138 static int hf_pres_abstract_syntax_name = -1; /* Abstract_syntax_name */
139 static int hf_pres_transfer_syntax_name_list = -1; /* SEQUENCE_OF_Transfer_syntax_name */
140 static int hf_pres_transfer_syntax_name_list_item = -1; /* Transfer_syntax_name */
141 static int hf_pres_transfer_syntax_name = -1; /* Transfer_syntax_name */
142 static int hf_pres_mode_value = -1; /* T_mode_value */
143 static int hf_pres_Presentation_context_deletion_list_item = -1; /* Presentation_context_identifier */
144 static int hf_pres_Presentation_context_deletion_result_list_item = -1; /* Presentation_context_deletion_result_list_item */
145 static int hf_pres_Presentation_context_identifier_list_item = -1; /* Presentation_context_identifier_list_item */
146 static int hf_pres_Result_list_item = -1; /* Result_list_item */
147 static int hf_pres_result = -1; /* Result */
148 static int hf_pres_provider_reason = -1; /* T_provider_reason */
149 static int hf_pres_simply_encoded_data = -1; /* Simply_encoded_data */
150 static int hf_pres_fully_encoded_data = -1; /* Fully_encoded_data */
151 static int hf_pres_Fully_encoded_data_item = -1; /* PDV_list */
152 static int hf_pres_presentation_data_values = -1; /* T_presentation_data_values */
153 static int hf_pres_single_ASN1_type = -1; /* T_single_ASN1_type */
154 static int hf_pres_octet_aligned = -1; /* OCTET_STRING */
155 static int hf_pres_arbitrary = -1; /* BIT_STRING */
157 static int hf_pres_Presentation_requirements_context_management = -1;
158 static int hf_pres_Presentation_requirements_restoration = -1;
159 static int hf_pres_Protocol_options_nominated_context = -1;
160 static int hf_pres_Protocol_options_short_encoding = -1;
161 static int hf_pres_Protocol_options_packed_encoding_rules = -1;
162 static int hf_pres_Protocol_version_version_1 = -1;
163 static int hf_pres_User_session_requirements_half_duplex = -1;
164 static int hf_pres_User_session_requirements_duplex = -1;
165 static int hf_pres_User_session_requirements_expedited_data = -1;
166 static int hf_pres_User_session_requirements_minor_synchronize = -1;
167 static int hf_pres_User_session_requirements_major_synchronize = -1;
168 static int hf_pres_User_session_requirements_resynchronize = -1;
169 static int hf_pres_User_session_requirements_activity_management = -1;
170 static int hf_pres_User_session_requirements_negotiated_release = -1;
171 static int hf_pres_User_session_requirements_capability_data = -1;
172 static int hf_pres_User_session_requirements_exceptions = -1;
173 static int hf_pres_User_session_requirements_typed_data = -1;
174 static int hf_pres_User_session_requirements_symmetric_synchronize = -1;
175 static int hf_pres_User_session_requirements_data_separation = -1;
177 /*--- End of included file: packet-pres-hf.c ---*/
180 /* Initialize the subtree pointers */
181 static gint ett_pres = -1;
184 /*--- Included file: packet-pres-ett.c ---*/
186 static gint ett_pres_RTORQapdu = -1;
187 static gint ett_pres_RTOACapdu = -1;
188 static gint ett_pres_RTORJapdu = -1;
189 static gint ett_pres_RTABapdu = -1;
190 static gint ett_pres_ConnectionData = -1;
191 static gint ett_pres_SessionConnectionIdentifier = -1;
192 static gint ett_pres_CallingSSuserReference = -1;
193 static gint ett_pres_CP_type = -1;
194 static gint ett_pres_T_normal_mode_parameters = -1;
195 static gint ett_pres_T_extensions = -1;
196 static gint ett_pres_CPA_PPDU = -1;
197 static gint ett_pres_T_CPA_PPDU_normal_mode_parameters = -1;
198 static gint ett_pres_CPR_PPDU = -1;
199 static gint ett_pres_T_CPR_PPDU_normal_mode_parameters = -1;
200 static gint ett_pres_Abort_type = -1;
201 static gint ett_pres_ARU_PPDU = -1;
202 static gint ett_pres_T_ARU_PPDU_normal_mode_parameters = -1;
203 static gint ett_pres_ARP_PPDU = -1;
204 static gint ett_pres_Typed_data_type = -1;
205 static gint ett_pres_AC_PPDU = -1;
206 static gint ett_pres_ACA_PPDU = -1;
207 static gint ett_pres_RS_PPDU = -1;
208 static gint ett_pres_RSA_PPDU = -1;
209 static gint ett_pres_Context_list = -1;
210 static gint ett_pres_Context_list_item = -1;
211 static gint ett_pres_SEQUENCE_OF_Transfer_syntax_name = -1;
212 static gint ett_pres_Default_context_name = -1;
213 static gint ett_pres_Mode_selector = -1;
214 static gint ett_pres_Presentation_context_deletion_list = -1;
215 static gint ett_pres_Presentation_context_deletion_result_list = -1;
216 static gint ett_pres_Presentation_context_identifier_list = -1;
217 static gint ett_pres_Presentation_context_identifier_list_item = -1;
218 static gint ett_pres_Presentation_requirements = -1;
219 static gint ett_pres_Protocol_options = -1;
220 static gint ett_pres_Protocol_version = -1;
221 static gint ett_pres_Result_list = -1;
222 static gint ett_pres_Result_list_item = -1;
223 static gint ett_pres_User_data = -1;
224 static gint ett_pres_Fully_encoded_data = -1;
225 static gint ett_pres_PDV_list = -1;
226 static gint ett_pres_T_presentation_data_values = -1;
227 static gint ett_pres_User_session_requirements = -1;
229 /*--- End of included file: packet-pres-ett.c ---*/
234 pres_ctx_oid_hash(gconstpointer k)
236 pres_ctx_oid_t *pco=(pres_ctx_oid_t *)k;
239 /* XXX this one should be made ADDRESS/PORT aware */
241 pres_ctx_oid_equal(gconstpointer k1, gconstpointer k2)
243 pres_ctx_oid_t *pco1=(pres_ctx_oid_t *)k1;
244 pres_ctx_oid_t *pco2=(pres_ctx_oid_t *)k2;
245 return pco1->ctx_id==pco2->ctx_id;
251 if( pres_ctx_oid_table ){
252 g_hash_table_destroy(pres_ctx_oid_table);
253 pres_ctx_oid_table = NULL;
255 pres_ctx_oid_table = g_hash_table_new(pres_ctx_oid_hash,
261 register_ctx_id_and_oid(packet_info *pinfo _U_, guint32 idx, char *oid)
263 pres_ctx_oid_t *pco, *tmppco;
264 pco=se_alloc(sizeof(pres_ctx_oid_t));
266 pco->oid=se_strdup(oid);
268 /* if this ctx already exists, remove the old one first */
269 tmppco=(pres_ctx_oid_t *)g_hash_table_lookup(pres_ctx_oid_table, pco);
271 g_hash_table_remove(pres_ctx_oid_table, tmppco);
274 g_hash_table_insert(pres_ctx_oid_table, pco, pco);
277 find_oid_by_pres_ctx_id(packet_info *pinfo _U_, guint32 idx)
279 pres_ctx_oid_t pco, *tmppco;
281 tmppco=(pres_ctx_oid_t *)g_hash_table_lookup(pres_ctx_oid_table, &pco);
290 /*--- Included file: packet-pres-fn.c ---*/
292 /*--- Fields for imported types ---*/
298 dissect_pres_INTEGER(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
299 offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
304 static int dissect_checkpointSize_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
305 return dissect_pres_INTEGER(TRUE, tvb, offset, pinfo, tree, hf_pres_checkpointSize);
307 static int dissect_windowSize_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
308 return dissect_pres_INTEGER(TRUE, tvb, offset, pinfo, tree, hf_pres_windowSize);
310 static int dissect_applicationProtocol_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
311 return dissect_pres_INTEGER(TRUE, tvb, offset, pinfo, tree, hf_pres_applicationProtocol);
315 static const value_string pres_T_dialogueMode_vals[] = {
323 dissect_pres_T_dialogueMode(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
324 offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
329 static int dissect_dialogueMode_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
330 return dissect_pres_T_dialogueMode(TRUE, tvb, offset, pinfo, tree, hf_pres_dialogueMode);
336 dissect_pres_OPEN(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
342 static int dissect_userDataRJ(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
343 return dissect_pres_OPEN(FALSE, tvb, offset, pinfo, tree, hf_pres_userDataRJ);
345 static int dissect_userdataAB(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
346 return dissect_pres_OPEN(FALSE, tvb, offset, pinfo, tree, hf_pres_userdataAB);
348 static int dissect_open(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
349 return dissect_pres_OPEN(FALSE, tvb, offset, pinfo, tree, hf_pres_open);
355 dissect_pres_T61String(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
356 offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_TeletexString,
357 pinfo, tree, tvb, offset, hf_index,
362 static int dissect_t61String(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
363 return dissect_pres_T61String(FALSE, tvb, offset, pinfo, tree, hf_pres_t61String);
369 dissect_pres_OCTET_STRING(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
370 offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index,
375 static int dissect_octetString(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
376 return dissect_pres_OCTET_STRING(FALSE, tvb, offset, pinfo, tree, hf_pres_octetString);
378 static int dissect_octet_aligned_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
379 return dissect_pres_OCTET_STRING(TRUE, tvb, offset, pinfo, tree, hf_pres_octet_aligned);
383 static const value_string pres_CallingSSuserReference_vals[] = {
385 { 1, "octetString" },
389 static const ber_choice_t CallingSSuserReference_choice[] = {
390 { 0, BER_CLASS_UNI, BER_UNI_TAG_TeletexString, BER_FLAGS_NOOWNTAG, dissect_t61String },
391 { 1, BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_octetString },
396 dissect_pres_CallingSSuserReference(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
397 offset = dissect_ber_choice(pinfo, tree, tvb, offset,
398 CallingSSuserReference_choice, hf_index, ett_pres_CallingSSuserReference,
403 static int dissect_callingSSuserReference(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
404 return dissect_pres_CallingSSuserReference(FALSE, tvb, offset, pinfo, tree, hf_pres_callingSSuserReference);
410 dissect_pres_CommonReference(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
411 offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_UTCTime,
412 pinfo, tree, tvb, offset, hf_index,
417 static int dissect_commonReference(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
418 return dissect_pres_CommonReference(FALSE, tvb, offset, pinfo, tree, hf_pres_commonReference);
424 dissect_pres_AdditionalReferenceInformation(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
425 offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_TeletexString,
426 pinfo, tree, tvb, offset, hf_index,
431 static int dissect_additionalReferenceInformation_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
432 return dissect_pres_AdditionalReferenceInformation(TRUE, tvb, offset, pinfo, tree, hf_pres_additionalReferenceInformation);
436 static const ber_sequence_t SessionConnectionIdentifier_sequence[] = {
437 { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_callingSSuserReference },
438 { BER_CLASS_UNI, BER_UNI_TAG_UTCTime, BER_FLAGS_NOOWNTAG, dissect_commonReference },
439 { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_additionalReferenceInformation_impl },
444 dissect_pres_SessionConnectionIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
445 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
446 SessionConnectionIdentifier_sequence, hf_index, ett_pres_SessionConnectionIdentifier);
450 static int dissect_recover_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
451 return dissect_pres_SessionConnectionIdentifier(TRUE, tvb, offset, pinfo, tree, hf_pres_recover);
455 static const value_string pres_ConnectionData_vals[] = {
461 static const ber_choice_t ConnectionData_choice[] = {
462 { 0, BER_CLASS_CON, 0, 0, dissect_open },
463 { 1, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_recover_impl },
468 dissect_pres_ConnectionData(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
469 offset = dissect_ber_choice(pinfo, tree, tvb, offset,
470 ConnectionData_choice, hf_index, ett_pres_ConnectionData,
475 static int dissect_connectionDataRQ(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
476 return dissect_pres_ConnectionData(FALSE, tvb, offset, pinfo, tree, hf_pres_connectionDataRQ);
478 static int dissect_connectionDataAC(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
479 return dissect_pres_ConnectionData(FALSE, tvb, offset, pinfo, tree, hf_pres_connectionDataAC);
483 static const ber_sequence_t RTORQapdu_set[] = {
484 { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_checkpointSize_impl },
485 { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_windowSize_impl },
486 { BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_dialogueMode_impl },
487 { BER_CLASS_CON, 3, BER_FLAGS_NOTCHKTAG, dissect_connectionDataRQ },
488 { BER_CLASS_CON, 4, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_applicationProtocol_impl },
493 dissect_pres_RTORQapdu(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
494 offset = dissect_ber_set(implicit_tag, pinfo, tree, tvb, offset,
495 RTORQapdu_set, hf_index, ett_pres_RTORQapdu);
499 static int dissect_x410_mode_parameters_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
500 return dissect_pres_RTORQapdu(TRUE, tvb, offset, pinfo, tree, hf_pres_x410_mode_parameters);
504 static const ber_sequence_t RTOACapdu_set[] = {
505 { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_checkpointSize_impl },
506 { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_windowSize_impl },
507 { BER_CLASS_CON, 2, BER_FLAGS_NOTCHKTAG, dissect_connectionDataAC },
512 dissect_pres_RTOACapdu(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
513 offset = dissect_ber_set(implicit_tag, pinfo, tree, tvb, offset,
514 RTOACapdu_set, hf_index, ett_pres_RTOACapdu);
518 static int dissect_cPR_PPDU_x400_mode_parameters_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
519 return dissect_pres_RTOACapdu(TRUE, tvb, offset, pinfo, tree, hf_pres_cPR_PPDU_x400_mode_parameters);
523 static const value_string pres_RefuseReason_vals[] = {
525 { 1, "cannotRecover" },
526 { 2, "validationFailure" },
527 { 3, "unacceptableDialogueMode" },
533 dissect_pres_RefuseReason(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
534 offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
539 static int dissect_refuseReason_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
540 return dissect_pres_RefuseReason(TRUE, tvb, offset, pinfo, tree, hf_pres_refuseReason);
544 static const ber_sequence_t RTORJapdu_set[] = {
545 { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_refuseReason_impl },
546 { BER_CLASS_CON, 1, 0, dissect_userDataRJ },
551 dissect_pres_RTORJapdu(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
552 offset = dissect_ber_set(implicit_tag, pinfo, tree, tvb, offset,
553 RTORJapdu_set, hf_index, ett_pres_RTORJapdu);
557 static int dissect_cPU_PPDU_x400_mode_parameters(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
558 return dissect_pres_RTORJapdu(FALSE, tvb, offset, pinfo, tree, hf_pres_cPU_PPDU_x400_mode_parameters);
562 static const value_string pres_AbortReason_vals[] = {
563 { 0, "localSystemProblem" },
564 { 1, "invalidParameter" },
565 { 2, "unrecognizedActivity" },
566 { 3, "temporaryProblem" },
567 { 4, "protocolError" },
568 { 5, "permanentProblem" },
570 { 7, "transferCompleted" },
576 dissect_pres_AbortReason(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
577 offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
582 static int dissect_abortReason_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
583 return dissect_pres_AbortReason(TRUE, tvb, offset, pinfo, tree, hf_pres_abortReason);
589 dissect_pres_BIT_STRING(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
590 offset = dissect_ber_bitstring(implicit_tag, pinfo, tree, tvb, offset,
596 static int dissect_reflectedParameter_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
597 return dissect_pres_BIT_STRING(TRUE, tvb, offset, pinfo, tree, hf_pres_reflectedParameter);
599 static int dissect_arbitrary_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
600 return dissect_pres_BIT_STRING(TRUE, tvb, offset, pinfo, tree, hf_pres_arbitrary);
604 static const ber_sequence_t RTABapdu_set[] = {
605 { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_abortReason_impl },
606 { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_reflectedParameter_impl },
607 { BER_CLASS_CON, 2, 0, dissect_userdataAB },
612 dissect_pres_RTABapdu(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
613 offset = dissect_ber_set(implicit_tag, pinfo, tree, tvb, offset,
614 RTABapdu_set, hf_index, ett_pres_RTABapdu);
618 static int dissect_aRU_PPDU_x400_mode_parameters(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
619 return dissect_pres_RTABapdu(FALSE, tvb, offset, pinfo, tree, hf_pres_aRU_PPDU_x400_mode_parameters);
623 static const value_string pres_T_mode_value_vals[] = {
624 { 0, "x410-1984-mode" },
625 { 1, "normal-mode" },
631 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_) {
632 offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
637 static int dissect_mode_value_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
638 return dissect_pres_T_mode_value(TRUE, tvb, offset, pinfo, tree, hf_pres_mode_value);
642 static const ber_sequence_t Mode_selector_set[] = {
643 { BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_mode_value_impl },
648 dissect_pres_Mode_selector(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
649 offset = dissect_ber_set(implicit_tag, pinfo, tree, tvb, offset,
650 Mode_selector_set, hf_index, ett_pres_Mode_selector);
654 static int dissect_mode_selector_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
655 return dissect_pres_Mode_selector(TRUE, tvb, offset, pinfo, tree, hf_pres_mode_selector);
659 static const asn_namedbit Protocol_version_bits[] = {
660 { 0, &hf_pres_Protocol_version_version_1, -1, -1, "version-1", NULL },
661 { 0, NULL, 0, 0, NULL, NULL }
665 dissect_pres_Protocol_version(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
666 offset = dissect_ber_bitstring(implicit_tag, pinfo, tree, tvb, offset,
667 Protocol_version_bits, hf_index, ett_pres_Protocol_version,
672 static int dissect_protocol_version_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
673 return dissect_pres_Protocol_version(TRUE, tvb, offset, pinfo, tree, hf_pres_protocol_version);
679 dissect_pres_Presentation_selector(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
680 offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index,
689 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_) {
690 offset = dissect_pres_Presentation_selector(implicit_tag, tvb, offset, pinfo, tree, hf_index);
694 static int dissect_calling_presentation_selector_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
695 return dissect_pres_Calling_presentation_selector(TRUE, tvb, offset, pinfo, tree, hf_pres_calling_presentation_selector);
701 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_) {
702 offset = dissect_pres_Presentation_selector(implicit_tag, tvb, offset, pinfo, tree, hf_index);
706 static int dissect_called_presentation_selector_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
707 return dissect_pres_Called_presentation_selector(TRUE, tvb, offset, pinfo, tree, hf_pres_called_presentation_selector);
713 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_) {
714 offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
715 &presentation_context_identifier);
719 static int dissect_initiators_nominated_context(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
720 return dissect_pres_Presentation_context_identifier(FALSE, tvb, offset, pinfo, tree, hf_pres_initiators_nominated_context);
722 static int dissect_responders_nominated_context(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
723 return dissect_pres_Presentation_context_identifier(FALSE, tvb, offset, pinfo, tree, hf_pres_responders_nominated_context);
725 static int dissect_presentation_context_identifier(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
726 return dissect_pres_Presentation_context_identifier(FALSE, tvb, offset, pinfo, tree, hf_pres_presentation_context_identifier);
728 static int dissect_Presentation_context_deletion_list_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
729 return dissect_pres_Presentation_context_identifier(FALSE, tvb, offset, pinfo, tree, hf_pres_Presentation_context_deletion_list_item);
735 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_) {
736 offset = dissect_ber_object_identifier(implicit_tag, pinfo, tree, tvb, offset, hf_index,
737 abstract_syntax_name_oid);
741 static int dissect_abstract_syntax_name(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
742 return dissect_pres_Abstract_syntax_name(FALSE, tvb, offset, pinfo, tree, hf_pres_abstract_syntax_name);
744 static int dissect_abstract_syntax_name_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
745 return dissect_pres_Abstract_syntax_name(TRUE, tvb, offset, pinfo, tree, hf_pres_abstract_syntax_name);
751 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_) {
752 offset = dissect_ber_object_identifier(implicit_tag, pinfo, tree, tvb, offset, hf_index,
757 static int dissect_transfer_syntax_name_list_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
758 return dissect_pres_Transfer_syntax_name(FALSE, tvb, offset, pinfo, tree, hf_pres_transfer_syntax_name_list_item);
760 static int dissect_transfer_syntax_name(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
761 return dissect_pres_Transfer_syntax_name(FALSE, tvb, offset, pinfo, tree, hf_pres_transfer_syntax_name);
763 static int dissect_transfer_syntax_name_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
764 return dissect_pres_Transfer_syntax_name(TRUE, tvb, offset, pinfo, tree, hf_pres_transfer_syntax_name);
768 static const ber_sequence_t SEQUENCE_OF_Transfer_syntax_name_sequence_of[1] = {
769 { BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_transfer_syntax_name_list_item },
773 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_) {
774 offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
775 SEQUENCE_OF_Transfer_syntax_name_sequence_of, hf_index, ett_pres_SEQUENCE_OF_Transfer_syntax_name);
779 static int dissect_transfer_syntax_name_list(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
780 return dissect_pres_SEQUENCE_OF_Transfer_syntax_name(FALSE, tvb, offset, pinfo, tree, hf_pres_transfer_syntax_name_list);
784 static const ber_sequence_t Context_list_item_sequence[] = {
785 { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_presentation_context_identifier },
786 { BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_abstract_syntax_name },
787 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_transfer_syntax_name_list },
792 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_) {
793 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
794 Context_list_item_sequence, hf_index, ett_pres_Context_list_item);
796 register_ctx_id_and_oid(pinfo, presentation_context_identifier, abstract_syntax_name_oid);
799 static int dissect_Context_list_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
800 return dissect_pres_Context_list_item(FALSE, tvb, offset, pinfo, tree, hf_pres_Context_list_item);
804 static const ber_sequence_t Context_list_sequence_of[1] = {
805 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_Context_list_item },
809 dissect_pres_Context_list(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
810 offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
811 Context_list_sequence_of, hf_index, ett_pres_Context_list);
819 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_) {
820 offset = dissect_pres_Context_list(implicit_tag, tvb, offset, pinfo, tree, hf_index);
824 static int dissect_presentation_context_definition_list_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
825 return dissect_pres_Presentation_context_definition_list(TRUE, tvb, offset, pinfo, tree, hf_pres_presentation_context_definition_list);
829 static const ber_sequence_t Default_context_name_sequence[] = {
830 { BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_abstract_syntax_name_impl },
831 { BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_transfer_syntax_name_impl },
836 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_) {
837 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
838 Default_context_name_sequence, hf_index, ett_pres_Default_context_name);
842 static int dissect_default_context_name_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
843 return dissect_pres_Default_context_name(TRUE, tvb, offset, pinfo, tree, hf_pres_default_context_name);
847 static const asn_namedbit Presentation_requirements_bits[] = {
848 { 0, &hf_pres_Presentation_requirements_context_management, -1, -1, "context-management", NULL },
849 { 1, &hf_pres_Presentation_requirements_restoration, -1, -1, "restoration", NULL },
850 { 0, NULL, 0, 0, NULL, NULL }
854 dissect_pres_Presentation_requirements(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
855 offset = dissect_ber_bitstring(implicit_tag, pinfo, tree, tvb, offset,
856 Presentation_requirements_bits, hf_index, ett_pres_Presentation_requirements,
861 static int dissect_presentation_requirements_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
862 return dissect_pres_Presentation_requirements(TRUE, tvb, offset, pinfo, tree, hf_pres_presentation_requirements);
866 static const asn_namedbit User_session_requirements_bits[] = {
867 { 0, &hf_pres_User_session_requirements_half_duplex, -1, -1, "half-duplex", NULL },
868 { 1, &hf_pres_User_session_requirements_duplex, -1, -1, "duplex", NULL },
869 { 2, &hf_pres_User_session_requirements_expedited_data, -1, -1, "expedited-data", NULL },
870 { 3, &hf_pres_User_session_requirements_minor_synchronize, -1, -1, "minor-synchronize", NULL },
871 { 4, &hf_pres_User_session_requirements_major_synchronize, -1, -1, "major-synchronize", NULL },
872 { 5, &hf_pres_User_session_requirements_resynchronize, -1, -1, "resynchronize", NULL },
873 { 6, &hf_pres_User_session_requirements_activity_management, -1, -1, "activity-management", NULL },
874 { 7, &hf_pres_User_session_requirements_negotiated_release, -1, -1, "negotiated-release", NULL },
875 { 8, &hf_pres_User_session_requirements_capability_data, -1, -1, "capability-data", NULL },
876 { 9, &hf_pres_User_session_requirements_exceptions, -1, -1, "exceptions", NULL },
877 { 10, &hf_pres_User_session_requirements_typed_data, -1, -1, "typed-data", NULL },
878 { 11, &hf_pres_User_session_requirements_symmetric_synchronize, -1, -1, "symmetric-synchronize", NULL },
879 { 12, &hf_pres_User_session_requirements_data_separation, -1, -1, "data-separation", NULL },
880 { 0, NULL, 0, 0, NULL, NULL }
884 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_) {
885 offset = dissect_ber_bitstring(implicit_tag, pinfo, tree, tvb, offset,
886 User_session_requirements_bits, hf_index, ett_pres_User_session_requirements,
891 static int dissect_user_session_requirements_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
892 return dissect_pres_User_session_requirements(TRUE, tvb, offset, pinfo, tree, hf_pres_user_session_requirements);
896 static const asn_namedbit Protocol_options_bits[] = {
897 { 0, &hf_pres_Protocol_options_nominated_context, -1, -1, "nominated-context", NULL },
898 { 1, &hf_pres_Protocol_options_short_encoding, -1, -1, "short-encoding", NULL },
899 { 2, &hf_pres_Protocol_options_packed_encoding_rules, -1, -1, "packed-encoding-rules", NULL },
900 { 0, NULL, 0, 0, NULL, NULL }
904 dissect_pres_Protocol_options(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
905 offset = dissect_ber_bitstring(implicit_tag, pinfo, tree, tvb, offset,
906 Protocol_options_bits, hf_index, ett_pres_Protocol_options,
911 static int dissect_protocol_options(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
912 return dissect_pres_Protocol_options(FALSE, tvb, offset, pinfo, tree, hf_pres_protocol_options);
916 static const ber_sequence_t T_extensions_sequence[] = {
921 dissect_pres_T_extensions(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
922 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
923 T_extensions_sequence, hf_index, ett_pres_T_extensions);
927 static int dissect_extensions(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
928 return dissect_pres_T_extensions(FALSE, tvb, offset, pinfo, tree, hf_pres_extensions);
934 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_) {
935 offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index,
940 static int dissect_simply_encoded_data_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
941 return dissect_pres_Simply_encoded_data(TRUE, tvb, offset, pinfo, tree, hf_pres_simply_encoded_data);
947 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_) {
952 oid=find_oid_by_pres_ctx_id(pinfo, presentation_context_identifier);
954 next_tvb = tvb_new_subset(tvb, offset, -1, -1);
955 call_ber_oid_callback(oid, next_tvb, offset, pinfo, global_tree);
957 proto_tree_add_text(tree, tvb, offset, -1,"dissector is not available");
958 offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index,
967 static int dissect_single_ASN1_type_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
968 return dissect_pres_T_single_ASN1_type(TRUE, tvb, offset, pinfo, tree, hf_pres_single_ASN1_type);
972 static const value_string pres_T_presentation_data_values_vals[] = {
973 { 0, "single-ASN1-type" },
974 { 1, "octet-aligned" },
979 static const ber_choice_t T_presentation_data_values_choice[] = {
980 { 0, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_single_ASN1_type_impl },
981 { 1, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_octet_aligned_impl },
982 { 2, BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_arbitrary_impl },
987 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_) {
988 offset = dissect_ber_choice(pinfo, tree, tvb, offset,
989 T_presentation_data_values_choice, hf_index, ett_pres_T_presentation_data_values,
994 static int dissect_presentation_data_values(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
995 return dissect_pres_T_presentation_data_values(FALSE, tvb, offset, pinfo, tree, hf_pres_presentation_data_values);
999 static const ber_sequence_t PDV_list_sequence[] = {
1000 { BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_transfer_syntax_name },
1001 { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_presentation_context_identifier },
1002 { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_presentation_data_values },
1007 dissect_pres_PDV_list(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1008 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
1009 PDV_list_sequence, hf_index, ett_pres_PDV_list);
1013 static int dissect_Fully_encoded_data_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1014 return dissect_pres_PDV_list(FALSE, tvb, offset, pinfo, tree, hf_pres_Fully_encoded_data_item);
1018 static const ber_sequence_t Fully_encoded_data_sequence_of[1] = {
1019 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_Fully_encoded_data_item },
1023 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_) {
1024 offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
1025 Fully_encoded_data_sequence_of, hf_index, ett_pres_Fully_encoded_data);
1029 static int dissect_fully_encoded_data_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1030 return dissect_pres_Fully_encoded_data(TRUE, tvb, offset, pinfo, tree, hf_pres_fully_encoded_data);
1034 static const value_string pres_User_data_vals[] = {
1035 { 0, "simply-encoded-data" },
1036 { 1, "fully-encoded-data" },
1040 static const ber_choice_t User_data_choice[] = {
1041 { 0, BER_CLASS_APP, 0, BER_FLAGS_IMPLTAG, dissect_simply_encoded_data_impl },
1042 { 1, BER_CLASS_APP, 1, BER_FLAGS_IMPLTAG, dissect_fully_encoded_data_impl },
1043 { 0, 0, 0, 0, NULL }
1047 dissect_pres_User_data(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1048 offset = dissect_ber_choice(pinfo, tree, tvb, offset,
1049 User_data_choice, hf_index, ett_pres_User_data,
1054 static int dissect_user_data(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1055 return dissect_pres_User_data(FALSE, tvb, offset, pinfo, tree, hf_pres_user_data);
1057 static int dissect_ttdPPDU(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1058 return dissect_pres_User_data(FALSE, tvb, offset, pinfo, tree, hf_pres_ttdPPDU);
1062 static const ber_sequence_t T_normal_mode_parameters_sequence[] = {
1063 { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_protocol_version_impl },
1064 { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_calling_presentation_selector_impl },
1065 { BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_called_presentation_selector_impl },
1066 { BER_CLASS_CON, 4, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_presentation_context_definition_list_impl },
1067 { BER_CLASS_CON, 6, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_default_context_name_impl },
1068 { BER_CLASS_CON, 8, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_presentation_requirements_impl },
1069 { BER_CLASS_CON, 9, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_user_session_requirements_impl },
1070 { BER_CLASS_CON, 11, BER_FLAGS_OPTIONAL, dissect_protocol_options },
1071 { BER_CLASS_CON, 12, BER_FLAGS_OPTIONAL, dissect_initiators_nominated_context },
1072 { BER_CLASS_CON, 14, BER_FLAGS_OPTIONAL, dissect_extensions },
1073 { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_user_data },
1078 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_) {
1079 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
1080 T_normal_mode_parameters_sequence, hf_index, ett_pres_T_normal_mode_parameters);
1084 static int dissect_normal_mode_parameters_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1085 return dissect_pres_T_normal_mode_parameters(TRUE, tvb, offset, pinfo, tree, hf_pres_normal_mode_parameters);
1089 static const ber_sequence_t CP_type_set[] = {
1090 { BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_mode_selector_impl },
1091 { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_x410_mode_parameters_impl },
1092 { BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_normal_mode_parameters_impl },
1097 dissect_pres_CP_type(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1098 offset = dissect_ber_set(implicit_tag, pinfo, tree, tvb, offset,
1099 CP_type_set, hf_index, ett_pres_CP_type);
1107 dissect_pres_CPC_type(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1108 offset = dissect_pres_User_data(implicit_tag, tvb, offset, pinfo, tree, hf_index);
1116 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_) {
1117 offset = dissect_pres_Presentation_selector(implicit_tag, tvb, offset, pinfo, tree, hf_index);
1121 static int dissect_responding_presentation_selector_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1122 return dissect_pres_Responding_presentation_selector(TRUE, tvb, offset, pinfo, tree, hf_pres_responding_presentation_selector);
1126 static const value_string pres_Result_vals[] = {
1127 { 0, "acceptance" },
1128 { 1, "user-rejection" },
1129 { 2, "provider-rejection" },
1135 dissect_pres_Result(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1136 offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
1141 static int dissect_result_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1142 return dissect_pres_Result(TRUE, tvb, offset, pinfo, tree, hf_pres_result);
1146 static const value_string pres_T_provider_reason_vals[] = {
1147 { 0, "reason-not-specified" },
1148 { 1, "abstract-syntax-not-supported" },
1149 { 2, "proposed-transfer-syntaxes-not-supported" },
1150 { 3, "local-limit-on-DCS-exceeded" },
1156 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_) {
1157 offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
1162 static int dissect_provider_reason_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1163 return dissect_pres_T_provider_reason(TRUE, tvb, offset, pinfo, tree, hf_pres_provider_reason);
1167 static const ber_sequence_t Result_list_item_sequence[] = {
1168 { BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_result_impl },
1169 { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_transfer_syntax_name_impl },
1170 { BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_provider_reason_impl },
1175 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_) {
1176 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
1177 Result_list_item_sequence, hf_index, ett_pres_Result_list_item);
1181 static int dissect_Result_list_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1182 return dissect_pres_Result_list_item(FALSE, tvb, offset, pinfo, tree, hf_pres_Result_list_item);
1186 static const ber_sequence_t Result_list_sequence_of[1] = {
1187 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_Result_list_item },
1191 dissect_pres_Result_list(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1192 offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
1193 Result_list_sequence_of, hf_index, ett_pres_Result_list);
1201 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_) {
1202 offset = dissect_pres_Result_list(implicit_tag, tvb, offset, pinfo, tree, hf_index);
1206 static int dissect_presentation_context_definition_result_list_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1207 return dissect_pres_Presentation_context_definition_result_list(TRUE, tvb, offset, pinfo, tree, hf_pres_presentation_context_definition_result_list);
1211 static const ber_sequence_t T_CPA_PPDU_normal_mode_parameters_sequence[] = {
1212 { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_protocol_version_impl },
1213 { BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_responding_presentation_selector_impl },
1214 { BER_CLASS_CON, 5, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_presentation_context_definition_result_list_impl },
1215 { BER_CLASS_CON, 8, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_presentation_requirements_impl },
1216 { BER_CLASS_CON, 9, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_user_session_requirements_impl },
1217 { BER_CLASS_CON, 11, BER_FLAGS_OPTIONAL, dissect_protocol_options },
1218 { BER_CLASS_CON, 13, BER_FLAGS_OPTIONAL, dissect_responders_nominated_context },
1219 { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_user_data },
1224 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_) {
1225 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
1226 T_CPA_PPDU_normal_mode_parameters_sequence, hf_index, ett_pres_T_CPA_PPDU_normal_mode_parameters);
1230 static int dissect_cPU_PPDU_normal_mode_parameters_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1231 return dissect_pres_T_CPA_PPDU_normal_mode_parameters(TRUE, tvb, offset, pinfo, tree, hf_pres_cPU_PPDU_normal_mode_parameters);
1235 static const ber_sequence_t CPA_PPDU_set[] = {
1236 { BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_mode_selector_impl },
1237 { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_cPR_PPDU_x400_mode_parameters_impl },
1238 { BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_cPU_PPDU_normal_mode_parameters_impl },
1243 dissect_pres_CPA_PPDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1244 offset = dissect_ber_set(implicit_tag, pinfo, tree, tvb, offset,
1245 CPA_PPDU_set, hf_index, ett_pres_CPA_PPDU);
1253 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_) {
1254 offset = dissect_pres_Result(implicit_tag, tvb, offset, pinfo, tree, hf_index);
1258 static int dissect_default_context_result_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1259 return dissect_pres_Default_context_result(TRUE, tvb, offset, pinfo, tree, hf_pres_default_context_result);
1263 static const value_string pres_Provider_reason_vals[] = {
1264 { 0, "reason-not-specified" },
1265 { 1, "temporary-congestion" },
1266 { 2, "local-limit-exceeded" },
1267 { 3, "called-presentation-address-unknown" },
1268 { 4, "protocol-version-not-supported" },
1269 { 5, "default-context-not-supported" },
1270 { 6, "user-data-not-readable" },
1271 { 7, "no-PSAP-available" },
1277 dissect_pres_Provider_reason(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1278 offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
1283 static int dissect_cPR_PPDU__provider_reason_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1284 return dissect_pres_Provider_reason(TRUE, tvb, offset, pinfo, tree, hf_pres_cPR_PPDU__provider_reason);
1288 static const ber_sequence_t T_CPR_PPDU_normal_mode_parameters_sequence[] = {
1289 { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_protocol_version_impl },
1290 { BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_responding_presentation_selector_impl },
1291 { BER_CLASS_CON, 5, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_presentation_context_definition_result_list_impl },
1292 { BER_CLASS_CON, 7, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_default_context_result_impl },
1293 { BER_CLASS_CON, 10, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_cPR_PPDU__provider_reason_impl },
1294 { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_user_data },
1299 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_) {
1300 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
1301 T_CPR_PPDU_normal_mode_parameters_sequence, hf_index, ett_pres_T_CPR_PPDU_normal_mode_parameters);
1305 static int dissect_cPR_PPDU_normal_mode_parameters(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1306 return dissect_pres_T_CPR_PPDU_normal_mode_parameters(FALSE, tvb, offset, pinfo, tree, hf_pres_cPR_PPDU_normal_mode_parameters);
1310 static const value_string pres_CPR_PPDU_vals[] = {
1311 { 0, "x400-mode-parameters" },
1312 { 1, "normal-mode-parameters" },
1316 static const ber_choice_t CPR_PPDU_choice[] = {
1317 { 0, BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_cPU_PPDU_x400_mode_parameters },
1318 { 1, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cPR_PPDU_normal_mode_parameters },
1319 { 0, 0, 0, 0, NULL }
1323 dissect_pres_CPR_PPDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1324 offset = dissect_ber_choice(pinfo, tree, tvb, offset,
1325 CPR_PPDU_choice, hf_index, ett_pres_CPR_PPDU,
1332 static const ber_sequence_t Presentation_context_identifier_list_item_sequence[] = {
1333 { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_presentation_context_identifier },
1334 { BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_transfer_syntax_name },
1339 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_) {
1340 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
1341 Presentation_context_identifier_list_item_sequence, hf_index, ett_pres_Presentation_context_identifier_list_item);
1345 static int dissect_Presentation_context_identifier_list_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1346 return dissect_pres_Presentation_context_identifier_list_item(FALSE, tvb, offset, pinfo, tree, hf_pres_Presentation_context_identifier_list_item);
1350 static const ber_sequence_t Presentation_context_identifier_list_sequence_of[1] = {
1351 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_Presentation_context_identifier_list_item },
1355 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_) {
1356 offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
1357 Presentation_context_identifier_list_sequence_of, hf_index, ett_pres_Presentation_context_identifier_list);
1361 static int dissect_presentation_context_identifier_list_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1362 return dissect_pres_Presentation_context_identifier_list(TRUE, tvb, offset, pinfo, tree, hf_pres_presentation_context_identifier_list);
1366 static const ber_sequence_t T_ARU_PPDU_normal_mode_parameters_sequence[] = {
1367 { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_presentation_context_identifier_list_impl },
1368 { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_user_data },
1373 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_) {
1374 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
1375 T_ARU_PPDU_normal_mode_parameters_sequence, hf_index, ett_pres_T_ARU_PPDU_normal_mode_parameters);
1379 static int dissect_aRU_PPDU_normal_mode_parameters_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1380 return dissect_pres_T_ARU_PPDU_normal_mode_parameters(TRUE, tvb, offset, pinfo, tree, hf_pres_aRU_PPDU_normal_mode_parameters);
1384 static const value_string pres_ARU_PPDU_vals[] = {
1385 { 0, "x400-mode-parameters" },
1386 { 1, "normal-mode-parameters" },
1390 static const ber_choice_t ARU_PPDU_choice[] = {
1391 { 0, BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_aRU_PPDU_x400_mode_parameters },
1392 { 1, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_aRU_PPDU_normal_mode_parameters_impl },
1393 { 0, 0, 0, 0, NULL }
1397 dissect_pres_ARU_PPDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1398 offset = dissect_ber_choice(pinfo, tree, tvb, offset,
1399 ARU_PPDU_choice, hf_index, ett_pres_ARU_PPDU,
1404 static int dissect_aru_ppdu(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1405 return dissect_pres_ARU_PPDU(FALSE, tvb, offset, pinfo, tree, hf_pres_aru_ppdu);
1409 static const value_string pres_Abort_reason_vals[] = {
1410 { 0, "reason-not-specified" },
1411 { 1, "unrecognized-ppdu" },
1412 { 2, "unexpected-ppdu" },
1413 { 3, "unexpected-session-service-primitive" },
1414 { 4, "unrecognized-ppdu-parameter" },
1415 { 5, "unexpected-ppdu-parameter" },
1416 { 6, "invalid-ppdu-parameter-value" },
1422 dissect_pres_Abort_reason(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1423 offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
1428 static int dissect_aRU_PPDU_provider_reason_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1429 return dissect_pres_Abort_reason(TRUE, tvb, offset, pinfo, tree, hf_pres_aRU_PPDU_provider_reason);
1433 static const value_string pres_Event_identifier_vals[] = {
1448 { 14, "s-release-indication" },
1449 { 15, "s-release-confirm" },
1450 { 16, "s-token-give-indication" },
1451 { 17, "s-token-please-indication" },
1452 { 18, "s-control-give-indication" },
1453 { 19, "s-sync-minor-indication" },
1454 { 20, "s-sync-minor-confirm" },
1455 { 21, "s-sync-major-indication" },
1456 { 22, "s-sync-major-confirm" },
1457 { 23, "s-p-exception-report-indication" },
1458 { 24, "s-u-exception-report-indication" },
1459 { 25, "s-activity-start-indication" },
1460 { 26, "s-activity-resume-indication" },
1461 { 27, "s-activity-interrupt-indication" },
1462 { 28, "s-activity-interrupt-confirm" },
1463 { 29, "s-activity-discard-indication" },
1464 { 30, "s-activity-discard-confirm" },
1465 { 31, "s-activity-end-indication" },
1466 { 32, "s-activity-end-confirm" },
1472 dissect_pres_Event_identifier(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1473 offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
1478 static int dissect_event_identifier_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1479 return dissect_pres_Event_identifier(TRUE, tvb, offset, pinfo, tree, hf_pres_event_identifier);
1483 static const ber_sequence_t ARP_PPDU_sequence[] = {
1484 { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_aRU_PPDU_provider_reason_impl },
1485 { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_event_identifier_impl },
1490 dissect_pres_ARP_PPDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1491 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
1492 ARP_PPDU_sequence, hf_index, ett_pres_ARP_PPDU);
1496 static int dissect_arp_ppdu(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1497 return dissect_pres_ARP_PPDU(FALSE, tvb, offset, pinfo, tree, hf_pres_arp_ppdu);
1501 static const value_string pres_Abort_type_vals[] = {
1507 static const ber_choice_t Abort_type_choice[] = {
1508 { 0, BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_aru_ppdu },
1509 { 1, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_arp_ppdu },
1510 { 0, 0, 0, 0, NULL }
1514 dissect_pres_Abort_type(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1515 offset = dissect_ber_choice(pinfo, tree, tvb, offset,
1516 Abort_type_choice, hf_index, ett_pres_Abort_type,
1525 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_) {
1526 offset = dissect_pres_Context_list(implicit_tag, tvb, offset, pinfo, tree, hf_index);
1530 static int dissect_presentation_context_addition_list_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1531 return dissect_pres_Presentation_context_addition_list(TRUE, tvb, offset, pinfo, tree, hf_pres_presentation_context_addition_list);
1535 static const ber_sequence_t Presentation_context_deletion_list_sequence_of[1] = {
1536 { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_Presentation_context_deletion_list_item },
1540 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_) {
1541 offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
1542 Presentation_context_deletion_list_sequence_of, hf_index, ett_pres_Presentation_context_deletion_list);
1546 static int dissect_presentation_context_deletion_list_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1547 return dissect_pres_Presentation_context_deletion_list(TRUE, tvb, offset, pinfo, tree, hf_pres_presentation_context_deletion_list);
1551 static const ber_sequence_t AC_PPDU_sequence[] = {
1552 { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_presentation_context_addition_list_impl },
1553 { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_presentation_context_deletion_list_impl },
1554 { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_user_data },
1559 dissect_pres_AC_PPDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1560 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
1561 AC_PPDU_sequence, hf_index, ett_pres_AC_PPDU);
1565 static int dissect_acPPDU_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1566 return dissect_pres_AC_PPDU(TRUE, tvb, offset, pinfo, tree, hf_pres_acPPDU);
1572 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_) {
1573 offset = dissect_pres_Result_list(implicit_tag, tvb, offset, pinfo, tree, hf_index);
1577 static int dissect_presentation_context_addition_result_list_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1578 return dissect_pres_Presentation_context_addition_result_list(TRUE, tvb, offset, pinfo, tree, hf_pres_presentation_context_addition_result_list);
1582 static const value_string pres_Presentation_context_deletion_result_list_item_vals[] = {
1583 { 0, "acceptance" },
1584 { 1, "user-rejection" },
1590 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_) {
1591 offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
1596 static int dissect_Presentation_context_deletion_result_list_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1597 return dissect_pres_Presentation_context_deletion_result_list_item(FALSE, tvb, offset, pinfo, tree, hf_pres_Presentation_context_deletion_result_list_item);
1601 static const ber_sequence_t Presentation_context_deletion_result_list_sequence_of[1] = {
1602 { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_Presentation_context_deletion_result_list_item },
1606 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_) {
1607 offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
1608 Presentation_context_deletion_result_list_sequence_of, hf_index, ett_pres_Presentation_context_deletion_result_list);
1612 static int dissect_presentation_context_deletion_result_list_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1613 return dissect_pres_Presentation_context_deletion_result_list(TRUE, tvb, offset, pinfo, tree, hf_pres_presentation_context_deletion_result_list);
1617 static const ber_sequence_t ACA_PPDU_sequence[] = {
1618 { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_presentation_context_addition_result_list_impl },
1619 { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_presentation_context_deletion_result_list_impl },
1620 { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_user_data },
1625 dissect_pres_ACA_PPDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1626 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
1627 ACA_PPDU_sequence, hf_index, ett_pres_ACA_PPDU);
1631 static int dissect_acaPPDU_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1632 return dissect_pres_ACA_PPDU(TRUE, tvb, offset, pinfo, tree, hf_pres_acaPPDU);
1636 static const value_string pres_Typed_data_type_vals[] = {
1643 static const ber_choice_t Typed_data_type_choice[] = {
1644 { 0, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_acPPDU_impl },
1645 { 1, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_acaPPDU_impl },
1646 { 2, BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_ttdPPDU },
1647 { 0, 0, 0, 0, NULL }
1651 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_) {
1652 offset = dissect_ber_choice(pinfo, tree, tvb, offset,
1653 Typed_data_type_choice, hf_index, ett_pres_Typed_data_type,
1660 static const ber_sequence_t RS_PPDU_sequence[] = {
1661 { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_presentation_context_identifier_list_impl },
1662 { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_user_data },
1667 dissect_pres_RS_PPDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1668 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
1669 RS_PPDU_sequence, hf_index, ett_pres_RS_PPDU);
1675 static const ber_sequence_t RSA_PPDU_sequence[] = {
1676 { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_presentation_context_identifier_list_impl },
1677 { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_user_data },
1682 dissect_pres_RSA_PPDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1683 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
1684 RSA_PPDU_sequence, hf_index, ett_pres_RSA_PPDU);
1690 /*--- End of included file: packet-pres-fn.c ---*/
1698 dissect_ppdu(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
1701 proto_tree *pres_tree = NULL;
1703 /* do we have spdu type from the session dissector? */
1704 if( !pinfo->private_data ){
1706 proto_tree_add_text(tree, tvb, offset, -1,
1707 "Internal error:can't get spdu type from session dissector.");
1711 session = ( (struct SESSION_DATA_STRUCTURE*)(pinfo->private_data) );
1712 if(session->spdu_type == 0 ){
1714 proto_tree_add_text(tree, tvb, offset, -1,
1715 "Internal error:wrong spdu type %x from session dissector.",session->spdu_type);
1720 /* get type of tag */
1721 s_type = tvb_get_guint8(tvb, offset);
1722 /* set up type of Ppdu */
1723 if (check_col(pinfo->cinfo, COL_INFO))
1724 col_add_str(pinfo->cinfo, COL_INFO,
1725 val_to_str(session->spdu_type, ses_vals, "Unknown Ppdu type (0x%02x)"));
1727 ti = proto_tree_add_item(tree, proto_pres, tvb, offset, -1,
1729 pres_tree = proto_item_add_subtree(ti, ett_pres);
1732 switch(session->spdu_type){
1735 case SES_CONNECTION_REQUEST:
1736 offset = dissect_pres_CP_type(FALSE, tvb, offset, pinfo, pres_tree, -1);
1738 case SES_CONNECTION_ACCEPT:
1739 offset = dissect_pres_CPA_PPDU(FALSE, tvb, offset, pinfo, pres_tree, -1);
1742 offset = dissect_pres_Abort_type(FALSE, tvb, offset, pinfo, pres_tree, -1);
1744 case SES_DATA_TRANSFER:
1745 offset = dissect_pres_CPC_type(FALSE, tvb, offset, pinfo, pres_tree, -1);
1755 dissect_pres(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
1757 int offset = 0, old_offset;
1758 /* first, try to check length */
1759 /* do we have at least 4 bytes */
1760 if (!tvb_bytes_exist(tvb, 0, 4)){
1761 proto_tree_add_text(parent_tree, tvb, offset,
1762 tvb_reported_length_remaining(tvb,offset),"User data");
1763 return; /* no, it isn't a presentation PDU */
1766 /* we can't make any additional checking here */
1767 /* postpone it before dissector will have more information */
1769 if (check_col(pinfo->cinfo, COL_PROTOCOL))
1770 col_set_str(pinfo->cinfo, COL_PROTOCOL, "PRES");
1771 if (check_col(pinfo->cinfo, COL_INFO))
1772 col_clear(pinfo->cinfo, COL_INFO);
1773 /* save pointers for calling the acse dissector */
1774 global_tree = parent_tree;
1775 global_pinfo = pinfo;
1777 while (tvb_reported_length_remaining(tvb, offset) > 0){
1778 old_offset = offset;
1779 offset = dissect_ppdu(tvb, offset, pinfo, parent_tree);
1780 if(offset <= old_offset){
1781 proto_tree_add_text(parent_tree, tvb, offset, -1,"Invalid offset");
1782 THROW(ReportedBoundsError);
1788 /*--- proto_register_pres -------------------------------------------*/
1789 void proto_register_pres(void) {
1791 /* List of fields */
1792 static hf_register_info hf[] = {
1795 /*--- Included file: packet-pres-hfarr.c ---*/
1797 { &hf_pres_checkpointSize,
1798 { "checkpointSize", "pres.checkpointSize",
1799 FT_INT32, BASE_DEC, NULL, 0,
1801 { &hf_pres_windowSize,
1802 { "windowSize", "pres.windowSize",
1803 FT_INT32, BASE_DEC, NULL, 0,
1805 { &hf_pres_dialogueMode,
1806 { "dialogueMode", "pres.dialogueMode",
1807 FT_INT32, BASE_DEC, VALS(pres_T_dialogueMode_vals), 0,
1808 "RTORQapdu/dialogueMode", HFILL }},
1809 { &hf_pres_connectionDataRQ,
1810 { "connectionDataRQ", "pres.connectionDataRQ",
1811 FT_UINT32, BASE_DEC, VALS(pres_ConnectionData_vals), 0,
1812 "RTORQapdu/connectionDataRQ", HFILL }},
1813 { &hf_pres_applicationProtocol,
1814 { "applicationProtocol", "pres.applicationProtocol",
1815 FT_INT32, BASE_DEC, NULL, 0,
1816 "RTORQapdu/applicationProtocol", HFILL }},
1817 { &hf_pres_connectionDataAC,
1818 { "connectionDataAC", "pres.connectionDataAC",
1819 FT_UINT32, BASE_DEC, VALS(pres_ConnectionData_vals), 0,
1820 "RTOACapdu/connectionDataAC", HFILL }},
1821 { &hf_pres_refuseReason,
1822 { "refuseReason", "pres.refuseReason",
1823 FT_INT32, BASE_DEC, VALS(pres_RefuseReason_vals), 0,
1824 "RTORJapdu/refuseReason", HFILL }},
1825 { &hf_pres_userDataRJ,
1826 { "userDataRJ", "pres.userDataRJ",
1827 FT_NONE, BASE_NONE, NULL, 0,
1828 "RTORJapdu/userDataRJ", HFILL }},
1829 { &hf_pres_abortReason,
1830 { "abortReason", "pres.abortReason",
1831 FT_INT32, BASE_DEC, VALS(pres_AbortReason_vals), 0,
1832 "RTABapdu/abortReason", HFILL }},
1833 { &hf_pres_reflectedParameter,
1834 { "reflectedParameter", "pres.reflectedParameter",
1835 FT_BYTES, BASE_HEX, NULL, 0,
1836 "RTABapdu/reflectedParameter", HFILL }},
1837 { &hf_pres_userdataAB,
1838 { "userdataAB", "pres.userdataAB",
1839 FT_NONE, BASE_NONE, NULL, 0,
1840 "RTABapdu/userdataAB", HFILL }},
1842 { "open", "pres.open",
1843 FT_NONE, BASE_NONE, NULL, 0,
1844 "ConnectionData/open", HFILL }},
1846 { "recover", "pres.recover",
1847 FT_NONE, BASE_NONE, NULL, 0,
1848 "ConnectionData/recover", HFILL }},
1849 { &hf_pres_callingSSuserReference,
1850 { "callingSSuserReference", "pres.callingSSuserReference",
1851 FT_UINT32, BASE_DEC, VALS(pres_CallingSSuserReference_vals), 0,
1852 "SessionConnectionIdentifier/callingSSuserReference", HFILL }},
1853 { &hf_pres_commonReference,
1854 { "commonReference", "pres.commonReference",
1855 FT_STRING, BASE_NONE, NULL, 0,
1856 "SessionConnectionIdentifier/commonReference", HFILL }},
1857 { &hf_pres_additionalReferenceInformation,
1858 { "additionalReferenceInformation", "pres.additionalReferenceInformation",
1859 FT_STRING, BASE_NONE, NULL, 0,
1860 "SessionConnectionIdentifier/additionalReferenceInformation", HFILL }},
1861 { &hf_pres_t61String,
1862 { "t61String", "pres.t61String",
1863 FT_STRING, BASE_NONE, NULL, 0,
1864 "CallingSSuserReference/t61String", HFILL }},
1865 { &hf_pres_octetString,
1866 { "octetString", "pres.octetString",
1867 FT_BYTES, BASE_HEX, NULL, 0,
1868 "CallingSSuserReference/octetString", HFILL }},
1869 { &hf_pres_mode_selector,
1870 { "mode-selector", "pres.mode_selector",
1871 FT_NONE, BASE_NONE, NULL, 0,
1873 { &hf_pres_x410_mode_parameters,
1874 { "x410-mode-parameters", "pres.x410_mode_parameters",
1875 FT_NONE, BASE_NONE, NULL, 0,
1876 "CP-type/x410-mode-parameters", HFILL }},
1877 { &hf_pres_normal_mode_parameters,
1878 { "normal-mode-parameters", "pres.normal_mode_parameters",
1879 FT_NONE, BASE_NONE, NULL, 0,
1880 "CP-type/normal-mode-parameters", HFILL }},
1881 { &hf_pres_protocol_version,
1882 { "protocol-version", "pres.protocol_version",
1883 FT_BYTES, BASE_HEX, NULL, 0,
1885 { &hf_pres_calling_presentation_selector,
1886 { "calling-presentation-selector", "pres.calling_presentation_selector",
1887 FT_BYTES, BASE_HEX, NULL, 0,
1888 "CP-type/normal-mode-parameters/calling-presentation-selector", HFILL }},
1889 { &hf_pres_called_presentation_selector,
1890 { "called-presentation-selector", "pres.called_presentation_selector",
1891 FT_BYTES, BASE_HEX, NULL, 0,
1892 "CP-type/normal-mode-parameters/called-presentation-selector", HFILL }},
1893 { &hf_pres_presentation_context_definition_list,
1894 { "presentation-context-definition-list", "pres.presentation_context_definition_list",
1895 FT_UINT32, BASE_DEC, NULL, 0,
1896 "CP-type/normal-mode-parameters/presentation-context-definition-list", HFILL }},
1897 { &hf_pres_default_context_name,
1898 { "default-context-name", "pres.default_context_name",
1899 FT_NONE, BASE_NONE, NULL, 0,
1900 "CP-type/normal-mode-parameters/default-context-name", HFILL }},
1901 { &hf_pres_presentation_requirements,
1902 { "presentation-requirements", "pres.presentation_requirements",
1903 FT_BYTES, BASE_HEX, NULL, 0,
1905 { &hf_pres_user_session_requirements,
1906 { "user-session-requirements", "pres.user_session_requirements",
1907 FT_BYTES, BASE_HEX, NULL, 0,
1909 { &hf_pres_protocol_options,
1910 { "protocol-options", "pres.protocol_options",
1911 FT_BYTES, BASE_HEX, NULL, 0,
1913 { &hf_pres_initiators_nominated_context,
1914 { "initiators-nominated-context", "pres.initiators_nominated_context",
1915 FT_INT32, BASE_DEC, NULL, 0,
1916 "CP-type/normal-mode-parameters/initiators-nominated-context", HFILL }},
1917 { &hf_pres_extensions,
1918 { "extensions", "pres.extensions",
1919 FT_NONE, BASE_NONE, NULL, 0,
1920 "CP-type/normal-mode-parameters/extensions", HFILL }},
1921 { &hf_pres_user_data,
1922 { "user-data", "pres.user_data",
1923 FT_UINT32, BASE_DEC, VALS(pres_User_data_vals), 0,
1925 { &hf_pres_cPR_PPDU_x400_mode_parameters,
1926 { "x410-mode-parameters", "pres.x410_mode_parameters",
1927 FT_NONE, BASE_NONE, NULL, 0,
1928 "CPA-PPDU/x410-mode-parameters", HFILL }},
1929 { &hf_pres_cPU_PPDU_normal_mode_parameters,
1930 { "normal-mode-parameters", "pres.normal_mode_parameters",
1931 FT_NONE, BASE_NONE, NULL, 0,
1932 "CPA-PPDU/normal-mode-parameters", HFILL }},
1933 { &hf_pres_responding_presentation_selector,
1934 { "responding-presentation-selector", "pres.responding_presentation_selector",
1935 FT_BYTES, BASE_HEX, NULL, 0,
1937 { &hf_pres_presentation_context_definition_result_list,
1938 { "presentation-context-definition-result-list", "pres.presentation_context_definition_result_list",
1939 FT_UINT32, BASE_DEC, NULL, 0,
1941 { &hf_pres_responders_nominated_context,
1942 { "responders-nominated-context", "pres.responders_nominated_context",
1943 FT_INT32, BASE_DEC, NULL, 0,
1944 "CPA-PPDU/normal-mode-parameters/responders-nominated-context", HFILL }},
1945 { &hf_pres_cPU_PPDU_x400_mode_parameters,
1946 { "x400-mode-parameters", "pres.x400_mode_parameters",
1947 FT_NONE, BASE_NONE, NULL, 0,
1948 "CPR-PPDU/x400-mode-parameters", HFILL }},
1949 { &hf_pres_cPR_PPDU_normal_mode_parameters,
1950 { "normal-mode-parameters", "pres.normal_mode_parameters",
1951 FT_NONE, BASE_NONE, NULL, 0,
1952 "CPR-PPDU/normal-mode-parameters", HFILL }},
1953 { &hf_pres_default_context_result,
1954 { "default-context-result", "pres.default_context_result",
1955 FT_INT32, BASE_DEC, VALS(pres_Result_vals), 0,
1956 "CPR-PPDU/normal-mode-parameters/default-context-result", HFILL }},
1957 { &hf_pres_cPR_PPDU__provider_reason,
1958 { "provider-reason", "pres.provider_reason",
1959 FT_INT32, BASE_DEC, VALS(pres_Provider_reason_vals), 0,
1960 "CPR-PPDU/normal-mode-parameters/provider-reason", HFILL }},
1961 { &hf_pres_aru_ppdu,
1962 { "aru-ppdu", "pres.aru_ppdu",
1963 FT_UINT32, BASE_DEC, VALS(pres_ARU_PPDU_vals), 0,
1964 "Abort-type/aru-ppdu", HFILL }},
1965 { &hf_pres_arp_ppdu,
1966 { "arp-ppdu", "pres.arp_ppdu",
1967 FT_NONE, BASE_NONE, NULL, 0,
1968 "Abort-type/arp-ppdu", HFILL }},
1969 { &hf_pres_aRU_PPDU_x400_mode_parameters,
1970 { "x400-mode-parameters", "pres.x400_mode_parameters",
1971 FT_NONE, BASE_NONE, NULL, 0,
1972 "ARU-PPDU/x400-mode-parameters", HFILL }},
1973 { &hf_pres_aRU_PPDU_normal_mode_parameters,
1974 { "normal-mode-parameters", "pres.normal_mode_parameters",
1975 FT_NONE, BASE_NONE, NULL, 0,
1976 "ARU-PPDU/normal-mode-parameters", HFILL }},
1977 { &hf_pres_presentation_context_identifier_list,
1978 { "presentation-context-identifier-list", "pres.presentation_context_identifier_list",
1979 FT_UINT32, BASE_DEC, NULL, 0,
1981 { &hf_pres_aRU_PPDU_provider_reason,
1982 { "provider-reason", "pres.provider_reason",
1983 FT_INT32, BASE_DEC, VALS(pres_Abort_reason_vals), 0,
1984 "ARP-PPDU/provider-reason", HFILL }},
1985 { &hf_pres_event_identifier,
1986 { "event-identifier", "pres.event_identifier",
1987 FT_INT32, BASE_DEC, VALS(pres_Event_identifier_vals), 0,
1988 "ARP-PPDU/event-identifier", HFILL }},
1990 { "acPPDU", "pres.acPPDU",
1991 FT_NONE, BASE_NONE, NULL, 0,
1992 "Typed-data-type/acPPDU", HFILL }},
1994 { "acaPPDU", "pres.acaPPDU",
1995 FT_NONE, BASE_NONE, NULL, 0,
1996 "Typed-data-type/acaPPDU", HFILL }},
1998 { "ttdPPDU", "pres.ttdPPDU",
1999 FT_UINT32, BASE_DEC, VALS(pres_User_data_vals), 0,
2000 "Typed-data-type/ttdPPDU", HFILL }},
2001 { &hf_pres_presentation_context_addition_list,
2002 { "presentation-context-addition-list", "pres.presentation_context_addition_list",
2003 FT_UINT32, BASE_DEC, NULL, 0,
2004 "AC-PPDU/presentation-context-addition-list", HFILL }},
2005 { &hf_pres_presentation_context_deletion_list,
2006 { "presentation-context-deletion-list", "pres.presentation_context_deletion_list",
2007 FT_UINT32, BASE_DEC, NULL, 0,
2008 "AC-PPDU/presentation-context-deletion-list", HFILL }},
2009 { &hf_pres_presentation_context_addition_result_list,
2010 { "presentation-context-addition-result-list", "pres.presentation_context_addition_result_list",
2011 FT_UINT32, BASE_DEC, NULL, 0,
2012 "ACA-PPDU/presentation-context-addition-result-list", HFILL }},
2013 { &hf_pres_presentation_context_deletion_result_list,
2014 { "presentation-context-deletion-result-list", "pres.presentation_context_deletion_result_list",
2015 FT_UINT32, BASE_DEC, NULL, 0,
2016 "ACA-PPDU/presentation-context-deletion-result-list", HFILL }},
2017 { &hf_pres_Context_list_item,
2018 { "Item", "pres.Context_list_item",
2019 FT_NONE, BASE_NONE, NULL, 0,
2020 "Context-list/_item", HFILL }},
2021 { &hf_pres_presentation_context_identifier,
2022 { "presentation-context-identifier", "pres.presentation_context_identifier",
2023 FT_INT32, BASE_DEC, NULL, 0,
2025 { &hf_pres_abstract_syntax_name,
2026 { "abstract-syntax-name", "pres.abstract_syntax_name",
2027 FT_STRING, BASE_NONE, NULL, 0,
2029 { &hf_pres_transfer_syntax_name_list,
2030 { "transfer-syntax-name-list", "pres.transfer_syntax_name_list",
2031 FT_UINT32, BASE_DEC, NULL, 0,
2032 "Context-list/_item/transfer-syntax-name-list", HFILL }},
2033 { &hf_pres_transfer_syntax_name_list_item,
2034 { "Item", "pres.transfer_syntax_name_list_item",
2035 FT_STRING, BASE_NONE, NULL, 0,
2036 "Context-list/_item/transfer-syntax-name-list/_item", HFILL }},
2037 { &hf_pres_transfer_syntax_name,
2038 { "transfer-syntax-name", "pres.transfer_syntax_name",
2039 FT_STRING, BASE_NONE, NULL, 0,
2041 { &hf_pres_mode_value,
2042 { "mode-value", "pres.mode_value",
2043 FT_INT32, BASE_DEC, VALS(pres_T_mode_value_vals), 0,
2044 "Mode-selector/mode-value", HFILL }},
2045 { &hf_pres_Presentation_context_deletion_list_item,
2046 { "Item", "pres.Presentation_context_deletion_list_item",
2047 FT_INT32, BASE_DEC, NULL, 0,
2048 "Presentation-context-deletion-list/_item", HFILL }},
2049 { &hf_pres_Presentation_context_deletion_result_list_item,
2050 { "Item", "pres.Presentation_context_deletion_result_list_item",
2051 FT_INT32, BASE_DEC, VALS(pres_Presentation_context_deletion_result_list_item_vals), 0,
2052 "Presentation-context-deletion-result-list/_item", HFILL }},
2053 { &hf_pres_Presentation_context_identifier_list_item,
2054 { "Item", "pres.Presentation_context_identifier_list_item",
2055 FT_NONE, BASE_NONE, NULL, 0,
2056 "Presentation-context-identifier-list/_item", HFILL }},
2057 { &hf_pres_Result_list_item,
2058 { "Item", "pres.Result_list_item",
2059 FT_NONE, BASE_NONE, NULL, 0,
2060 "Result-list/_item", HFILL }},
2062 { "result", "pres.result",
2063 FT_INT32, BASE_DEC, VALS(pres_Result_vals), 0,
2064 "Result-list/_item/result", HFILL }},
2065 { &hf_pres_provider_reason,
2066 { "provider-reason", "pres.provider_reason",
2067 FT_INT32, BASE_DEC, VALS(pres_T_provider_reason_vals), 0,
2068 "Result-list/_item/provider-reason", HFILL }},
2069 { &hf_pres_simply_encoded_data,
2070 { "simply-encoded-data", "pres.simply_encoded_data",
2071 FT_BYTES, BASE_HEX, NULL, 0,
2072 "User-data/simply-encoded-data", HFILL }},
2073 { &hf_pres_fully_encoded_data,
2074 { "fully-encoded-data", "pres.fully_encoded_data",
2075 FT_UINT32, BASE_DEC, NULL, 0,
2076 "User-data/fully-encoded-data", HFILL }},
2077 { &hf_pres_Fully_encoded_data_item,
2078 { "Item", "pres.Fully_encoded_data_item",
2079 FT_NONE, BASE_NONE, NULL, 0,
2080 "Fully-encoded-data/_item", HFILL }},
2081 { &hf_pres_presentation_data_values,
2082 { "presentation-data-values", "pres.presentation_data_values",
2083 FT_UINT32, BASE_DEC, VALS(pres_T_presentation_data_values_vals), 0,
2084 "PDV-list/presentation-data-values", HFILL }},
2085 { &hf_pres_single_ASN1_type,
2086 { "single-ASN1-type", "pres.single_ASN1_type",
2087 FT_BYTES, BASE_HEX, NULL, 0,
2088 "PDV-list/presentation-data-values/single-ASN1-type", HFILL }},
2089 { &hf_pres_octet_aligned,
2090 { "octet-aligned", "pres.octet_aligned",
2091 FT_BYTES, BASE_HEX, NULL, 0,
2092 "PDV-list/presentation-data-values/octet-aligned", HFILL }},
2093 { &hf_pres_arbitrary,
2094 { "arbitrary", "pres.arbitrary",
2095 FT_BYTES, BASE_HEX, NULL, 0,
2096 "PDV-list/presentation-data-values/arbitrary", HFILL }},
2097 { &hf_pres_Presentation_requirements_context_management,
2098 { "context-management", "pres.context-management",
2099 FT_BOOLEAN, 8, NULL, 0x80,
2101 { &hf_pres_Presentation_requirements_restoration,
2102 { "restoration", "pres.restoration",
2103 FT_BOOLEAN, 8, NULL, 0x40,
2105 { &hf_pres_Protocol_options_nominated_context,
2106 { "nominated-context", "pres.nominated-context",
2107 FT_BOOLEAN, 8, NULL, 0x80,
2109 { &hf_pres_Protocol_options_short_encoding,
2110 { "short-encoding", "pres.short-encoding",
2111 FT_BOOLEAN, 8, NULL, 0x40,
2113 { &hf_pres_Protocol_options_packed_encoding_rules,
2114 { "packed-encoding-rules", "pres.packed-encoding-rules",
2115 FT_BOOLEAN, 8, NULL, 0x20,
2117 { &hf_pres_Protocol_version_version_1,
2118 { "version-1", "pres.version-1",
2119 FT_BOOLEAN, 8, NULL, 0x80,
2121 { &hf_pres_User_session_requirements_half_duplex,
2122 { "half-duplex", "pres.half-duplex",
2123 FT_BOOLEAN, 8, NULL, 0x80,
2125 { &hf_pres_User_session_requirements_duplex,
2126 { "duplex", "pres.duplex",
2127 FT_BOOLEAN, 8, NULL, 0x40,
2129 { &hf_pres_User_session_requirements_expedited_data,
2130 { "expedited-data", "pres.expedited-data",
2131 FT_BOOLEAN, 8, NULL, 0x20,
2133 { &hf_pres_User_session_requirements_minor_synchronize,
2134 { "minor-synchronize", "pres.minor-synchronize",
2135 FT_BOOLEAN, 8, NULL, 0x10,
2137 { &hf_pres_User_session_requirements_major_synchronize,
2138 { "major-synchronize", "pres.major-synchronize",
2139 FT_BOOLEAN, 8, NULL, 0x08,
2141 { &hf_pres_User_session_requirements_resynchronize,
2142 { "resynchronize", "pres.resynchronize",
2143 FT_BOOLEAN, 8, NULL, 0x04,
2145 { &hf_pres_User_session_requirements_activity_management,
2146 { "activity-management", "pres.activity-management",
2147 FT_BOOLEAN, 8, NULL, 0x02,
2149 { &hf_pres_User_session_requirements_negotiated_release,
2150 { "negotiated-release", "pres.negotiated-release",
2151 FT_BOOLEAN, 8, NULL, 0x01,
2153 { &hf_pres_User_session_requirements_capability_data,
2154 { "capability-data", "pres.capability-data",
2155 FT_BOOLEAN, 8, NULL, 0x80,
2157 { &hf_pres_User_session_requirements_exceptions,
2158 { "exceptions", "pres.exceptions",
2159 FT_BOOLEAN, 8, NULL, 0x40,
2161 { &hf_pres_User_session_requirements_typed_data,
2162 { "typed-data", "pres.typed-data",
2163 FT_BOOLEAN, 8, NULL, 0x20,
2165 { &hf_pres_User_session_requirements_symmetric_synchronize,
2166 { "symmetric-synchronize", "pres.symmetric-synchronize",
2167 FT_BOOLEAN, 8, NULL, 0x10,
2169 { &hf_pres_User_session_requirements_data_separation,
2170 { "data-separation", "pres.data-separation",
2171 FT_BOOLEAN, 8, NULL, 0x08,
2174 /*--- End of included file: packet-pres-hfarr.c ---*/
2178 /* List of subtrees */
2179 static gint *ett[] = {
2182 /*--- Included file: packet-pres-ettarr.c ---*/
2184 &ett_pres_RTORQapdu,
2185 &ett_pres_RTOACapdu,
2186 &ett_pres_RTORJapdu,
2188 &ett_pres_ConnectionData,
2189 &ett_pres_SessionConnectionIdentifier,
2190 &ett_pres_CallingSSuserReference,
2192 &ett_pres_T_normal_mode_parameters,
2193 &ett_pres_T_extensions,
2195 &ett_pres_T_CPA_PPDU_normal_mode_parameters,
2197 &ett_pres_T_CPR_PPDU_normal_mode_parameters,
2198 &ett_pres_Abort_type,
2200 &ett_pres_T_ARU_PPDU_normal_mode_parameters,
2202 &ett_pres_Typed_data_type,
2207 &ett_pres_Context_list,
2208 &ett_pres_Context_list_item,
2209 &ett_pres_SEQUENCE_OF_Transfer_syntax_name,
2210 &ett_pres_Default_context_name,
2211 &ett_pres_Mode_selector,
2212 &ett_pres_Presentation_context_deletion_list,
2213 &ett_pres_Presentation_context_deletion_result_list,
2214 &ett_pres_Presentation_context_identifier_list,
2215 &ett_pres_Presentation_context_identifier_list_item,
2216 &ett_pres_Presentation_requirements,
2217 &ett_pres_Protocol_options,
2218 &ett_pres_Protocol_version,
2219 &ett_pres_Result_list,
2220 &ett_pres_Result_list_item,
2221 &ett_pres_User_data,
2222 &ett_pres_Fully_encoded_data,
2224 &ett_pres_T_presentation_data_values,
2225 &ett_pres_User_session_requirements,
2227 /*--- End of included file: packet-pres-ettarr.c ---*/
2231 /* Register protocol */
2232 proto_pres = proto_register_protocol(PNAME, PSNAME, PFNAME);
2233 register_dissector("pres", dissect_pres, proto_pres);
2234 /* Register fields and subtrees */
2235 proto_register_field_array(proto_pres, hf, array_length(hf));
2236 proto_register_subtree_array(ett, array_length(ett));
2237 register_init_routine(pres_init);
2242 /*--- proto_reg_handoff_pres ---------------------------------------*/
2243 void proto_reg_handoff_pres(void) {
2245 /* register_ber_oid_dissector("0.4.0.0.1.1.1.1", dissect_pres, proto_pres,
2246 "itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) abstractSyntax(1) pres(1) version1(1)"); */
2248 data_handle = find_dissector("data");