1 /* Do not modify this file. */
2 /* It is created automatically by the ASN.1 to Wireshark dissector compiler */
4 /* ../../tools/asn2wrs.py -b -p pres -c ./pres.cnf -s ./packet-pres-template -D . ISO8823-PRESENTATION.asn ISO9576-PRESENTATION.asn */
6 /* Input file: packet-pres-template.c */
8 #line 1 "../../asn1/pres/packet-pres-template.c"
10 * Routine to dissect ISO 8823 OSI Presentation Protocol packets
11 * Based on the dissector by
12 * Yuriy Sidelnikov <YSidelnikov@hotmail.com>
16 * Wireshark - Network traffic analyzer
17 * By Gerald Combs <gerald@wireshark.org>
18 * Copyright 1998 Gerald Combs
20 * This program is free software; you can redistribute it and/or
21 * modify it under the terms of the GNU General Public License
22 * as published by the Free Software Foundation; either version 2
23 * of the License, or (at your option) any later version.
25 * This program is distributed in the hope that it will be useful,
26 * but WITHOUT ANY WARRANTY; without even the implied warranty of
27 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 * GNU General Public License for more details.
30 * You should have received a copy of the GNU General Public License
31 * along with this program; if not, write to the Free Software
32 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
40 #include <epan/packet.h>
41 #include <epan/prefs.h>
42 #include <epan/conversation.h>
43 #include <epan/emem.h>
44 #include <epan/expert.h>
49 #include <epan/asn1.h>
50 #include <epan/oids.h>
51 #include "packet-ber.h"
52 #include "packet-ses.h"
53 #include "packet-pres.h"
54 #include "packet-rtse.h"
57 #define PNAME "ISO 8823 OSI Presentation Protocol"
61 #define CLPNAME "ISO 9576-1 OSI Connectionless Presentation Protocol"
62 #define CLPSNAME "CLPRES"
63 #define CLPFNAME "clpres"
65 /* Initialize the protocol and registered fields */
66 static int proto_pres = -1;
68 /* Initialize the connectionles protocol */
69 static int proto_clpres = -1;
72 /* type of session envelop */
73 static struct SESSION_DATA_STRUCTURE* session = NULL;
75 /* pointers for acse dissector */
76 proto_tree *global_tree = NULL;
77 packet_info *global_pinfo = NULL;
79 static const char *abstract_syntax_name_oid;
80 static guint32 presentation_context_identifier;
82 /* to keep track of presentation context identifiers and protocol-oids */
83 typedef struct _pres_ctx_oid_t {
88 static GHashTable *pres_ctx_oid_table = NULL;
90 typedef struct _pres_user_t {
95 static pres_user_t *pres_users;
96 static guint num_pres_users;
98 static int hf_pres_CP_type = -1;
99 static int hf_pres_CPA_PPDU = -1;
100 static int hf_pres_Abort_type = -1;
101 static int hf_pres_CPR_PPDU = -1;
102 static int hf_pres_Typed_data_type = -1;
105 /*--- Included file: packet-pres-hf.c ---*/
106 #line 1 "../../asn1/pres/packet-pres-hf.c"
107 static int hf_pres_UD_type_PDU = -1; /* UD_type */
108 static int hf_pres_UDC_type_PDU = -1; /* UDC_type */
109 static int hf_pres_mode_selector = -1; /* Mode_selector */
110 static int hf_pres_x410_mode_parameters = -1; /* RTORQapdu */
111 static int hf_pres_normal_mode_parameters = -1; /* T_normal_mode_parameters */
112 static int hf_pres_protocol_version = -1; /* Protocol_version */
113 static int hf_pres_calling_presentation_selector = -1; /* Calling_presentation_selector */
114 static int hf_pres_called_presentation_selector = -1; /* Called_presentation_selector */
115 static int hf_pres_presentation_context_definition_list = -1; /* Presentation_context_definition_list */
116 static int hf_pres_default_context_name = -1; /* Default_context_name */
117 static int hf_pres_presentation_requirements = -1; /* Presentation_requirements */
118 static int hf_pres_user_session_requirements = -1; /* User_session_requirements */
119 static int hf_pres_protocol_options = -1; /* Protocol_options */
120 static int hf_pres_initiators_nominated_context = -1; /* Presentation_context_identifier */
121 static int hf_pres_extensions = -1; /* T_extensions */
122 static int hf_pres_user_data = -1; /* User_data */
123 static int hf_pres_cPR_PPDU_x400_mode_parameters = -1; /* RTOACapdu */
124 static int hf_pres_cPU_PPDU_normal_mode_parameters = -1; /* T_CPA_PPDU_normal_mode_parameters */
125 static int hf_pres_responding_presentation_selector = -1; /* Responding_presentation_selector */
126 static int hf_pres_presentation_context_definition_result_list = -1; /* Presentation_context_definition_result_list */
127 static int hf_pres_responders_nominated_context = -1; /* Presentation_context_identifier */
128 static int hf_pres_cPU_PPDU_x400_mode_parameters = -1; /* RTORJapdu */
129 static int hf_pres_cPR_PPDU_normal_mode_parameters = -1; /* T_CPR_PPDU_normal_mode_parameters */
130 static int hf_pres_default_context_result = -1; /* Default_context_result */
131 static int hf_pres_cPR_PPDU__provider_reason = -1; /* Provider_reason */
132 static int hf_pres_aru_ppdu = -1; /* ARU_PPDU */
133 static int hf_pres_arp_ppdu = -1; /* ARP_PPDU */
134 static int hf_pres_aRU_PPDU_x400_mode_parameters = -1; /* RTABapdu */
135 static int hf_pres_aRU_PPDU_normal_mode_parameters = -1; /* T_ARU_PPDU_normal_mode_parameters */
136 static int hf_pres_presentation_context_identifier_list = -1; /* Presentation_context_identifier_list */
137 static int hf_pres_aRU_PPDU_provider_reason = -1; /* Abort_reason */
138 static int hf_pres_event_identifier = -1; /* Event_identifier */
139 static int hf_pres_acPPDU = -1; /* AC_PPDU */
140 static int hf_pres_acaPPDU = -1; /* ACA_PPDU */
141 static int hf_pres_ttdPPDU = -1; /* User_data */
142 static int hf_pres_presentation_context_addition_list = -1; /* Presentation_context_addition_list */
143 static int hf_pres_presentation_context_deletion_list = -1; /* Presentation_context_deletion_list */
144 static int hf_pres_presentation_context_addition_result_list = -1; /* Presentation_context_addition_result_list */
145 static int hf_pres_presentation_context_deletion_result_list = -1; /* Presentation_context_deletion_result_list */
146 static int hf_pres_Context_list_item = -1; /* Context_list_item */
147 static int hf_pres_presentation_context_identifier = -1; /* Presentation_context_identifier */
148 static int hf_pres_abstract_syntax_name = -1; /* Abstract_syntax_name */
149 static int hf_pres_transfer_syntax_name_list = -1; /* SEQUENCE_OF_Transfer_syntax_name */
150 static int hf_pres_transfer_syntax_name_list_item = -1; /* Transfer_syntax_name */
151 static int hf_pres_transfer_syntax_name = -1; /* Transfer_syntax_name */
152 static int hf_pres_mode_value = -1; /* T_mode_value */
153 static int hf_pres_Presentation_context_deletion_list_item = -1; /* Presentation_context_identifier */
154 static int hf_pres_Presentation_context_deletion_result_list_item = -1; /* Presentation_context_deletion_result_list_item */
155 static int hf_pres_Presentation_context_identifier_list_item = -1; /* Presentation_context_identifier_list_item */
156 static int hf_pres_Result_list_item = -1; /* Result_list_item */
157 static int hf_pres_result = -1; /* Result */
158 static int hf_pres_provider_reason = -1; /* T_provider_reason */
159 static int hf_pres_simply_encoded_data = -1; /* Simply_encoded_data */
160 static int hf_pres_fully_encoded_data = -1; /* Fully_encoded_data */
161 static int hf_pres_Fully_encoded_data_item = -1; /* PDV_list */
162 static int hf_pres_presentation_data_values = -1; /* T_presentation_data_values */
163 static int hf_pres_single_ASN1_type = -1; /* T_single_ASN1_type */
164 static int hf_pres_octet_aligned = -1; /* T_octet_aligned */
165 static int hf_pres_arbitrary = -1; /* BIT_STRING */
167 static int hf_pres_Presentation_requirements_context_management = -1;
168 static int hf_pres_Presentation_requirements_restoration = -1;
169 static int hf_pres_Protocol_options_nominated_context = -1;
170 static int hf_pres_Protocol_options_short_encoding = -1;
171 static int hf_pres_Protocol_options_packed_encoding_rules = -1;
172 static int hf_pres_Protocol_version_version_1 = -1;
173 static int hf_pres_User_session_requirements_half_duplex = -1;
174 static int hf_pres_User_session_requirements_duplex = -1;
175 static int hf_pres_User_session_requirements_expedited_data = -1;
176 static int hf_pres_User_session_requirements_minor_synchronize = -1;
177 static int hf_pres_User_session_requirements_major_synchronize = -1;
178 static int hf_pres_User_session_requirements_resynchronize = -1;
179 static int hf_pres_User_session_requirements_activity_management = -1;
180 static int hf_pres_User_session_requirements_negotiated_release = -1;
181 static int hf_pres_User_session_requirements_capability_data = -1;
182 static int hf_pres_User_session_requirements_exceptions = -1;
183 static int hf_pres_User_session_requirements_typed_data = -1;
184 static int hf_pres_User_session_requirements_symmetric_synchronize = -1;
185 static int hf_pres_User_session_requirements_data_separation = -1;
187 /*--- End of included file: packet-pres-hf.c ---*/
188 #line 97 "../../asn1/pres/packet-pres-template.c"
190 /* Initialize the subtree pointers */
191 static gint ett_pres = -1;
194 /*--- Included file: packet-pres-ett.c ---*/
195 #line 1 "../../asn1/pres/packet-pres-ett.c"
196 static gint ett_pres_CP_type = -1;
197 static gint ett_pres_T_normal_mode_parameters = -1;
198 static gint ett_pres_T_extensions = -1;
199 static gint ett_pres_CPA_PPDU = -1;
200 static gint ett_pres_T_CPA_PPDU_normal_mode_parameters = -1;
201 static gint ett_pres_CPR_PPDU = -1;
202 static gint ett_pres_T_CPR_PPDU_normal_mode_parameters = -1;
203 static gint ett_pres_Abort_type = -1;
204 static gint ett_pres_ARU_PPDU = -1;
205 static gint ett_pres_T_ARU_PPDU_normal_mode_parameters = -1;
206 static gint ett_pres_ARP_PPDU = -1;
207 static gint ett_pres_Typed_data_type = -1;
208 static gint ett_pres_AC_PPDU = -1;
209 static gint ett_pres_ACA_PPDU = -1;
210 static gint ett_pres_RS_PPDU = -1;
211 static gint ett_pres_RSA_PPDU = -1;
212 static gint ett_pres_Context_list = -1;
213 static gint ett_pres_Context_list_item = -1;
214 static gint ett_pres_SEQUENCE_OF_Transfer_syntax_name = -1;
215 static gint ett_pres_Default_context_name = -1;
216 static gint ett_pres_Mode_selector = -1;
217 static gint ett_pres_Presentation_context_deletion_list = -1;
218 static gint ett_pres_Presentation_context_deletion_result_list = -1;
219 static gint ett_pres_Presentation_context_identifier_list = -1;
220 static gint ett_pres_Presentation_context_identifier_list_item = -1;
221 static gint ett_pres_Presentation_requirements = -1;
222 static gint ett_pres_Protocol_options = -1;
223 static gint ett_pres_Protocol_version = -1;
224 static gint ett_pres_Result_list = -1;
225 static gint ett_pres_Result_list_item = -1;
226 static gint ett_pres_User_data = -1;
227 static gint ett_pres_Fully_encoded_data = -1;
228 static gint ett_pres_PDV_list = -1;
229 static gint ett_pres_T_presentation_data_values = -1;
230 static gint ett_pres_User_session_requirements = -1;
231 static gint ett_pres_UD_type = -1;
233 /*--- End of included file: packet-pres-ett.c ---*/
234 #line 102 "../../asn1/pres/packet-pres-template.c"
236 UAT_DEC_CB_DEF(pres_users, ctx_id, pres_user_t)
237 UAT_CSTRING_CB_DEF(pres_users, oid, pres_user_t)
240 pres_ctx_oid_hash(gconstpointer k)
242 pres_ctx_oid_t *pco=(pres_ctx_oid_t *)k;
247 pres_ctx_oid_equal(gconstpointer k1, gconstpointer k2)
249 pres_ctx_oid_t *pco1=(pres_ctx_oid_t *)k1;
250 pres_ctx_oid_t *pco2=(pres_ctx_oid_t *)k2;
251 return (pco1->ctx_id==pco2->ctx_id && pco1->index==pco2->index);
257 if( pres_ctx_oid_table ){
258 g_hash_table_destroy(pres_ctx_oid_table);
259 pres_ctx_oid_table = NULL;
261 pres_ctx_oid_table = g_hash_table_new(pres_ctx_oid_hash,
267 register_ctx_id_and_oid(packet_info *pinfo _U_, guint32 idx, const char *oid)
269 pres_ctx_oid_t *pco, *tmppco;
270 conversation_t *conversation;
273 /* we did not get any oid name, malformed packet? */
277 pco=se_alloc(sizeof(pres_ctx_oid_t));
279 pco->oid=se_strdup(oid);
280 conversation=find_conversation (pinfo->fd->num, &pinfo->src, &pinfo->dst,
281 pinfo->ptype, pinfo->srcport, pinfo->destport, 0);
283 pco->index = conversation->index;
288 /* if this ctx already exists, remove the old one first */
289 tmppco=(pres_ctx_oid_t *)g_hash_table_lookup(pres_ctx_oid_table, pco);
291 g_hash_table_remove(pres_ctx_oid_table, tmppco);
294 g_hash_table_insert(pres_ctx_oid_table, pco, pco);
298 find_oid_by_pres_ctx_id(packet_info *pinfo _U_, guint32 idx)
300 pres_ctx_oid_t pco, *tmppco;
301 conversation_t *conversation;
304 conversation=find_conversation (pinfo->fd->num, &pinfo->src, &pinfo->dst,
305 pinfo->ptype, pinfo->srcport, pinfo->destport, 0);
307 pco.index = conversation->index;
312 tmppco=(pres_ctx_oid_t *)g_hash_table_lookup(pres_ctx_oid_table, &pco);
320 pres_copy_cb(void *dest, const void *orig, size_t len _U_)
322 pres_user_t *u = dest;
323 const pres_user_t *o = orig;
325 u->ctx_id = o->ctx_id;
326 u->oid = g_strdup(o->oid);
332 pres_free_cb(void *r)
340 pres_try_users_table(guint32 ctx_id, tvbuff_t *tvb, int offset, packet_info *pinfo)
345 for (i = 0; i < num_pres_users; i++) {
346 pres_user_t *u = &(pres_users[i]);
348 if (u->ctx_id == ctx_id) {
349 /* Register oid so other dissectors can find this connection */
350 register_ctx_id_and_oid(pinfo, u->ctx_id, u->oid);
351 next_tvb = tvb_new_subset_remaining(tvb, offset);
352 call_ber_oid_callback(u->oid, next_tvb, offset, pinfo, global_tree);
362 /*--- Included file: packet-pres-fn.c ---*/
363 #line 1 "../../asn1/pres/packet-pres-fn.c"
365 static const value_string pres_T_mode_value_vals[] = {
366 { 0, "x410-1984-mode" },
367 { 1, "normal-mode" },
373 dissect_pres_T_mode_value(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
374 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
381 static const ber_sequence_t Mode_selector_set[] = {
382 { &hf_pres_mode_value , BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_pres_T_mode_value },
383 { NULL, 0, 0, 0, NULL }
387 dissect_pres_Mode_selector(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
388 offset = dissect_ber_set(implicit_tag, actx, tree, tvb, offset,
389 Mode_selector_set, hf_index, ett_pres_Mode_selector);
395 static const asn_namedbit Protocol_version_bits[] = {
396 { 0, &hf_pres_Protocol_version_version_1, -1, -1, "version-1", NULL },
397 { 0, NULL, 0, 0, NULL, NULL }
401 dissect_pres_Protocol_version(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
402 offset = dissect_ber_bitstring(implicit_tag, actx, tree, tvb, offset,
403 Protocol_version_bits, hf_index, ett_pres_Protocol_version,
412 dissect_pres_Presentation_selector(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
413 offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
422 dissect_pres_Calling_presentation_selector(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
423 offset = dissect_pres_Presentation_selector(implicit_tag, tvb, offset, actx, tree, hf_index);
431 dissect_pres_Called_presentation_selector(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
432 offset = dissect_pres_Presentation_selector(implicit_tag, tvb, offset, actx, tree, hf_index);
440 dissect_pres_Presentation_context_identifier(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
441 #line 76 "../../asn1/pres/pres.cnf"
445 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
446 &presentation_context_identifier);
450 session->pres_ctx_id = presentation_context_identifier;
452 oid = find_oid_by_pres_ctx_id(actx->pinfo, presentation_context_identifier);
454 if(oid && (name = oid_resolved_from_string(oid))) {
455 proto_item_append_text(actx->created_item, " (%s)", name);
466 dissect_pres_Abstract_syntax_name(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
467 offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_index, &abstract_syntax_name_oid);
475 dissect_pres_Transfer_syntax_name(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
476 offset = dissect_ber_object_identifier(implicit_tag, actx, tree, tvb, offset, hf_index, NULL);
482 static const ber_sequence_t SEQUENCE_OF_Transfer_syntax_name_sequence_of[1] = {
483 { &hf_pres_transfer_syntax_name_list_item, BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_pres_Transfer_syntax_name },
487 dissect_pres_SEQUENCE_OF_Transfer_syntax_name(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
488 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
489 SEQUENCE_OF_Transfer_syntax_name_sequence_of, hf_index, ett_pres_SEQUENCE_OF_Transfer_syntax_name);
495 static const ber_sequence_t Context_list_item_sequence[] = {
496 { &hf_pres_presentation_context_identifier, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_pres_Presentation_context_identifier },
497 { &hf_pres_abstract_syntax_name, BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_pres_Abstract_syntax_name },
498 { &hf_pres_transfer_syntax_name_list, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pres_SEQUENCE_OF_Transfer_syntax_name },
499 { NULL, 0, 0, 0, NULL }
503 dissect_pres_Context_list_item(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
504 #line 101 "../../asn1/pres/pres.cnf"
505 abstract_syntax_name_oid=NULL;
507 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
508 Context_list_item_sequence, hf_index, ett_pres_Context_list_item);
510 #line 104 "../../asn1/pres/pres.cnf"
511 register_ctx_id_and_oid(actx->pinfo, presentation_context_identifier, abstract_syntax_name_oid);
517 static const ber_sequence_t Context_list_sequence_of[1] = {
518 { &hf_pres_Context_list_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pres_Context_list_item },
522 dissect_pres_Context_list(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
523 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
524 Context_list_sequence_of, hf_index, ett_pres_Context_list);
532 dissect_pres_Presentation_context_definition_list(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
533 offset = dissect_pres_Context_list(implicit_tag, tvb, offset, actx, tree, hf_index);
539 static const ber_sequence_t Default_context_name_sequence[] = {
540 { &hf_pres_abstract_syntax_name, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_pres_Abstract_syntax_name },
541 { &hf_pres_transfer_syntax_name, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_pres_Transfer_syntax_name },
542 { NULL, 0, 0, 0, NULL }
546 dissect_pres_Default_context_name(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
547 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
548 Default_context_name_sequence, hf_index, ett_pres_Default_context_name);
554 static const asn_namedbit Presentation_requirements_bits[] = {
555 { 0, &hf_pres_Presentation_requirements_context_management, -1, -1, "context-management", NULL },
556 { 1, &hf_pres_Presentation_requirements_restoration, -1, -1, "restoration", NULL },
557 { 0, NULL, 0, 0, NULL, NULL }
561 dissect_pres_Presentation_requirements(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
562 offset = dissect_ber_bitstring(implicit_tag, actx, tree, tvb, offset,
563 Presentation_requirements_bits, hf_index, ett_pres_Presentation_requirements,
570 static const asn_namedbit User_session_requirements_bits[] = {
571 { 0, &hf_pres_User_session_requirements_half_duplex, -1, -1, "half-duplex", NULL },
572 { 1, &hf_pres_User_session_requirements_duplex, -1, -1, "duplex", NULL },
573 { 2, &hf_pres_User_session_requirements_expedited_data, -1, -1, "expedited-data", NULL },
574 { 3, &hf_pres_User_session_requirements_minor_synchronize, -1, -1, "minor-synchronize", NULL },
575 { 4, &hf_pres_User_session_requirements_major_synchronize, -1, -1, "major-synchronize", NULL },
576 { 5, &hf_pres_User_session_requirements_resynchronize, -1, -1, "resynchronize", NULL },
577 { 6, &hf_pres_User_session_requirements_activity_management, -1, -1, "activity-management", NULL },
578 { 7, &hf_pres_User_session_requirements_negotiated_release, -1, -1, "negotiated-release", NULL },
579 { 8, &hf_pres_User_session_requirements_capability_data, -1, -1, "capability-data", NULL },
580 { 9, &hf_pres_User_session_requirements_exceptions, -1, -1, "exceptions", NULL },
581 { 10, &hf_pres_User_session_requirements_typed_data, -1, -1, "typed-data", NULL },
582 { 11, &hf_pres_User_session_requirements_symmetric_synchronize, -1, -1, "symmetric-synchronize", NULL },
583 { 12, &hf_pres_User_session_requirements_data_separation, -1, -1, "data-separation", NULL },
584 { 0, NULL, 0, 0, NULL, NULL }
588 dissect_pres_User_session_requirements(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
589 offset = dissect_ber_bitstring(implicit_tag, actx, tree, tvb, offset,
590 User_session_requirements_bits, hf_index, ett_pres_User_session_requirements,
597 static const asn_namedbit Protocol_options_bits[] = {
598 { 0, &hf_pres_Protocol_options_nominated_context, -1, -1, "nominated-context", NULL },
599 { 1, &hf_pres_Protocol_options_short_encoding, -1, -1, "short-encoding", NULL },
600 { 2, &hf_pres_Protocol_options_packed_encoding_rules, -1, -1, "packed-encoding-rules", NULL },
601 { 0, NULL, 0, 0, NULL, NULL }
605 dissect_pres_Protocol_options(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
606 offset = dissect_ber_bitstring(implicit_tag, actx, tree, tvb, offset,
607 Protocol_options_bits, hf_index, ett_pres_Protocol_options,
614 static const ber_sequence_t T_extensions_sequence[] = {
615 { NULL, 0, 0, 0, NULL }
619 dissect_pres_T_extensions(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
620 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
621 T_extensions_sequence, hf_index, ett_pres_T_extensions);
629 dissect_pres_Simply_encoded_data(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
630 offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
639 dissect_pres_T_single_ASN1_type(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
640 #line 37 "../../asn1/pres/pres.cnf"
645 oid=find_oid_by_pres_ctx_id(actx->pinfo, presentation_context_identifier);
647 next_tvb = tvb_new_subset_remaining(tvb, offset);
648 call_ber_oid_callback(oid, next_tvb, offset, actx->pinfo, global_tree);
650 if (!pres_try_users_table(presentation_context_identifier, tvb, offset, actx->pinfo)) {
651 proto_item *ti = proto_tree_add_text(tree, tvb, offset, -1,"dissector is not available");
652 expert_add_info_format(actx->pinfo, ti, PI_UNDECODED, PI_WARN, "Dissector is not available");
663 dissect_pres_T_octet_aligned(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
664 #line 52 "../../asn1/pres/pres.cnf"
669 oid=find_oid_by_pres_ctx_id(actx->pinfo, presentation_context_identifier);
671 dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index, &next_tvb);
672 call_ber_oid_callback(oid, next_tvb, offset, actx->pinfo, global_tree);
674 if (!pres_try_users_table(presentation_context_identifier, tvb, offset, actx->pinfo)) {
675 proto_item *ti = proto_tree_add_text(tree, tvb, offset, -1,"dissector is not available");
676 expert_add_info_format(actx->pinfo, ti, PI_UNDECODED, PI_WARN, "Dissector is not available");
678 offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
692 dissect_pres_BIT_STRING(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
693 offset = dissect_ber_bitstring(implicit_tag, actx, tree, tvb, offset,
701 static const value_string pres_T_presentation_data_values_vals[] = {
702 { 0, "single-ASN1-type" },
703 { 1, "octet-aligned" },
708 static const ber_choice_t T_presentation_data_values_choice[] = {
709 { 0, &hf_pres_single_ASN1_type, BER_CLASS_CON, 0, 0, dissect_pres_T_single_ASN1_type },
710 { 1, &hf_pres_octet_aligned , BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_pres_T_octet_aligned },
711 { 2, &hf_pres_arbitrary , BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_pres_BIT_STRING },
712 { 0, NULL, 0, 0, 0, NULL }
716 dissect_pres_T_presentation_data_values(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
717 offset = dissect_ber_choice(actx, tree, tvb, offset,
718 T_presentation_data_values_choice, hf_index, ett_pres_T_presentation_data_values,
725 static const ber_sequence_t PDV_list_sequence[] = {
726 { &hf_pres_transfer_syntax_name, BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_pres_Transfer_syntax_name },
727 { &hf_pres_presentation_context_identifier, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_pres_Presentation_context_identifier },
728 { &hf_pres_presentation_data_values, BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_pres_T_presentation_data_values },
729 { NULL, 0, 0, 0, NULL }
733 dissect_pres_PDV_list(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
734 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
735 PDV_list_sequence, hf_index, ett_pres_PDV_list);
741 static const ber_sequence_t Fully_encoded_data_sequence_of[1] = {
742 { &hf_pres_Fully_encoded_data_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pres_PDV_list },
746 dissect_pres_Fully_encoded_data(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
747 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
748 Fully_encoded_data_sequence_of, hf_index, ett_pres_Fully_encoded_data);
754 static const value_string pres_User_data_vals[] = {
755 { 0, "simply-encoded-data" },
756 { 1, "fully-encoded-data" },
760 static const ber_choice_t User_data_choice[] = {
761 { 0, &hf_pres_simply_encoded_data, BER_CLASS_APP, 0, BER_FLAGS_IMPLTAG, dissect_pres_Simply_encoded_data },
762 { 1, &hf_pres_fully_encoded_data, BER_CLASS_APP, 1, BER_FLAGS_IMPLTAG, dissect_pres_Fully_encoded_data },
763 { 0, NULL, 0, 0, 0, NULL }
767 dissect_pres_User_data(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
768 offset = dissect_ber_choice(actx, tree, tvb, offset,
769 User_data_choice, hf_index, ett_pres_User_data,
776 static const ber_sequence_t T_normal_mode_parameters_sequence[] = {
777 { &hf_pres_protocol_version, BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pres_Protocol_version },
778 { &hf_pres_calling_presentation_selector, BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pres_Calling_presentation_selector },
779 { &hf_pres_called_presentation_selector, BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pres_Called_presentation_selector },
780 { &hf_pres_presentation_context_definition_list, BER_CLASS_CON, 4, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pres_Presentation_context_definition_list },
781 { &hf_pres_default_context_name, BER_CLASS_CON, 6, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pres_Default_context_name },
782 { &hf_pres_presentation_requirements, BER_CLASS_CON, 8, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pres_Presentation_requirements },
783 { &hf_pres_user_session_requirements, BER_CLASS_CON, 9, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pres_User_session_requirements },
784 { &hf_pres_protocol_options, BER_CLASS_CON, 11, BER_FLAGS_OPTIONAL, dissect_pres_Protocol_options },
785 { &hf_pres_initiators_nominated_context, BER_CLASS_CON, 12, BER_FLAGS_OPTIONAL, dissect_pres_Presentation_context_identifier },
786 { &hf_pres_extensions , BER_CLASS_CON, 14, BER_FLAGS_OPTIONAL, dissect_pres_T_extensions },
787 { &hf_pres_user_data , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_pres_User_data },
788 { NULL, 0, 0, 0, NULL }
792 dissect_pres_T_normal_mode_parameters(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
793 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
794 T_normal_mode_parameters_sequence, hf_index, ett_pres_T_normal_mode_parameters);
800 static const ber_sequence_t CP_type_set[] = {
801 { &hf_pres_mode_selector , BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_pres_Mode_selector },
802 { &hf_pres_x410_mode_parameters, BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_rtse_RTORQapdu },
803 { &hf_pres_normal_mode_parameters, BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pres_T_normal_mode_parameters },
804 { NULL, 0, 0, 0, NULL }
808 dissect_pres_CP_type(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
809 offset = dissect_ber_set(implicit_tag, actx, tree, tvb, offset,
810 CP_type_set, hf_index, ett_pres_CP_type);
818 dissect_pres_CPC_type(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
819 offset = dissect_pres_User_data(implicit_tag, tvb, offset, actx, tree, hf_index);
827 dissect_pres_Responding_presentation_selector(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
828 offset = dissect_pres_Presentation_selector(implicit_tag, tvb, offset, actx, tree, hf_index);
834 static const value_string pres_Result_vals[] = {
836 { 1, "user-rejection" },
837 { 2, "provider-rejection" },
843 dissect_pres_Result(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
844 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
851 static const value_string pres_T_provider_reason_vals[] = {
852 { 0, "reason-not-specified" },
853 { 1, "abstract-syntax-not-supported" },
854 { 2, "proposed-transfer-syntaxes-not-supported" },
855 { 3, "local-limit-on-DCS-exceeded" },
861 dissect_pres_T_provider_reason(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
862 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
869 static const ber_sequence_t Result_list_item_sequence[] = {
870 { &hf_pres_result , BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_pres_Result },
871 { &hf_pres_transfer_syntax_name, BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pres_Transfer_syntax_name },
872 { &hf_pres_provider_reason, BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pres_T_provider_reason },
873 { NULL, 0, 0, 0, NULL }
877 dissect_pres_Result_list_item(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
878 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
879 Result_list_item_sequence, hf_index, ett_pres_Result_list_item);
885 static const ber_sequence_t Result_list_sequence_of[1] = {
886 { &hf_pres_Result_list_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pres_Result_list_item },
890 dissect_pres_Result_list(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
891 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
892 Result_list_sequence_of, hf_index, ett_pres_Result_list);
900 dissect_pres_Presentation_context_definition_result_list(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
901 offset = dissect_pres_Result_list(implicit_tag, tvb, offset, actx, tree, hf_index);
907 static const ber_sequence_t T_CPA_PPDU_normal_mode_parameters_sequence[] = {
908 { &hf_pres_protocol_version, BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pres_Protocol_version },
909 { &hf_pres_responding_presentation_selector, BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pres_Responding_presentation_selector },
910 { &hf_pres_presentation_context_definition_result_list, BER_CLASS_CON, 5, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pres_Presentation_context_definition_result_list },
911 { &hf_pres_presentation_requirements, BER_CLASS_CON, 8, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pres_Presentation_requirements },
912 { &hf_pres_user_session_requirements, BER_CLASS_CON, 9, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pres_User_session_requirements },
913 { &hf_pres_protocol_options, BER_CLASS_CON, 11, BER_FLAGS_OPTIONAL, dissect_pres_Protocol_options },
914 { &hf_pres_responders_nominated_context, BER_CLASS_CON, 13, BER_FLAGS_OPTIONAL, dissect_pres_Presentation_context_identifier },
915 { &hf_pres_user_data , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_pres_User_data },
916 { NULL, 0, 0, 0, NULL }
920 dissect_pres_T_CPA_PPDU_normal_mode_parameters(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
921 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
922 T_CPA_PPDU_normal_mode_parameters_sequence, hf_index, ett_pres_T_CPA_PPDU_normal_mode_parameters);
928 static const ber_sequence_t CPA_PPDU_set[] = {
929 { &hf_pres_mode_selector , BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_pres_Mode_selector },
930 { &hf_pres_cPR_PPDU_x400_mode_parameters, BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_rtse_RTOACapdu },
931 { &hf_pres_cPU_PPDU_normal_mode_parameters, BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pres_T_CPA_PPDU_normal_mode_parameters },
932 { NULL, 0, 0, 0, NULL }
936 dissect_pres_CPA_PPDU(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
937 offset = dissect_ber_set(implicit_tag, actx, tree, tvb, offset,
938 CPA_PPDU_set, hf_index, ett_pres_CPA_PPDU);
946 dissect_pres_Default_context_result(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
947 offset = dissect_pres_Result(implicit_tag, tvb, offset, actx, tree, hf_index);
953 static const value_string pres_Provider_reason_vals[] = {
954 { 0, "reason-not-specified" },
955 { 1, "temporary-congestion" },
956 { 2, "local-limit-exceeded" },
957 { 3, "called-presentation-address-unknown" },
958 { 4, "protocol-version-not-supported" },
959 { 5, "default-context-not-supported" },
960 { 6, "user-data-not-readable" },
961 { 7, "no-PSAP-available" },
967 dissect_pres_Provider_reason(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
968 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
975 static const ber_sequence_t T_CPR_PPDU_normal_mode_parameters_sequence[] = {
976 { &hf_pres_protocol_version, BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pres_Protocol_version },
977 { &hf_pres_responding_presentation_selector, BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pres_Responding_presentation_selector },
978 { &hf_pres_presentation_context_definition_result_list, BER_CLASS_CON, 5, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pres_Presentation_context_definition_result_list },
979 { &hf_pres_default_context_result, BER_CLASS_CON, 7, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pres_Default_context_result },
980 { &hf_pres_cPR_PPDU__provider_reason, BER_CLASS_CON, 10, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pres_Provider_reason },
981 { &hf_pres_user_data , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_pres_User_data },
982 { NULL, 0, 0, 0, NULL }
986 dissect_pres_T_CPR_PPDU_normal_mode_parameters(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
987 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
988 T_CPR_PPDU_normal_mode_parameters_sequence, hf_index, ett_pres_T_CPR_PPDU_normal_mode_parameters);
994 static const value_string pres_CPR_PPDU_vals[] = {
995 { 0, "x400-mode-parameters" },
996 { 1, "normal-mode-parameters" },
1000 static const ber_choice_t CPR_PPDU_choice[] = {
1001 { 0, &hf_pres_cPU_PPDU_x400_mode_parameters, BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_rtse_RTORJapdu },
1002 { 1, &hf_pres_cPR_PPDU_normal_mode_parameters, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pres_T_CPR_PPDU_normal_mode_parameters },
1003 { 0, NULL, 0, 0, 0, NULL }
1007 dissect_pres_CPR_PPDU(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1008 offset = dissect_ber_choice(actx, tree, tvb, offset,
1009 CPR_PPDU_choice, hf_index, ett_pres_CPR_PPDU,
1016 static const ber_sequence_t Presentation_context_identifier_list_item_sequence[] = {
1017 { &hf_pres_presentation_context_identifier, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_pres_Presentation_context_identifier },
1018 { &hf_pres_transfer_syntax_name, BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_pres_Transfer_syntax_name },
1019 { NULL, 0, 0, 0, NULL }
1023 dissect_pres_Presentation_context_identifier_list_item(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1024 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
1025 Presentation_context_identifier_list_item_sequence, hf_index, ett_pres_Presentation_context_identifier_list_item);
1031 static const ber_sequence_t Presentation_context_identifier_list_sequence_of[1] = {
1032 { &hf_pres_Presentation_context_identifier_list_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pres_Presentation_context_identifier_list_item },
1036 dissect_pres_Presentation_context_identifier_list(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1037 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
1038 Presentation_context_identifier_list_sequence_of, hf_index, ett_pres_Presentation_context_identifier_list);
1044 static const ber_sequence_t T_ARU_PPDU_normal_mode_parameters_sequence[] = {
1045 { &hf_pres_presentation_context_identifier_list, BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pres_Presentation_context_identifier_list },
1046 { &hf_pres_user_data , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_pres_User_data },
1047 { NULL, 0, 0, 0, NULL }
1051 dissect_pres_T_ARU_PPDU_normal_mode_parameters(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1052 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
1053 T_ARU_PPDU_normal_mode_parameters_sequence, hf_index, ett_pres_T_ARU_PPDU_normal_mode_parameters);
1059 static const value_string pres_ARU_PPDU_vals[] = {
1060 { 0, "x400-mode-parameters" },
1061 { 1, "normal-mode-parameters" },
1065 static const ber_choice_t ARU_PPDU_choice[] = {
1066 { 0, &hf_pres_aRU_PPDU_x400_mode_parameters, BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_rtse_RTABapdu },
1067 { 1, &hf_pres_aRU_PPDU_normal_mode_parameters, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_pres_T_ARU_PPDU_normal_mode_parameters },
1068 { 0, NULL, 0, 0, 0, NULL }
1072 dissect_pres_ARU_PPDU(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1073 offset = dissect_ber_choice(actx, tree, tvb, offset,
1074 ARU_PPDU_choice, hf_index, ett_pres_ARU_PPDU,
1081 static const value_string pres_Abort_reason_vals[] = {
1082 { 0, "reason-not-specified" },
1083 { 1, "unrecognized-ppdu" },
1084 { 2, "unexpected-ppdu" },
1085 { 3, "unexpected-session-service-primitive" },
1086 { 4, "unrecognized-ppdu-parameter" },
1087 { 5, "unexpected-ppdu-parameter" },
1088 { 6, "invalid-ppdu-parameter-value" },
1094 dissect_pres_Abort_reason(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1095 #line 94 "../../asn1/pres/pres.cnf"
1098 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
1102 col_append_fstr(actx->pinfo->cinfo, COL_INFO, " (%s)", val_to_str(reason, pres_Abort_reason_vals, "unknown: %d"));
1110 static const value_string pres_Event_identifier_vals[] = {
1125 { 14, "s-release-indication" },
1126 { 15, "s-release-confirm" },
1127 { 16, "s-token-give-indication" },
1128 { 17, "s-token-please-indication" },
1129 { 18, "s-control-give-indication" },
1130 { 19, "s-sync-minor-indication" },
1131 { 20, "s-sync-minor-confirm" },
1132 { 21, "s-sync-major-indication" },
1133 { 22, "s-sync-major-confirm" },
1134 { 23, "s-p-exception-report-indication" },
1135 { 24, "s-u-exception-report-indication" },
1136 { 25, "s-activity-start-indication" },
1137 { 26, "s-activity-resume-indication" },
1138 { 27, "s-activity-interrupt-indication" },
1139 { 28, "s-activity-interrupt-confirm" },
1140 { 29, "s-activity-discard-indication" },
1141 { 30, "s-activity-discard-confirm" },
1142 { 31, "s-activity-end-indication" },
1143 { 32, "s-activity-end-confirm" },
1149 dissect_pres_Event_identifier(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1150 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
1157 static const ber_sequence_t ARP_PPDU_sequence[] = {
1158 { &hf_pres_aRU_PPDU_provider_reason, BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pres_Abort_reason },
1159 { &hf_pres_event_identifier, BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pres_Event_identifier },
1160 { NULL, 0, 0, 0, NULL }
1164 dissect_pres_ARP_PPDU(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1165 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
1166 ARP_PPDU_sequence, hf_index, ett_pres_ARP_PPDU);
1172 static const value_string pres_Abort_type_vals[] = {
1178 static const ber_choice_t Abort_type_choice[] = {
1179 { 0, &hf_pres_aru_ppdu , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_pres_ARU_PPDU },
1180 { 1, &hf_pres_arp_ppdu , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_pres_ARP_PPDU },
1181 { 0, NULL, 0, 0, 0, NULL }
1185 dissect_pres_Abort_type(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1186 offset = dissect_ber_choice(actx, tree, tvb, offset,
1187 Abort_type_choice, hf_index, ett_pres_Abort_type,
1196 dissect_pres_Presentation_context_addition_list(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1197 offset = dissect_pres_Context_list(implicit_tag, tvb, offset, actx, tree, hf_index);
1203 static const ber_sequence_t Presentation_context_deletion_list_sequence_of[1] = {
1204 { &hf_pres_Presentation_context_deletion_list_item, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_pres_Presentation_context_identifier },
1208 dissect_pres_Presentation_context_deletion_list(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1209 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
1210 Presentation_context_deletion_list_sequence_of, hf_index, ett_pres_Presentation_context_deletion_list);
1216 static const ber_sequence_t AC_PPDU_sequence[] = {
1217 { &hf_pres_presentation_context_addition_list, BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pres_Presentation_context_addition_list },
1218 { &hf_pres_presentation_context_deletion_list, BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pres_Presentation_context_deletion_list },
1219 { &hf_pres_user_data , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_pres_User_data },
1220 { NULL, 0, 0, 0, NULL }
1224 dissect_pres_AC_PPDU(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1225 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
1226 AC_PPDU_sequence, hf_index, ett_pres_AC_PPDU);
1234 dissect_pres_Presentation_context_addition_result_list(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1235 offset = dissect_pres_Result_list(implicit_tag, tvb, offset, actx, tree, hf_index);
1241 static const value_string pres_Presentation_context_deletion_result_list_item_vals[] = {
1242 { 0, "acceptance" },
1243 { 1, "user-rejection" },
1249 dissect_pres_Presentation_context_deletion_result_list_item(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1250 offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
1257 static const ber_sequence_t Presentation_context_deletion_result_list_sequence_of[1] = {
1258 { &hf_pres_Presentation_context_deletion_result_list_item, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_NOOWNTAG, dissect_pres_Presentation_context_deletion_result_list_item },
1262 dissect_pres_Presentation_context_deletion_result_list(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1263 offset = dissect_ber_sequence_of(implicit_tag, actx, tree, tvb, offset,
1264 Presentation_context_deletion_result_list_sequence_of, hf_index, ett_pres_Presentation_context_deletion_result_list);
1270 static const ber_sequence_t ACA_PPDU_sequence[] = {
1271 { &hf_pres_presentation_context_addition_result_list, BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pres_Presentation_context_addition_result_list },
1272 { &hf_pres_presentation_context_deletion_result_list, BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pres_Presentation_context_deletion_result_list },
1273 { &hf_pres_user_data , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_pres_User_data },
1274 { NULL, 0, 0, 0, NULL }
1278 dissect_pres_ACA_PPDU(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1279 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
1280 ACA_PPDU_sequence, hf_index, ett_pres_ACA_PPDU);
1286 static const value_string pres_Typed_data_type_vals[] = {
1293 static const ber_choice_t Typed_data_type_choice[] = {
1294 { 0, &hf_pres_acPPDU , BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_pres_AC_PPDU },
1295 { 1, &hf_pres_acaPPDU , BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_pres_ACA_PPDU },
1296 { 2, &hf_pres_ttdPPDU , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_pres_User_data },
1297 { 0, NULL, 0, 0, 0, NULL }
1301 dissect_pres_Typed_data_type(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1302 offset = dissect_ber_choice(actx, tree, tvb, offset,
1303 Typed_data_type_choice, hf_index, ett_pres_Typed_data_type,
1310 static const ber_sequence_t RS_PPDU_sequence[] = {
1311 { &hf_pres_presentation_context_identifier_list, BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pres_Presentation_context_identifier_list },
1312 { &hf_pres_user_data , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_pres_User_data },
1313 { NULL, 0, 0, 0, NULL }
1317 dissect_pres_RS_PPDU(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1318 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
1319 RS_PPDU_sequence, hf_index, ett_pres_RS_PPDU);
1325 static const ber_sequence_t RSA_PPDU_sequence[] = {
1326 { &hf_pres_presentation_context_identifier_list, BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pres_Presentation_context_identifier_list },
1327 { &hf_pres_user_data , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_pres_User_data },
1328 { NULL, 0, 0, 0, NULL }
1332 dissect_pres_RSA_PPDU(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1333 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
1334 RSA_PPDU_sequence, hf_index, ett_pres_RSA_PPDU);
1340 static const ber_sequence_t UD_type_sequence[] = {
1341 { &hf_pres_protocol_version, BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pres_Protocol_version },
1342 { &hf_pres_calling_presentation_selector, BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pres_Calling_presentation_selector },
1343 { &hf_pres_called_presentation_selector, BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pres_Called_presentation_selector },
1344 { &hf_pres_presentation_context_definition_list, BER_CLASS_CON, 4, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_pres_Presentation_context_definition_list },
1345 { &hf_pres_user_data , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_pres_User_data },
1346 { NULL, 0, 0, 0, NULL }
1350 dissect_pres_UD_type(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1351 offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
1352 UD_type_sequence, hf_index, ett_pres_UD_type);
1360 dissect_pres_UDC_type(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1361 offset = dissect_pres_User_data(implicit_tag, tvb, offset, actx, tree, hf_index);
1368 static void dissect_UD_type_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
1369 asn1_ctx_t asn1_ctx;
1370 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
1371 dissect_pres_UD_type(FALSE, tvb, 0, &asn1_ctx, tree, hf_pres_UD_type_PDU);
1373 static void dissect_UDC_type_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_tree *tree _U_) {
1374 asn1_ctx_t asn1_ctx;
1375 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
1376 dissect_pres_UDC_type(FALSE, tvb, 0, &asn1_ctx, tree, hf_pres_UDC_type_PDU);
1380 /*--- End of included file: packet-pres-fn.c ---*/
1381 #line 229 "../../asn1/pres/packet-pres-template.c"
1388 dissect_ppdu(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
1391 proto_tree *pres_tree = NULL;
1393 asn1_ctx_t asn1_ctx;
1394 asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
1396 /* do we have spdu type from the session dissector? */
1397 if( !pinfo->private_data ){
1399 proto_tree_add_text(tree, tvb, offset, -1,
1400 "Internal error:can't get spdu type from session dissector.");
1404 session = ( (struct SESSION_DATA_STRUCTURE*)(pinfo->private_data) );
1405 if(session->spdu_type == 0 ){
1407 proto_tree_add_text(tree, tvb, offset, -1,
1408 "Internal error:wrong spdu type %x from session dissector.",session->spdu_type);
1413 /* get type of tag */
1414 s_type = tvb_get_guint8(tvb, offset);
1415 /* set up type of PPDU */
1416 col_add_str(pinfo->cinfo, COL_INFO,
1417 val_to_str(session->spdu_type, ses_vals, "Unknown PPDU type (0x%02x)"));
1419 ti = proto_tree_add_item(tree, proto_pres, tvb, offset, -1, FALSE);
1420 pres_tree = proto_item_add_subtree(ti, ett_pres);
1423 switch(session->spdu_type){
1424 case SES_CONNECTION_REQUEST:
1425 offset = dissect_pres_CP_type(FALSE, tvb, offset, &asn1_ctx, pres_tree, hf_pres_CP_type);
1427 case SES_CONNECTION_ACCEPT:
1428 offset = dissect_pres_CPA_PPDU(FALSE, tvb, offset, &asn1_ctx, pres_tree, hf_pres_CPA_PPDU);
1431 case SES_ABORT_ACCEPT:
1432 offset = dissect_pres_Abort_type(FALSE, tvb, offset, &asn1_ctx, pres_tree, hf_pres_Abort_type);
1434 case SES_DATA_TRANSFER:
1435 offset = dissect_pres_CPC_type(FALSE, tvb, offset, &asn1_ctx, pres_tree, hf_pres_user_data);
1437 case SES_TYPED_DATA:
1438 offset = dissect_pres_Typed_data_type(FALSE, tvb, offset, &asn1_ctx, pres_tree, hf_pres_Typed_data_type);
1440 case SES_RESYNCHRONIZE:
1441 offset = dissect_pres_RS_PPDU(FALSE, tvb, offset, &asn1_ctx, pres_tree, -1);
1443 case SES_RESYNCHRONIZE_ACK:
1444 offset = dissect_pres_RSA_PPDU(FALSE, tvb, offset, &asn1_ctx, pres_tree, -1);
1447 offset = dissect_pres_CPR_PPDU(FALSE, tvb, offset, &asn1_ctx, pres_tree, hf_pres_CPR_PPDU);
1450 offset = dissect_pres_CPC_type(FALSE, tvb, offset, &asn1_ctx, pres_tree, hf_pres_user_data);
1458 dissect_pres(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
1460 int offset = 0, old_offset;
1462 session = ((struct SESSION_DATA_STRUCTURE*)(pinfo->private_data));
1464 /* first, try to check length */
1465 /* do we have at least 4 bytes */
1466 if (!tvb_bytes_exist(tvb, 0, 4)){
1467 if (session && session->spdu_type != SES_MAJOR_SYNC_POINT) {
1468 proto_tree_add_text(parent_tree, tvb, offset,
1469 tvb_reported_length_remaining(tvb,offset),"User data");
1470 return; /* no, it isn't a presentation PDU */
1474 /* save pointers for calling the acse dissector */
1475 global_tree = parent_tree;
1476 global_pinfo = pinfo;
1478 /* if the session unit-data packet then we process it */
1479 /* as a connectionless presentation protocol unit data */
1480 if(session && session->spdu_type == CLSES_UNIT_DATA)
1482 proto_tree * clpres_tree = NULL;
1485 col_set_str(pinfo->cinfo, COL_PROTOCOL, "CL-PRES");
1486 col_clear(pinfo->cinfo, COL_INFO);
1490 ti = proto_tree_add_item(parent_tree, proto_clpres, tvb, offset, -1, FALSE);
1491 clpres_tree = proto_item_add_subtree(ti, ett_pres);
1494 /* dissect the packet */
1495 dissect_UD_type_PDU(tvb, pinfo, clpres_tree);
1499 /* we can't make any additional checking here */
1500 /* postpone it before dissector will have more information */
1502 col_set_str(pinfo->cinfo, COL_PROTOCOL, "PRES");
1503 col_clear(pinfo->cinfo, COL_INFO);
1505 if (session && session->spdu_type == SES_MAJOR_SYNC_POINT) {
1506 /* This is a reassembly initiated in packet-ses */
1507 char *oid = find_oid_by_pres_ctx_id (pinfo, session->pres_ctx_id);
1509 call_ber_oid_callback (oid, tvb, offset, pinfo, parent_tree);
1511 proto_tree_add_text(parent_tree, tvb, offset,
1512 tvb_reported_length_remaining(tvb,offset),"User data");
1517 while (tvb_reported_length_remaining(tvb, offset) > 0){
1518 old_offset = offset;
1519 offset = dissect_ppdu(tvb, offset, pinfo, parent_tree);
1520 if(offset <= old_offset){
1521 proto_tree_add_text(parent_tree, tvb, offset, -1,"Invalid offset");
1522 THROW(ReportedBoundsError);
1528 /*--- proto_register_pres -------------------------------------------*/
1529 void proto_register_pres(void) {
1531 /* List of fields */
1532 static hf_register_info hf[] = {
1534 { "CP-type", "pres.cptype",
1535 FT_NONE, BASE_NONE, NULL, 0,
1537 { &hf_pres_CPA_PPDU,
1538 { "CPA-PPDU", "pres.cpapdu",
1539 FT_NONE, BASE_NONE, NULL, 0,
1541 { &hf_pres_Abort_type,
1542 { "Abort type", "pres.aborttype",
1543 FT_UINT32, BASE_DEC, VALS(pres_Abort_type_vals), 0,
1545 { &hf_pres_CPR_PPDU,
1546 { "CPR-PPDU", "pres.cprtype",
1547 FT_UINT32, BASE_DEC, VALS(pres_CPR_PPDU_vals), 0,
1549 { &hf_pres_Typed_data_type,
1550 { "Typed data type", "pres.Typed_data_type",
1551 FT_UINT32, BASE_DEC, VALS(pres_Typed_data_type_vals), 0,
1556 /*--- Included file: packet-pres-hfarr.c ---*/
1557 #line 1 "../../asn1/pres/packet-pres-hfarr.c"
1558 { &hf_pres_UD_type_PDU,
1559 { "UD-type", "pres.UD_type",
1560 FT_NONE, BASE_NONE, NULL, 0,
1562 { &hf_pres_UDC_type_PDU,
1563 { "UDC-type", "pres.UDC_type",
1564 FT_UINT32, BASE_DEC, VALS(pres_User_data_vals), 0,
1566 { &hf_pres_mode_selector,
1567 { "mode-selector", "pres.mode_selector",
1568 FT_NONE, BASE_NONE, NULL, 0,
1570 { &hf_pres_x410_mode_parameters,
1571 { "x410-mode-parameters", "pres.x410_mode_parameters",
1572 FT_NONE, BASE_NONE, NULL, 0,
1573 "RTORQapdu", HFILL }},
1574 { &hf_pres_normal_mode_parameters,
1575 { "normal-mode-parameters", "pres.normal_mode_parameters",
1576 FT_NONE, BASE_NONE, NULL, 0,
1578 { &hf_pres_protocol_version,
1579 { "protocol-version", "pres.protocol_version",
1580 FT_BYTES, BASE_NONE, NULL, 0,
1582 { &hf_pres_calling_presentation_selector,
1583 { "calling-presentation-selector", "pres.calling_presentation_selector",
1584 FT_BYTES, BASE_NONE, NULL, 0,
1586 { &hf_pres_called_presentation_selector,
1587 { "called-presentation-selector", "pres.called_presentation_selector",
1588 FT_BYTES, BASE_NONE, NULL, 0,
1590 { &hf_pres_presentation_context_definition_list,
1591 { "presentation-context-definition-list", "pres.presentation_context_definition_list",
1592 FT_UINT32, BASE_DEC, NULL, 0,
1594 { &hf_pres_default_context_name,
1595 { "default-context-name", "pres.default_context_name",
1596 FT_NONE, BASE_NONE, NULL, 0,
1598 { &hf_pres_presentation_requirements,
1599 { "presentation-requirements", "pres.presentation_requirements",
1600 FT_BYTES, BASE_NONE, NULL, 0,
1602 { &hf_pres_user_session_requirements,
1603 { "user-session-requirements", "pres.user_session_requirements",
1604 FT_BYTES, BASE_NONE, NULL, 0,
1606 { &hf_pres_protocol_options,
1607 { "protocol-options", "pres.protocol_options",
1608 FT_BYTES, BASE_NONE, NULL, 0,
1610 { &hf_pres_initiators_nominated_context,
1611 { "initiators-nominated-context", "pres.initiators_nominated_context",
1612 FT_INT32, BASE_DEC, NULL, 0,
1613 "Presentation_context_identifier", HFILL }},
1614 { &hf_pres_extensions,
1615 { "extensions", "pres.extensions",
1616 FT_NONE, BASE_NONE, NULL, 0,
1618 { &hf_pres_user_data,
1619 { "user-data", "pres.user_data",
1620 FT_UINT32, BASE_DEC, VALS(pres_User_data_vals), 0,
1622 { &hf_pres_cPR_PPDU_x400_mode_parameters,
1623 { "x410-mode-parameters", "pres.x410_mode_parameters",
1624 FT_NONE, BASE_NONE, NULL, 0,
1625 "RTOACapdu", HFILL }},
1626 { &hf_pres_cPU_PPDU_normal_mode_parameters,
1627 { "normal-mode-parameters", "pres.normal_mode_parameters",
1628 FT_NONE, BASE_NONE, NULL, 0,
1629 "T_CPA_PPDU_normal_mode_parameters", HFILL }},
1630 { &hf_pres_responding_presentation_selector,
1631 { "responding-presentation-selector", "pres.responding_presentation_selector",
1632 FT_BYTES, BASE_NONE, NULL, 0,
1634 { &hf_pres_presentation_context_definition_result_list,
1635 { "presentation-context-definition-result-list", "pres.presentation_context_definition_result_list",
1636 FT_UINT32, BASE_DEC, NULL, 0,
1638 { &hf_pres_responders_nominated_context,
1639 { "responders-nominated-context", "pres.responders_nominated_context",
1640 FT_INT32, BASE_DEC, NULL, 0,
1641 "Presentation_context_identifier", HFILL }},
1642 { &hf_pres_cPU_PPDU_x400_mode_parameters,
1643 { "x400-mode-parameters", "pres.x400_mode_parameters",
1644 FT_NONE, BASE_NONE, NULL, 0,
1645 "RTORJapdu", HFILL }},
1646 { &hf_pres_cPR_PPDU_normal_mode_parameters,
1647 { "normal-mode-parameters", "pres.normal_mode_parameters",
1648 FT_NONE, BASE_NONE, NULL, 0,
1649 "T_CPR_PPDU_normal_mode_parameters", HFILL }},
1650 { &hf_pres_default_context_result,
1651 { "default-context-result", "pres.default_context_result",
1652 FT_INT32, BASE_DEC, VALS(pres_Result_vals), 0,
1654 { &hf_pres_cPR_PPDU__provider_reason,
1655 { "provider-reason", "pres.provider_reason",
1656 FT_INT32, BASE_DEC, VALS(pres_Provider_reason_vals), 0,
1658 { &hf_pres_aru_ppdu,
1659 { "aru-ppdu", "pres.aru_ppdu",
1660 FT_UINT32, BASE_DEC, VALS(pres_ARU_PPDU_vals), 0,
1662 { &hf_pres_arp_ppdu,
1663 { "arp-ppdu", "pres.arp_ppdu",
1664 FT_NONE, BASE_NONE, NULL, 0,
1666 { &hf_pres_aRU_PPDU_x400_mode_parameters,
1667 { "x400-mode-parameters", "pres.x400_mode_parameters",
1668 FT_NONE, BASE_NONE, NULL, 0,
1669 "RTABapdu", HFILL }},
1670 { &hf_pres_aRU_PPDU_normal_mode_parameters,
1671 { "normal-mode-parameters", "pres.normal_mode_parameters",
1672 FT_NONE, BASE_NONE, NULL, 0,
1673 "T_ARU_PPDU_normal_mode_parameters", HFILL }},
1674 { &hf_pres_presentation_context_identifier_list,
1675 { "presentation-context-identifier-list", "pres.presentation_context_identifier_list",
1676 FT_UINT32, BASE_DEC, NULL, 0,
1678 { &hf_pres_aRU_PPDU_provider_reason,
1679 { "provider-reason", "pres.provider_reason",
1680 FT_INT32, BASE_DEC, VALS(pres_Abort_reason_vals), 0,
1681 "Abort_reason", HFILL }},
1682 { &hf_pres_event_identifier,
1683 { "event-identifier", "pres.event_identifier",
1684 FT_INT32, BASE_DEC, VALS(pres_Event_identifier_vals), 0,
1687 { "acPPDU", "pres.acPPDU",
1688 FT_NONE, BASE_NONE, NULL, 0,
1689 "AC_PPDU", HFILL }},
1691 { "acaPPDU", "pres.acaPPDU",
1692 FT_NONE, BASE_NONE, NULL, 0,
1693 "ACA_PPDU", HFILL }},
1695 { "ttdPPDU", "pres.ttdPPDU",
1696 FT_UINT32, BASE_DEC, VALS(pres_User_data_vals), 0,
1697 "User_data", HFILL }},
1698 { &hf_pres_presentation_context_addition_list,
1699 { "presentation-context-addition-list", "pres.presentation_context_addition_list",
1700 FT_UINT32, BASE_DEC, NULL, 0,
1702 { &hf_pres_presentation_context_deletion_list,
1703 { "presentation-context-deletion-list", "pres.presentation_context_deletion_list",
1704 FT_UINT32, BASE_DEC, NULL, 0,
1706 { &hf_pres_presentation_context_addition_result_list,
1707 { "presentation-context-addition-result-list", "pres.presentation_context_addition_result_list",
1708 FT_UINT32, BASE_DEC, NULL, 0,
1710 { &hf_pres_presentation_context_deletion_result_list,
1711 { "presentation-context-deletion-result-list", "pres.presentation_context_deletion_result_list",
1712 FT_UINT32, BASE_DEC, NULL, 0,
1714 { &hf_pres_Context_list_item,
1715 { "Context-list item", "pres.Context_list_item",
1716 FT_NONE, BASE_NONE, NULL, 0,
1718 { &hf_pres_presentation_context_identifier,
1719 { "presentation-context-identifier", "pres.presentation_context_identifier",
1720 FT_INT32, BASE_DEC, NULL, 0,
1722 { &hf_pres_abstract_syntax_name,
1723 { "abstract-syntax-name", "pres.abstract_syntax_name",
1724 FT_OID, BASE_NONE, NULL, 0,
1726 { &hf_pres_transfer_syntax_name_list,
1727 { "transfer-syntax-name-list", "pres.transfer_syntax_name_list",
1728 FT_UINT32, BASE_DEC, NULL, 0,
1729 "SEQUENCE_OF_Transfer_syntax_name", HFILL }},
1730 { &hf_pres_transfer_syntax_name_list_item,
1731 { "Transfer-syntax-name", "pres.Transfer_syntax_name",
1732 FT_OID, BASE_NONE, NULL, 0,
1734 { &hf_pres_transfer_syntax_name,
1735 { "transfer-syntax-name", "pres.transfer_syntax_name",
1736 FT_OID, BASE_NONE, NULL, 0,
1738 { &hf_pres_mode_value,
1739 { "mode-value", "pres.mode_value",
1740 FT_INT32, BASE_DEC, VALS(pres_T_mode_value_vals), 0,
1742 { &hf_pres_Presentation_context_deletion_list_item,
1743 { "Presentation-context-identifier", "pres.Presentation_context_identifier",
1744 FT_INT32, BASE_DEC, NULL, 0,
1746 { &hf_pres_Presentation_context_deletion_result_list_item,
1747 { "Presentation-context-deletion-result-list item", "pres.Presentation_context_deletion_result_list_item",
1748 FT_INT32, BASE_DEC, VALS(pres_Presentation_context_deletion_result_list_item_vals), 0,
1750 { &hf_pres_Presentation_context_identifier_list_item,
1751 { "Presentation-context-identifier-list item", "pres.Presentation_context_identifier_list_item",
1752 FT_NONE, BASE_NONE, NULL, 0,
1754 { &hf_pres_Result_list_item,
1755 { "Result-list item", "pres.Result_list_item",
1756 FT_NONE, BASE_NONE, NULL, 0,
1759 { "result", "pres.result",
1760 FT_INT32, BASE_DEC, VALS(pres_Result_vals), 0,
1762 { &hf_pres_provider_reason,
1763 { "provider-reason", "pres.provider_reason",
1764 FT_INT32, BASE_DEC, VALS(pres_T_provider_reason_vals), 0,
1766 { &hf_pres_simply_encoded_data,
1767 { "simply-encoded-data", "pres.simply_encoded_data",
1768 FT_BYTES, BASE_NONE, NULL, 0,
1770 { &hf_pres_fully_encoded_data,
1771 { "fully-encoded-data", "pres.fully_encoded_data",
1772 FT_UINT32, BASE_DEC, NULL, 0,
1774 { &hf_pres_Fully_encoded_data_item,
1775 { "PDV-list", "pres.PDV_list",
1776 FT_NONE, BASE_NONE, NULL, 0,
1778 { &hf_pres_presentation_data_values,
1779 { "presentation-data-values", "pres.presentation_data_values",
1780 FT_UINT32, BASE_DEC, VALS(pres_T_presentation_data_values_vals), 0,
1782 { &hf_pres_single_ASN1_type,
1783 { "single-ASN1-type", "pres.single_ASN1_type",
1784 FT_NONE, BASE_NONE, NULL, 0,
1786 { &hf_pres_octet_aligned,
1787 { "octet-aligned", "pres.octet_aligned",
1788 FT_BYTES, BASE_NONE, NULL, 0,
1789 "T_octet_aligned", HFILL }},
1790 { &hf_pres_arbitrary,
1791 { "arbitrary", "pres.arbitrary",
1792 FT_BYTES, BASE_NONE, NULL, 0,
1793 "BIT_STRING", HFILL }},
1794 { &hf_pres_Presentation_requirements_context_management,
1795 { "context-management", "pres.context-management",
1796 FT_BOOLEAN, 8, NULL, 0x80,
1798 { &hf_pres_Presentation_requirements_restoration,
1799 { "restoration", "pres.restoration",
1800 FT_BOOLEAN, 8, NULL, 0x40,
1802 { &hf_pres_Protocol_options_nominated_context,
1803 { "nominated-context", "pres.nominated-context",
1804 FT_BOOLEAN, 8, NULL, 0x80,
1806 { &hf_pres_Protocol_options_short_encoding,
1807 { "short-encoding", "pres.short-encoding",
1808 FT_BOOLEAN, 8, NULL, 0x40,
1810 { &hf_pres_Protocol_options_packed_encoding_rules,
1811 { "packed-encoding-rules", "pres.packed-encoding-rules",
1812 FT_BOOLEAN, 8, NULL, 0x20,
1814 { &hf_pres_Protocol_version_version_1,
1815 { "version-1", "pres.version-1",
1816 FT_BOOLEAN, 8, NULL, 0x80,
1818 { &hf_pres_User_session_requirements_half_duplex,
1819 { "half-duplex", "pres.half-duplex",
1820 FT_BOOLEAN, 8, NULL, 0x80,
1822 { &hf_pres_User_session_requirements_duplex,
1823 { "duplex", "pres.duplex",
1824 FT_BOOLEAN, 8, NULL, 0x40,
1826 { &hf_pres_User_session_requirements_expedited_data,
1827 { "expedited-data", "pres.expedited-data",
1828 FT_BOOLEAN, 8, NULL, 0x20,
1830 { &hf_pres_User_session_requirements_minor_synchronize,
1831 { "minor-synchronize", "pres.minor-synchronize",
1832 FT_BOOLEAN, 8, NULL, 0x10,
1834 { &hf_pres_User_session_requirements_major_synchronize,
1835 { "major-synchronize", "pres.major-synchronize",
1836 FT_BOOLEAN, 8, NULL, 0x08,
1838 { &hf_pres_User_session_requirements_resynchronize,
1839 { "resynchronize", "pres.resynchronize",
1840 FT_BOOLEAN, 8, NULL, 0x04,
1842 { &hf_pres_User_session_requirements_activity_management,
1843 { "activity-management", "pres.activity-management",
1844 FT_BOOLEAN, 8, NULL, 0x02,
1846 { &hf_pres_User_session_requirements_negotiated_release,
1847 { "negotiated-release", "pres.negotiated-release",
1848 FT_BOOLEAN, 8, NULL, 0x01,
1850 { &hf_pres_User_session_requirements_capability_data,
1851 { "capability-data", "pres.capability-data",
1852 FT_BOOLEAN, 8, NULL, 0x80,
1854 { &hf_pres_User_session_requirements_exceptions,
1855 { "exceptions", "pres.exceptions",
1856 FT_BOOLEAN, 8, NULL, 0x40,
1858 { &hf_pres_User_session_requirements_typed_data,
1859 { "typed-data", "pres.typed-data",
1860 FT_BOOLEAN, 8, NULL, 0x20,
1862 { &hf_pres_User_session_requirements_symmetric_synchronize,
1863 { "symmetric-synchronize", "pres.symmetric-synchronize",
1864 FT_BOOLEAN, 8, NULL, 0x10,
1866 { &hf_pres_User_session_requirements_data_separation,
1867 { "data-separation", "pres.data-separation",
1868 FT_BOOLEAN, 8, NULL, 0x08,
1871 /*--- End of included file: packet-pres-hfarr.c ---*/
1872 #line 403 "../../asn1/pres/packet-pres-template.c"
1875 /* List of subtrees */
1876 static gint *ett[] = {
1879 /*--- Included file: packet-pres-ettarr.c ---*/
1880 #line 1 "../../asn1/pres/packet-pres-ettarr.c"
1882 &ett_pres_T_normal_mode_parameters,
1883 &ett_pres_T_extensions,
1885 &ett_pres_T_CPA_PPDU_normal_mode_parameters,
1887 &ett_pres_T_CPR_PPDU_normal_mode_parameters,
1888 &ett_pres_Abort_type,
1890 &ett_pres_T_ARU_PPDU_normal_mode_parameters,
1892 &ett_pres_Typed_data_type,
1897 &ett_pres_Context_list,
1898 &ett_pres_Context_list_item,
1899 &ett_pres_SEQUENCE_OF_Transfer_syntax_name,
1900 &ett_pres_Default_context_name,
1901 &ett_pres_Mode_selector,
1902 &ett_pres_Presentation_context_deletion_list,
1903 &ett_pres_Presentation_context_deletion_result_list,
1904 &ett_pres_Presentation_context_identifier_list,
1905 &ett_pres_Presentation_context_identifier_list_item,
1906 &ett_pres_Presentation_requirements,
1907 &ett_pres_Protocol_options,
1908 &ett_pres_Protocol_version,
1909 &ett_pres_Result_list,
1910 &ett_pres_Result_list_item,
1911 &ett_pres_User_data,
1912 &ett_pres_Fully_encoded_data,
1914 &ett_pres_T_presentation_data_values,
1915 &ett_pres_User_session_requirements,
1918 /*--- End of included file: packet-pres-ettarr.c ---*/
1919 #line 409 "../../asn1/pres/packet-pres-template.c"
1922 static uat_field_t users_flds[] = {
1923 UAT_FLD_DEC(pres_users,ctx_id,"Context Id","Presentation Context Identifier"),
1924 UAT_FLD_CSTRING(pres_users,oid,"Syntax Name OID","Abstract Syntax Name (Object Identifier)"),
1928 uat_t* users_uat = uat_new("PRES Users Context List",
1929 sizeof(pres_user_t),
1930 "pres_context_list",
1932 (void*) &pres_users,
1935 "ChPresContextList",
1942 static module_t *pres_module;
1944 /* Register protocol */
1945 proto_pres = proto_register_protocol(PNAME, PSNAME, PFNAME);
1946 register_dissector("pres", dissect_pres, proto_pres);
1948 /* Register connectionless protocol (just for the description) */
1949 proto_clpres = proto_register_protocol(CLPNAME, CLPSNAME, CLPFNAME);
1951 /* Register fields and subtrees */
1952 proto_register_field_array(proto_pres, hf, array_length(hf));
1953 proto_register_subtree_array(ett, array_length(ett));
1954 register_init_routine(pres_init);
1956 pres_module = prefs_register_protocol(proto_pres, NULL);
1958 prefs_register_uat_preference(pres_module, "users_table", "Users Context List",
1959 "A table that enumerates user protocols to be used against"
1960 " specific presentation context identifiers",
1965 /*--- proto_reg_handoff_pres ---------------------------------------*/
1966 void proto_reg_handoff_pres(void) {
1968 /* register_ber_oid_dissector("0.4.0.0.1.1.1.1", dissect_pres, proto_pres,
1969 "itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) abstractSyntax(1) pres(1) version1(1)"); */