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;
63 /* dissector for data */
64 static dissector_handle_t data_handle;
65 static dissector_handle_t acse_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 *aco=(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 *aco1=(pres_ctx_oid_t *)k1;
244 pres_ctx_oid_t *aco2=(pres_ctx_oid_t *)k2;
245 return aco1->ctx_id==aco2->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 *aco, *tmpaco;
264 aco=se_alloc(sizeof(pres_ctx_oid_t));
266 aco->oid=se_strdup(oid);
268 /* if this ctx already exists, remove the old one first */
269 tmpaco=(pres_ctx_oid_t *)g_hash_table_lookup(pres_ctx_oid_table, aco);
271 g_hash_table_remove(pres_ctx_oid_table, tmpaco);
273 g_hash_table_insert(pres_ctx_oid_table, aco, aco);
276 find_oid_by_ctx_id(packet_info *pinfo _U_, guint32 idx)
278 pres_ctx_oid_t aco, *tmpaco;
280 tmpaco=(pres_ctx_oid_t *)g_hash_table_lookup(pres_ctx_oid_table, &aco);
289 /*--- Included file: packet-pres-fn.c ---*/
291 /*--- Fields for imported types ---*/
297 dissect_pres_INTEGER(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
298 offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
303 static int dissect_checkpointSize_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
304 return dissect_pres_INTEGER(TRUE, tvb, offset, pinfo, tree, hf_pres_checkpointSize);
306 static int dissect_windowSize_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
307 return dissect_pres_INTEGER(TRUE, tvb, offset, pinfo, tree, hf_pres_windowSize);
309 static int dissect_applicationProtocol_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
310 return dissect_pres_INTEGER(TRUE, tvb, offset, pinfo, tree, hf_pres_applicationProtocol);
314 static const value_string pres_T_dialogueMode_vals[] = {
322 dissect_pres_T_dialogueMode(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
323 offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
328 static int dissect_dialogueMode_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
329 return dissect_pres_T_dialogueMode(TRUE, tvb, offset, pinfo, tree, hf_pres_dialogueMode);
335 dissect_pres_OPEN(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
341 static int dissect_userDataRJ(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
342 return dissect_pres_OPEN(FALSE, tvb, offset, pinfo, tree, hf_pres_userDataRJ);
344 static int dissect_userdataAB(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
345 return dissect_pres_OPEN(FALSE, tvb, offset, pinfo, tree, hf_pres_userdataAB);
347 static int dissect_open(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
348 return dissect_pres_OPEN(FALSE, tvb, offset, pinfo, tree, hf_pres_open);
354 dissect_pres_T61String(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
355 offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_TeletexString,
356 pinfo, tree, tvb, offset, hf_index,
361 static int dissect_t61String(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
362 return dissect_pres_T61String(FALSE, tvb, offset, pinfo, tree, hf_pres_t61String);
368 dissect_pres_OCTET_STRING(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
369 offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index,
374 static int dissect_octetString(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
375 return dissect_pres_OCTET_STRING(FALSE, tvb, offset, pinfo, tree, hf_pres_octetString);
377 static int dissect_octet_aligned_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
378 return dissect_pres_OCTET_STRING(TRUE, tvb, offset, pinfo, tree, hf_pres_octet_aligned);
382 static const value_string pres_CallingSSuserReference_vals[] = {
384 { 1, "octetString" },
388 static const ber_choice_t CallingSSuserReference_choice[] = {
389 { 0, BER_CLASS_UNI, BER_UNI_TAG_TeletexString, BER_FLAGS_NOOWNTAG, dissect_t61String },
390 { 1, BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_octetString },
395 dissect_pres_CallingSSuserReference(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
396 offset = dissect_ber_choice(pinfo, tree, tvb, offset,
397 CallingSSuserReference_choice, hf_index, ett_pres_CallingSSuserReference,
402 static int dissect_callingSSuserReference(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
403 return dissect_pres_CallingSSuserReference(FALSE, tvb, offset, pinfo, tree, hf_pres_callingSSuserReference);
409 dissect_pres_CommonReference(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
410 offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_UTCTime,
411 pinfo, tree, tvb, offset, hf_index,
416 static int dissect_commonReference(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
417 return dissect_pres_CommonReference(FALSE, tvb, offset, pinfo, tree, hf_pres_commonReference);
423 dissect_pres_AdditionalReferenceInformation(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
424 offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_TeletexString,
425 pinfo, tree, tvb, offset, hf_index,
430 static int dissect_additionalReferenceInformation_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
431 return dissect_pres_AdditionalReferenceInformation(TRUE, tvb, offset, pinfo, tree, hf_pres_additionalReferenceInformation);
435 static const ber_sequence_t SessionConnectionIdentifier_sequence[] = {
436 { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_callingSSuserReference },
437 { BER_CLASS_UNI, BER_UNI_TAG_UTCTime, BER_FLAGS_NOOWNTAG, dissect_commonReference },
438 { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_additionalReferenceInformation_impl },
443 dissect_pres_SessionConnectionIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
444 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
445 SessionConnectionIdentifier_sequence, hf_index, ett_pres_SessionConnectionIdentifier);
449 static int dissect_recover_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
450 return dissect_pres_SessionConnectionIdentifier(TRUE, tvb, offset, pinfo, tree, hf_pres_recover);
454 static const value_string pres_ConnectionData_vals[] = {
460 static const ber_choice_t ConnectionData_choice[] = {
461 { 0, BER_CLASS_CON, 0, 0, dissect_open },
462 { 1, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_recover_impl },
467 dissect_pres_ConnectionData(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
468 offset = dissect_ber_choice(pinfo, tree, tvb, offset,
469 ConnectionData_choice, hf_index, ett_pres_ConnectionData,
474 static int dissect_connectionDataRQ(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
475 return dissect_pres_ConnectionData(FALSE, tvb, offset, pinfo, tree, hf_pres_connectionDataRQ);
477 static int dissect_connectionDataAC(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
478 return dissect_pres_ConnectionData(FALSE, tvb, offset, pinfo, tree, hf_pres_connectionDataAC);
482 static const ber_sequence_t RTORQapdu_set[] = {
483 { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_checkpointSize_impl },
484 { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_windowSize_impl },
485 { BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_dialogueMode_impl },
486 { BER_CLASS_CON, 3, BER_FLAGS_NOTCHKTAG, dissect_connectionDataRQ },
487 { BER_CLASS_CON, 4, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_applicationProtocol_impl },
492 dissect_pres_RTORQapdu(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
493 offset = dissect_ber_set(implicit_tag, pinfo, tree, tvb, offset,
494 RTORQapdu_set, hf_index, ett_pres_RTORQapdu);
498 static int dissect_x410_mode_parameters_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
499 return dissect_pres_RTORQapdu(TRUE, tvb, offset, pinfo, tree, hf_pres_x410_mode_parameters);
503 static const ber_sequence_t RTOACapdu_set[] = {
504 { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_checkpointSize_impl },
505 { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_windowSize_impl },
506 { BER_CLASS_CON, 2, BER_FLAGS_NOTCHKTAG, dissect_connectionDataAC },
511 dissect_pres_RTOACapdu(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
512 offset = dissect_ber_set(implicit_tag, pinfo, tree, tvb, offset,
513 RTOACapdu_set, hf_index, ett_pres_RTOACapdu);
517 static int dissect_cPR_PPDU_x400_mode_parameters_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
518 return dissect_pres_RTOACapdu(TRUE, tvb, offset, pinfo, tree, hf_pres_cPR_PPDU_x400_mode_parameters);
522 static const value_string pres_RefuseReason_vals[] = {
524 { 1, "cannotRecover" },
525 { 2, "validationFailure" },
526 { 3, "unacceptableDialogueMode" },
532 dissect_pres_RefuseReason(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
533 offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
538 static int dissect_refuseReason_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
539 return dissect_pres_RefuseReason(TRUE, tvb, offset, pinfo, tree, hf_pres_refuseReason);
543 static const ber_sequence_t RTORJapdu_set[] = {
544 { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_refuseReason_impl },
545 { BER_CLASS_CON, 1, 0, dissect_userDataRJ },
550 dissect_pres_RTORJapdu(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
551 offset = dissect_ber_set(implicit_tag, pinfo, tree, tvb, offset,
552 RTORJapdu_set, hf_index, ett_pres_RTORJapdu);
556 static int dissect_cPU_PPDU_x400_mode_parameters(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
557 return dissect_pres_RTORJapdu(FALSE, tvb, offset, pinfo, tree, hf_pres_cPU_PPDU_x400_mode_parameters);
561 static const value_string pres_AbortReason_vals[] = {
562 { 0, "localSystemProblem" },
563 { 1, "invalidParameter" },
564 { 2, "unrecognizedActivity" },
565 { 3, "temporaryProblem" },
566 { 4, "protocolError" },
567 { 5, "permanentProblem" },
569 { 7, "transferCompleted" },
575 dissect_pres_AbortReason(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
576 offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
581 static int dissect_abortReason_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
582 return dissect_pres_AbortReason(TRUE, tvb, offset, pinfo, tree, hf_pres_abortReason);
588 dissect_pres_BIT_STRING(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
589 offset = dissect_ber_bitstring(implicit_tag, pinfo, tree, tvb, offset,
595 static int dissect_reflectedParameter_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
596 return dissect_pres_BIT_STRING(TRUE, tvb, offset, pinfo, tree, hf_pres_reflectedParameter);
598 static int dissect_arbitrary_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
599 return dissect_pres_BIT_STRING(TRUE, tvb, offset, pinfo, tree, hf_pres_arbitrary);
603 static const ber_sequence_t RTABapdu_set[] = {
604 { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_abortReason_impl },
605 { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_reflectedParameter_impl },
606 { BER_CLASS_CON, 2, 0, dissect_userdataAB },
611 dissect_pres_RTABapdu(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
612 offset = dissect_ber_set(implicit_tag, pinfo, tree, tvb, offset,
613 RTABapdu_set, hf_index, ett_pres_RTABapdu);
617 static int dissect_aRU_PPDU_x400_mode_parameters(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
618 return dissect_pres_RTABapdu(FALSE, tvb, offset, pinfo, tree, hf_pres_aRU_PPDU_x400_mode_parameters);
622 static const value_string pres_T_mode_value_vals[] = {
623 { 0, "x410-1984-mode" },
624 { 1, "normal-mode" },
630 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_) {
631 offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
636 static int dissect_mode_value_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
637 return dissect_pres_T_mode_value(TRUE, tvb, offset, pinfo, tree, hf_pres_mode_value);
641 static const ber_sequence_t Mode_selector_set[] = {
642 { BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_mode_value_impl },
647 dissect_pres_Mode_selector(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
648 offset = dissect_ber_set(implicit_tag, pinfo, tree, tvb, offset,
649 Mode_selector_set, hf_index, ett_pres_Mode_selector);
653 static int dissect_mode_selector_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
654 return dissect_pres_Mode_selector(TRUE, tvb, offset, pinfo, tree, hf_pres_mode_selector);
658 static const asn_namedbit Protocol_version_bits[] = {
659 { 0, &hf_pres_Protocol_version_version_1, -1, -1, "version-1", NULL },
660 { 0, NULL, 0, 0, NULL, NULL }
664 dissect_pres_Protocol_version(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
665 offset = dissect_ber_bitstring(implicit_tag, pinfo, tree, tvb, offset,
666 Protocol_version_bits, hf_index, ett_pres_Protocol_version,
671 static int dissect_protocol_version_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
672 return dissect_pres_Protocol_version(TRUE, tvb, offset, pinfo, tree, hf_pres_protocol_version);
678 dissect_pres_Presentation_selector(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
679 offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index,
688 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_) {
689 offset = dissect_pres_Presentation_selector(implicit_tag, tvb, offset, pinfo, tree, hf_index);
693 static int dissect_calling_presentation_selector_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
694 return dissect_pres_Calling_presentation_selector(TRUE, tvb, offset, pinfo, tree, hf_pres_calling_presentation_selector);
700 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_) {
701 offset = dissect_pres_Presentation_selector(implicit_tag, tvb, offset, pinfo, tree, hf_index);
705 static int dissect_called_presentation_selector_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
706 return dissect_pres_Called_presentation_selector(TRUE, tvb, offset, pinfo, tree, hf_pres_called_presentation_selector);
712 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_) {
713 offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
714 &presentation_context_identifier);
718 static int dissect_initiators_nominated_context(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
719 return dissect_pres_Presentation_context_identifier(FALSE, tvb, offset, pinfo, tree, hf_pres_initiators_nominated_context);
721 static int dissect_responders_nominated_context(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
722 return dissect_pres_Presentation_context_identifier(FALSE, tvb, offset, pinfo, tree, hf_pres_responders_nominated_context);
724 static int dissect_presentation_context_identifier(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
725 return dissect_pres_Presentation_context_identifier(FALSE, tvb, offset, pinfo, tree, hf_pres_presentation_context_identifier);
727 static int dissect_Presentation_context_deletion_list_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
728 return dissect_pres_Presentation_context_identifier(FALSE, tvb, offset, pinfo, tree, hf_pres_Presentation_context_deletion_list_item);
734 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_) {
735 offset = dissect_ber_object_identifier(implicit_tag, pinfo, tree, tvb, offset, hf_index,
736 abstract_syntax_name_oid);
740 static int dissect_abstract_syntax_name(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
741 return dissect_pres_Abstract_syntax_name(FALSE, tvb, offset, pinfo, tree, hf_pres_abstract_syntax_name);
743 static int dissect_abstract_syntax_name_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
744 return dissect_pres_Abstract_syntax_name(TRUE, tvb, offset, pinfo, tree, hf_pres_abstract_syntax_name);
750 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_) {
751 offset = dissect_ber_object_identifier(implicit_tag, pinfo, tree, tvb, offset, hf_index,
756 static int dissect_transfer_syntax_name_list_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
757 return dissect_pres_Transfer_syntax_name(FALSE, tvb, offset, pinfo, tree, hf_pres_transfer_syntax_name_list_item);
759 static int dissect_transfer_syntax_name(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
760 return dissect_pres_Transfer_syntax_name(FALSE, tvb, offset, pinfo, tree, hf_pres_transfer_syntax_name);
762 static int dissect_transfer_syntax_name_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
763 return dissect_pres_Transfer_syntax_name(TRUE, tvb, offset, pinfo, tree, hf_pres_transfer_syntax_name);
767 static const ber_sequence_t SEQUENCE_OF_Transfer_syntax_name_sequence_of[1] = {
768 { BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_transfer_syntax_name_list_item },
772 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_) {
773 offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
774 SEQUENCE_OF_Transfer_syntax_name_sequence_of, hf_index, ett_pres_SEQUENCE_OF_Transfer_syntax_name);
778 static int dissect_transfer_syntax_name_list(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
779 return dissect_pres_SEQUENCE_OF_Transfer_syntax_name(FALSE, tvb, offset, pinfo, tree, hf_pres_transfer_syntax_name_list);
783 static const ber_sequence_t Context_list_item_sequence[] = {
784 { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_presentation_context_identifier },
785 { BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_abstract_syntax_name },
786 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_transfer_syntax_name_list },
791 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_) {
792 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
793 Context_list_item_sequence, hf_index, ett_pres_Context_list_item);
795 register_ctx_id_and_oid(pinfo, presentation_context_identifier, abstract_syntax_name_oid);
798 static int dissect_Context_list_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
799 return dissect_pres_Context_list_item(FALSE, tvb, offset, pinfo, tree, hf_pres_Context_list_item);
803 static const ber_sequence_t Context_list_sequence_of[1] = {
804 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_Context_list_item },
808 dissect_pres_Context_list(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
809 offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
810 Context_list_sequence_of, hf_index, ett_pres_Context_list);
818 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_) {
819 offset = dissect_pres_Context_list(implicit_tag, tvb, offset, pinfo, tree, hf_index);
823 static int dissect_presentation_context_definition_list_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
824 return dissect_pres_Presentation_context_definition_list(TRUE, tvb, offset, pinfo, tree, hf_pres_presentation_context_definition_list);
828 static const ber_sequence_t Default_context_name_sequence[] = {
829 { BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_abstract_syntax_name_impl },
830 { BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_transfer_syntax_name_impl },
835 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_) {
836 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
837 Default_context_name_sequence, hf_index, ett_pres_Default_context_name);
841 static int dissect_default_context_name_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
842 return dissect_pres_Default_context_name(TRUE, tvb, offset, pinfo, tree, hf_pres_default_context_name);
846 static const asn_namedbit Presentation_requirements_bits[] = {
847 { 0, &hf_pres_Presentation_requirements_context_management, -1, -1, "context-management", NULL },
848 { 1, &hf_pres_Presentation_requirements_restoration, -1, -1, "restoration", NULL },
849 { 0, NULL, 0, 0, NULL, NULL }
853 dissect_pres_Presentation_requirements(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
854 offset = dissect_ber_bitstring(implicit_tag, pinfo, tree, tvb, offset,
855 Presentation_requirements_bits, hf_index, ett_pres_Presentation_requirements,
860 static int dissect_presentation_requirements_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
861 return dissect_pres_Presentation_requirements(TRUE, tvb, offset, pinfo, tree, hf_pres_presentation_requirements);
865 static const asn_namedbit User_session_requirements_bits[] = {
866 { 0, &hf_pres_User_session_requirements_half_duplex, -1, -1, "half-duplex", NULL },
867 { 1, &hf_pres_User_session_requirements_duplex, -1, -1, "duplex", NULL },
868 { 2, &hf_pres_User_session_requirements_expedited_data, -1, -1, "expedited-data", NULL },
869 { 3, &hf_pres_User_session_requirements_minor_synchronize, -1, -1, "minor-synchronize", NULL },
870 { 4, &hf_pres_User_session_requirements_major_synchronize, -1, -1, "major-synchronize", NULL },
871 { 5, &hf_pres_User_session_requirements_resynchronize, -1, -1, "resynchronize", NULL },
872 { 6, &hf_pres_User_session_requirements_activity_management, -1, -1, "activity-management", NULL },
873 { 7, &hf_pres_User_session_requirements_negotiated_release, -1, -1, "negotiated-release", NULL },
874 { 8, &hf_pres_User_session_requirements_capability_data, -1, -1, "capability-data", NULL },
875 { 9, &hf_pres_User_session_requirements_exceptions, -1, -1, "exceptions", NULL },
876 { 10, &hf_pres_User_session_requirements_typed_data, -1, -1, "typed-data", NULL },
877 { 11, &hf_pres_User_session_requirements_symmetric_synchronize, -1, -1, "symmetric-synchronize", NULL },
878 { 12, &hf_pres_User_session_requirements_data_separation, -1, -1, "data-separation", NULL },
879 { 0, NULL, 0, 0, NULL, NULL }
883 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_) {
884 offset = dissect_ber_bitstring(implicit_tag, pinfo, tree, tvb, offset,
885 User_session_requirements_bits, hf_index, ett_pres_User_session_requirements,
890 static int dissect_user_session_requirements_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
891 return dissect_pres_User_session_requirements(TRUE, tvb, offset, pinfo, tree, hf_pres_user_session_requirements);
895 static const asn_namedbit Protocol_options_bits[] = {
896 { 0, &hf_pres_Protocol_options_nominated_context, -1, -1, "nominated-context", NULL },
897 { 1, &hf_pres_Protocol_options_short_encoding, -1, -1, "short-encoding", NULL },
898 { 2, &hf_pres_Protocol_options_packed_encoding_rules, -1, -1, "packed-encoding-rules", NULL },
899 { 0, NULL, 0, 0, NULL, NULL }
903 dissect_pres_Protocol_options(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
904 offset = dissect_ber_bitstring(implicit_tag, pinfo, tree, tvb, offset,
905 Protocol_options_bits, hf_index, ett_pres_Protocol_options,
910 static int dissect_protocol_options(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
911 return dissect_pres_Protocol_options(FALSE, tvb, offset, pinfo, tree, hf_pres_protocol_options);
915 static const ber_sequence_t T_extensions_sequence[] = {
920 dissect_pres_T_extensions(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(implicit_tag, pinfo, tree, tvb, offset,
922 T_extensions_sequence, hf_index, ett_pres_T_extensions);
926 static int dissect_extensions(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
927 return dissect_pres_T_extensions(FALSE, tvb, offset, pinfo, tree, hf_pres_extensions);
933 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_) {
934 offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index,
939 static int dissect_simply_encoded_data_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
940 return dissect_pres_Simply_encoded_data(TRUE, tvb, offset, pinfo, tree, hf_pres_simply_encoded_data);
946 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_) {
951 oid=find_oid_by_ctx_id(pinfo, presentation_context_identifier);
953 next_tvb = tvb_new_subset(tvb, offset, -1, -1);
954 call_ber_oid_callback(oid, next_tvb, offset, pinfo, global_tree);
956 proto_tree_add_text(tree, tvb, offset, -1,"dissector is not available");
957 offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index,
966 static int dissect_single_ASN1_type_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
967 return dissect_pres_T_single_ASN1_type(TRUE, tvb, offset, pinfo, tree, hf_pres_single_ASN1_type);
971 static const value_string pres_T_presentation_data_values_vals[] = {
972 { 0, "single-ASN1-type" },
973 { 1, "octet-aligned" },
978 static const ber_choice_t T_presentation_data_values_choice[] = {
979 { 0, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_single_ASN1_type_impl },
980 { 1, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_octet_aligned_impl },
981 { 2, BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_arbitrary_impl },
986 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_) {
987 offset = dissect_ber_choice(pinfo, tree, tvb, offset,
988 T_presentation_data_values_choice, hf_index, ett_pres_T_presentation_data_values,
993 static int dissect_presentation_data_values(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
994 return dissect_pres_T_presentation_data_values(FALSE, tvb, offset, pinfo, tree, hf_pres_presentation_data_values);
998 static const ber_sequence_t PDV_list_sequence[] = {
999 { BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_transfer_syntax_name },
1000 { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_presentation_context_identifier },
1001 { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_presentation_data_values },
1006 dissect_pres_PDV_list(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1007 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
1008 PDV_list_sequence, hf_index, ett_pres_PDV_list);
1012 static int dissect_Fully_encoded_data_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1013 return dissect_pres_PDV_list(FALSE, tvb, offset, pinfo, tree, hf_pres_Fully_encoded_data_item);
1017 static const ber_sequence_t Fully_encoded_data_sequence_of[1] = {
1018 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_Fully_encoded_data_item },
1022 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_) {
1023 offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
1024 Fully_encoded_data_sequence_of, hf_index, ett_pres_Fully_encoded_data);
1028 static int dissect_fully_encoded_data_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1029 return dissect_pres_Fully_encoded_data(TRUE, tvb, offset, pinfo, tree, hf_pres_fully_encoded_data);
1033 static const value_string pres_User_data_vals[] = {
1034 { 0, "simply-encoded-data" },
1035 { 1, "fully-encoded-data" },
1039 static const ber_choice_t User_data_choice[] = {
1040 { 0, BER_CLASS_APP, 0, BER_FLAGS_IMPLTAG, dissect_simply_encoded_data_impl },
1041 { 1, BER_CLASS_APP, 1, BER_FLAGS_IMPLTAG, dissect_fully_encoded_data_impl },
1042 { 0, 0, 0, 0, NULL }
1046 dissect_pres_User_data(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1047 offset = dissect_ber_choice(pinfo, tree, tvb, offset,
1048 User_data_choice, hf_index, ett_pres_User_data,
1053 static int dissect_user_data(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1054 return dissect_pres_User_data(FALSE, tvb, offset, pinfo, tree, hf_pres_user_data);
1056 static int dissect_ttdPPDU(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1057 return dissect_pres_User_data(FALSE, tvb, offset, pinfo, tree, hf_pres_ttdPPDU);
1061 static const ber_sequence_t T_normal_mode_parameters_sequence[] = {
1062 { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_protocol_version_impl },
1063 { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_calling_presentation_selector_impl },
1064 { BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_called_presentation_selector_impl },
1065 { BER_CLASS_CON, 4, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_presentation_context_definition_list_impl },
1066 { BER_CLASS_CON, 6, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_default_context_name_impl },
1067 { BER_CLASS_CON, 8, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_presentation_requirements_impl },
1068 { BER_CLASS_CON, 9, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_user_session_requirements_impl },
1069 { BER_CLASS_CON, 11, BER_FLAGS_OPTIONAL, dissect_protocol_options },
1070 { BER_CLASS_CON, 12, BER_FLAGS_OPTIONAL, dissect_initiators_nominated_context },
1071 { BER_CLASS_CON, 14, BER_FLAGS_OPTIONAL, dissect_extensions },
1072 { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_user_data },
1077 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_) {
1078 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
1079 T_normal_mode_parameters_sequence, hf_index, ett_pres_T_normal_mode_parameters);
1083 static int dissect_normal_mode_parameters_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1084 return dissect_pres_T_normal_mode_parameters(TRUE, tvb, offset, pinfo, tree, hf_pres_normal_mode_parameters);
1088 static const ber_sequence_t CP_type_set[] = {
1089 { BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_mode_selector_impl },
1090 { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_x410_mode_parameters_impl },
1091 { BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_normal_mode_parameters_impl },
1096 dissect_pres_CP_type(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1097 offset = dissect_ber_set(implicit_tag, pinfo, tree, tvb, offset,
1098 CP_type_set, hf_index, ett_pres_CP_type);
1106 dissect_pres_CPC_type(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1107 offset = dissect_pres_User_data(implicit_tag, tvb, offset, pinfo, tree, hf_index);
1115 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_) {
1116 offset = dissect_pres_Presentation_selector(implicit_tag, tvb, offset, pinfo, tree, hf_index);
1120 static int dissect_responding_presentation_selector_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1121 return dissect_pres_Responding_presentation_selector(TRUE, tvb, offset, pinfo, tree, hf_pres_responding_presentation_selector);
1125 static const value_string pres_Result_vals[] = {
1126 { 0, "acceptance" },
1127 { 1, "user-rejection" },
1128 { 2, "provider-rejection" },
1134 dissect_pres_Result(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1135 offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
1140 static int dissect_result_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1141 return dissect_pres_Result(TRUE, tvb, offset, pinfo, tree, hf_pres_result);
1145 static const value_string pres_T_provider_reason_vals[] = {
1146 { 0, "reason-not-specified" },
1147 { 1, "abstract-syntax-not-supported" },
1148 { 2, "proposed-transfer-syntaxes-not-supported" },
1149 { 3, "local-limit-on-DCS-exceeded" },
1155 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_) {
1156 offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
1161 static int dissect_provider_reason_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1162 return dissect_pres_T_provider_reason(TRUE, tvb, offset, pinfo, tree, hf_pres_provider_reason);
1166 static const ber_sequence_t Result_list_item_sequence[] = {
1167 { BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_result_impl },
1168 { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_transfer_syntax_name_impl },
1169 { BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_provider_reason_impl },
1174 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_) {
1175 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
1176 Result_list_item_sequence, hf_index, ett_pres_Result_list_item);
1180 static int dissect_Result_list_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1181 return dissect_pres_Result_list_item(FALSE, tvb, offset, pinfo, tree, hf_pres_Result_list_item);
1185 static const ber_sequence_t Result_list_sequence_of[1] = {
1186 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_Result_list_item },
1190 dissect_pres_Result_list(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1191 offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
1192 Result_list_sequence_of, hf_index, ett_pres_Result_list);
1200 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_) {
1201 offset = dissect_pres_Result_list(implicit_tag, tvb, offset, pinfo, tree, hf_index);
1205 static int dissect_presentation_context_definition_result_list_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1206 return dissect_pres_Presentation_context_definition_result_list(TRUE, tvb, offset, pinfo, tree, hf_pres_presentation_context_definition_result_list);
1210 static const ber_sequence_t T_CPA_PPDU_normal_mode_parameters_sequence[] = {
1211 { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_protocol_version_impl },
1212 { BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_responding_presentation_selector_impl },
1213 { BER_CLASS_CON, 5, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_presentation_context_definition_result_list_impl },
1214 { BER_CLASS_CON, 8, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_presentation_requirements_impl },
1215 { BER_CLASS_CON, 9, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_user_session_requirements_impl },
1216 { BER_CLASS_CON, 11, BER_FLAGS_OPTIONAL, dissect_protocol_options },
1217 { BER_CLASS_CON, 13, BER_FLAGS_OPTIONAL, dissect_responders_nominated_context },
1218 { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_user_data },
1223 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_) {
1224 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
1225 T_CPA_PPDU_normal_mode_parameters_sequence, hf_index, ett_pres_T_CPA_PPDU_normal_mode_parameters);
1229 static int dissect_cPU_PPDU_normal_mode_parameters_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1230 return dissect_pres_T_CPA_PPDU_normal_mode_parameters(TRUE, tvb, offset, pinfo, tree, hf_pres_cPU_PPDU_normal_mode_parameters);
1234 static const ber_sequence_t CPA_PPDU_set[] = {
1235 { BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_mode_selector_impl },
1236 { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_cPR_PPDU_x400_mode_parameters_impl },
1237 { BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_cPU_PPDU_normal_mode_parameters_impl },
1242 dissect_pres_CPA_PPDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1243 offset = dissect_ber_set(implicit_tag, pinfo, tree, tvb, offset,
1244 CPA_PPDU_set, hf_index, ett_pres_CPA_PPDU);
1252 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_) {
1253 offset = dissect_pres_Result(implicit_tag, tvb, offset, pinfo, tree, hf_index);
1257 static int dissect_default_context_result_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1258 return dissect_pres_Default_context_result(TRUE, tvb, offset, pinfo, tree, hf_pres_default_context_result);
1262 static const value_string pres_Provider_reason_vals[] = {
1263 { 0, "reason-not-specified" },
1264 { 1, "temporary-congestion" },
1265 { 2, "local-limit-exceeded" },
1266 { 3, "called-presentation-address-unknown" },
1267 { 4, "protocol-version-not-supported" },
1268 { 5, "default-context-not-supported" },
1269 { 6, "user-data-not-readable" },
1270 { 7, "no-PSAP-available" },
1276 dissect_pres_Provider_reason(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1277 offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
1282 static int dissect_cPR_PPDU__provider_reason_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1283 return dissect_pres_Provider_reason(TRUE, tvb, offset, pinfo, tree, hf_pres_cPR_PPDU__provider_reason);
1287 static const ber_sequence_t T_CPR_PPDU_normal_mode_parameters_sequence[] = {
1288 { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_protocol_version_impl },
1289 { BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_responding_presentation_selector_impl },
1290 { BER_CLASS_CON, 5, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_presentation_context_definition_result_list_impl },
1291 { BER_CLASS_CON, 7, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_default_context_result_impl },
1292 { BER_CLASS_CON, 10, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_cPR_PPDU__provider_reason_impl },
1293 { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_user_data },
1298 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_) {
1299 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
1300 T_CPR_PPDU_normal_mode_parameters_sequence, hf_index, ett_pres_T_CPR_PPDU_normal_mode_parameters);
1304 static int dissect_cPR_PPDU_normal_mode_parameters(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1305 return dissect_pres_T_CPR_PPDU_normal_mode_parameters(FALSE, tvb, offset, pinfo, tree, hf_pres_cPR_PPDU_normal_mode_parameters);
1309 static const value_string pres_CPR_PPDU_vals[] = {
1310 { 0, "x400-mode-parameters" },
1311 { 1, "normal-mode-parameters" },
1315 static const ber_choice_t CPR_PPDU_choice[] = {
1316 { 0, BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_cPU_PPDU_x400_mode_parameters },
1317 { 1, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cPR_PPDU_normal_mode_parameters },
1318 { 0, 0, 0, 0, NULL }
1322 dissect_pres_CPR_PPDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1323 offset = dissect_ber_choice(pinfo, tree, tvb, offset,
1324 CPR_PPDU_choice, hf_index, ett_pres_CPR_PPDU,
1331 static const ber_sequence_t Presentation_context_identifier_list_item_sequence[] = {
1332 { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_presentation_context_identifier },
1333 { BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_transfer_syntax_name },
1338 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_) {
1339 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
1340 Presentation_context_identifier_list_item_sequence, hf_index, ett_pres_Presentation_context_identifier_list_item);
1344 static int dissect_Presentation_context_identifier_list_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1345 return dissect_pres_Presentation_context_identifier_list_item(FALSE, tvb, offset, pinfo, tree, hf_pres_Presentation_context_identifier_list_item);
1349 static const ber_sequence_t Presentation_context_identifier_list_sequence_of[1] = {
1350 { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_Presentation_context_identifier_list_item },
1354 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_) {
1355 offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
1356 Presentation_context_identifier_list_sequence_of, hf_index, ett_pres_Presentation_context_identifier_list);
1360 static int dissect_presentation_context_identifier_list_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1361 return dissect_pres_Presentation_context_identifier_list(TRUE, tvb, offset, pinfo, tree, hf_pres_presentation_context_identifier_list);
1365 static const ber_sequence_t T_ARU_PPDU_normal_mode_parameters_sequence[] = {
1366 { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_presentation_context_identifier_list_impl },
1367 { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_user_data },
1372 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_) {
1373 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
1374 T_ARU_PPDU_normal_mode_parameters_sequence, hf_index, ett_pres_T_ARU_PPDU_normal_mode_parameters);
1378 static int dissect_aRU_PPDU_normal_mode_parameters_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1379 return dissect_pres_T_ARU_PPDU_normal_mode_parameters(TRUE, tvb, offset, pinfo, tree, hf_pres_aRU_PPDU_normal_mode_parameters);
1383 static const value_string pres_ARU_PPDU_vals[] = {
1384 { 0, "x400-mode-parameters" },
1385 { 1, "normal-mode-parameters" },
1389 static const ber_choice_t ARU_PPDU_choice[] = {
1390 { 0, BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_aRU_PPDU_x400_mode_parameters },
1391 { 1, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_aRU_PPDU_normal_mode_parameters_impl },
1392 { 0, 0, 0, 0, NULL }
1396 dissect_pres_ARU_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_choice(pinfo, tree, tvb, offset,
1398 ARU_PPDU_choice, hf_index, ett_pres_ARU_PPDU,
1403 static int dissect_aru_ppdu(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1404 return dissect_pres_ARU_PPDU(FALSE, tvb, offset, pinfo, tree, hf_pres_aru_ppdu);
1408 static const value_string pres_Abort_reason_vals[] = {
1409 { 0, "reason-not-specified" },
1410 { 1, "unrecognized-ppdu" },
1411 { 2, "unexpected-ppdu" },
1412 { 3, "unexpected-session-service-primitive" },
1413 { 4, "unrecognized-ppdu-parameter" },
1414 { 5, "unexpected-ppdu-parameter" },
1415 { 6, "invalid-ppdu-parameter-value" },
1421 dissect_pres_Abort_reason(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1422 offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
1427 static int dissect_aRU_PPDU_provider_reason_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1428 return dissect_pres_Abort_reason(TRUE, tvb, offset, pinfo, tree, hf_pres_aRU_PPDU_provider_reason);
1432 static const value_string pres_Event_identifier_vals[] = {
1447 { 14, "s-release-indication" },
1448 { 15, "s-release-confirm" },
1449 { 16, "s-token-give-indication" },
1450 { 17, "s-token-please-indication" },
1451 { 18, "s-control-give-indication" },
1452 { 19, "s-sync-minor-indication" },
1453 { 20, "s-sync-minor-confirm" },
1454 { 21, "s-sync-major-indication" },
1455 { 22, "s-sync-major-confirm" },
1456 { 23, "s-p-exception-report-indication" },
1457 { 24, "s-u-exception-report-indication" },
1458 { 25, "s-activity-start-indication" },
1459 { 26, "s-activity-resume-indication" },
1460 { 27, "s-activity-interrupt-indication" },
1461 { 28, "s-activity-interrupt-confirm" },
1462 { 29, "s-activity-discard-indication" },
1463 { 30, "s-activity-discard-confirm" },
1464 { 31, "s-activity-end-indication" },
1465 { 32, "s-activity-end-confirm" },
1471 dissect_pres_Event_identifier(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1472 offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
1477 static int dissect_event_identifier_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1478 return dissect_pres_Event_identifier(TRUE, tvb, offset, pinfo, tree, hf_pres_event_identifier);
1482 static const ber_sequence_t ARP_PPDU_sequence[] = {
1483 { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_aRU_PPDU_provider_reason_impl },
1484 { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_event_identifier_impl },
1489 dissect_pres_ARP_PPDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1490 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
1491 ARP_PPDU_sequence, hf_index, ett_pres_ARP_PPDU);
1495 static int dissect_arp_ppdu(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1496 return dissect_pres_ARP_PPDU(FALSE, tvb, offset, pinfo, tree, hf_pres_arp_ppdu);
1500 static const value_string pres_Abort_type_vals[] = {
1506 static const ber_choice_t Abort_type_choice[] = {
1507 { 0, BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_aru_ppdu },
1508 { 1, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_arp_ppdu },
1509 { 0, 0, 0, 0, NULL }
1513 dissect_pres_Abort_type(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1514 offset = dissect_ber_choice(pinfo, tree, tvb, offset,
1515 Abort_type_choice, hf_index, ett_pres_Abort_type,
1524 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_) {
1525 offset = dissect_pres_Context_list(implicit_tag, tvb, offset, pinfo, tree, hf_index);
1529 static int dissect_presentation_context_addition_list_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1530 return dissect_pres_Presentation_context_addition_list(TRUE, tvb, offset, pinfo, tree, hf_pres_presentation_context_addition_list);
1534 static const ber_sequence_t Presentation_context_deletion_list_sequence_of[1] = {
1535 { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_Presentation_context_deletion_list_item },
1539 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_) {
1540 offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
1541 Presentation_context_deletion_list_sequence_of, hf_index, ett_pres_Presentation_context_deletion_list);
1545 static int dissect_presentation_context_deletion_list_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1546 return dissect_pres_Presentation_context_deletion_list(TRUE, tvb, offset, pinfo, tree, hf_pres_presentation_context_deletion_list);
1550 static const ber_sequence_t AC_PPDU_sequence[] = {
1551 { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_presentation_context_addition_list_impl },
1552 { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_presentation_context_deletion_list_impl },
1553 { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_user_data },
1558 dissect_pres_AC_PPDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1559 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
1560 AC_PPDU_sequence, hf_index, ett_pres_AC_PPDU);
1564 static int dissect_acPPDU_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1565 return dissect_pres_AC_PPDU(TRUE, tvb, offset, pinfo, tree, hf_pres_acPPDU);
1571 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_) {
1572 offset = dissect_pres_Result_list(implicit_tag, tvb, offset, pinfo, tree, hf_index);
1576 static int dissect_presentation_context_addition_result_list_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1577 return dissect_pres_Presentation_context_addition_result_list(TRUE, tvb, offset, pinfo, tree, hf_pres_presentation_context_addition_result_list);
1581 static const value_string pres_Presentation_context_deletion_result_list_item_vals[] = {
1582 { 0, "acceptance" },
1583 { 1, "user-rejection" },
1589 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_) {
1590 offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
1595 static int dissect_Presentation_context_deletion_result_list_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1596 return dissect_pres_Presentation_context_deletion_result_list_item(FALSE, tvb, offset, pinfo, tree, hf_pres_Presentation_context_deletion_result_list_item);
1600 static const ber_sequence_t Presentation_context_deletion_result_list_sequence_of[1] = {
1601 { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_Presentation_context_deletion_result_list_item },
1605 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_) {
1606 offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
1607 Presentation_context_deletion_result_list_sequence_of, hf_index, ett_pres_Presentation_context_deletion_result_list);
1611 static int dissect_presentation_context_deletion_result_list_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1612 return dissect_pres_Presentation_context_deletion_result_list(TRUE, tvb, offset, pinfo, tree, hf_pres_presentation_context_deletion_result_list);
1616 static const ber_sequence_t ACA_PPDU_sequence[] = {
1617 { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_presentation_context_addition_result_list_impl },
1618 { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_presentation_context_deletion_result_list_impl },
1619 { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_user_data },
1624 dissect_pres_ACA_PPDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1625 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
1626 ACA_PPDU_sequence, hf_index, ett_pres_ACA_PPDU);
1630 static int dissect_acaPPDU_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1631 return dissect_pres_ACA_PPDU(TRUE, tvb, offset, pinfo, tree, hf_pres_acaPPDU);
1635 static const value_string pres_Typed_data_type_vals[] = {
1642 static const ber_choice_t Typed_data_type_choice[] = {
1643 { 0, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_acPPDU_impl },
1644 { 1, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_acaPPDU_impl },
1645 { 2, BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_ttdPPDU },
1646 { 0, 0, 0, 0, NULL }
1650 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_) {
1651 offset = dissect_ber_choice(pinfo, tree, tvb, offset,
1652 Typed_data_type_choice, hf_index, ett_pres_Typed_data_type,
1659 static const ber_sequence_t RS_PPDU_sequence[] = {
1660 { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_presentation_context_identifier_list_impl },
1661 { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_user_data },
1666 dissect_pres_RS_PPDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1667 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
1668 RS_PPDU_sequence, hf_index, ett_pres_RS_PPDU);
1674 static const ber_sequence_t RSA_PPDU_sequence[] = {
1675 { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_presentation_context_identifier_list_impl },
1676 { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_user_data },
1681 dissect_pres_RSA_PPDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1682 offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
1683 RSA_PPDU_sequence, hf_index, ett_pres_RSA_PPDU);
1689 /*--- End of included file: packet-pres-fn.c ---*/
1697 dissect_ppdu(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
1700 proto_tree *pres_tree = NULL;
1702 /* do we have spdu type from the session dissector? */
1703 if( !pinfo->private_data ){
1705 proto_tree_add_text(tree, tvb, offset, -1,
1706 "Internal error:can't get spdu type from session dissector.");
1710 session = ( (struct SESSION_DATA_STRUCTURE*)(pinfo->private_data) );
1711 if(session->spdu_type == 0 ){
1713 proto_tree_add_text(tree, tvb, offset, -1,
1714 "Internal error:wrong spdu type %x from session dissector.",session->spdu_type);
1719 /* get type of tag */
1720 s_type = tvb_get_guint8(tvb, offset);
1721 /* set up type of Ppdu */
1722 if (check_col(pinfo->cinfo, COL_INFO))
1723 col_add_str(pinfo->cinfo, COL_INFO,
1724 val_to_str(session->spdu_type, ses_vals, "Unknown Ppdu type (0x%02x)"));
1726 ti = proto_tree_add_item(tree, proto_pres, tvb, offset, -1,
1728 pres_tree = proto_item_add_subtree(ti, ett_pres);
1731 switch(session->spdu_type){
1734 case SES_CONNECTION_REQUEST:
1735 offset = dissect_pres_CP_type(FALSE, tvb, offset, pinfo, pres_tree, -1);
1737 case SES_CONNECTION_ACCEPT:
1738 offset = dissect_pres_CPA_PPDU(FALSE, tvb, offset, pinfo, pres_tree, -1);
1741 offset = dissect_pres_Abort_type(FALSE, tvb, offset, pinfo, pres_tree, -1);
1743 case SES_DATA_TRANSFER:
1744 offset = dissect_pres_CPC_type(FALSE, tvb, offset, pinfo, pres_tree, -1);
1754 dissect_pres(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
1756 int offset = 0, old_offset;
1757 /* first, try to check length */
1758 /* do we have at least 4 bytes */
1759 if (!tvb_bytes_exist(tvb, 0, 4)){
1760 proto_tree_add_text(parent_tree, tvb, offset,
1761 tvb_reported_length_remaining(tvb,offset),"User data");
1762 return; /* no, it isn't a presentation PDU */
1765 /* we can't make any additional checking here */
1766 /* postpone it before dissector will have more information */
1768 if (check_col(pinfo->cinfo, COL_PROTOCOL))
1769 col_set_str(pinfo->cinfo, COL_PROTOCOL, "PRES");
1770 if (check_col(pinfo->cinfo, COL_INFO))
1771 col_clear(pinfo->cinfo, COL_INFO);
1772 /* save pointers for calling the acse dissector */
1773 global_tree = parent_tree;
1774 global_pinfo = pinfo;
1776 while (tvb_reported_length_remaining(tvb, offset) > 0){
1777 old_offset = offset;
1778 offset = dissect_ppdu(tvb, offset, pinfo, parent_tree);
1779 if(offset <= old_offset){
1780 proto_tree_add_text(parent_tree, tvb, offset, -1,"Invalid offset");
1781 THROW(ReportedBoundsError);
1787 /*--- proto_register_pres -------------------------------------------*/
1788 void proto_register_pres(void) {
1790 /* List of fields */
1791 static hf_register_info hf[] = {
1794 /*--- Included file: packet-pres-hfarr.c ---*/
1796 { &hf_pres_checkpointSize,
1797 { "checkpointSize", "pres.checkpointSize",
1798 FT_INT32, BASE_DEC, NULL, 0,
1800 { &hf_pres_windowSize,
1801 { "windowSize", "pres.windowSize",
1802 FT_INT32, BASE_DEC, NULL, 0,
1804 { &hf_pres_dialogueMode,
1805 { "dialogueMode", "pres.dialogueMode",
1806 FT_INT32, BASE_DEC, VALS(pres_T_dialogueMode_vals), 0,
1807 "RTORQapdu/dialogueMode", HFILL }},
1808 { &hf_pres_connectionDataRQ,
1809 { "connectionDataRQ", "pres.connectionDataRQ",
1810 FT_UINT32, BASE_DEC, VALS(pres_ConnectionData_vals), 0,
1811 "RTORQapdu/connectionDataRQ", HFILL }},
1812 { &hf_pres_applicationProtocol,
1813 { "applicationProtocol", "pres.applicationProtocol",
1814 FT_INT32, BASE_DEC, NULL, 0,
1815 "RTORQapdu/applicationProtocol", HFILL }},
1816 { &hf_pres_connectionDataAC,
1817 { "connectionDataAC", "pres.connectionDataAC",
1818 FT_UINT32, BASE_DEC, VALS(pres_ConnectionData_vals), 0,
1819 "RTOACapdu/connectionDataAC", HFILL }},
1820 { &hf_pres_refuseReason,
1821 { "refuseReason", "pres.refuseReason",
1822 FT_INT32, BASE_DEC, VALS(pres_RefuseReason_vals), 0,
1823 "RTORJapdu/refuseReason", HFILL }},
1824 { &hf_pres_userDataRJ,
1825 { "userDataRJ", "pres.userDataRJ",
1826 FT_NONE, BASE_NONE, NULL, 0,
1827 "RTORJapdu/userDataRJ", HFILL }},
1828 { &hf_pres_abortReason,
1829 { "abortReason", "pres.abortReason",
1830 FT_INT32, BASE_DEC, VALS(pres_AbortReason_vals), 0,
1831 "RTABapdu/abortReason", HFILL }},
1832 { &hf_pres_reflectedParameter,
1833 { "reflectedParameter", "pres.reflectedParameter",
1834 FT_BYTES, BASE_HEX, NULL, 0,
1835 "RTABapdu/reflectedParameter", HFILL }},
1836 { &hf_pres_userdataAB,
1837 { "userdataAB", "pres.userdataAB",
1838 FT_NONE, BASE_NONE, NULL, 0,
1839 "RTABapdu/userdataAB", HFILL }},
1841 { "open", "pres.open",
1842 FT_NONE, BASE_NONE, NULL, 0,
1843 "ConnectionData/open", HFILL }},
1845 { "recover", "pres.recover",
1846 FT_NONE, BASE_NONE, NULL, 0,
1847 "ConnectionData/recover", HFILL }},
1848 { &hf_pres_callingSSuserReference,
1849 { "callingSSuserReference", "pres.callingSSuserReference",
1850 FT_UINT32, BASE_DEC, VALS(pres_CallingSSuserReference_vals), 0,
1851 "SessionConnectionIdentifier/callingSSuserReference", HFILL }},
1852 { &hf_pres_commonReference,
1853 { "commonReference", "pres.commonReference",
1854 FT_STRING, BASE_NONE, NULL, 0,
1855 "SessionConnectionIdentifier/commonReference", HFILL }},
1856 { &hf_pres_additionalReferenceInformation,
1857 { "additionalReferenceInformation", "pres.additionalReferenceInformation",
1858 FT_STRING, BASE_NONE, NULL, 0,
1859 "SessionConnectionIdentifier/additionalReferenceInformation", HFILL }},
1860 { &hf_pres_t61String,
1861 { "t61String", "pres.t61String",
1862 FT_STRING, BASE_NONE, NULL, 0,
1863 "CallingSSuserReference/t61String", HFILL }},
1864 { &hf_pres_octetString,
1865 { "octetString", "pres.octetString",
1866 FT_BYTES, BASE_HEX, NULL, 0,
1867 "CallingSSuserReference/octetString", HFILL }},
1868 { &hf_pres_mode_selector,
1869 { "mode-selector", "pres.mode_selector",
1870 FT_NONE, BASE_NONE, NULL, 0,
1872 { &hf_pres_x410_mode_parameters,
1873 { "x410-mode-parameters", "pres.x410_mode_parameters",
1874 FT_NONE, BASE_NONE, NULL, 0,
1875 "CP-type/x410-mode-parameters", HFILL }},
1876 { &hf_pres_normal_mode_parameters,
1877 { "normal-mode-parameters", "pres.normal_mode_parameters",
1878 FT_NONE, BASE_NONE, NULL, 0,
1879 "CP-type/normal-mode-parameters", HFILL }},
1880 { &hf_pres_protocol_version,
1881 { "protocol-version", "pres.protocol_version",
1882 FT_BYTES, BASE_HEX, NULL, 0,
1884 { &hf_pres_calling_presentation_selector,
1885 { "calling-presentation-selector", "pres.calling_presentation_selector",
1886 FT_BYTES, BASE_HEX, NULL, 0,
1887 "CP-type/normal-mode-parameters/calling-presentation-selector", HFILL }},
1888 { &hf_pres_called_presentation_selector,
1889 { "called-presentation-selector", "pres.called_presentation_selector",
1890 FT_BYTES, BASE_HEX, NULL, 0,
1891 "CP-type/normal-mode-parameters/called-presentation-selector", HFILL }},
1892 { &hf_pres_presentation_context_definition_list,
1893 { "presentation-context-definition-list", "pres.presentation_context_definition_list",
1894 FT_UINT32, BASE_DEC, NULL, 0,
1895 "CP-type/normal-mode-parameters/presentation-context-definition-list", HFILL }},
1896 { &hf_pres_default_context_name,
1897 { "default-context-name", "pres.default_context_name",
1898 FT_NONE, BASE_NONE, NULL, 0,
1899 "CP-type/normal-mode-parameters/default-context-name", HFILL }},
1900 { &hf_pres_presentation_requirements,
1901 { "presentation-requirements", "pres.presentation_requirements",
1902 FT_BYTES, BASE_HEX, NULL, 0,
1904 { &hf_pres_user_session_requirements,
1905 { "user-session-requirements", "pres.user_session_requirements",
1906 FT_BYTES, BASE_HEX, NULL, 0,
1908 { &hf_pres_protocol_options,
1909 { "protocol-options", "pres.protocol_options",
1910 FT_BYTES, BASE_HEX, NULL, 0,
1912 { &hf_pres_initiators_nominated_context,
1913 { "initiators-nominated-context", "pres.initiators_nominated_context",
1914 FT_INT32, BASE_DEC, NULL, 0,
1915 "CP-type/normal-mode-parameters/initiators-nominated-context", HFILL }},
1916 { &hf_pres_extensions,
1917 { "extensions", "pres.extensions",
1918 FT_NONE, BASE_NONE, NULL, 0,
1919 "CP-type/normal-mode-parameters/extensions", HFILL }},
1920 { &hf_pres_user_data,
1921 { "user-data", "pres.user_data",
1922 FT_UINT32, BASE_DEC, VALS(pres_User_data_vals), 0,
1924 { &hf_pres_cPR_PPDU_x400_mode_parameters,
1925 { "x410-mode-parameters", "pres.x410_mode_parameters",
1926 FT_NONE, BASE_NONE, NULL, 0,
1927 "CPA-PPDU/x410-mode-parameters", HFILL }},
1928 { &hf_pres_cPU_PPDU_normal_mode_parameters,
1929 { "normal-mode-parameters", "pres.normal_mode_parameters",
1930 FT_NONE, BASE_NONE, NULL, 0,
1931 "CPA-PPDU/normal-mode-parameters", HFILL }},
1932 { &hf_pres_responding_presentation_selector,
1933 { "responding-presentation-selector", "pres.responding_presentation_selector",
1934 FT_BYTES, BASE_HEX, NULL, 0,
1936 { &hf_pres_presentation_context_definition_result_list,
1937 { "presentation-context-definition-result-list", "pres.presentation_context_definition_result_list",
1938 FT_UINT32, BASE_DEC, NULL, 0,
1940 { &hf_pres_responders_nominated_context,
1941 { "responders-nominated-context", "pres.responders_nominated_context",
1942 FT_INT32, BASE_DEC, NULL, 0,
1943 "CPA-PPDU/normal-mode-parameters/responders-nominated-context", HFILL }},
1944 { &hf_pres_cPU_PPDU_x400_mode_parameters,
1945 { "x400-mode-parameters", "pres.x400_mode_parameters",
1946 FT_NONE, BASE_NONE, NULL, 0,
1947 "CPR-PPDU/x400-mode-parameters", HFILL }},
1948 { &hf_pres_cPR_PPDU_normal_mode_parameters,
1949 { "normal-mode-parameters", "pres.normal_mode_parameters",
1950 FT_NONE, BASE_NONE, NULL, 0,
1951 "CPR-PPDU/normal-mode-parameters", HFILL }},
1952 { &hf_pres_default_context_result,
1953 { "default-context-result", "pres.default_context_result",
1954 FT_INT32, BASE_DEC, VALS(pres_Result_vals), 0,
1955 "CPR-PPDU/normal-mode-parameters/default-context-result", HFILL }},
1956 { &hf_pres_cPR_PPDU__provider_reason,
1957 { "provider-reason", "pres.provider_reason",
1958 FT_INT32, BASE_DEC, VALS(pres_Provider_reason_vals), 0,
1959 "CPR-PPDU/normal-mode-parameters/provider-reason", HFILL }},
1960 { &hf_pres_aru_ppdu,
1961 { "aru-ppdu", "pres.aru_ppdu",
1962 FT_UINT32, BASE_DEC, VALS(pres_ARU_PPDU_vals), 0,
1963 "Abort-type/aru-ppdu", HFILL }},
1964 { &hf_pres_arp_ppdu,
1965 { "arp-ppdu", "pres.arp_ppdu",
1966 FT_NONE, BASE_NONE, NULL, 0,
1967 "Abort-type/arp-ppdu", HFILL }},
1968 { &hf_pres_aRU_PPDU_x400_mode_parameters,
1969 { "x400-mode-parameters", "pres.x400_mode_parameters",
1970 FT_NONE, BASE_NONE, NULL, 0,
1971 "ARU-PPDU/x400-mode-parameters", HFILL }},
1972 { &hf_pres_aRU_PPDU_normal_mode_parameters,
1973 { "normal-mode-parameters", "pres.normal_mode_parameters",
1974 FT_NONE, BASE_NONE, NULL, 0,
1975 "ARU-PPDU/normal-mode-parameters", HFILL }},
1976 { &hf_pres_presentation_context_identifier_list,
1977 { "presentation-context-identifier-list", "pres.presentation_context_identifier_list",
1978 FT_UINT32, BASE_DEC, NULL, 0,
1980 { &hf_pres_aRU_PPDU_provider_reason,
1981 { "provider-reason", "pres.provider_reason",
1982 FT_INT32, BASE_DEC, VALS(pres_Abort_reason_vals), 0,
1983 "ARP-PPDU/provider-reason", HFILL }},
1984 { &hf_pres_event_identifier,
1985 { "event-identifier", "pres.event_identifier",
1986 FT_INT32, BASE_DEC, VALS(pres_Event_identifier_vals), 0,
1987 "ARP-PPDU/event-identifier", HFILL }},
1989 { "acPPDU", "pres.acPPDU",
1990 FT_NONE, BASE_NONE, NULL, 0,
1991 "Typed-data-type/acPPDU", HFILL }},
1993 { "acaPPDU", "pres.acaPPDU",
1994 FT_NONE, BASE_NONE, NULL, 0,
1995 "Typed-data-type/acaPPDU", HFILL }},
1997 { "ttdPPDU", "pres.ttdPPDU",
1998 FT_UINT32, BASE_DEC, VALS(pres_User_data_vals), 0,
1999 "Typed-data-type/ttdPPDU", HFILL }},
2000 { &hf_pres_presentation_context_addition_list,
2001 { "presentation-context-addition-list", "pres.presentation_context_addition_list",
2002 FT_UINT32, BASE_DEC, NULL, 0,
2003 "AC-PPDU/presentation-context-addition-list", HFILL }},
2004 { &hf_pres_presentation_context_deletion_list,
2005 { "presentation-context-deletion-list", "pres.presentation_context_deletion_list",
2006 FT_UINT32, BASE_DEC, NULL, 0,
2007 "AC-PPDU/presentation-context-deletion-list", HFILL }},
2008 { &hf_pres_presentation_context_addition_result_list,
2009 { "presentation-context-addition-result-list", "pres.presentation_context_addition_result_list",
2010 FT_UINT32, BASE_DEC, NULL, 0,
2011 "ACA-PPDU/presentation-context-addition-result-list", HFILL }},
2012 { &hf_pres_presentation_context_deletion_result_list,
2013 { "presentation-context-deletion-result-list", "pres.presentation_context_deletion_result_list",
2014 FT_UINT32, BASE_DEC, NULL, 0,
2015 "ACA-PPDU/presentation-context-deletion-result-list", HFILL }},
2016 { &hf_pres_Context_list_item,
2017 { "Item", "pres.Context_list_item",
2018 FT_NONE, BASE_NONE, NULL, 0,
2019 "Context-list/_item", HFILL }},
2020 { &hf_pres_presentation_context_identifier,
2021 { "presentation-context-identifier", "pres.presentation_context_identifier",
2022 FT_INT32, BASE_DEC, NULL, 0,
2024 { &hf_pres_abstract_syntax_name,
2025 { "abstract-syntax-name", "pres.abstract_syntax_name",
2026 FT_STRING, BASE_NONE, NULL, 0,
2028 { &hf_pres_transfer_syntax_name_list,
2029 { "transfer-syntax-name-list", "pres.transfer_syntax_name_list",
2030 FT_UINT32, BASE_DEC, NULL, 0,
2031 "Context-list/_item/transfer-syntax-name-list", HFILL }},
2032 { &hf_pres_transfer_syntax_name_list_item,
2033 { "Item", "pres.transfer_syntax_name_list_item",
2034 FT_STRING, BASE_NONE, NULL, 0,
2035 "Context-list/_item/transfer-syntax-name-list/_item", HFILL }},
2036 { &hf_pres_transfer_syntax_name,
2037 { "transfer-syntax-name", "pres.transfer_syntax_name",
2038 FT_STRING, BASE_NONE, NULL, 0,
2040 { &hf_pres_mode_value,
2041 { "mode-value", "pres.mode_value",
2042 FT_INT32, BASE_DEC, VALS(pres_T_mode_value_vals), 0,
2043 "Mode-selector/mode-value", HFILL }},
2044 { &hf_pres_Presentation_context_deletion_list_item,
2045 { "Item", "pres.Presentation_context_deletion_list_item",
2046 FT_INT32, BASE_DEC, NULL, 0,
2047 "Presentation-context-deletion-list/_item", HFILL }},
2048 { &hf_pres_Presentation_context_deletion_result_list_item,
2049 { "Item", "pres.Presentation_context_deletion_result_list_item",
2050 FT_INT32, BASE_DEC, VALS(pres_Presentation_context_deletion_result_list_item_vals), 0,
2051 "Presentation-context-deletion-result-list/_item", HFILL }},
2052 { &hf_pres_Presentation_context_identifier_list_item,
2053 { "Item", "pres.Presentation_context_identifier_list_item",
2054 FT_NONE, BASE_NONE, NULL, 0,
2055 "Presentation-context-identifier-list/_item", HFILL }},
2056 { &hf_pres_Result_list_item,
2057 { "Item", "pres.Result_list_item",
2058 FT_NONE, BASE_NONE, NULL, 0,
2059 "Result-list/_item", HFILL }},
2061 { "result", "pres.result",
2062 FT_INT32, BASE_DEC, VALS(pres_Result_vals), 0,
2063 "Result-list/_item/result", HFILL }},
2064 { &hf_pres_provider_reason,
2065 { "provider-reason", "pres.provider_reason",
2066 FT_INT32, BASE_DEC, VALS(pres_T_provider_reason_vals), 0,
2067 "Result-list/_item/provider-reason", HFILL }},
2068 { &hf_pres_simply_encoded_data,
2069 { "simply-encoded-data", "pres.simply_encoded_data",
2070 FT_BYTES, BASE_HEX, NULL, 0,
2071 "User-data/simply-encoded-data", HFILL }},
2072 { &hf_pres_fully_encoded_data,
2073 { "fully-encoded-data", "pres.fully_encoded_data",
2074 FT_UINT32, BASE_DEC, NULL, 0,
2075 "User-data/fully-encoded-data", HFILL }},
2076 { &hf_pres_Fully_encoded_data_item,
2077 { "Item", "pres.Fully_encoded_data_item",
2078 FT_NONE, BASE_NONE, NULL, 0,
2079 "Fully-encoded-data/_item", HFILL }},
2080 { &hf_pres_presentation_data_values,
2081 { "presentation-data-values", "pres.presentation_data_values",
2082 FT_UINT32, BASE_DEC, VALS(pres_T_presentation_data_values_vals), 0,
2083 "PDV-list/presentation-data-values", HFILL }},
2084 { &hf_pres_single_ASN1_type,
2085 { "single-ASN1-type", "pres.single_ASN1_type",
2086 FT_BYTES, BASE_HEX, NULL, 0,
2087 "PDV-list/presentation-data-values/single-ASN1-type", HFILL }},
2088 { &hf_pres_octet_aligned,
2089 { "octet-aligned", "pres.octet_aligned",
2090 FT_BYTES, BASE_HEX, NULL, 0,
2091 "PDV-list/presentation-data-values/octet-aligned", HFILL }},
2092 { &hf_pres_arbitrary,
2093 { "arbitrary", "pres.arbitrary",
2094 FT_BYTES, BASE_HEX, NULL, 0,
2095 "PDV-list/presentation-data-values/arbitrary", HFILL }},
2096 { &hf_pres_Presentation_requirements_context_management,
2097 { "context-management", "pres.context-management",
2098 FT_BOOLEAN, 8, NULL, 0x80,
2100 { &hf_pres_Presentation_requirements_restoration,
2101 { "restoration", "pres.restoration",
2102 FT_BOOLEAN, 8, NULL, 0x40,
2104 { &hf_pres_Protocol_options_nominated_context,
2105 { "nominated-context", "pres.nominated-context",
2106 FT_BOOLEAN, 8, NULL, 0x80,
2108 { &hf_pres_Protocol_options_short_encoding,
2109 { "short-encoding", "pres.short-encoding",
2110 FT_BOOLEAN, 8, NULL, 0x40,
2112 { &hf_pres_Protocol_options_packed_encoding_rules,
2113 { "packed-encoding-rules", "pres.packed-encoding-rules",
2114 FT_BOOLEAN, 8, NULL, 0x20,
2116 { &hf_pres_Protocol_version_version_1,
2117 { "version-1", "pres.version-1",
2118 FT_BOOLEAN, 8, NULL, 0x80,
2120 { &hf_pres_User_session_requirements_half_duplex,
2121 { "half-duplex", "pres.half-duplex",
2122 FT_BOOLEAN, 8, NULL, 0x80,
2124 { &hf_pres_User_session_requirements_duplex,
2125 { "duplex", "pres.duplex",
2126 FT_BOOLEAN, 8, NULL, 0x40,
2128 { &hf_pres_User_session_requirements_expedited_data,
2129 { "expedited-data", "pres.expedited-data",
2130 FT_BOOLEAN, 8, NULL, 0x20,
2132 { &hf_pres_User_session_requirements_minor_synchronize,
2133 { "minor-synchronize", "pres.minor-synchronize",
2134 FT_BOOLEAN, 8, NULL, 0x10,
2136 { &hf_pres_User_session_requirements_major_synchronize,
2137 { "major-synchronize", "pres.major-synchronize",
2138 FT_BOOLEAN, 8, NULL, 0x08,
2140 { &hf_pres_User_session_requirements_resynchronize,
2141 { "resynchronize", "pres.resynchronize",
2142 FT_BOOLEAN, 8, NULL, 0x04,
2144 { &hf_pres_User_session_requirements_activity_management,
2145 { "activity-management", "pres.activity-management",
2146 FT_BOOLEAN, 8, NULL, 0x02,
2148 { &hf_pres_User_session_requirements_negotiated_release,
2149 { "negotiated-release", "pres.negotiated-release",
2150 FT_BOOLEAN, 8, NULL, 0x01,
2152 { &hf_pres_User_session_requirements_capability_data,
2153 { "capability-data", "pres.capability-data",
2154 FT_BOOLEAN, 8, NULL, 0x80,
2156 { &hf_pres_User_session_requirements_exceptions,
2157 { "exceptions", "pres.exceptions",
2158 FT_BOOLEAN, 8, NULL, 0x40,
2160 { &hf_pres_User_session_requirements_typed_data,
2161 { "typed-data", "pres.typed-data",
2162 FT_BOOLEAN, 8, NULL, 0x20,
2164 { &hf_pres_User_session_requirements_symmetric_synchronize,
2165 { "symmetric-synchronize", "pres.symmetric-synchronize",
2166 FT_BOOLEAN, 8, NULL, 0x10,
2168 { &hf_pres_User_session_requirements_data_separation,
2169 { "data-separation", "pres.data-separation",
2170 FT_BOOLEAN, 8, NULL, 0x08,
2173 /*--- End of included file: packet-pres-hfarr.c ---*/
2177 /* List of subtrees */
2178 static gint *ett[] = {
2181 /*--- Included file: packet-pres-ettarr.c ---*/
2183 &ett_pres_RTORQapdu,
2184 &ett_pres_RTOACapdu,
2185 &ett_pres_RTORJapdu,
2187 &ett_pres_ConnectionData,
2188 &ett_pres_SessionConnectionIdentifier,
2189 &ett_pres_CallingSSuserReference,
2191 &ett_pres_T_normal_mode_parameters,
2192 &ett_pres_T_extensions,
2194 &ett_pres_T_CPA_PPDU_normal_mode_parameters,
2196 &ett_pres_T_CPR_PPDU_normal_mode_parameters,
2197 &ett_pres_Abort_type,
2199 &ett_pres_T_ARU_PPDU_normal_mode_parameters,
2201 &ett_pres_Typed_data_type,
2206 &ett_pres_Context_list,
2207 &ett_pres_Context_list_item,
2208 &ett_pres_SEQUENCE_OF_Transfer_syntax_name,
2209 &ett_pres_Default_context_name,
2210 &ett_pres_Mode_selector,
2211 &ett_pres_Presentation_context_deletion_list,
2212 &ett_pres_Presentation_context_deletion_result_list,
2213 &ett_pres_Presentation_context_identifier_list,
2214 &ett_pres_Presentation_context_identifier_list_item,
2215 &ett_pres_Presentation_requirements,
2216 &ett_pres_Protocol_options,
2217 &ett_pres_Protocol_version,
2218 &ett_pres_Result_list,
2219 &ett_pres_Result_list_item,
2220 &ett_pres_User_data,
2221 &ett_pres_Fully_encoded_data,
2223 &ett_pres_T_presentation_data_values,
2224 &ett_pres_User_session_requirements,
2226 /*--- End of included file: packet-pres-ettarr.c ---*/
2230 /* Register protocol */
2231 proto_pres = proto_register_protocol(PNAME, PSNAME, PFNAME);
2232 register_dissector("pres", dissect_pres, proto_pres);
2233 /* Register fields and subtrees */
2234 proto_register_field_array(proto_pres, hf, array_length(hf));
2235 proto_register_subtree_array(ett, array_length(ett));
2236 register_init_routine(pres_init);
2241 /*--- proto_reg_handoff_pres ---------------------------------------*/
2242 void proto_reg_handoff_pres(void) {
2244 /* register_ber_oid_dissector("0.4.0.0.1.1.1.1", dissect_pres, proto_pres,
2245 "itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) abstractSyntax(1) pres(1) version1(1)"); */
2247 data_handle = find_dissector("data");
2248 acse_handle = find_dissector("acse");