From Graeme Lunt
[obnox/wireshark/wip.git] / epan / dissectors / packet-x411.c
1 /* Do not modify this file.                                                   */
2 /* It is created automatically by the ASN.1 to Ethereal dissector compiler    */
3 /* .\packet-x411.c                                                            */
4 /* ../../tools/asn2eth.py -X -b -e -p x411 -c x411.cnf -s packet-x411-template x411.asn */
5
6 /* Input file: packet-x411-template.c */
7
8 /* packet-x411.c
9  * Routines for X.411 (X.400 Message Transfer)  packet dissection
10  * Graeme Lunt 2005
11  *
12  * $Id$
13  *
14  * Ethereal - Network traffic analyzer
15  * By Gerald Combs <gerald@ethereal.com>
16  * Copyright 1998 Gerald Combs
17  *
18  * This program is free software; you can redistribute it and/or
19  * modify it under the terms of the GNU General Public License
20  * as published by the Free Software Foundation; either version 2
21  * of the License, or (at your option) any later version.
22  *
23  * This program is distributed in the hope that it will be useful,
24  * but WITHOUT ANY WARRANTY; without even the implied warranty of
25  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
26  * GNU General Public License for more details.
27  *
28  * You should have received a copy of the GNU General Public License
29  * along with this program; if not, write to the Free Software
30  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
31  */
32
33 #ifdef HAVE_CONFIG_H
34 # include "config.h"
35 #endif
36
37 #include <glib.h>
38 #include <epan/packet.h>
39 #include <epan/conversation.h>
40
41 #include <stdio.h>
42 #include <string.h>
43
44 #include "packet-ber.h"
45 #include "packet-acse.h"
46 #include "packet-ros.h"
47 #include "packet-rtse.h"
48
49 #include "packet-x509af.h"
50 #include "packet-x509ce.h"
51 #include "packet-x509if.h"
52 #include "packet-x509sat.h"
53
54 #include "packet-x411.h"
55
56 #define PNAME  "X.411 OSI Message Transfer Service"
57 #define PSNAME "X411"
58 #define PFNAME "x411"
59
60 /* Initialize the protocol and registered fields */
61 int proto_x411 = -1;
62
63 static struct SESSION_DATA_STRUCTURE* session = NULL;
64 static int extension_id = 0; /* integer extension id */
65 static char object_identifier_id[BER_MAX_OID_STR_LEN]; /* content type identifier */
66 static int
67 call_x411_oid_callback(char *base_oid, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree);
68
69
70 /*--- Included file: packet-x411-hf.c ---*/
71
72 static int hf_x411_InternalTraceInformation_PDU = -1;  /* InternalTraceInformation */
73 static int hf_x411_TraceInformation_PDU = -1;     /* TraceInformation */
74 static int hf_x411_RecipientReassignmentProhibited_PDU = -1;  /* RecipientReassignmentProhibited */
75 static int hf_x411_MTSOriginatorRequestedAlternateRecipient_PDU = -1;  /* MTSOriginatorRequestedAlternateRecipient */
76 static int hf_x411_DLExpansionProhibited_PDU = -1;  /* DLExpansionProhibited */
77 static int hf_x411_ConversionWithLossProhibited_PDU = -1;  /* ConversionWithLossProhibited */
78 static int hf_x411_LatestDeliveryTime_PDU = -1;   /* LatestDeliveryTime */
79 static int hf_x411_RequestedDeliveryMethod_PDU = -1;  /* RequestedDeliveryMethod */
80 static int hf_x411_PhysicalForwardingProhibited_PDU = -1;  /* PhysicalForwardingProhibited */
81 static int hf_x411_PhysicalForwardingAddressRequest_PDU = -1;  /* PhysicalForwardingAddressRequest */
82 static int hf_x411_PhysicalDeliveryModes_PDU = -1;  /* PhysicalDeliveryModes */
83 static int hf_x411_RegisteredMailType_PDU = -1;   /* RegisteredMailType */
84 static int hf_x411_RecipientNumberForAdvice_PDU = -1;  /* RecipientNumberForAdvice */
85 static int hf_x411_PhysicalRenditionAttributes_PDU = -1;  /* PhysicalRenditionAttributes */
86 static int hf_x411_OriginatorReturnAddress_PDU = -1;  /* OriginatorReturnAddress */
87 static int hf_x411_PhysicalDeliveryReportRequest_PDU = -1;  /* PhysicalDeliveryReportRequest */
88 static int hf_x411_OriginatorCertificate_PDU = -1;  /* OriginatorCertificate */
89 static int hf_x411_ContentConfidentialityAlgorithmIdentifier_PDU = -1;  /* ContentConfidentialityAlgorithmIdentifier */
90 static int hf_x411_MessageSecurityLabel_PDU = -1;  /* MessageSecurityLabel */
91 static int hf_x411_ProofOfSubmissionRequest_PDU = -1;  /* ProofOfSubmissionRequest */
92 static int hf_x411_ProofOfDeliveryRequest_PDU = -1;  /* ProofOfDeliveryRequest */
93 static int hf_x411_ContentCorrelator_PDU = -1;    /* ContentCorrelator */
94 static int hf_x411_RedirectionHistory_PDU = -1;   /* RedirectionHistory */
95 static int hf_x411_DLExpansionHistory_PDU = -1;   /* DLExpansionHistory */
96 static int hf_x411_PhysicalForwardingAddress_PDU = -1;  /* PhysicalForwardingAddress */
97 static int hf_x411_OriginatorAndDLExpansionHistory_PDU = -1;  /* OriginatorAndDLExpansionHistory */
98 static int hf_x411_ReportingDLName_PDU = -1;      /* ReportingDLName */
99 static int hf_x411_ReportingMTACertificate_PDU = -1;  /* ReportingMTACertificate */
100 static int hf_x411_ReportingMTAName_PDU = -1;     /* ReportingMTAName */
101 static int hf_x411_ExtendedCertificates_PDU = -1;  /* ExtendedCertificates */
102 static int hf_x411_DLExemptedRecipients_PDU = -1;  /* DLExemptedRecipients */
103 static int hf_x411_CertificateSelectors_PDU = -1;  /* CertificateSelectors */
104 static int hf_x411_CommonName_PDU = -1;           /* CommonName */
105 static int hf_x411_TeletexCommonName_PDU = -1;    /* TeletexCommonName */
106 static int hf_x411_UniversalCommonName_PDU = -1;  /* UniversalCommonName */
107 static int hf_x411_TeletexOrganizationName_PDU = -1;  /* TeletexOrganizationName */
108 static int hf_x411_UniversalOrganizationName_PDU = -1;  /* UniversalOrganizationName */
109 static int hf_x411_TeletexPersonalName_PDU = -1;  /* TeletexPersonalName */
110 static int hf_x411_UniversalPersonalName_PDU = -1;  /* UniversalPersonalName */
111 static int hf_x411_TeletexOrganizationalUnitNames_PDU = -1;  /* TeletexOrganizationalUnitNames */
112 static int hf_x411_UniversalOrganizationalUnitNames_PDU = -1;  /* UniversalOrganizationalUnitNames */
113 static int hf_x411_PDSName_PDU = -1;              /* PDSName */
114 static int hf_x411_PhysicalDeliveryCountryName_PDU = -1;  /* PhysicalDeliveryCountryName */
115 static int hf_x411_PostalCode_PDU = -1;           /* PostalCode */
116 static int hf_x411_PhysicalDeliveryOfficeName_PDU = -1;  /* PhysicalDeliveryOfficeName */
117 static int hf_x411_unauthenticated = -1;          /* NULL */
118 static int hf_x411_authenticated_argument = -1;   /* AuthenticatedArgument */
119 static int hf_x411_authenticated_initiator_name = -1;  /* MTAName */
120 static int hf_x411_initiator_credentials = -1;    /* InitiatorCredentials */
121 static int hf_x411_security_context = -1;         /* SecurityContext */
122 static int hf_x411_authenticated_result = -1;     /* AuthenticatedResult */
123 static int hf_x411_authenticated_responder_name = -1;  /* MTAName */
124 static int hf_x411_responder_credentials = -1;    /* ResponderCredentials */
125 static int hf_x411_message = -1;                  /* Message */
126 static int hf_x411_probe = -1;                    /* Probe */
127 static int hf_x411_report = -1;                   /* Report */
128 static int hf_x411_message_envelope = -1;         /* MessageTransferEnvelope */
129 static int hf_x411_content = -1;                  /* Content */
130 static int hf_x411_report_envelope = -1;          /* ReportTransferEnvelope */
131 static int hf_x411_report_content = -1;           /* ReportTransferContent */
132 static int hf_x411_message_identifier = -1;       /* MessageIdentifier */
133 static int hf_x411_mta_originator_name = -1;      /* MTAOriginatorName */
134 static int hf_x411_original_encoded_information_types = -1;  /* OriginalEncodedInformationTypes */
135 static int hf_x411_content_type = -1;             /* ContentType */
136 static int hf_x411_content_identifier = -1;       /* ContentIdentifier */
137 static int hf_x411_priority = -1;                 /* Priority */
138 static int hf_x411_per_message_indicators = -1;   /* PerMessageIndicators */
139 static int hf_x411_deferred_delivery_time = -1;   /* DeferredDeliveryTime */
140 static int hf_x411_per_domain_bilateral_information = -1;  /* SEQUENCE_OF_PerDomainBilateralInformation */
141 static int hf_x411_per_domain_bilateral_information_item = -1;  /* PerDomainBilateralInformation */
142 static int hf_x411_trace_information = -1;        /* TraceInformation */
143 static int hf_x411_extensions = -1;               /* SET_OF_ExtensionField */
144 static int hf_x411_extensions_item = -1;          /* ExtensionField */
145 static int hf_x411_per_recipient_message_fields = -1;  /* SEQUENCE_OF_PerRecipientMessageTransferFields */
146 static int hf_x411_per_recipient_message_fields_item = -1;  /* PerRecipientMessageTransferFields */
147 static int hf_x411_recipient_name = -1;           /* MTARecipientName */
148 static int hf_x411_originally_specified_recipient_number = -1;  /* OriginallySpecifiedRecipientNumber */
149 static int hf_x411_per_recipient_indicators = -1;  /* PerRecipientIndicators */
150 static int hf_x411_explicit_conversion = -1;      /* ExplicitConversion */
151 static int hf_x411_probe_identifier = -1;         /* ProbeIdentifier */
152 static int hf_x411_content_length = -1;           /* ContentLength */
153 static int hf_x411_per_recipient_probe_transfer_fields = -1;  /* SEQUENCE_OF_PerRecipientProbeTransferFields */
154 static int hf_x411_per_recipient_probe_transfer_fields_item = -1;  /* PerRecipientProbeTransferFields */
155 static int hf_x411_report_identifier = -1;        /* ReportIdentifier */
156 static int hf_x411_report_destination_name = -1;  /* ReportDestinationName */
157 static int hf_x411_subject_identifier = -1;       /* SubjectIdentifier */
158 static int hf_x411_subject_intermediate_trace_information = -1;  /* SubjectIntermediateTraceInformation */
159 static int hf_x411_returned_content = -1;         /* Content */
160 static int hf_x411_additional_information = -1;   /* AdditionalInformation */
161 static int hf_x411_per_recipient_report_fields = -1;  /* SEQUENCE_OF_PerRecipientReportTransferFields */
162 static int hf_x411_per_recipient_fields_item = -1;  /* PerRecipientReportTransferFields */
163 static int hf_x411_mta_actual_recipient_name = -1;  /* MTAActualRecipientName */
164 static int hf_x411_last_trace_information = -1;   /* LastTraceInformation */
165 static int hf_x411_report_originally_intended_recipient_name = -1;  /* MTAOriginallyIntendedRecipientName */
166 static int hf_x411_supplementary_information = -1;  /* SupplementaryInformation */
167 static int hf_x411_country_name = -1;             /* CountryName */
168 static int hf_x411_bilateral_domain = -1;         /* T_domain */
169 static int hf_x411_administration_domain_name = -1;  /* AdministrationDomainName */
170 static int hf_x411_private_domain = -1;           /* T_private_domain */
171 static int hf_x411_private_domain_identifier = -1;  /* PrivateDomainIdentifier */
172 static int hf_x411_arrival_time = -1;             /* ArrivalTime */
173 static int hf_x411_converted_encoded_information_types = -1;  /* ConvertedEncodedInformationTypes */
174 static int hf_x411_trace_report_type = -1;        /* ReportType */
175 static int hf_x411_InternalTraceInformation_item = -1;  /* InternalTraceInformationElement */
176 static int hf_x411_global_domain_identifier = -1;  /* GlobalDomainIdentifier */
177 static int hf_x411_mta_name = -1;                 /* MTAName */
178 static int hf_x411_mta_supplied_information = -1;  /* MTASuppliedInformation */
179 static int hf_x411_routing_action = -1;           /* RoutingAction */
180 static int hf_x411_attempted = -1;                /* T_attempted */
181 static int hf_x411_mta = -1;                      /* MTAName */
182 static int hf_x411_domain = -1;                   /* GlobalDomainIdentifier */
183 static int hf_x411_deferred_time = -1;            /* DeferredTime */
184 static int hf_x411_other_actions = -1;            /* OtherActions */
185 static int hf_x411_TraceInformation_item = -1;    /* TraceInformationElement */
186 static int hf_x411_domain_supplied_information = -1;  /* DomainSuppliedInformation */
187 static int hf_x411_attempted_domain = -1;         /* GlobalDomainIdentifier */
188 static int hf_x411_initiator_name = -1;           /* ObjectName */
189 static int hf_x411_messages_waiting = -1;         /* MessagesWaiting */
190 static int hf_x411_responder_name = -1;           /* ObjectName */
191 static int hf_x411_user_agent = -1;               /* ORAddressAndOptionalDirectoryName */
192 static int hf_x411_mTA = -1;                      /* MTAName */
193 static int hf_x411_message_store = -1;            /* ORAddressAndOptionalDirectoryName */
194 static int hf_x411_urgent = -1;                   /* DeliveryQueue */
195 static int hf_x411_normal = -1;                   /* DeliveryQueue */
196 static int hf_x411_non_urgent = -1;               /* DeliveryQueue */
197 static int hf_x411_messages = -1;                 /* INTEGER */
198 static int hf_x411_delivery_queue_octets = -1;    /* INTEGER */
199 static int hf_x411_simple = -1;                   /* Password */
200 static int hf_x411_ia5_string = -1;               /* IA5String */
201 static int hf_x411_octet_string = -1;             /* OCTET_STRING */
202 static int hf_x411_SecurityContext_item = -1;     /* SecurityLabel */
203 static int hf_x411_message_submission_envelope = -1;  /* MessageSubmissionEnvelope */
204 static int hf_x411_message_submission_identifier = -1;  /* MessageSubmissionIdentifier */
205 static int hf_x411_message_submission_time = -1;  /* MessageSubmissionTime */
206 static int hf_x411_probe_submission_identifier = -1;  /* ProbeSubmissionIdentifier */
207 static int hf_x411_probe_submission_time = -1;    /* ProbeSubmissionTime */
208 static int hf_x411_ImproperlySpecifiedRecipients_item = -1;  /* MTSRecipientName */
209 static int hf_x411_waiting_operations = -1;       /* Operations */
210 static int hf_x411_waiting_messages = -1;         /* WaitingMessages */
211 static int hf_x411_waiting_content_types = -1;    /* SET_OF_ContentType */
212 static int hf_x411_waiting_content_types_item = -1;  /* ContentType */
213 static int hf_x411_waiting_encoded_information_types = -1;  /* EncodedInformationTypes */
214 static int hf_x411_message_delivery_identifier = -1;  /* MessageDeliveryIdentifier */
215 static int hf_x411_message_delivery_time = -1;    /* MessageDeliveryTime */
216 static int hf_x411_other_fields = -1;             /* OtherMessageDeliveryFields */
217 static int hf_x411_recipient_certificate = -1;    /* RecipientCertificate */
218 static int hf_x411_subject_submission_identifier = -1;  /* SubjectSubmissionIdentifier */
219 static int hf_x411_per_recipient_report_delivery_fields = -1;  /* SEQUENCE_OF_PerRecipientReportDeliveryFields */
220 static int hf_x411_per_recipient_report_delivery_fields_item = -1;  /* PerRecipientReportDeliveryFields */
221 static int hf_x411_empty_result = -1;             /* NULL */
222 static int hf_x411_restrict = -1;                 /* BOOLEAN */
223 static int hf_x411_permissible_operations = -1;   /* Operations */
224 static int hf_x411_permissible_maximum_content_length = -1;  /* ContentLength */
225 static int hf_x411_permissible_lowest_priority = -1;  /* Priority */
226 static int hf_x411_permissible_content_types = -1;  /* ContentTypes */
227 static int hf_x411_permissible_encoded_information_types = -1;  /* PermissibleEncodedInformationTypes */
228 static int hf_x411_permissible_security_context = -1;  /* SecurityContext */
229 static int hf_x411_refused_argument = -1;         /* T_refused_argument */
230 static int hf_x411_built_in_argument = -1;        /* RefusedArgument */
231 static int hf_x411_refused_extension = -1;        /* T_refused_extension */
232 static int hf_x411_refusal_reason = -1;           /* RefusalReason */
233 static int hf_x411_user_name = -1;                /* UserName */
234 static int hf_x411_user_address = -1;             /* UserAddress */
235 static int hf_x411_deliverable_class = -1;        /* SET_OF_DeliverableClass */
236 static int hf_x411_deliverable_class_item = -1;   /* DeliverableClass */
237 static int hf_x411_default_delivery_controls = -1;  /* DefaultDeliveryControls */
238 static int hf_x411_redirections = -1;             /* Redirections */
239 static int hf_x411_restricted_delivery = -1;      /* RestrictedDelivery */
240 static int hf_x411_retrieve_registrations = -1;   /* RegistrationTypes */
241 static int hf_x411_non_empty_result = -1;         /* T_non_empty_result */
242 static int hf_x411_registered_information = -1;   /* RegisterArgument */
243 static int hf_x411_old_credentials = -1;          /* Credentials */
244 static int hf_x411_new_credentials = -1;          /* Credentials */
245 static int hf_x411_x121 = -1;                     /* T_x121 */
246 static int hf_x411_x121_address = -1;             /* NumericString */
247 static int hf_x411_tsap_id = -1;                  /* PrintableString */
248 static int hf_x411_presentation = -1;             /* PSAPAddress */
249 static int hf_x411_Redirections_item = -1;        /* RecipientRedirection */
250 static int hf_x411_redirection_classes = -1;      /* SET_OF_RedirectionClass */
251 static int hf_x411_redirection_classes_item = -1;  /* RedirectionClass */
252 static int hf_x411_recipient_assigned_alternate_recipient = -1;  /* RecipientAssignedAlternateRecipient */
253 static int hf_x411_content_types = -1;            /* ContentTypes */
254 static int hf_x411_maximum_content_length = -1;   /* ContentLength */
255 static int hf_x411_encoded_information_types_constraints = -1;  /* EncodedInformationTypesConstraints */
256 static int hf_x411_security_labels = -1;          /* SecurityContext */
257 static int hf_x411_class_priority = -1;           /* SET_OF_Priority */
258 static int hf_x411_priority_item = -1;            /* Priority */
259 static int hf_x411_objects = -1;                  /* T_objects */
260 static int hf_x411_applies_only_to = -1;          /* SEQUENCE_OF_Restriction */
261 static int hf_x411_applies_only_to_item = -1;     /* Restriction */
262 static int hf_x411_unacceptable_eits = -1;        /* ExtendedEncodedInformationTypes */
263 static int hf_x411_acceptable_eits = -1;          /* ExtendedEncodedInformationTypes */
264 static int hf_x411_exclusively_acceptable_eits = -1;  /* ExtendedEncodedInformationTypes */
265 static int hf_x411_RestrictedDelivery_item = -1;  /* Restriction */
266 static int hf_x411_permitted = -1;                /* BOOLEAN */
267 static int hf_x411_source_type = -1;              /* T_source_type */
268 static int hf_x411_source_name = -1;              /* ExactOrPattern */
269 static int hf_x411_exact_match = -1;              /* ORName */
270 static int hf_x411_pattern_match = -1;            /* ORName */
271 static int hf_x411_standard_parameters = -1;      /* T_standard_parameters */
272 static int hf_x411_type_extensions = -1;          /* T_extensions */
273 static int hf_x411_type_extensions_item = -1;     /* T_extensions_item */
274 static int hf_x411_mts_originator_name = -1;      /* MTSOriginatorName */
275 static int hf_x411_per_recipient_message_submission_fields = -1;  /* SEQUENCE_OF_PerRecipientMessageSubmissionFields */
276 static int hf_x411_per_recipient_message_submission_fields_item = -1;  /* PerRecipientMessageSubmissionFields */
277 static int hf_x411_submission_recipient_name = -1;  /* MTSRecipientName */
278 static int hf_x411_originator_report_request = -1;  /* OriginatorReportRequest */
279 static int hf_x411_per_recipient_probe_submission_fields = -1;  /* SEQUENCE_OF_PerRecipientProbeSubmissionFields */
280 static int hf_x411_per_recipient_probe_submission_fields_item = -1;  /* PerRecipientProbeSubmissionFields */
281 static int hf_x411_probe_recipient_name = -1;     /* MTSRecipientName */
282 static int hf_x411_delivered_content_type = -1;   /* DeliveredContentType */
283 static int hf_x411_originator_name = -1;          /* DeliveredOriginatorName */
284 static int hf_x411_delivery_flags = -1;           /* DeliveryFlags */
285 static int hf_x411_other_recipient_names = -1;    /* OtherRecipientNames */
286 static int hf_x411_this_recipient_name = -1;      /* ThisRecipientName */
287 static int hf_x411_originally_intended_recipient_name = -1;  /* MTSOriginallyIntendedRecipientName */
288 static int hf_x411_actual_recipient_name = -1;    /* MTSActualRecipientName */
289 static int hf_x411_delivery_report_type = -1;     /* ReportType */
290 static int hf_x411_delivery = -1;                 /* DeliveryReport */
291 static int hf_x411_non_delivery = -1;             /* NonDeliveryReport */
292 static int hf_x411_type_of_MTS_user = -1;         /* TypeOfMTSUser */
293 static int hf_x411_non_delivery_reason_code = -1;  /* NonDeliveryReasonCode */
294 static int hf_x411_non_delivery_diagnostic_code = -1;  /* NonDeliveryDiagnosticCode */
295 static int hf_x411_ContentTypes_item = -1;        /* ContentType */
296 static int hf_x411_built_in = -1;                 /* BuiltInContentType */
297 static int hf_x411_extended = -1;                 /* ExtendedContentType */
298 static int hf_x411_OtherRecipientNames_item = -1;  /* OtherRecipientName */
299 static int hf_x411_standard_extension = -1;       /* INTEGER */
300 static int hf_x411_private_extension = -1;        /* OBJECT_IDENTIFIER */
301 static int hf_x411_extension_type = -1;           /* ExtensionType */
302 static int hf_x411_criticality = -1;              /* Criticality */
303 static int hf_x411_extension_value = -1;          /* ExtensionValue */
304 static int hf_x411_RequestedDeliveryMethod_item = -1;  /* RequestedDeliveryMethod_item */
305 static int hf_x411_ia5text = -1;                  /* IA5String */
306 static int hf_x411_octets = -1;                   /* OCTET_STRING */
307 static int hf_x411_RedirectionHistory_item = -1;  /* Redirection */
308 static int hf_x411_intended_recipient_name = -1;  /* IntendedRecipientName */
309 static int hf_x411_redirection_reason = -1;       /* RedirectionReason */
310 static int hf_x411_intended_recipient = -1;       /* ORAddressAndOptionalDirectoryName */
311 static int hf_x411_redirection_time = -1;         /* Time */
312 static int hf_x411_DLExpansionHistory_item = -1;  /* DLExpansion */
313 static int hf_x411_dl = -1;                       /* ORAddressAndOptionalDirectoryName */
314 static int hf_x411_dl_expansion_time = -1;        /* Time */
315 static int hf_x411_OriginatorAndDLExpansionHistory_item = -1;  /* OriginatorAndDLExpansion */
316 static int hf_x411_originator_or_dl_name = -1;    /* ORAddressAndOptionalDirectoryName */
317 static int hf_x411_origination_or_expansion_time = -1;  /* Time */
318 static int hf_x411_report_type = -1;              /* T_report_type */
319 static int hf_x411_report_type_delivery = -1;     /* PerRecipientDeliveryReportFields */
320 static int hf_x411_non_delivery_report = -1;      /* PerRecipientNonDeliveryReportFields */
321 static int hf_x411_mta_directory_name = -1;       /* Name */
322 static int hf_x411_ExtendedCertificates_item = -1;  /* ExtendedCertificate */
323 static int hf_x411_directory_entry = -1;          /* Name */
324 static int hf_x411_certificate = -1;              /* Certificates */
325 static int hf_x411_DLExemptedRecipients_item = -1;  /* ORAddressAndOrDirectoryName */
326 static int hf_x411_encryption_recipient = -1;     /* CertificateAssertion */
327 static int hf_x411_encryption_originator = -1;    /* CertificateAssertion */
328 static int hf_x411_content_integrity_check = -1;  /* CertificateAssertion */
329 static int hf_x411_token_signature = -1;          /* CertificateAssertion */
330 static int hf_x411_message_origin_authentication = -1;  /* CertificateAssertion */
331 static int hf_x411_local_identifier = -1;         /* LocalIdentifier */
332 static int hf_x411_numeric = -1;                  /* NumericString */
333 static int hf_x411_printable = -1;                /* PrintableString */
334 static int hf_x411_built_in_standard_attributes = -1;  /* BuiltInStandardAttributes */
335 static int hf_x411_built_in_domain_defined_attributes = -1;  /* BuiltInDomainDefinedAttributes */
336 static int hf_x411_extension_attributes = -1;     /* ExtensionAttributes */
337 static int hf_x411_directory_name = -1;           /* Name */
338 static int hf_x411_network_address = -1;          /* NetworkAddress */
339 static int hf_x411_terminal_identifier = -1;      /* TerminalIdentifier */
340 static int hf_x411_private_domain_name = -1;      /* PrivateDomainName */
341 static int hf_x411_organization_name = -1;        /* OrganizationName */
342 static int hf_x411_numeric_user_identifier = -1;  /* NumericUserIdentifier */
343 static int hf_x411_personal_name = -1;            /* PersonalName */
344 static int hf_x411_organizational_unit_names = -1;  /* OrganizationalUnitNames */
345 static int hf_x411_x121_dcc_code = -1;            /* NumericString */
346 static int hf_x411_iso_3166_alpha2_code = -1;     /* PrintableString */
347 static int hf_x411_printable_surname = -1;        /* PrintableString */
348 static int hf_x411_printable_given_name = -1;     /* PrintableString */
349 static int hf_x411_printable_initials = -1;       /* PrintableString */
350 static int hf_x411_printable_generation_qualifier = -1;  /* PrintableString */
351 static int hf_x411_OrganizationalUnitNames_item = -1;  /* OrganizationalUnitName */
352 static int hf_x411_BuiltInDomainDefinedAttributes_item = -1;  /* BuiltInDomainDefinedAttribute */
353 static int hf_x411_printable_type = -1;           /* PrintableString */
354 static int hf_x411_printable_value = -1;          /* PrintableString */
355 static int hf_x411_ExtensionAttributes_item = -1;  /* ExtensionAttribute */
356 static int hf_x411_extension_attribute_type = -1;  /* INTEGER */
357 static int hf_x411_extension_attribute_value = -1;  /* T_extension_attribute_value */
358 static int hf_x411_teletex_surname = -1;          /* TeletexString */
359 static int hf_x411_teletex_given_name = -1;       /* TeletexString */
360 static int hf_x411_teletex_initials = -1;         /* TeletexString */
361 static int hf_x411_teletex_generation_qualifier = -1;  /* TeletexString */
362 static int hf_x411_universal_surname = -1;        /* UniversalOrBMPString */
363 static int hf_x411_universal_given_name = -1;     /* UniversalOrBMPString */
364 static int hf_x411_universal_initials = -1;       /* UniversalOrBMPString */
365 static int hf_x411_universal_generation_qualifier = -1;  /* UniversalOrBMPString */
366 static int hf_x411_TeletexOrganizationalUnitNames_item = -1;  /* TeletexOrganizationalUnitName */
367 static int hf_x411_UniversalOrganizationalUnitNames_item = -1;  /* UniversalOrganizationalUnitName */
368 static int hf_x411_character_encoding = -1;       /* T_character_encoding */
369 static int hf_x411_two_octets = -1;               /* BMPString */
370 static int hf_x411_four_octets = -1;              /* UniversalString */
371 static int hf_x411_iso_639_language_code = -1;    /* PrintableString */
372 static int hf_x411_numeric_code = -1;             /* NumericString */
373 static int hf_x411_printable_code = -1;           /* PrintableString */
374 static int hf_x411_printable_address = -1;        /* T_printable_address */
375 static int hf_x411_printable_address_item = -1;   /* PrintableString */
376 static int hf_x411_teletex_string = -1;           /* TeletexString */
377 static int hf_x411_printable_string = -1;         /* PrintableString */
378 static int hf_x411_e163_4_address = -1;           /* T_e163_4_address */
379 static int hf_x411_number = -1;                   /* NumericString */
380 static int hf_x411_sub_address = -1;              /* NumericString */
381 static int hf_x411_psap_address = -1;             /* PresentationAddress */
382 static int hf_x411_TeletexDomainDefinedAttributes_item = -1;  /* TeletexDomainDefinedAttribute */
383 static int hf_x411_type = -1;                     /* TeletexString */
384 static int hf_x411_teletex_value = -1;            /* TeletexString */
385 static int hf_x411_UniversalDomainDefinedAttributes_item = -1;  /* UniversalDomainDefinedAttribute */
386 static int hf_x411_universal_type = -1;           /* UniversalOrBMPString */
387 static int hf_x411_universal_value = -1;          /* UniversalOrBMPString */
388 static int hf_x411_built_in_encoded_information_types = -1;  /* BuiltInEncodedInformationTypes */
389 static int hf_x411_g3_facsimile = -1;             /* G3FacsimileNonBasicParameters */
390 static int hf_x411_teletex = -1;                  /* TeletexNonBasicParameters */
391 static int hf_x411_extended_encoded_information_types = -1;  /* ExtendedEncodedInformationTypes */
392 static int hf_x411_ExtendedEncodedInformationTypes_item = -1;  /* ExtendedEncodedInformationType */
393 static int hf_x411_graphic_character_sets = -1;   /* TeletexString */
394 static int hf_x411_control_character_sets = -1;   /* TeletexString */
395 static int hf_x411_page_formats = -1;             /* OCTET_STRING */
396 static int hf_x411_miscellaneous_terminal_capabilities = -1;  /* TeletexString */
397 static int hf_x411_private_use = -1;              /* OCTET_STRING */
398 static int hf_x411_security_policy_identifier = -1;  /* SecurityPolicyIdentifier */
399 static int hf_x411_security_classification = -1;  /* SecurityClassification */
400 static int hf_x411_privacy_mark = -1;             /* PrivacyMark */
401 static int hf_x411_security_categories = -1;      /* SecurityCategories */
402 static int hf_x411_SecurityCategories_item = -1;  /* SecurityCategory */
403 static int hf_x411_category_type = -1;            /* OBJECT_IDENTIFIER */
404 static int hf_x411_category_value = -1;           /* CategoryValue */
405 /* named bits */
406 static int hf_x411_PerRecipientIndicators_responsibility = -1;
407 static int hf_x411_PerRecipientIndicators_originating_MTA_report = -1;
408 static int hf_x411_PerRecipientIndicators_originating_MTA_non_delivery_report = -1;
409 static int hf_x411_PerRecipientIndicators_originator_report = -1;
410 static int hf_x411_PerRecipientIndicators_originator_non_delivery_report = -1;
411 static int hf_x411_PerRecipientIndicators_reserved_5 = -1;
412 static int hf_x411_PerRecipientIndicators_reserved_6 = -1;
413 static int hf_x411_PerRecipientIndicators_reserved_7 = -1;
414 static int hf_x411_OtherActions_redirected = -1;
415 static int hf_x411_OtherActions_dl_operation = -1;
416 static int hf_x411_Operations_probe_submission_or_report_delivery = -1;
417 static int hf_x411_Operations_message_submission_or_message_delivery = -1;
418 static int hf_x411_WaitingMessages_long_content = -1;
419 static int hf_x411_WaitingMessages_low_priority = -1;
420 static int hf_x411_WaitingMessages_other_security_labels = -1;
421 static int hf_x411_T_source_type_originated_by = -1;
422 static int hf_x411_T_source_type_redirected_by = -1;
423 static int hf_x411_T_source_type_dl_expanded_by = -1;
424 static int hf_x411_T_standard_parameters_user_name = -1;
425 static int hf_x411_T_standard_parameters_user_address = -1;
426 static int hf_x411_T_standard_parameters_deliverable_class = -1;
427 static int hf_x411_T_standard_parameters_default_delivery_controls = -1;
428 static int hf_x411_T_standard_parameters_redirections = -1;
429 static int hf_x411_T_standard_parameters_restricted_delivery = -1;
430 static int hf_x411_PerMessageIndicators_disclosure_of_other_recipients = -1;
431 static int hf_x411_PerMessageIndicators_implicit_conversion_prohibited = -1;
432 static int hf_x411_PerMessageIndicators_alternate_recipient_allowed = -1;
433 static int hf_x411_PerMessageIndicators_content_return_request = -1;
434 static int hf_x411_PerMessageIndicators_reserved = -1;
435 static int hf_x411_PerMessageIndicators_bit_5 = -1;
436 static int hf_x411_PerMessageIndicators_bit_6 = -1;
437 static int hf_x411_PerMessageIndicators_service_message = -1;
438 static int hf_x411_OriginatorReportRequest_report = -1;
439 static int hf_x411_OriginatorReportRequest_non_delivery_report = -1;
440 static int hf_x411_DeliveryFlags_implicit_conversion_prohibited = -1;
441 static int hf_x411_Criticality_for_submission = -1;
442 static int hf_x411_Criticality_for_transfer = -1;
443 static int hf_x411_Criticality_for_delivery = -1;
444 static int hf_x411_PhysicalDeliveryModes_ordinary_mail = -1;
445 static int hf_x411_PhysicalDeliveryModes_special_delivery = -1;
446 static int hf_x411_PhysicalDeliveryModes_express_mail = -1;
447 static int hf_x411_PhysicalDeliveryModes_counter_collection = -1;
448 static int hf_x411_PhysicalDeliveryModes_counter_collection_with_telephone_advice = -1;
449 static int hf_x411_PhysicalDeliveryModes_counter_collection_with_telex_advice = -1;
450 static int hf_x411_PhysicalDeliveryModes_counter_collection_with_teletex_advice = -1;
451 static int hf_x411_PhysicalDeliveryModes_bureau_fax_delivery = -1;
452 static int hf_x411_BuiltInEncodedInformationTypes_unknown = -1;
453 static int hf_x411_BuiltInEncodedInformationTypes_ia5_text = -1;
454 static int hf_x411_BuiltInEncodedInformationTypes_g3_facsimile = -1;
455 static int hf_x411_BuiltInEncodedInformationTypes_g4_class_1 = -1;
456 static int hf_x411_BuiltInEncodedInformationTypes_teletex = -1;
457 static int hf_x411_BuiltInEncodedInformationTypes_videotex = -1;
458 static int hf_x411_BuiltInEncodedInformationTypes_voice = -1;
459 static int hf_x411_BuiltInEncodedInformationTypes_sfd = -1;
460 static int hf_x411_BuiltInEncodedInformationTypes_mixed_mode = -1;
461 static int hf_x411_G3FacsimileNonBasicParameters_two_dimensional = -1;
462 static int hf_x411_G3FacsimileNonBasicParameters_fine_resolution = -1;
463 static int hf_x411_G3FacsimileNonBasicParameters_unlimited_length = -1;
464 static int hf_x411_G3FacsimileNonBasicParameters_b4_length = -1;
465 static int hf_x411_G3FacsimileNonBasicParameters_a3_width = -1;
466 static int hf_x411_G3FacsimileNonBasicParameters_b4_width = -1;
467 static int hf_x411_G3FacsimileNonBasicParameters_t6_coding = -1;
468 static int hf_x411_G3FacsimileNonBasicParameters_uncompressed = -1;
469 static int hf_x411_G3FacsimileNonBasicParameters_width_middle_864_of_1728 = -1;
470 static int hf_x411_G3FacsimileNonBasicParameters_width_middle_1216_of_1728 = -1;
471 static int hf_x411_G3FacsimileNonBasicParameters_resolution_type = -1;
472 static int hf_x411_G3FacsimileNonBasicParameters_resolution_400x400 = -1;
473 static int hf_x411_G3FacsimileNonBasicParameters_resolution_300x300 = -1;
474 static int hf_x411_G3FacsimileNonBasicParameters_resolution_8x15 = -1;
475 static int hf_x411_G3FacsimileNonBasicParameters_edi = -1;
476 static int hf_x411_G3FacsimileNonBasicParameters_dtm = -1;
477 static int hf_x411_G3FacsimileNonBasicParameters_bft = -1;
478 static int hf_x411_G3FacsimileNonBasicParameters_mixed_mode = -1;
479 static int hf_x411_G3FacsimileNonBasicParameters_character_mode = -1;
480 static int hf_x411_G3FacsimileNonBasicParameters_twelve_bits = -1;
481 static int hf_x411_G3FacsimileNonBasicParameters_preferred_huffmann = -1;
482 static int hf_x411_G3FacsimileNonBasicParameters_full_colour = -1;
483 static int hf_x411_G3FacsimileNonBasicParameters_jpeg = -1;
484 static int hf_x411_G3FacsimileNonBasicParameters_processable_mode_26 = -1;
485
486 /*--- End of included file: packet-x411-hf.c ---*/
487
488
489 /* Initialize the subtree pointers */
490 static gint ett_x411 = -1;
491
492 /*--- Included file: packet-x411-ett.c ---*/
493
494 static gint ett_x411_MTABindArgument = -1;
495 static gint ett_x411_AuthenticatedArgument = -1;
496 static gint ett_x411_MTABindResult = -1;
497 static gint ett_x411_AuthenticatedResult = -1;
498 static gint ett_x411_MTS_APDU = -1;
499 static gint ett_x411_Message = -1;
500 static gint ett_x411_Report = -1;
501 static gint ett_x411_MessageTransferEnvelope = -1;
502 static gint ett_x411_SEQUENCE_OF_PerDomainBilateralInformation = -1;
503 static gint ett_x411_SET_OF_ExtensionField = -1;
504 static gint ett_x411_SEQUENCE_OF_PerRecipientMessageTransferFields = -1;
505 static gint ett_x411_PerRecipientMessageTransferFields = -1;
506 static gint ett_x411_ProbeTransferEnvelope = -1;
507 static gint ett_x411_SEQUENCE_OF_PerRecipientProbeTransferFields = -1;
508 static gint ett_x411_PerRecipientProbeTransferFields = -1;
509 static gint ett_x411_ReportTransferEnvelope = -1;
510 static gint ett_x411_ReportTransferContent = -1;
511 static gint ett_x411_SEQUENCE_OF_PerRecipientReportTransferFields = -1;
512 static gint ett_x411_PerRecipientReportTransferFields = -1;
513 static gint ett_x411_PerDomainBilateralInformation = -1;
514 static gint ett_x411_T_domain = -1;
515 static gint ett_x411_T_private_domain = -1;
516 static gint ett_x411_PerRecipientIndicators = -1;
517 static gint ett_x411_LastTraceInformation = -1;
518 static gint ett_x411_InternalTraceInformation = -1;
519 static gint ett_x411_InternalTraceInformationElement = -1;
520 static gint ett_x411_MTASuppliedInformation = -1;
521 static gint ett_x411_T_attempted = -1;
522 static gint ett_x411_TraceInformation = -1;
523 static gint ett_x411_TraceInformationElement = -1;
524 static gint ett_x411_DomainSuppliedInformation = -1;
525 static gint ett_x411_OtherActions = -1;
526 static gint ett_x411_MTSBindArgument = -1;
527 static gint ett_x411_MTSBindResult = -1;
528 static gint ett_x411_ObjectName = -1;
529 static gint ett_x411_MessagesWaiting = -1;
530 static gint ett_x411_DeliveryQueue = -1;
531 static gint ett_x411_Credentials = -1;
532 static gint ett_x411_Password = -1;
533 static gint ett_x411_SecurityContext = -1;
534 static gint ett_x411_MessageSubmissionArgument = -1;
535 static gint ett_x411_MessageSubmissionResult = -1;
536 static gint ett_x411_ProbeSubmissionResult = -1;
537 static gint ett_x411_ImproperlySpecifiedRecipients = -1;
538 static gint ett_x411_Waiting = -1;
539 static gint ett_x411_SET_OF_ContentType = -1;
540 static gint ett_x411_Operations = -1;
541 static gint ett_x411_WaitingMessages = -1;
542 static gint ett_x411_MessageDeliveryArgument = -1;
543 static gint ett_x411_MessageDeliveryResult = -1;
544 static gint ett_x411_ReportDeliveryArgument = -1;
545 static gint ett_x411_SEQUENCE_OF_PerRecipientReportDeliveryFields = -1;
546 static gint ett_x411_ReportDeliveryResult = -1;
547 static gint ett_x411_DeliveryControlArgument = -1;
548 static gint ett_x411_DeliveryControlResult = -1;
549 static gint ett_x411_RefusedOperation = -1;
550 static gint ett_x411_T_refused_argument = -1;
551 static gint ett_x411_Controls = -1;
552 static gint ett_x411_RegisterArgument = -1;
553 static gint ett_x411_SET_OF_DeliverableClass = -1;
554 static gint ett_x411_RegisterResult = -1;
555 static gint ett_x411_T_non_empty_result = -1;
556 static gint ett_x411_ChangeCredentialsArgument = -1;
557 static gint ett_x411_UserAddress = -1;
558 static gint ett_x411_T_x121 = -1;
559 static gint ett_x411_Redirections = -1;
560 static gint ett_x411_RecipientRedirection = -1;
561 static gint ett_x411_SET_OF_RedirectionClass = -1;
562 static gint ett_x411_MessageClass = -1;
563 static gint ett_x411_SET_OF_Priority = -1;
564 static gint ett_x411_SEQUENCE_OF_Restriction = -1;
565 static gint ett_x411_EncodedInformationTypesConstraints = -1;
566 static gint ett_x411_RestrictedDelivery = -1;
567 static gint ett_x411_Restriction = -1;
568 static gint ett_x411_T_source_type = -1;
569 static gint ett_x411_ExactOrPattern = -1;
570 static gint ett_x411_RegistrationTypes = -1;
571 static gint ett_x411_T_standard_parameters = -1;
572 static gint ett_x411_T_extensions = -1;
573 static gint ett_x411_MessageSubmissionEnvelope = -1;
574 static gint ett_x411_SEQUENCE_OF_PerRecipientMessageSubmissionFields = -1;
575 static gint ett_x411_PerRecipientMessageSubmissionFields = -1;
576 static gint ett_x411_ProbeSubmissionEnvelope = -1;
577 static gint ett_x411_SEQUENCE_OF_PerRecipientProbeSubmissionFields = -1;
578 static gint ett_x411_PerRecipientProbeSubmissionFields = -1;
579 static gint ett_x411_MessageDeliveryEnvelope = -1;
580 static gint ett_x411_OtherMessageDeliveryFields = -1;
581 static gint ett_x411_ReportDeliveryEnvelope = -1;
582 static gint ett_x411_PerRecipientReportDeliveryFields = -1;
583 static gint ett_x411_ReportType = -1;
584 static gint ett_x411_DeliveryReport = -1;
585 static gint ett_x411_NonDeliveryReport = -1;
586 static gint ett_x411_ContentTypes = -1;
587 static gint ett_x411_ContentType = -1;
588 static gint ett_x411_DeliveredContentType = -1;
589 static gint ett_x411_PerMessageIndicators = -1;
590 static gint ett_x411_OriginatorReportRequest = -1;
591 static gint ett_x411_DeliveryFlags = -1;
592 static gint ett_x411_OtherRecipientNames = -1;
593 static gint ett_x411_ExtensionType = -1;
594 static gint ett_x411_Criticality = -1;
595 static gint ett_x411_ExtensionField = -1;
596 static gint ett_x411_RequestedDeliveryMethod = -1;
597 static gint ett_x411_PhysicalDeliveryModes = -1;
598 static gint ett_x411_ContentCorrelator = -1;
599 static gint ett_x411_RedirectionHistory = -1;
600 static gint ett_x411_Redirection = -1;
601 static gint ett_x411_IntendedRecipientName = -1;
602 static gint ett_x411_DLExpansionHistory = -1;
603 static gint ett_x411_DLExpansion = -1;
604 static gint ett_x411_OriginatorAndDLExpansionHistory = -1;
605 static gint ett_x411_OriginatorAndDLExpansion = -1;
606 static gint ett_x411_PerRecipientReportFields = -1;
607 static gint ett_x411_T_report_type = -1;
608 static gint ett_x411_PerRecipientDeliveryReportFields = -1;
609 static gint ett_x411_PerRecipientNonDeliveryReportFields = -1;
610 static gint ett_x411_ReportingMTAName = -1;
611 static gint ett_x411_ExtendedCertificates = -1;
612 static gint ett_x411_ExtendedCertificate = -1;
613 static gint ett_x411_DLExemptedRecipients = -1;
614 static gint ett_x411_CertificateSelectors = -1;
615 static gint ett_x411_MTSIdentifier = -1;
616 static gint ett_x411_GlobalDomainIdentifier = -1;
617 static gint ett_x411_PrivateDomainIdentifier = -1;
618 static gint ett_x411_ORName = -1;
619 static gint ett_x411_ORAddress = -1;
620 static gint ett_x411_BuiltInStandardAttributes = -1;
621 static gint ett_x411_CountryName = -1;
622 static gint ett_x411_AdministrationDomainName = -1;
623 static gint ett_x411_PrivateDomainName = -1;
624 static gint ett_x411_PersonalName = -1;
625 static gint ett_x411_OrganizationalUnitNames = -1;
626 static gint ett_x411_BuiltInDomainDefinedAttributes = -1;
627 static gint ett_x411_BuiltInDomainDefinedAttribute = -1;
628 static gint ett_x411_ExtensionAttributes = -1;
629 static gint ett_x411_ExtensionAttribute = -1;
630 static gint ett_x411_TeletexPersonalName = -1;
631 static gint ett_x411_UniversalPersonalName = -1;
632 static gint ett_x411_TeletexOrganizationalUnitNames = -1;
633 static gint ett_x411_UniversalOrganizationalUnitNames = -1;
634 static gint ett_x411_UniversalOrBMPString = -1;
635 static gint ett_x411_T_character_encoding = -1;
636 static gint ett_x411_PhysicalDeliveryCountryName = -1;
637 static gint ett_x411_PostalCode = -1;
638 static gint ett_x411_UnformattedPostalAddress = -1;
639 static gint ett_x411_T_printable_address = -1;
640 static gint ett_x411_PDSParameter = -1;
641 static gint ett_x411_ExtendedNetworkAddress = -1;
642 static gint ett_x411_T_e163_4_address = -1;
643 static gint ett_x411_TeletexDomainDefinedAttributes = -1;
644 static gint ett_x411_TeletexDomainDefinedAttribute = -1;
645 static gint ett_x411_UniversalDomainDefinedAttributes = -1;
646 static gint ett_x411_UniversalDomainDefinedAttribute = -1;
647 static gint ett_x411_EncodedInformationTypes = -1;
648 static gint ett_x411_BuiltInEncodedInformationTypes = -1;
649 static gint ett_x411_ExtendedEncodedInformationTypes = -1;
650 static gint ett_x411_NonBasicParameters = -1;
651 static gint ett_x411_G3FacsimileNonBasicParameters = -1;
652 static gint ett_x411_TeletexNonBasicParameters = -1;
653 static gint ett_x411_SecurityLabel = -1;
654 static gint ett_x411_SecurityCategories = -1;
655 static gint ett_x411_SecurityCategory = -1;
656
657 /*--- End of included file: packet-x411-ett.c ---*/
658
659
660
661 /*--- Included file: packet-x411-fn.c ---*/
662
663 /*--- Fields for imported types ---*/
664
665 static int dissect_mta_directory_name_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
666   return dissect_x509if_Name(TRUE, tvb, offset, pinfo, tree, hf_x411_mta_directory_name);
667 }
668 static int dissect_directory_entry_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
669   return dissect_x509if_Name(TRUE, tvb, offset, pinfo, tree, hf_x411_directory_entry);
670 }
671 static int dissect_certificate_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
672   return dissect_x509af_Certificates(TRUE, tvb, offset, pinfo, tree, hf_x411_certificate);
673 }
674 static int dissect_encryption_recipient_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
675   return dissect_x509ce_CertificateAssertion(TRUE, tvb, offset, pinfo, tree, hf_x411_encryption_recipient);
676 }
677 static int dissect_encryption_originator_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
678   return dissect_x509ce_CertificateAssertion(TRUE, tvb, offset, pinfo, tree, hf_x411_encryption_originator);
679 }
680 static int dissect_content_integrity_check_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
681   return dissect_x509ce_CertificateAssertion(TRUE, tvb, offset, pinfo, tree, hf_x411_content_integrity_check);
682 }
683 static int dissect_token_signature_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
684   return dissect_x509ce_CertificateAssertion(TRUE, tvb, offset, pinfo, tree, hf_x411_token_signature);
685 }
686 static int dissect_message_origin_authentication_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
687   return dissect_x509ce_CertificateAssertion(TRUE, tvb, offset, pinfo, tree, hf_x411_message_origin_authentication);
688 }
689 static int dissect_directory_name_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
690   return dissect_x509if_Name(TRUE, tvb, offset, pinfo, tree, hf_x411_directory_name);
691 }
692 static int dissect_psap_address_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
693   return dissect_x509sat_PresentationAddress(TRUE, tvb, offset, pinfo, tree, hf_x411_psap_address);
694 }
695
696
697
698 static int
699 dissect_x411_NULL(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
700   offset = dissect_ber_null(implicit_tag, pinfo, tree, tvb, offset, hf_index);
701
702   return offset;
703 }
704 static int dissect_unauthenticated(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
705   return dissect_x411_NULL(FALSE, tvb, offset, pinfo, tree, hf_x411_unauthenticated);
706 }
707 static int dissect_empty_result(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
708   return dissect_x411_NULL(FALSE, tvb, offset, pinfo, tree, hf_x411_empty_result);
709 }
710
711
712
713 static int
714 dissect_x411_MTAName(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
715   offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_IA5String,
716                                             pinfo, tree, tvb, offset, hf_index,
717                                             NULL);
718
719   return offset;
720 }
721 static int dissect_authenticated_initiator_name_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
722   return dissect_x411_MTAName(TRUE, tvb, offset, pinfo, tree, hf_x411_authenticated_initiator_name);
723 }
724 static int dissect_authenticated_responder_name_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
725   return dissect_x411_MTAName(TRUE, tvb, offset, pinfo, tree, hf_x411_authenticated_responder_name);
726 }
727 static int dissect_mta_name(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
728   return dissect_x411_MTAName(FALSE, tvb, offset, pinfo, tree, hf_x411_mta_name);
729 }
730 static int dissect_mta(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
731   return dissect_x411_MTAName(FALSE, tvb, offset, pinfo, tree, hf_x411_mta);
732 }
733 static int dissect_mTA_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
734   return dissect_x411_MTAName(TRUE, tvb, offset, pinfo, tree, hf_x411_mTA);
735 }
736
737
738
739 static int
740 dissect_x411_IA5String(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
741   offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_IA5String,
742                                             pinfo, tree, tvb, offset, hf_index,
743                                             NULL);
744
745   return offset;
746 }
747 static int dissect_ia5_string(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
748   return dissect_x411_IA5String(FALSE, tvb, offset, pinfo, tree, hf_x411_ia5_string);
749 }
750 static int dissect_ia5text(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
751   return dissect_x411_IA5String(FALSE, tvb, offset, pinfo, tree, hf_x411_ia5text);
752 }
753
754
755
756 static int
757 dissect_x411_OCTET_STRING(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
758   offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index,
759                                        NULL);
760
761   return offset;
762 }
763 static int dissect_octet_string(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
764   return dissect_x411_OCTET_STRING(FALSE, tvb, offset, pinfo, tree, hf_x411_octet_string);
765 }
766 static int dissect_octets(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
767   return dissect_x411_OCTET_STRING(FALSE, tvb, offset, pinfo, tree, hf_x411_octets);
768 }
769 static int dissect_page_formats_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
770   return dissect_x411_OCTET_STRING(TRUE, tvb, offset, pinfo, tree, hf_x411_page_formats);
771 }
772 static int dissect_private_use_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
773   return dissect_x411_OCTET_STRING(TRUE, tvb, offset, pinfo, tree, hf_x411_private_use);
774 }
775
776
777 static const value_string x411_Password_vals[] = {
778   {   0, "ia5-string" },
779   {   1, "octet-string" },
780   { 0, NULL }
781 };
782
783 static const ber_choice_t Password_choice[] = {
784   {   0, BER_CLASS_UNI, BER_UNI_TAG_IA5String, BER_FLAGS_NOOWNTAG, dissect_ia5_string },
785   {   1, BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_octet_string },
786   { 0, 0, 0, 0, NULL }
787 };
788
789 static int
790 dissect_x411_Password(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
791   offset = dissect_ber_choice(pinfo, tree, tvb, offset,
792                                  Password_choice, hf_index, ett_x411_Password,
793                                  NULL);
794
795   return offset;
796 }
797 static int dissect_simple(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
798   return dissect_x411_Password(FALSE, tvb, offset, pinfo, tree, hf_x411_simple);
799 }
800
801
802 static const value_string x411_Credentials_vals[] = {
803   { -1/*choice*/, "simple" },
804   { 0, NULL }
805 };
806
807 static const ber_choice_t Credentials_choice[] = {
808   { -1/*choice*/, BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_simple },
809   { 0, 0, 0, 0, NULL }
810 };
811
812 static int
813 dissect_x411_Credentials(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
814   offset = dissect_ber_choice(pinfo, tree, tvb, offset,
815                                  Credentials_choice, hf_index, ett_x411_Credentials,
816                                  NULL);
817
818   return offset;
819 }
820 static int dissect_old_credentials_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
821   return dissect_x411_Credentials(TRUE, tvb, offset, pinfo, tree, hf_x411_old_credentials);
822 }
823 static int dissect_new_credentials_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
824   return dissect_x411_Credentials(TRUE, tvb, offset, pinfo, tree, hf_x411_new_credentials);
825 }
826
827
828
829 static int
830 dissect_x411_InitiatorCredentials(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
831   offset = dissect_x411_Credentials(implicit_tag, tvb, offset, pinfo, tree, hf_index);
832
833   return offset;
834 }
835 static int dissect_initiator_credentials_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
836   return dissect_x411_InitiatorCredentials(TRUE, tvb, offset, pinfo, tree, hf_x411_initiator_credentials);
837 }
838
839
840
841 static int
842 dissect_x411_SecurityPolicyIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
843   offset = dissect_ber_object_identifier(implicit_tag, pinfo, tree, tvb, offset, hf_index,
844                                             NULL);
845
846   return offset;
847 }
848 static int dissect_security_policy_identifier(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
849   return dissect_x411_SecurityPolicyIdentifier(FALSE, tvb, offset, pinfo, tree, hf_x411_security_policy_identifier);
850 }
851
852
853 static const value_string x411_SecurityClassification_vals[] = {
854   {   0, "unmarked" },
855   {   1, "unclassified" },
856   {   2, "restricted" },
857   {   3, "confidential" },
858   {   4, "secret" },
859   {   5, "top-secret" },
860   { 0, NULL }
861 };
862
863
864 static int
865 dissect_x411_SecurityClassification(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
866   offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
867                                   NULL);
868
869   return offset;
870 }
871 static int dissect_security_classification(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
872   return dissect_x411_SecurityClassification(FALSE, tvb, offset, pinfo, tree, hf_x411_security_classification);
873 }
874
875
876
877 static int
878 dissect_x411_PrivacyMark(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
879   offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_PrintableString,
880                                             pinfo, tree, tvb, offset, hf_index,
881                                             NULL);
882
883   return offset;
884 }
885 static int dissect_privacy_mark(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
886   return dissect_x411_PrivacyMark(FALSE, tvb, offset, pinfo, tree, hf_x411_privacy_mark);
887 }
888
889
890
891 static int
892 dissect_x411_OBJECT_IDENTIFIER(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
893   offset = dissect_ber_object_identifier(implicit_tag, pinfo, tree, tvb, offset, hf_index,
894                                             NULL);
895
896   return offset;
897 }
898 static int dissect_private_extension_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
899   return dissect_x411_OBJECT_IDENTIFIER(TRUE, tvb, offset, pinfo, tree, hf_x411_private_extension);
900 }
901 static int dissect_category_type_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
902   return dissect_x411_OBJECT_IDENTIFIER(TRUE, tvb, offset, pinfo, tree, hf_x411_category_type);
903 }
904
905
906
907 static int
908 dissect_x411_CategoryValue(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
909
910         offset = dissect_unknown_ber(pinfo, tvb, offset, tree);
911
912
913   return offset;
914 }
915 static int dissect_category_value_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
916   return dissect_x411_CategoryValue(TRUE, tvb, offset, pinfo, tree, hf_x411_category_value);
917 }
918
919
920 static const ber_sequence_t SecurityCategory_sequence[] = {
921   { BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_category_type_impl },
922   { BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_category_value_impl },
923   { 0, 0, 0, NULL }
924 };
925
926 static int
927 dissect_x411_SecurityCategory(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
928   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
929                                    SecurityCategory_sequence, hf_index, ett_x411_SecurityCategory);
930
931   return offset;
932 }
933 static int dissect_SecurityCategories_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
934   return dissect_x411_SecurityCategory(FALSE, tvb, offset, pinfo, tree, hf_x411_SecurityCategories_item);
935 }
936
937
938 static const ber_sequence_t SecurityCategories_set_of[1] = {
939   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_SecurityCategories_item },
940 };
941
942 static int
943 dissect_x411_SecurityCategories(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
944   offset = dissect_ber_set_of(implicit_tag, pinfo, tree, tvb, offset,
945                                  SecurityCategories_set_of, hf_index, ett_x411_SecurityCategories);
946
947   return offset;
948 }
949 static int dissect_security_categories(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
950   return dissect_x411_SecurityCategories(FALSE, tvb, offset, pinfo, tree, hf_x411_security_categories);
951 }
952
953
954 static const ber_sequence_t SecurityLabel_set[] = {
955   { BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_security_policy_identifier },
956   { BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_security_classification },
957   { BER_CLASS_UNI, BER_UNI_TAG_PrintableString, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_privacy_mark },
958   { BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_security_categories },
959   { 0, 0, 0, NULL }
960 };
961
962 int
963 dissect_x411_SecurityLabel(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
964   offset = dissect_ber_set(implicit_tag, pinfo, tree, tvb, offset,
965                               SecurityLabel_set, hf_index, ett_x411_SecurityLabel);
966
967   return offset;
968 }
969 static int dissect_SecurityContext_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
970   return dissect_x411_SecurityLabel(FALSE, tvb, offset, pinfo, tree, hf_x411_SecurityContext_item);
971 }
972
973
974 static const ber_sequence_t SecurityContext_set_of[1] = {
975   { BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_SecurityContext_item },
976 };
977
978 static int
979 dissect_x411_SecurityContext(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
980   offset = dissect_ber_set_of(implicit_tag, pinfo, tree, tvb, offset,
981                                  SecurityContext_set_of, hf_index, ett_x411_SecurityContext);
982
983   return offset;
984 }
985 static int dissect_security_context_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
986   return dissect_x411_SecurityContext(TRUE, tvb, offset, pinfo, tree, hf_x411_security_context);
987 }
988 static int dissect_permissible_security_context_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
989   return dissect_x411_SecurityContext(TRUE, tvb, offset, pinfo, tree, hf_x411_permissible_security_context);
990 }
991 static int dissect_security_labels_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
992   return dissect_x411_SecurityContext(TRUE, tvb, offset, pinfo, tree, hf_x411_security_labels);
993 }
994
995
996 static const ber_sequence_t AuthenticatedArgument_set[] = {
997   { BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_authenticated_initiator_name_impl },
998   { BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG|BER_FLAGS_NOTCHKTAG, dissect_initiator_credentials_impl },
999   { BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_security_context_impl },
1000   { 0, 0, 0, NULL }
1001 };
1002
1003 static int
1004 dissect_x411_AuthenticatedArgument(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1005   offset = dissect_ber_set(implicit_tag, pinfo, tree, tvb, offset,
1006                               AuthenticatedArgument_set, hf_index, ett_x411_AuthenticatedArgument);
1007
1008   return offset;
1009 }
1010 static int dissect_authenticated_argument_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1011   return dissect_x411_AuthenticatedArgument(TRUE, tvb, offset, pinfo, tree, hf_x411_authenticated_argument);
1012 }
1013
1014
1015 static const value_string x411_MTABindArgument_vals[] = {
1016   {   0, "unauthenticated" },
1017   {   1, "authenticated" },
1018   { 0, NULL }
1019 };
1020
1021 static const ber_choice_t MTABindArgument_choice[] = {
1022   {   0, BER_CLASS_UNI, BER_UNI_TAG_NULL, BER_FLAGS_NOOWNTAG, dissect_unauthenticated },
1023   {   1, BER_CLASS_CON, 1, 0, dissect_authenticated_argument_impl },
1024   { 0, 0, 0, 0, NULL }
1025 };
1026
1027 static int
1028 dissect_x411_MTABindArgument(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1029   offset = dissect_ber_choice(pinfo, tree, tvb, offset,
1030                                  MTABindArgument_choice, hf_index, ett_x411_MTABindArgument,
1031                                  NULL);
1032
1033   return offset;
1034 }
1035
1036
1037
1038 static int
1039 dissect_x411_ResponderCredentials(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1040   offset = dissect_x411_Credentials(implicit_tag, tvb, offset, pinfo, tree, hf_index);
1041
1042   return offset;
1043 }
1044 static int dissect_responder_credentials_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1045   return dissect_x411_ResponderCredentials(TRUE, tvb, offset, pinfo, tree, hf_x411_responder_credentials);
1046 }
1047
1048
1049 static const ber_sequence_t AuthenticatedResult_set[] = {
1050   { BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_authenticated_responder_name_impl },
1051   { BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG|BER_FLAGS_NOTCHKTAG, dissect_responder_credentials_impl },
1052   { 0, 0, 0, NULL }
1053 };
1054
1055 static int
1056 dissect_x411_AuthenticatedResult(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1057   offset = dissect_ber_set(implicit_tag, pinfo, tree, tvb, offset,
1058                               AuthenticatedResult_set, hf_index, ett_x411_AuthenticatedResult);
1059
1060   return offset;
1061 }
1062 static int dissect_authenticated_result_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1063   return dissect_x411_AuthenticatedResult(TRUE, tvb, offset, pinfo, tree, hf_x411_authenticated_result);
1064 }
1065
1066
1067 static const value_string x411_MTABindResult_vals[] = {
1068   {   0, "unauthenticated" },
1069   {   1, "authenticated" },
1070   { 0, NULL }
1071 };
1072
1073 static const ber_choice_t MTABindResult_choice[] = {
1074   {   0, BER_CLASS_UNI, BER_UNI_TAG_NULL, BER_FLAGS_NOOWNTAG, dissect_unauthenticated },
1075   {   1, BER_CLASS_CON, 1, 0, dissect_authenticated_result_impl },
1076   { 0, 0, 0, 0, NULL }
1077 };
1078
1079 static int
1080 dissect_x411_MTABindResult(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1081   offset = dissect_ber_choice(pinfo, tree, tvb, offset,
1082                                  MTABindResult_choice, hf_index, ett_x411_MTABindResult,
1083                                  NULL);
1084
1085   return offset;
1086 }
1087
1088
1089 static const value_string x411_MTABindError_vals[] = {
1090   {   0, "busy" },
1091   {   2, "authentication-error" },
1092   {   3, "unacceptable-dialogue-mode" },
1093   {   4, "unacceptable-security-context" },
1094   {   5, "inadequate-association-confidentiality" },
1095   { 0, NULL }
1096 };
1097
1098
1099 static int
1100 dissect_x411_MTABindError(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1101   offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
1102                                   NULL);
1103
1104   return offset;
1105 }
1106
1107
1108
1109 static int
1110 dissect_x411_NumericString(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1111   offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_NumericString,
1112                                             pinfo, tree, tvb, offset, hf_index,
1113                                             NULL);
1114
1115   return offset;
1116 }
1117 static int dissect_x121_address(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1118   return dissect_x411_NumericString(FALSE, tvb, offset, pinfo, tree, hf_x411_x121_address);
1119 }
1120 static int dissect_numeric(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1121   return dissect_x411_NumericString(FALSE, tvb, offset, pinfo, tree, hf_x411_numeric);
1122 }
1123 static int dissect_x121_dcc_code(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1124   return dissect_x411_NumericString(FALSE, tvb, offset, pinfo, tree, hf_x411_x121_dcc_code);
1125 }
1126 static int dissect_numeric_code(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1127   return dissect_x411_NumericString(FALSE, tvb, offset, pinfo, tree, hf_x411_numeric_code);
1128 }
1129 static int dissect_number_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1130   return dissect_x411_NumericString(TRUE, tvb, offset, pinfo, tree, hf_x411_number);
1131 }
1132 static int dissect_sub_address_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1133   return dissect_x411_NumericString(TRUE, tvb, offset, pinfo, tree, hf_x411_sub_address);
1134 }
1135
1136
1137
1138 static int
1139 dissect_x411_PrintableString(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1140   offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_PrintableString,
1141                                             pinfo, tree, tvb, offset, hf_index,
1142                                             NULL);
1143
1144   return offset;
1145 }
1146 static int dissect_tsap_id(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1147   return dissect_x411_PrintableString(FALSE, tvb, offset, pinfo, tree, hf_x411_tsap_id);
1148 }
1149 static int dissect_printable(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1150   return dissect_x411_PrintableString(FALSE, tvb, offset, pinfo, tree, hf_x411_printable);
1151 }
1152 static int dissect_iso_3166_alpha2_code(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1153   return dissect_x411_PrintableString(FALSE, tvb, offset, pinfo, tree, hf_x411_iso_3166_alpha2_code);
1154 }
1155 static int dissect_printable_surname_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1156   return dissect_x411_PrintableString(TRUE, tvb, offset, pinfo, tree, hf_x411_printable_surname);
1157 }
1158 static int dissect_printable_given_name_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1159   return dissect_x411_PrintableString(TRUE, tvb, offset, pinfo, tree, hf_x411_printable_given_name);
1160 }
1161 static int dissect_printable_initials_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1162   return dissect_x411_PrintableString(TRUE, tvb, offset, pinfo, tree, hf_x411_printable_initials);
1163 }
1164 static int dissect_printable_generation_qualifier_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1165   return dissect_x411_PrintableString(TRUE, tvb, offset, pinfo, tree, hf_x411_printable_generation_qualifier);
1166 }
1167 static int dissect_printable_type(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1168   return dissect_x411_PrintableString(FALSE, tvb, offset, pinfo, tree, hf_x411_printable_type);
1169 }
1170 static int dissect_printable_value(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1171   return dissect_x411_PrintableString(FALSE, tvb, offset, pinfo, tree, hf_x411_printable_value);
1172 }
1173 static int dissect_iso_639_language_code(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1174   return dissect_x411_PrintableString(FALSE, tvb, offset, pinfo, tree, hf_x411_iso_639_language_code);
1175 }
1176 static int dissect_printable_code(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1177   return dissect_x411_PrintableString(FALSE, tvb, offset, pinfo, tree, hf_x411_printable_code);
1178 }
1179 static int dissect_printable_address_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1180   return dissect_x411_PrintableString(FALSE, tvb, offset, pinfo, tree, hf_x411_printable_address_item);
1181 }
1182 static int dissect_printable_string(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1183   return dissect_x411_PrintableString(FALSE, tvb, offset, pinfo, tree, hf_x411_printable_string);
1184 }
1185
1186
1187 static const value_string x411_CountryName_vals[] = {
1188   {   0, "x121-dcc-code" },
1189   {   1, "iso-3166-alpha2-code" },
1190   { 0, NULL }
1191 };
1192
1193 static const ber_choice_t CountryName_choice[] = {
1194   {   0, BER_CLASS_UNI, BER_UNI_TAG_NumericString, BER_FLAGS_NOOWNTAG, dissect_x121_dcc_code },
1195   {   1, BER_CLASS_UNI, BER_UNI_TAG_PrintableString, BER_FLAGS_NOOWNTAG, dissect_iso_3166_alpha2_code },
1196   { 0, 0, 0, 0, NULL }
1197 };
1198
1199 static int
1200 dissect_x411_CountryName(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1201  gint8 class;
1202  gboolean pc, ind_field;
1203  gint32 tag;
1204  gint32 len1;
1205
1206  if(!implicit_tag){
1207    /* XXX  asn2eth can not yet handle tagged assignment yes so this
1208     * XXX is some conformance file magic to work around that bug
1209     */
1210     offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
1211     offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
1212  }
1213   offset = dissect_ber_choice(pinfo, tree, tvb, offset,
1214                               CountryName_choice, hf_index, ett_x411_CountryName, NULL);
1215
1216
1217   return offset;
1218 }
1219 static int dissect_country_name(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1220   return dissect_x411_CountryName(FALSE, tvb, offset, pinfo, tree, hf_x411_country_name);
1221 }
1222
1223
1224 static const value_string x411_AdministrationDomainName_vals[] = {
1225   {   0, "numeric" },
1226   {   1, "printable" },
1227   { 0, NULL }
1228 };
1229
1230 static const ber_choice_t AdministrationDomainName_choice[] = {
1231   {   0, BER_CLASS_UNI, BER_UNI_TAG_NumericString, BER_FLAGS_NOOWNTAG, dissect_numeric },
1232   {   1, BER_CLASS_UNI, BER_UNI_TAG_PrintableString, BER_FLAGS_NOOWNTAG, dissect_printable },
1233   { 0, 0, 0, 0, NULL }
1234 };
1235
1236 static int
1237 dissect_x411_AdministrationDomainName(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1238  gint8 class;
1239  gboolean pc, ind_field;
1240  gint32 tag;
1241  gint32 len1;
1242
1243  if(!implicit_tag){
1244    /* XXX  asn2eth can not yet handle tagged assignment yes so this
1245     * XXX is some conformance file magic to work around that bug
1246     */
1247     offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
1248     offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
1249  }
1250
1251   offset = dissect_ber_choice(pinfo, tree, tvb, offset,
1252                               AdministrationDomainName_choice, hf_index, ett_x411_AdministrationDomainName, NULL);
1253
1254
1255   return offset;
1256 }
1257 static int dissect_administration_domain_name(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1258   return dissect_x411_AdministrationDomainName(FALSE, tvb, offset, pinfo, tree, hf_x411_administration_domain_name);
1259 }
1260 static int dissect_administration_domain_name_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1261   return dissect_x411_AdministrationDomainName(TRUE, tvb, offset, pinfo, tree, hf_x411_administration_domain_name);
1262 }
1263
1264
1265 static const value_string x411_PrivateDomainIdentifier_vals[] = {
1266   {   0, "numeric" },
1267   {   1, "printable" },
1268   { 0, NULL }
1269 };
1270
1271 static const ber_choice_t PrivateDomainIdentifier_choice[] = {
1272   {   0, BER_CLASS_UNI, BER_UNI_TAG_NumericString, BER_FLAGS_NOOWNTAG, dissect_numeric },
1273   {   1, BER_CLASS_UNI, BER_UNI_TAG_PrintableString, BER_FLAGS_NOOWNTAG, dissect_printable },
1274   { 0, 0, 0, 0, NULL }
1275 };
1276
1277 static int
1278 dissect_x411_PrivateDomainIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1279   offset = dissect_ber_choice(pinfo, tree, tvb, offset,
1280                                  PrivateDomainIdentifier_choice, hf_index, ett_x411_PrivateDomainIdentifier,
1281                                  NULL);
1282
1283   return offset;
1284 }
1285 static int dissect_private_domain_identifier(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1286   return dissect_x411_PrivateDomainIdentifier(FALSE, tvb, offset, pinfo, tree, hf_x411_private_domain_identifier);
1287 }
1288 static int dissect_private_domain_identifier_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1289   return dissect_x411_PrivateDomainIdentifier(TRUE, tvb, offset, pinfo, tree, hf_x411_private_domain_identifier);
1290 }
1291
1292
1293 static const ber_sequence_t GlobalDomainIdentifier_sequence[] = {
1294   { BER_CLASS_APP, 1, BER_FLAGS_NOOWNTAG, dissect_country_name },
1295   { BER_CLASS_APP, 2, BER_FLAGS_NOOWNTAG, dissect_administration_domain_name },
1296   { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_private_domain_identifier },
1297   { 0, 0, 0, NULL }
1298 };
1299
1300 static int
1301 dissect_x411_GlobalDomainIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1302   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
1303                                    GlobalDomainIdentifier_sequence, hf_index, ett_x411_GlobalDomainIdentifier);
1304
1305   return offset;
1306 }
1307 static int dissect_global_domain_identifier(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1308   return dissect_x411_GlobalDomainIdentifier(FALSE, tvb, offset, pinfo, tree, hf_x411_global_domain_identifier);
1309 }
1310 static int dissect_domain(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1311   return dissect_x411_GlobalDomainIdentifier(FALSE, tvb, offset, pinfo, tree, hf_x411_domain);
1312 }
1313 static int dissect_attempted_domain(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1314   return dissect_x411_GlobalDomainIdentifier(FALSE, tvb, offset, pinfo, tree, hf_x411_attempted_domain);
1315 }
1316
1317
1318
1319 static int
1320 dissect_x411_LocalIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1321   offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_IA5String,
1322                                             pinfo, tree, tvb, offset, hf_index,
1323                                             NULL);
1324
1325   return offset;
1326 }
1327 static int dissect_local_identifier(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1328   return dissect_x411_LocalIdentifier(FALSE, tvb, offset, pinfo, tree, hf_x411_local_identifier);
1329 }
1330
1331
1332 static const ber_sequence_t MTSIdentifier_sequence[] = {
1333   { BER_CLASS_APP, 3, BER_FLAGS_NOOWNTAG, dissect_global_domain_identifier },
1334   { BER_CLASS_UNI, BER_UNI_TAG_IA5String, BER_FLAGS_NOOWNTAG, dissect_local_identifier },
1335   { 0, 0, 0, NULL }
1336 };
1337
1338 static int
1339 dissect_x411_MTSIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1340   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
1341                                    MTSIdentifier_sequence, hf_index, ett_x411_MTSIdentifier);
1342
1343   return offset;
1344 }
1345
1346
1347
1348 static int
1349 dissect_x411_MessageIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1350   offset = dissect_x411_MTSIdentifier(implicit_tag, tvb, offset, pinfo, tree, hf_index);
1351
1352   return offset;
1353 }
1354 static int dissect_message_identifier(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1355   return dissect_x411_MessageIdentifier(FALSE, tvb, offset, pinfo, tree, hf_x411_message_identifier);
1356 }
1357
1358
1359
1360 static int
1361 dissect_x411_X121Address(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1362   offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_NumericString,
1363                                             pinfo, tree, tvb, offset, hf_index,
1364                                             NULL);
1365
1366   return offset;
1367 }
1368
1369
1370
1371 static int
1372 dissect_x411_NetworkAddress(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1373   offset = dissect_x411_X121Address(implicit_tag, tvb, offset, pinfo, tree, hf_index);
1374
1375   return offset;
1376 }
1377 static int dissect_network_address_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1378   return dissect_x411_NetworkAddress(TRUE, tvb, offset, pinfo, tree, hf_x411_network_address);
1379 }
1380
1381
1382
1383 static int
1384 dissect_x411_TerminalIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1385   offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_PrintableString,
1386                                             pinfo, tree, tvb, offset, hf_index,
1387                                             NULL);
1388
1389   return offset;
1390 }
1391 static int dissect_terminal_identifier_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1392   return dissect_x411_TerminalIdentifier(TRUE, tvb, offset, pinfo, tree, hf_x411_terminal_identifier);
1393 }
1394
1395
1396 static const value_string x411_PrivateDomainName_vals[] = {
1397   {   0, "numeric" },
1398   {   1, "printable" },
1399   { 0, NULL }
1400 };
1401
1402 static const ber_choice_t PrivateDomainName_choice[] = {
1403   {   0, BER_CLASS_UNI, BER_UNI_TAG_NumericString, BER_FLAGS_NOOWNTAG, dissect_numeric },
1404   {   1, BER_CLASS_UNI, BER_UNI_TAG_PrintableString, BER_FLAGS_NOOWNTAG, dissect_printable },
1405   { 0, 0, 0, 0, NULL }
1406 };
1407
1408 static int
1409 dissect_x411_PrivateDomainName(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1410   offset = dissect_ber_choice(pinfo, tree, tvb, offset,
1411                                  PrivateDomainName_choice, hf_index, ett_x411_PrivateDomainName,
1412                                  NULL);
1413
1414   return offset;
1415 }
1416 static int dissect_private_domain_name_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1417   return dissect_x411_PrivateDomainName(TRUE, tvb, offset, pinfo, tree, hf_x411_private_domain_name);
1418 }
1419
1420
1421
1422 static int
1423 dissect_x411_OrganizationName(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1424   offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_PrintableString,
1425                                             pinfo, tree, tvb, offset, hf_index,
1426                                             NULL);
1427
1428   return offset;
1429 }
1430 static int dissect_organization_name_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1431   return dissect_x411_OrganizationName(TRUE, tvb, offset, pinfo, tree, hf_x411_organization_name);
1432 }
1433
1434
1435
1436 static int
1437 dissect_x411_NumericUserIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1438   offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_NumericString,
1439                                             pinfo, tree, tvb, offset, hf_index,
1440                                             NULL);
1441
1442   return offset;
1443 }
1444 static int dissect_numeric_user_identifier_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1445   return dissect_x411_NumericUserIdentifier(TRUE, tvb, offset, pinfo, tree, hf_x411_numeric_user_identifier);
1446 }
1447
1448
1449 static const ber_sequence_t PersonalName_set[] = {
1450   { BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_printable_surname_impl },
1451   { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_printable_given_name_impl },
1452   { BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_printable_initials_impl },
1453   { BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_printable_generation_qualifier_impl },
1454   { 0, 0, 0, NULL }
1455 };
1456
1457 static int
1458 dissect_x411_PersonalName(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1459   offset = dissect_ber_set(implicit_tag, pinfo, tree, tvb, offset,
1460                               PersonalName_set, hf_index, ett_x411_PersonalName);
1461
1462   return offset;
1463 }
1464 static int dissect_personal_name_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1465   return dissect_x411_PersonalName(TRUE, tvb, offset, pinfo, tree, hf_x411_personal_name);
1466 }
1467
1468
1469
1470 static int
1471 dissect_x411_OrganizationalUnitName(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1472   offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_PrintableString,
1473                                             pinfo, tree, tvb, offset, hf_index,
1474                                             NULL);
1475
1476   return offset;
1477 }
1478 static int dissect_OrganizationalUnitNames_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1479   return dissect_x411_OrganizationalUnitName(FALSE, tvb, offset, pinfo, tree, hf_x411_OrganizationalUnitNames_item);
1480 }
1481
1482
1483 static const ber_sequence_t OrganizationalUnitNames_sequence_of[1] = {
1484   { BER_CLASS_UNI, BER_UNI_TAG_PrintableString, BER_FLAGS_NOOWNTAG, dissect_OrganizationalUnitNames_item },
1485 };
1486
1487 static int
1488 dissect_x411_OrganizationalUnitNames(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1489   offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
1490                                       OrganizationalUnitNames_sequence_of, hf_index, ett_x411_OrganizationalUnitNames);
1491
1492   return offset;
1493 }
1494 static int dissect_organizational_unit_names_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1495   return dissect_x411_OrganizationalUnitNames(TRUE, tvb, offset, pinfo, tree, hf_x411_organizational_unit_names);
1496 }
1497
1498
1499 static const ber_sequence_t BuiltInStandardAttributes_sequence[] = {
1500   { BER_CLASS_APP, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_country_name },
1501   { BER_CLASS_APP, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_administration_domain_name },
1502   { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_network_address_impl },
1503   { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_terminal_identifier_impl },
1504   { BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG|BER_FLAGS_NOTCHKTAG, dissect_private_domain_name_impl },
1505   { BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_organization_name_impl },
1506   { BER_CLASS_CON, 4, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_numeric_user_identifier_impl },
1507   { BER_CLASS_CON, 5, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_personal_name_impl },
1508   { BER_CLASS_CON, 6, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_organizational_unit_names_impl },
1509   { 0, 0, 0, NULL }
1510 };
1511
1512 static int
1513 dissect_x411_BuiltInStandardAttributes(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1514   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
1515                                    BuiltInStandardAttributes_sequence, hf_index, ett_x411_BuiltInStandardAttributes);
1516
1517   return offset;
1518 }
1519 static int dissect_built_in_standard_attributes(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1520   return dissect_x411_BuiltInStandardAttributes(FALSE, tvb, offset, pinfo, tree, hf_x411_built_in_standard_attributes);
1521 }
1522
1523
1524 static const ber_sequence_t BuiltInDomainDefinedAttribute_sequence[] = {
1525   { BER_CLASS_UNI, BER_UNI_TAG_PrintableString, BER_FLAGS_NOOWNTAG, dissect_printable_type },
1526   { BER_CLASS_UNI, BER_UNI_TAG_PrintableString, BER_FLAGS_NOOWNTAG, dissect_printable_value },
1527   { 0, 0, 0, NULL }
1528 };
1529
1530 static int
1531 dissect_x411_BuiltInDomainDefinedAttribute(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1532   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
1533                                    BuiltInDomainDefinedAttribute_sequence, hf_index, ett_x411_BuiltInDomainDefinedAttribute);
1534
1535   return offset;
1536 }
1537 static int dissect_BuiltInDomainDefinedAttributes_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1538   return dissect_x411_BuiltInDomainDefinedAttribute(FALSE, tvb, offset, pinfo, tree, hf_x411_BuiltInDomainDefinedAttributes_item);
1539 }
1540
1541
1542 static const ber_sequence_t BuiltInDomainDefinedAttributes_sequence_of[1] = {
1543   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_BuiltInDomainDefinedAttributes_item },
1544 };
1545
1546 static int
1547 dissect_x411_BuiltInDomainDefinedAttributes(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1548   offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
1549                                       BuiltInDomainDefinedAttributes_sequence_of, hf_index, ett_x411_BuiltInDomainDefinedAttributes);
1550
1551   return offset;
1552 }
1553 static int dissect_built_in_domain_defined_attributes(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1554   return dissect_x411_BuiltInDomainDefinedAttributes(FALSE, tvb, offset, pinfo, tree, hf_x411_built_in_domain_defined_attributes);
1555 }
1556
1557
1558
1559 static int
1560 dissect_x411_INTEGER(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1561
1562   offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
1563                                   &extension_id);
1564
1565
1566   return offset;
1567 }
1568 static int dissect_messages_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1569   return dissect_x411_INTEGER(TRUE, tvb, offset, pinfo, tree, hf_x411_messages);
1570 }
1571 static int dissect_delivery_queue_octets_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1572   return dissect_x411_INTEGER(TRUE, tvb, offset, pinfo, tree, hf_x411_delivery_queue_octets);
1573 }
1574 static int dissect_standard_extension_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1575   return dissect_x411_INTEGER(TRUE, tvb, offset, pinfo, tree, hf_x411_standard_extension);
1576 }
1577 static int dissect_extension_attribute_type_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1578   return dissect_x411_INTEGER(TRUE, tvb, offset, pinfo, tree, hf_x411_extension_attribute_type);
1579 }
1580
1581
1582
1583 static int
1584 dissect_x411_T_extension_attribute_value(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1585
1586         offset=call_x411_oid_callback("x411.extension-attribute", tvb, offset, pinfo, tree);
1587
1588
1589   return offset;
1590 }
1591 static int dissect_extension_attribute_value_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1592   return dissect_x411_T_extension_attribute_value(TRUE, tvb, offset, pinfo, tree, hf_x411_extension_attribute_value);
1593 }
1594
1595
1596 static const ber_sequence_t ExtensionAttribute_sequence[] = {
1597   { BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_extension_attribute_type_impl },
1598   { BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_extension_attribute_value_impl },
1599   { 0, 0, 0, NULL }
1600 };
1601
1602 static int
1603 dissect_x411_ExtensionAttribute(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1604   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
1605                                    ExtensionAttribute_sequence, hf_index, ett_x411_ExtensionAttribute);
1606
1607   return offset;
1608 }
1609 static int dissect_ExtensionAttributes_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1610   return dissect_x411_ExtensionAttribute(FALSE, tvb, offset, pinfo, tree, hf_x411_ExtensionAttributes_item);
1611 }
1612
1613
1614 static const ber_sequence_t ExtensionAttributes_set_of[1] = {
1615   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_ExtensionAttributes_item },
1616 };
1617
1618 static int
1619 dissect_x411_ExtensionAttributes(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1620   offset = dissect_ber_set_of(implicit_tag, pinfo, tree, tvb, offset,
1621                                  ExtensionAttributes_set_of, hf_index, ett_x411_ExtensionAttributes);
1622
1623   return offset;
1624 }
1625 static int dissect_extension_attributes(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1626   return dissect_x411_ExtensionAttributes(FALSE, tvb, offset, pinfo, tree, hf_x411_extension_attributes);
1627 }
1628
1629
1630 static const ber_sequence_t ORName_sequence[] = {
1631   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_built_in_standard_attributes },
1632   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_built_in_domain_defined_attributes },
1633   { BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_extension_attributes },
1634   { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_directory_name_impl },
1635   { 0, 0, 0, NULL }
1636 };
1637
1638 int
1639 dissect_x411_ORName(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1640   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
1641                                    ORName_sequence, hf_index, ett_x411_ORName);
1642
1643   return offset;
1644 }
1645 static int dissect_exact_match_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1646   return dissect_x411_ORName(TRUE, tvb, offset, pinfo, tree, hf_x411_exact_match);
1647 }
1648 static int dissect_pattern_match_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1649   return dissect_x411_ORName(TRUE, tvb, offset, pinfo, tree, hf_x411_pattern_match);
1650 }
1651
1652
1653
1654 static int
1655 dissect_x411_ORAddressAndOptionalDirectoryName(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1656   offset = dissect_x411_ORName(implicit_tag, tvb, offset, pinfo, tree, hf_index);
1657
1658   return offset;
1659 }
1660 static int dissect_user_agent(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1661   return dissect_x411_ORAddressAndOptionalDirectoryName(FALSE, tvb, offset, pinfo, tree, hf_x411_user_agent);
1662 }
1663 static int dissect_message_store_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1664   return dissect_x411_ORAddressAndOptionalDirectoryName(TRUE, tvb, offset, pinfo, tree, hf_x411_message_store);
1665 }
1666 static int dissect_intended_recipient(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1667   return dissect_x411_ORAddressAndOptionalDirectoryName(FALSE, tvb, offset, pinfo, tree, hf_x411_intended_recipient);
1668 }
1669 static int dissect_dl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1670   return dissect_x411_ORAddressAndOptionalDirectoryName(FALSE, tvb, offset, pinfo, tree, hf_x411_dl);
1671 }
1672 static int dissect_originator_or_dl_name(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1673   return dissect_x411_ORAddressAndOptionalDirectoryName(FALSE, tvb, offset, pinfo, tree, hf_x411_originator_or_dl_name);
1674 }
1675
1676
1677
1678 static int
1679 dissect_x411_MTAOriginatorName(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1680   offset = dissect_x411_ORAddressAndOptionalDirectoryName(implicit_tag, tvb, offset, pinfo, tree, hf_index);
1681
1682   return offset;
1683 }
1684 static int dissect_mta_originator_name(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1685   return dissect_x411_MTAOriginatorName(FALSE, tvb, offset, pinfo, tree, hf_x411_mta_originator_name);
1686 }
1687
1688
1689 static const asn_namedbit BuiltInEncodedInformationTypes_bits[] = {
1690   {  0, &hf_x411_BuiltInEncodedInformationTypes_unknown, -1, -1, "unknown", NULL },
1691   {  2, &hf_x411_BuiltInEncodedInformationTypes_ia5_text, -1, -1, "ia5-text", NULL },
1692   {  3, &hf_x411_BuiltInEncodedInformationTypes_g3_facsimile, -1, -1, "g3-facsimile", NULL },
1693   {  4, &hf_x411_BuiltInEncodedInformationTypes_g4_class_1, -1, -1, "g4-class-1", NULL },
1694   {  5, &hf_x411_BuiltInEncodedInformationTypes_teletex, -1, -1, "teletex", NULL },
1695   {  6, &hf_x411_BuiltInEncodedInformationTypes_videotex, -1, -1, "videotex", NULL },
1696   {  7, &hf_x411_BuiltInEncodedInformationTypes_voice, -1, -1, "voice", NULL },
1697   {  8, &hf_x411_BuiltInEncodedInformationTypes_sfd, -1, -1, "sfd", NULL },
1698   {  9, &hf_x411_BuiltInEncodedInformationTypes_mixed_mode, -1, -1, "mixed-mode", NULL },
1699   { 0, NULL, 0, 0, NULL, NULL }
1700 };
1701
1702 static int
1703 dissect_x411_BuiltInEncodedInformationTypes(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1704   offset = dissect_ber_bitstring(implicit_tag, pinfo, tree, tvb, offset,
1705                                     BuiltInEncodedInformationTypes_bits, hf_index, ett_x411_BuiltInEncodedInformationTypes,
1706                                     NULL);
1707
1708   return offset;
1709 }
1710 static int dissect_built_in_encoded_information_types_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1711   return dissect_x411_BuiltInEncodedInformationTypes(TRUE, tvb, offset, pinfo, tree, hf_x411_built_in_encoded_information_types);
1712 }
1713
1714
1715 static const asn_namedbit G3FacsimileNonBasicParameters_bits[] = {
1716   {  8, &hf_x411_G3FacsimileNonBasicParameters_two_dimensional, -1, -1, "two-dimensional", NULL },
1717   {  9, &hf_x411_G3FacsimileNonBasicParameters_fine_resolution, -1, -1, "fine-resolution", NULL },
1718   { 20, &hf_x411_G3FacsimileNonBasicParameters_unlimited_length, -1, -1, "unlimited-length", NULL },
1719   { 21, &hf_x411_G3FacsimileNonBasicParameters_b4_length, -1, -1, "b4-length", NULL },
1720   { 22, &hf_x411_G3FacsimileNonBasicParameters_a3_width, -1, -1, "a3-width", NULL },
1721   { 23, &hf_x411_G3FacsimileNonBasicParameters_b4_width, -1, -1, "b4-width", NULL },
1722   { 25, &hf_x411_G3FacsimileNonBasicParameters_t6_coding, -1, -1, "t6-coding", NULL },
1723   { 30, &hf_x411_G3FacsimileNonBasicParameters_uncompressed, -1, -1, "uncompressed", NULL },
1724   { 37, &hf_x411_G3FacsimileNonBasicParameters_width_middle_864_of_1728, -1, -1, "width-middle-864-of-1728", NULL },
1725   { 38, &hf_x411_G3FacsimileNonBasicParameters_width_middle_1216_of_1728, -1, -1, "width-middle-1216-of-1728", NULL },
1726   { 44, &hf_x411_G3FacsimileNonBasicParameters_resolution_type, -1, -1, "resolution-type", NULL },
1727   { 45, &hf_x411_G3FacsimileNonBasicParameters_resolution_400x400, -1, -1, "resolution-400x400", NULL },
1728   { 46, &hf_x411_G3FacsimileNonBasicParameters_resolution_300x300, -1, -1, "resolution-300x300", NULL },
1729   { 47, &hf_x411_G3FacsimileNonBasicParameters_resolution_8x15, -1, -1, "resolution-8x15", NULL },
1730   { 49, &hf_x411_G3FacsimileNonBasicParameters_edi, -1, -1, "edi", NULL },
1731   { 50, &hf_x411_G3FacsimileNonBasicParameters_dtm, -1, -1, "dtm", NULL },
1732   { 51, &hf_x411_G3FacsimileNonBasicParameters_bft, -1, -1, "bft", NULL },
1733   { 58, &hf_x411_G3FacsimileNonBasicParameters_mixed_mode, -1, -1, "mixed-mode", NULL },
1734   { 60, &hf_x411_G3FacsimileNonBasicParameters_character_mode, -1, -1, "character-mode", NULL },
1735   { 65, &hf_x411_G3FacsimileNonBasicParameters_twelve_bits, -1, -1, "twelve-bits", NULL },
1736   { 66, &hf_x411_G3FacsimileNonBasicParameters_preferred_huffmann, -1, -1, "preferred-huffmann", NULL },
1737   { 67, &hf_x411_G3FacsimileNonBasicParameters_full_colour, -1, -1, "full-colour", NULL },
1738   { 68, &hf_x411_G3FacsimileNonBasicParameters_jpeg, -1, -1, "jpeg", NULL },
1739   { 71, &hf_x411_G3FacsimileNonBasicParameters_processable_mode_26, -1, -1, "processable-mode-26", NULL },
1740   { 0, NULL, 0, 0, NULL, NULL }
1741 };
1742
1743 int
1744 dissect_x411_G3FacsimileNonBasicParameters(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1745   offset = dissect_ber_bitstring(implicit_tag, pinfo, tree, tvb, offset,
1746                                     G3FacsimileNonBasicParameters_bits, hf_index, ett_x411_G3FacsimileNonBasicParameters,
1747                                     NULL);
1748
1749   return offset;
1750 }
1751 static int dissect_g3_facsimile_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1752   return dissect_x411_G3FacsimileNonBasicParameters(TRUE, tvb, offset, pinfo, tree, hf_x411_g3_facsimile);
1753 }
1754
1755
1756
1757 static int
1758 dissect_x411_TeletexString(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1759   offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_TeletexString,
1760                                             pinfo, tree, tvb, offset, hf_index,
1761                                             NULL);
1762
1763   return offset;
1764 }
1765 static int dissect_teletex_surname_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1766   return dissect_x411_TeletexString(TRUE, tvb, offset, pinfo, tree, hf_x411_teletex_surname);
1767 }
1768 static int dissect_teletex_given_name_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1769   return dissect_x411_TeletexString(TRUE, tvb, offset, pinfo, tree, hf_x411_teletex_given_name);
1770 }
1771 static int dissect_teletex_initials_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1772   return dissect_x411_TeletexString(TRUE, tvb, offset, pinfo, tree, hf_x411_teletex_initials);
1773 }
1774 static int dissect_teletex_generation_qualifier_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1775   return dissect_x411_TeletexString(TRUE, tvb, offset, pinfo, tree, hf_x411_teletex_generation_qualifier);
1776 }
1777 static int dissect_teletex_string(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1778   return dissect_x411_TeletexString(FALSE, tvb, offset, pinfo, tree, hf_x411_teletex_string);
1779 }
1780 static int dissect_type(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1781   return dissect_x411_TeletexString(FALSE, tvb, offset, pinfo, tree, hf_x411_type);
1782 }
1783 static int dissect_teletex_value(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1784   return dissect_x411_TeletexString(FALSE, tvb, offset, pinfo, tree, hf_x411_teletex_value);
1785 }
1786 static int dissect_graphic_character_sets_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1787   return dissect_x411_TeletexString(TRUE, tvb, offset, pinfo, tree, hf_x411_graphic_character_sets);
1788 }
1789 static int dissect_control_character_sets_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1790   return dissect_x411_TeletexString(TRUE, tvb, offset, pinfo, tree, hf_x411_control_character_sets);
1791 }
1792 static int dissect_miscellaneous_terminal_capabilities_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1793   return dissect_x411_TeletexString(TRUE, tvb, offset, pinfo, tree, hf_x411_miscellaneous_terminal_capabilities);
1794 }
1795
1796
1797 static const ber_sequence_t TeletexNonBasicParameters_set[] = {
1798   { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_graphic_character_sets_impl },
1799   { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_control_character_sets_impl },
1800   { BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_page_formats_impl },
1801   { BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_miscellaneous_terminal_capabilities_impl },
1802   { BER_CLASS_CON, 4, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_private_use_impl },
1803   { 0, 0, 0, NULL }
1804 };
1805
1806 int
1807 dissect_x411_TeletexNonBasicParameters(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1808   offset = dissect_ber_set(implicit_tag, pinfo, tree, tvb, offset,
1809                               TeletexNonBasicParameters_set, hf_index, ett_x411_TeletexNonBasicParameters);
1810
1811   return offset;
1812 }
1813 static int dissect_teletex_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1814   return dissect_x411_TeletexNonBasicParameters(TRUE, tvb, offset, pinfo, tree, hf_x411_teletex);
1815 }
1816
1817
1818
1819 static int
1820 dissect_x411_ExtendedEncodedInformationType(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1821   offset = dissect_ber_object_identifier(implicit_tag, pinfo, tree, tvb, offset, hf_index,
1822                                             NULL);
1823
1824   return offset;
1825 }
1826 static int dissect_ExtendedEncodedInformationTypes_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1827   return dissect_x411_ExtendedEncodedInformationType(FALSE, tvb, offset, pinfo, tree, hf_x411_ExtendedEncodedInformationTypes_item);
1828 }
1829
1830
1831 static const ber_sequence_t ExtendedEncodedInformationTypes_set_of[1] = {
1832   { BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_ExtendedEncodedInformationTypes_item },
1833 };
1834
1835 static int
1836 dissect_x411_ExtendedEncodedInformationTypes(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1837   offset = dissect_ber_set_of(implicit_tag, pinfo, tree, tvb, offset,
1838                                  ExtendedEncodedInformationTypes_set_of, hf_index, ett_x411_ExtendedEncodedInformationTypes);
1839
1840   return offset;
1841 }
1842 static int dissect_unacceptable_eits_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1843   return dissect_x411_ExtendedEncodedInformationTypes(TRUE, tvb, offset, pinfo, tree, hf_x411_unacceptable_eits);
1844 }
1845 static int dissect_acceptable_eits_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1846   return dissect_x411_ExtendedEncodedInformationTypes(TRUE, tvb, offset, pinfo, tree, hf_x411_acceptable_eits);
1847 }
1848 static int dissect_exclusively_acceptable_eits_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1849   return dissect_x411_ExtendedEncodedInformationTypes(TRUE, tvb, offset, pinfo, tree, hf_x411_exclusively_acceptable_eits);
1850 }
1851 static int dissect_extended_encoded_information_types_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1852   return dissect_x411_ExtendedEncodedInformationTypes(TRUE, tvb, offset, pinfo, tree, hf_x411_extended_encoded_information_types);
1853 }
1854
1855
1856 static const ber_sequence_t EncodedInformationTypes_set[] = {
1857   { BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_built_in_encoded_information_types_impl },
1858   { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_g3_facsimile_impl },
1859   { BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_teletex_impl },
1860   { BER_CLASS_CON, 4, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_extended_encoded_information_types_impl },
1861   { 0, 0, 0, NULL }
1862 };
1863
1864 int
1865 dissect_x411_EncodedInformationTypes(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1866   offset = dissect_ber_set(implicit_tag, pinfo, tree, tvb, offset,
1867                               EncodedInformationTypes_set, hf_index, ett_x411_EncodedInformationTypes);
1868
1869   return offset;
1870 }
1871 static int dissect_waiting_encoded_information_types(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1872   return dissect_x411_EncodedInformationTypes(FALSE, tvb, offset, pinfo, tree, hf_x411_waiting_encoded_information_types);
1873 }
1874
1875
1876
1877 static int
1878 dissect_x411_OriginalEncodedInformationTypes(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1879   offset = dissect_x411_EncodedInformationTypes(implicit_tag, tvb, offset, pinfo, tree, hf_index);
1880
1881   return offset;
1882 }
1883 static int dissect_original_encoded_information_types(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1884   return dissect_x411_OriginalEncodedInformationTypes(FALSE, tvb, offset, pinfo, tree, hf_x411_original_encoded_information_types);
1885 }
1886 static int dissect_original_encoded_information_types_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1887   return dissect_x411_OriginalEncodedInformationTypes(TRUE, tvb, offset, pinfo, tree, hf_x411_original_encoded_information_types);
1888 }
1889
1890
1891 static const value_string x411_BuiltInContentType_vals[] = {
1892   {   0, "unidentified" },
1893   {   1, "external" },
1894   {   2, "interpersonal-messaging-1984" },
1895   {  22, "interpersonal-messaging-1988" },
1896   {  35, "edi-messaging" },
1897   {  40, "voice-messaging" },
1898   { 0, NULL }
1899 };
1900
1901
1902 static int
1903 dissect_x411_BuiltInContentType(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1904   guint32       ict = -1;       
1905
1906   offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
1907                                   &ict);
1908
1909   /* convert integer content type to oid for dispatch when the content is found */
1910   switch(ict) {
1911         case 2:
1912         strcpy(object_identifier_id, "2.6.1.10.0");
1913         break;
1914         case 22:
1915         strcpy(object_identifier_id, "2.6.1.10.1");
1916         break;
1917         default:
1918         break;
1919         }
1920
1921
1922   return offset;
1923 }
1924 static int dissect_built_in(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1925   return dissect_x411_BuiltInContentType(FALSE, tvb, offset, pinfo, tree, hf_x411_built_in);
1926 }
1927 static int dissect_built_in_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1928   return dissect_x411_BuiltInContentType(TRUE, tvb, offset, pinfo, tree, hf_x411_built_in);
1929 }
1930
1931
1932
1933 static int
1934 dissect_x411_ExtendedContentType(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1935   offset = dissect_ber_object_identifier(implicit_tag, pinfo, tree, tvb, offset,
1936                                          hf_index, object_identifier_id);
1937
1938
1939
1940   return offset;
1941 }
1942 static int dissect_extended(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1943   return dissect_x411_ExtendedContentType(FALSE, tvb, offset, pinfo, tree, hf_x411_extended);
1944 }
1945
1946
1947 static const value_string x411_ContentType_vals[] = {
1948   {   0, "built-in" },
1949   {   1, "extended" },
1950   { 0, NULL }
1951 };
1952
1953 static const ber_choice_t ContentType_choice[] = {
1954   {   0, BER_CLASS_APP, 6, BER_FLAGS_NOOWNTAG, dissect_built_in },
1955   {   1, BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_extended },
1956   { 0, 0, 0, 0, NULL }
1957 };
1958
1959 static int
1960 dissect_x411_ContentType(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1961   offset = dissect_ber_choice(pinfo, tree, tvb, offset,
1962                                  ContentType_choice, hf_index, ett_x411_ContentType,
1963                                  NULL);
1964
1965   return offset;
1966 }
1967 static int dissect_content_type(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1968   return dissect_x411_ContentType(FALSE, tvb, offset, pinfo, tree, hf_x411_content_type);
1969 }
1970 static int dissect_waiting_content_types_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1971   return dissect_x411_ContentType(FALSE, tvb, offset, pinfo, tree, hf_x411_waiting_content_types_item);
1972 }
1973 static int dissect_ContentTypes_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
1974   return dissect_x411_ContentType(FALSE, tvb, offset, pinfo, tree, hf_x411_ContentTypes_item);
1975 }
1976
1977
1978
1979 static int
1980 dissect_x411_ContentIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
1981  gint8 class;
1982  gboolean pc, ind_field;
1983  gint32 tag;
1984  gint32 len1;
1985
1986  if(!implicit_tag){
1987    /* XXX  asn2eth can not yet handle tagged assignment yes so this
1988     * XXX is some conformance file magic to work around that bug
1989     */
1990     offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
1991     offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
1992  }
1993
1994   /* this is magic I haven't seen used before - I've stripped the tag - but now I'm going to say it is IMPLICIT! */
1995   offset = dissect_ber_restricted_string(TRUE, BER_UNI_TAG_PrintableString,
1996                                          pinfo, tree, tvb, offset, hf_index,
1997                                          NULL);
1998
1999
2000
2001   return offset;
2002 }
2003 static int dissect_content_identifier(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
2004   return dissect_x411_ContentIdentifier(FALSE, tvb, offset, pinfo, tree, hf_x411_content_identifier);
2005 }
2006 static int dissect_content_identifier_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
2007   return dissect_x411_ContentIdentifier(TRUE, tvb, offset, pinfo, tree, hf_x411_content_identifier);
2008 }
2009
2010
2011 static const value_string x411_Priority_vals[] = {
2012   {   0, "normal" },
2013   {   1, "non-urgent" },
2014   {   2, "urgent" },
2015   { 0, NULL }
2016 };
2017
2018
2019 static int
2020 dissect_x411_Priority(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
2021   offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
2022                                   NULL);
2023
2024   return offset;
2025 }
2026 static int dissect_priority(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
2027   return dissect_x411_Priority(FALSE, tvb, offset, pinfo, tree, hf_x411_priority);
2028 }
2029 static int dissect_permissible_lowest_priority(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
2030   return dissect_x411_Priority(FALSE, tvb, offset, pinfo, tree, hf_x411_permissible_lowest_priority);
2031 }
2032 static int dissect_priority_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
2033   return dissect_x411_Priority(FALSE, tvb, offset, pinfo, tree, hf_x411_priority_item);
2034 }
2035
2036
2037 static const asn_namedbit PerMessageIndicators_bits[] = {
2038   {  0, &hf_x411_PerMessageIndicators_disclosure_of_other_recipients, -1, -1, "disclosure-of-other-recipients", NULL },
2039   {  1, &hf_x411_PerMessageIndicators_implicit_conversion_prohibited, -1, -1, "implicit-conversion-prohibited", NULL },
2040   {  2, &hf_x411_PerMessageIndicators_alternate_recipient_allowed, -1, -1, "alternate-recipient-allowed", NULL },
2041   {  3, &hf_x411_PerMessageIndicators_content_return_request, -1, -1, "content-return-request", NULL },
2042   {  4, &hf_x411_PerMessageIndicators_reserved, -1, -1, "reserved", NULL },
2043   {  5, &hf_x411_PerMessageIndicators_bit_5, -1, -1, "bit-5", NULL },
2044   {  6, &hf_x411_PerMessageIndicators_bit_6, -1, -1, "bit-6", NULL },
2045   {  7, &hf_x411_PerMessageIndicators_service_message, -1, -1, "service-message", NULL },
2046   { 0, NULL, 0, 0, NULL, NULL }
2047 };
2048
2049 static int
2050 dissect_x411_PerMessageIndicators(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
2051   offset = dissect_ber_bitstring(implicit_tag, pinfo, tree, tvb, offset,
2052                                     PerMessageIndicators_bits, hf_index, ett_x411_PerMessageIndicators,
2053                                     NULL);
2054
2055   return offset;
2056 }
2057 static int dissect_per_message_indicators(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
2058   return dissect_x411_PerMessageIndicators(FALSE, tvb, offset, pinfo, tree, hf_x411_per_message_indicators);
2059 }
2060
2061
2062
2063 static int
2064 dissect_x411_Time(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
2065   offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_UTCTime,
2066                                             pinfo, tree, tvb, offset, hf_index,
2067                                             NULL);
2068
2069   return offset;
2070 }
2071 static int dissect_redirection_time(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
2072   return dissect_x411_Time(FALSE, tvb, offset, pinfo, tree, hf_x411_redirection_time);
2073 }
2074 static int dissect_dl_expansion_time(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
2075   return dissect_x411_Time(FALSE, tvb, offset, pinfo, tree, hf_x411_dl_expansion_time);
2076 }
2077 static int dissect_origination_or_expansion_time(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
2078   return dissect_x411_Time(FALSE, tvb, offset, pinfo, tree, hf_x411_origination_or_expansion_time);
2079 }
2080
2081
2082
2083 static int
2084 dissect_x411_DeferredDeliveryTime(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
2085   offset = dissect_x411_Time(implicit_tag, tvb, offset, pinfo, tree, hf_index);
2086
2087   return offset;
2088 }
2089 static int dissect_deferred_delivery_time_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
2090   return dissect_x411_DeferredDeliveryTime(TRUE, tvb, offset, pinfo, tree, hf_x411_deferred_delivery_time);
2091 }
2092
2093
2094 static const ber_sequence_t T_private_domain_sequence[] = {
2095   { BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_administration_domain_name_impl },
2096   { BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG|BER_FLAGS_NOTCHKTAG, dissect_private_domain_identifier_impl },
2097   { 0, 0, 0, NULL }
2098 };
2099
2100 static int
2101 dissect_x411_T_private_domain(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
2102   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
2103                                    T_private_domain_sequence, hf_index, ett_x411_T_private_domain);
2104
2105   return offset;
2106 }
2107 static int dissect_private_domain(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
2108   return dissect_x411_T_private_domain(FALSE, tvb, offset, pinfo, tree, hf_x411_private_domain);
2109 }
2110
2111
2112 static const value_string x411_T_domain_vals[] = {
2113   {   0, "administration-domain-name" },
2114   {   1, "private-domain" },
2115   { 0, NULL }
2116 };
2117
2118 static const ber_choice_t T_domain_choice[] = {
2119   {   0, BER_CLASS_APP, 2, BER_FLAGS_NOOWNTAG, dissect_administration_domain_name },
2120   {   1, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_private_domain },
2121   { 0, 0, 0, 0, NULL }
2122 };
2123
2124 static int
2125 dissect_x411_T_domain(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
2126   offset = dissect_ber_choice(pinfo, tree, tvb, offset,
2127                                  T_domain_choice, hf_index, ett_x411_T_domain,
2128                                  NULL);
2129
2130   return offset;
2131 }
2132 static int dissect_bilateral_domain(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
2133   return dissect_x411_T_domain(FALSE, tvb, offset, pinfo, tree, hf_x411_bilateral_domain);
2134 }
2135
2136
2137 static const ber_sequence_t PerDomainBilateralInformation_sequence[] = {
2138   { BER_CLASS_APP, 1, BER_FLAGS_NOOWNTAG, dissect_country_name },
2139   { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_bilateral_domain },
2140   { 0, 0, 0, NULL }
2141 };
2142
2143 static int
2144 dissect_x411_PerDomainBilateralInformation(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
2145   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
2146                                    PerDomainBilateralInformation_sequence, hf_index, ett_x411_PerDomainBilateralInformation);
2147
2148   return offset;
2149 }
2150 static int dissect_per_domain_bilateral_information_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
2151   return dissect_x411_PerDomainBilateralInformation(FALSE, tvb, offset, pinfo, tree, hf_x411_per_domain_bilateral_information_item);
2152 }
2153
2154
2155 static const ber_sequence_t SEQUENCE_OF_PerDomainBilateralInformation_sequence_of[1] = {
2156   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_per_domain_bilateral_information_item },
2157 };
2158
2159 static int
2160 dissect_x411_SEQUENCE_OF_PerDomainBilateralInformation(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
2161   offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
2162                                       SEQUENCE_OF_PerDomainBilateralInformation_sequence_of, hf_index, ett_x411_SEQUENCE_OF_PerDomainBilateralInformation);
2163
2164   return offset;
2165 }
2166 static int dissect_per_domain_bilateral_information_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
2167   return dissect_x411_SEQUENCE_OF_PerDomainBilateralInformation(TRUE, tvb, offset, pinfo, tree, hf_x411_per_domain_bilateral_information);
2168 }
2169
2170
2171
2172 static int
2173 dissect_x411_ArrivalTime(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
2174   offset = dissect_x411_Time(implicit_tag, tvb, offset, pinfo, tree, hf_index);
2175
2176   return offset;
2177 }
2178 static int dissect_arrival_time_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
2179   return dissect_x411_ArrivalTime(TRUE, tvb, offset, pinfo, tree, hf_x411_arrival_time);
2180 }
2181
2182
2183 static const value_string x411_RoutingAction_vals[] = {
2184   {   0, "relayed" },
2185   {   1, "rerouted" },
2186   { 0, NULL }
2187 };
2188
2189
2190 static int
2191 dissect_x411_RoutingAction(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
2192   offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
2193                                   NULL);
2194
2195   return offset;
2196 }
2197 static int dissect_routing_action_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
2198   return dissect_x411_RoutingAction(TRUE, tvb, offset, pinfo, tree, hf_x411_routing_action);
2199 }
2200
2201
2202
2203 static int
2204 dissect_x411_DeferredTime(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
2205   offset = dissect_x411_Time(implicit_tag, tvb, offset, pinfo, tree, hf_index);
2206
2207   return offset;
2208 }
2209 static int dissect_deferred_time_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
2210   return dissect_x411_DeferredTime(TRUE, tvb, offset, pinfo, tree, hf_x411_deferred_time);
2211 }
2212
2213
2214
2215 static int
2216 dissect_x411_ConvertedEncodedInformationTypes(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
2217   offset = dissect_x411_EncodedInformationTypes(implicit_tag, tvb, offset, pinfo, tree, hf_index);
2218
2219   return offset;
2220 }
2221 static int dissect_converted_encoded_information_types(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
2222   return dissect_x411_ConvertedEncodedInformationTypes(FALSE, tvb, offset, pinfo, tree, hf_x411_converted_encoded_information_types);
2223 }
2224 static int dissect_converted_encoded_information_types_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
2225   return dissect_x411_ConvertedEncodedInformationTypes(TRUE, tvb, offset, pinfo, tree, hf_x411_converted_encoded_information_types);
2226 }
2227
2228
2229 static const asn_namedbit OtherActions_bits[] = {
2230   {  0, &hf_x411_OtherActions_redirected, -1, -1, "redirected", NULL },
2231   {  1, &hf_x411_OtherActions_dl_operation, -1, -1, "dl-operation", NULL },
2232   { 0, NULL, 0, 0, NULL, NULL }
2233 };
2234
2235 static int
2236 dissect_x411_OtherActions(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
2237   offset = dissect_ber_bitstring(implicit_tag, pinfo, tree, tvb, offset,
2238                                     OtherActions_bits, hf_index, ett_x411_OtherActions,
2239                                     NULL);
2240
2241   return offset;
2242 }
2243 static int dissect_other_actions_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
2244   return dissect_x411_OtherActions(TRUE, tvb, offset, pinfo, tree, hf_x411_other_actions);
2245 }
2246
2247
2248 static const ber_sequence_t DomainSuppliedInformation_set[] = {
2249   { BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_arrival_time_impl },
2250   { BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_routing_action_impl },
2251   { BER_CLASS_APP, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_attempted_domain },
2252   { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_deferred_time_impl },
2253   { BER_CLASS_APP, 5, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_converted_encoded_information_types },
2254   { BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_other_actions_impl },
2255   { 0, 0, 0, NULL }
2256 };
2257
2258 static int
2259 dissect_x411_DomainSuppliedInformation(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
2260   offset = dissect_ber_set(implicit_tag, pinfo, tree, tvb, offset,
2261                               DomainSuppliedInformation_set, hf_index, ett_x411_DomainSuppliedInformation);
2262
2263   return offset;
2264 }
2265 static int dissect_domain_supplied_information(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
2266   return dissect_x411_DomainSuppliedInformation(FALSE, tvb, offset, pinfo, tree, hf_x411_domain_supplied_information);
2267 }
2268
2269
2270 static const ber_sequence_t TraceInformationElement_sequence[] = {
2271   { BER_CLASS_APP, 3, BER_FLAGS_NOOWNTAG, dissect_global_domain_identifier },
2272   { BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_domain_supplied_information },
2273   { 0, 0, 0, NULL }
2274 };
2275
2276 static int
2277 dissect_x411_TraceInformationElement(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
2278   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
2279                                    TraceInformationElement_sequence, hf_index, ett_x411_TraceInformationElement);
2280
2281   return offset;
2282 }
2283 static int dissect_TraceInformation_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
2284   return dissect_x411_TraceInformationElement(FALSE, tvb, offset, pinfo, tree, hf_x411_TraceInformation_item);
2285 }
2286
2287
2288 static const ber_sequence_t TraceInformation_sequence_of[1] = {
2289   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_TraceInformation_item },
2290 };
2291
2292 static int
2293 dissect_x411_TraceInformation(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
2294   offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
2295                                       TraceInformation_sequence_of, hf_index, ett_x411_TraceInformation);
2296
2297   return offset;
2298 }
2299 static int dissect_trace_information(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
2300   return dissect_x411_TraceInformation(FALSE, tvb, offset, pinfo, tree, hf_x411_trace_information);
2301 }
2302
2303
2304 static const value_string x411_ExtensionType_vals[] = {
2305   {   0, "standard-extension" },
2306   {   3, "private-extension" },
2307   { 0, NULL }
2308 };
2309
2310 static const ber_choice_t ExtensionType_choice[] = {
2311   {   0, BER_CLASS_CON, 0, 0, dissect_standard_extension_impl },
2312   {   3, BER_CLASS_CON, 3, 0, dissect_private_extension_impl },
2313   { 0, 0, 0, 0, NULL }
2314 };
2315
2316 static int
2317 dissect_x411_ExtensionType(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
2318   offset = dissect_ber_choice(pinfo, tree, tvb, offset,
2319                                  ExtensionType_choice, hf_index, ett_x411_ExtensionType,
2320                                  NULL);
2321
2322   return offset;
2323 }
2324 static int dissect_extension_type(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
2325   return dissect_x411_ExtensionType(FALSE, tvb, offset, pinfo, tree, hf_x411_extension_type);
2326 }
2327
2328
2329 static const asn_namedbit Criticality_bits[] = {
2330   {  0, &hf_x411_Criticality_for_submission, -1, -1, "for-submission", NULL },
2331   {  1, &hf_x411_Criticality_for_transfer, -1, -1, "for-transfer", NULL },
2332   {  2, &hf_x411_Criticality_for_delivery, -1, -1, "for-delivery", NULL },
2333   { 0, NULL, 0, 0, NULL, NULL }
2334 };
2335
2336 static int
2337 dissect_x411_Criticality(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
2338   offset = dissect_ber_bitstring(implicit_tag, pinfo, tree, tvb, offset,
2339                                     Criticality_bits, hf_index, ett_x411_Criticality,
2340                                     NULL);
2341
2342   return offset;
2343 }
2344 static int dissect_criticality_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
2345   return dissect_x411_Criticality(TRUE, tvb, offset, pinfo, tree, hf_x411_criticality);
2346 }
2347
2348
2349
2350 static int
2351 dissect_x411_ExtensionValue(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
2352
2353         offset=call_x411_oid_callback("x411.extension", tvb, offset, pinfo, tree);
2354
2355
2356   return offset;
2357 }
2358 static int dissect_extension_value_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
2359   return dissect_x411_ExtensionValue(TRUE, tvb, offset, pinfo, tree, hf_x411_extension_value);
2360 }
2361
2362
2363 static const ber_sequence_t ExtensionField_sequence[] = {
2364   { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_extension_type },
2365   { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_criticality_impl },
2366   { BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_extension_value_impl },
2367   { 0, 0, 0, NULL }
2368 };
2369
2370 static int
2371 dissect_x411_ExtensionField(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
2372   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
2373                                    ExtensionField_sequence, hf_index, ett_x411_ExtensionField);
2374
2375   return offset;
2376 }
2377 static int dissect_extensions_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
2378   return dissect_x411_ExtensionField(FALSE, tvb, offset, pinfo, tree, hf_x411_extensions_item);
2379 }
2380
2381
2382 static const ber_sequence_t SET_OF_ExtensionField_set_of[1] = {
2383   { BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_extensions_item },
2384 };
2385
2386 static int
2387 dissect_x411_SET_OF_ExtensionField(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
2388   offset = dissect_ber_set_of(implicit_tag, pinfo, tree, tvb, offset,
2389                                  SET_OF_ExtensionField_set_of, hf_index, ett_x411_SET_OF_ExtensionField);
2390
2391   return offset;
2392 }
2393 static int dissect_extensions(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
2394   return dissect_x411_SET_OF_ExtensionField(FALSE, tvb, offset, pinfo, tree, hf_x411_extensions);
2395 }
2396 static int dissect_extensions_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
2397   return dissect_x411_SET_OF_ExtensionField(TRUE, tvb, offset, pinfo, tree, hf_x411_extensions);
2398 }
2399
2400
2401
2402 static int
2403 dissect_x411_MTARecipientName(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
2404   offset = dissect_x411_ORAddressAndOptionalDirectoryName(implicit_tag, tvb, offset, pinfo, tree, hf_index);
2405
2406   return offset;
2407 }
2408 static int dissect_recipient_name(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
2409   return dissect_x411_MTARecipientName(FALSE, tvb, offset, pinfo, tree, hf_x411_recipient_name);
2410 }
2411
2412
2413
2414 static int
2415 dissect_x411_OriginallySpecifiedRecipientNumber(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
2416   offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
2417                                   NULL);
2418
2419   return offset;
2420 }
2421 static int dissect_originally_specified_recipient_number_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
2422   return dissect_x411_OriginallySpecifiedRecipientNumber(TRUE, tvb, offset, pinfo, tree, hf_x411_originally_specified_recipient_number);
2423 }
2424
2425
2426 static const asn_namedbit PerRecipientIndicators_bits[] = {
2427   {  0, &hf_x411_PerRecipientIndicators_responsibility, -1, -1, "responsibility", NULL },
2428   {  1, &hf_x411_PerRecipientIndicators_originating_MTA_report, -1, -1, "originating-MTA-report", NULL },
2429   {  2, &hf_x411_PerRecipientIndicators_originating_MTA_non_delivery_report, -1, -1, "originating-MTA-non-delivery-report", NULL },
2430   {  3, &hf_x411_PerRecipientIndicators_originator_report, -1, -1, "originator-report", NULL },
2431   {  4, &hf_x411_PerRecipientIndicators_originator_non_delivery_report, -1, -1, "originator-non-delivery-report", NULL },
2432   {  5, &hf_x411_PerRecipientIndicators_reserved_5, -1, -1, "reserved-5", NULL },
2433   {  6, &hf_x411_PerRecipientIndicators_reserved_6, -1, -1, "reserved-6", NULL },
2434   {  7, &hf_x411_PerRecipientIndicators_reserved_7, -1, -1, "reserved-7", NULL },
2435   { 0, NULL, 0, 0, NULL, NULL }
2436 };
2437
2438 static int
2439 dissect_x411_PerRecipientIndicators(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
2440   offset = dissect_ber_bitstring(implicit_tag, pinfo, tree, tvb, offset,
2441                                     PerRecipientIndicators_bits, hf_index, ett_x411_PerRecipientIndicators,
2442                                     NULL);
2443
2444   return offset;
2445 }
2446 static int dissect_per_recipient_indicators_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
2447   return dissect_x411_PerRecipientIndicators(TRUE, tvb, offset, pinfo, tree, hf_x411_per_recipient_indicators);
2448 }
2449
2450
2451 static const value_string x411_ExplicitConversion_vals[] = {
2452   {   0, "ia5-text-to-teletex" },
2453   {   8, "ia5-text-to-g3-facsimile" },
2454   {   9, "ia5-text-to-g4-class-1" },
2455   {  10, "ia5-text-to-videotex" },
2456   {  11, "teletex-to-ia5-text" },
2457   {  12, "teletex-to-g3-facsimile" },
2458   {  13, "teletex-to-g4-class-1" },
2459   {  14, "teletex-to-videotex" },
2460   {  16, "videotex-to-ia5-text" },
2461   {  17, "videotex-to-teletex" },
2462   { 0, NULL }
2463 };
2464
2465
2466 static int
2467 dissect_x411_ExplicitConversion(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
2468   offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
2469                                   NULL);
2470
2471   return offset;
2472 }
2473 static int dissect_explicit_conversion_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
2474   return dissect_x411_ExplicitConversion(TRUE, tvb, offset, pinfo, tree, hf_x411_explicit_conversion);
2475 }
2476
2477
2478 static const ber_sequence_t PerRecipientMessageTransferFields_set[] = {
2479   { BER_CLASS_APP, 0, BER_FLAGS_NOOWNTAG, dissect_recipient_name },
2480   { BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_originally_specified_recipient_number_impl },
2481   { BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_per_recipient_indicators_impl },
2482   { BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_explicit_conversion_impl },
2483   { BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_extensions_impl },
2484   { 0, 0, 0, NULL }
2485 };
2486
2487 static int
2488 dissect_x411_PerRecipientMessageTransferFields(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
2489   offset = dissect_ber_set(implicit_tag, pinfo, tree, tvb, offset,
2490                               PerRecipientMessageTransferFields_set, hf_index, ett_x411_PerRecipientMessageTransferFields);
2491
2492   return offset;
2493 }
2494 static int dissect_per_recipient_message_fields_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
2495   return dissect_x411_PerRecipientMessageTransferFields(FALSE, tvb, offset, pinfo, tree, hf_x411_per_recipient_message_fields_item);
2496 }
2497
2498
2499 static const ber_sequence_t SEQUENCE_OF_PerRecipientMessageTransferFields_sequence_of[1] = {
2500   { BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_per_recipient_message_fields_item },
2501 };
2502
2503 static int
2504 dissect_x411_SEQUENCE_OF_PerRecipientMessageTransferFields(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
2505   offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
2506                                       SEQUENCE_OF_PerRecipientMessageTransferFields_sequence_of, hf_index, ett_x411_SEQUENCE_OF_PerRecipientMessageTransferFields);
2507
2508   return offset;
2509 }
2510 static int dissect_per_recipient_message_fields_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
2511   return dissect_x411_SEQUENCE_OF_PerRecipientMessageTransferFields(TRUE, tvb, offset, pinfo, tree, hf_x411_per_recipient_message_fields);
2512 }
2513
2514
2515 static const ber_sequence_t MessageTransferEnvelope_set[] = {
2516   { BER_CLASS_APP, 4, BER_FLAGS_NOOWNTAG, dissect_message_identifier },
2517   { BER_CLASS_APP, 0, BER_FLAGS_NOOWNTAG, dissect_mta_originator_name },
2518   { BER_CLASS_APP, 5, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_original_encoded_information_types },
2519   { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_content_type },
2520   { BER_CLASS_APP, 10, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_content_identifier },
2521   { BER_CLASS_APP, 7, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_priority },
2522   { BER_CLASS_APP, 8, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_per_message_indicators },
2523   { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_deferred_delivery_time_impl },
2524   { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_per_domain_bilateral_information_impl },
2525   { BER_CLASS_APP, 9, BER_FLAGS_NOOWNTAG, dissect_trace_information },
2526   { BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_extensions_impl },
2527   { BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_per_recipient_message_fields_impl },
2528   { 0, 0, 0, NULL }
2529 };
2530
2531 static int
2532 dissect_x411_MessageTransferEnvelope(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
2533   offset = dissect_ber_set(implicit_tag, pinfo, tree, tvb, offset,
2534                               MessageTransferEnvelope_set, hf_index, ett_x411_MessageTransferEnvelope);
2535
2536   return offset;
2537 }
2538 static int dissect_message_envelope(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
2539   return dissect_x411_MessageTransferEnvelope(FALSE, tvb, offset, pinfo, tree, hf_x411_message_envelope);
2540 }
2541
2542
2543
2544 static int
2545 dissect_x411_Content(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
2546   tvbuff_t *next_tvb;
2547
2548   /* we can do this now constructed octet strings are supported */
2549   offset = dissect_ber_octet_string(FALSE, pinfo, tree, tvb, offset, hf_index, &next_tvb);
2550
2551   (void) call_ber_oid_callback(object_identifier_id, next_tvb, 0, pinfo, tree);
2552
2553
2554   return offset;
2555 }
2556 static int dissect_content(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
2557   return dissect_x411_Content(FALSE, tvb, offset, pinfo, tree, hf_x411_content);
2558 }
2559 static int dissect_returned_content_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
2560   return dissect_x411_Content(TRUE, tvb, offset, pinfo, tree, hf_x411_returned_content);
2561 }
2562
2563
2564 static const ber_sequence_t Message_sequence[] = {
2565   { BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_message_envelope },
2566   { BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_content },
2567   { 0, 0, 0, NULL }
2568 };
2569
2570 static int
2571 dissect_x411_Message(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
2572   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
2573                                    Message_sequence, hf_index, ett_x411_Message);
2574
2575   return offset;
2576 }
2577 static int dissect_message_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
2578   return dissect_x411_Message(TRUE, tvb, offset, pinfo, tree, hf_x411_message);
2579 }
2580
2581
2582
2583 static int
2584 dissect_x411_ProbeIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
2585   offset = dissect_x411_MTSIdentifier(implicit_tag, tvb, offset, pinfo, tree, hf_index);
2586
2587   return offset;
2588 }
2589 static int dissect_probe_identifier(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
2590   return dissect_x411_ProbeIdentifier(FALSE, tvb, offset, pinfo, tree, hf_x411_probe_identifier);
2591 }
2592
2593
2594
2595 static int
2596 dissect_x411_ContentLength(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
2597   offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
2598                                   NULL);
2599
2600   return offset;
2601 }
2602 static int dissect_content_length_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
2603   return dissect_x411_ContentLength(TRUE, tvb, offset, pinfo, tree, hf_x411_content_length);
2604 }
2605 static int dissect_permissible_maximum_content_length_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
2606   return dissect_x411_ContentLength(TRUE, tvb, offset, pinfo, tree, hf_x411_permissible_maximum_content_length);
2607 }
2608 static int dissect_maximum_content_length_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
2609   return dissect_x411_ContentLength(TRUE, tvb, offset, pinfo, tree, hf_x411_maximum_content_length);
2610 }
2611
2612
2613 static const ber_sequence_t PerRecipientProbeTransferFields_set[] = {
2614   { BER_CLASS_APP, 0, BER_FLAGS_NOOWNTAG, dissect_recipient_name },
2615   { BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_originally_specified_recipient_number_impl },
2616   { BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_per_recipient_indicators_impl },
2617   { BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_explicit_conversion_impl },
2618   { BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_extensions_impl },
2619   { 0, 0, 0, NULL }
2620 };
2621
2622 static int
2623 dissect_x411_PerRecipientProbeTransferFields(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
2624   offset = dissect_ber_set(implicit_tag, pinfo, tree, tvb, offset,
2625                               PerRecipientProbeTransferFields_set, hf_index, ett_x411_PerRecipientProbeTransferFields);
2626
2627   return offset;
2628 }
2629 static int dissect_per_recipient_probe_transfer_fields_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
2630   return dissect_x411_PerRecipientProbeTransferFields(FALSE, tvb, offset, pinfo, tree, hf_x411_per_recipient_probe_transfer_fields_item);
2631 }
2632
2633
2634 static const ber_sequence_t SEQUENCE_OF_PerRecipientProbeTransferFields_sequence_of[1] = {
2635   { BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_per_recipient_probe_transfer_fields_item },
2636 };
2637
2638 static int
2639 dissect_x411_SEQUENCE_OF_PerRecipientProbeTransferFields(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
2640   offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
2641                                       SEQUENCE_OF_PerRecipientProbeTransferFields_sequence_of, hf_index, ett_x411_SEQUENCE_OF_PerRecipientProbeTransferFields);
2642
2643   return offset;
2644 }
2645 static int dissect_per_recipient_probe_transfer_fields_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
2646   return dissect_x411_SEQUENCE_OF_PerRecipientProbeTransferFields(TRUE, tvb, offset, pinfo, tree, hf_x411_per_recipient_probe_transfer_fields);
2647 }
2648
2649
2650 static const ber_sequence_t ProbeTransferEnvelope_set[] = {
2651   { BER_CLASS_APP, 4, BER_FLAGS_NOOWNTAG, dissect_probe_identifier },
2652   { BER_CLASS_APP, 0, BER_FLAGS_NOOWNTAG, dissect_mta_originator_name },
2653   { BER_CLASS_APP, 5, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_original_encoded_information_types },
2654   { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_content_type },
2655   { BER_CLASS_APP, 10, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_content_identifier },
2656   { BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_content_length_impl },
2657   { BER_CLASS_APP, 8, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_per_message_indicators },
2658   { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_per_domain_bilateral_information_impl },
2659   { BER_CLASS_APP, 9, BER_FLAGS_NOOWNTAG, dissect_trace_information },
2660   { BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_extensions_impl },
2661   { BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_per_recipient_probe_transfer_fields_impl },
2662   { 0, 0, 0, NULL }
2663 };
2664
2665 static int
2666 dissect_x411_ProbeTransferEnvelope(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
2667   offset = dissect_ber_set(implicit_tag, pinfo, tree, tvb, offset,
2668                               ProbeTransferEnvelope_set, hf_index, ett_x411_ProbeTransferEnvelope);
2669
2670   return offset;
2671 }
2672
2673
2674
2675 static int
2676 dissect_x411_Probe(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
2677   offset = dissect_x411_ProbeTransferEnvelope(implicit_tag, tvb, offset, pinfo, tree, hf_index);
2678
2679   return offset;
2680 }
2681 static int dissect_probe_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
2682   return dissect_x411_Probe(TRUE, tvb, offset, pinfo, tree, hf_x411_probe);
2683 }
2684
2685
2686
2687 static int
2688 dissect_x411_ReportIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
2689   offset = dissect_x411_MTSIdentifier(implicit_tag, tvb, offset, pinfo, tree, hf_index);
2690
2691   return offset;
2692 }
2693 static int dissect_report_identifier(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
2694   return dissect_x411_ReportIdentifier(FALSE, tvb, offset, pinfo, tree, hf_x411_report_identifier);
2695 }
2696
2697
2698
2699 static int
2700 dissect_x411_ReportDestinationName(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
2701   offset = dissect_x411_ORAddressAndOptionalDirectoryName(implicit_tag, tvb, offset, pinfo, tree, hf_index);
2702
2703   return offset;
2704 }
2705 static int dissect_report_destination_name(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
2706   return dissect_x411_ReportDestinationName(FALSE, tvb, offset, pinfo, tree, hf_x411_report_destination_name);
2707 }
2708
2709
2710 static const ber_sequence_t ReportTransferEnvelope_set[] = {
2711   { BER_CLASS_APP, 4, BER_FLAGS_NOOWNTAG, dissect_report_identifier },
2712   { BER_CLASS_APP, 0, BER_FLAGS_NOOWNTAG, dissect_report_destination_name },
2713   { BER_CLASS_APP, 9, BER_FLAGS_NOOWNTAG, dissect_trace_information },
2714   { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_extensions_impl },
2715   { 0, 0, 0, NULL }
2716 };
2717
2718 static int
2719 dissect_x411_ReportTransferEnvelope(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
2720   offset = dissect_ber_set(implicit_tag, pinfo, tree, tvb, offset,
2721                               ReportTransferEnvelope_set, hf_index, ett_x411_ReportTransferEnvelope);
2722
2723   return offset;
2724 }
2725 static int dissect_report_envelope(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
2726   return dissect_x411_ReportTransferEnvelope(FALSE, tvb, offset, pinfo, tree, hf_x411_report_envelope);
2727 }
2728
2729
2730
2731 static int
2732 dissect_x411_MessageOrProbeIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
2733   offset = dissect_x411_MTSIdentifier(implicit_tag, tvb, offset, pinfo, tree, hf_index);
2734
2735   return offset;
2736 }
2737
2738
2739
2740 static int
2741 dissect_x411_SubjectIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
2742   offset = dissect_x411_MessageOrProbeIdentifier(implicit_tag, tvb, offset, pinfo, tree, hf_index);
2743
2744   return offset;
2745 }
2746 static int dissect_subject_identifier(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
2747   return dissect_x411_SubjectIdentifier(FALSE, tvb, offset, pinfo, tree, hf_x411_subject_identifier);
2748 }
2749
2750
2751
2752 static int
2753 dissect_x411_SubjectIntermediateTraceInformation(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
2754   offset = dissect_x411_TraceInformation(implicit_tag, tvb, offset, pinfo, tree, hf_index);
2755
2756   return offset;
2757 }
2758 static int dissect_subject_intermediate_trace_information(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
2759   return dissect_x411_SubjectIntermediateTraceInformation(FALSE, tvb, offset, pinfo, tree, hf_x411_subject_intermediate_trace_information);
2760 }
2761
2762
2763
2764 static int
2765 dissect_x411_AdditionalInformation(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
2766 /*XXX not implemented yet */
2767
2768
2769   return offset;
2770 }
2771 static int dissect_additional_information_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
2772   return dissect_x411_AdditionalInformation(TRUE, tvb, offset, pinfo, tree, hf_x411_additional_information);
2773 }
2774
2775
2776
2777 static int
2778 dissect_x411_MTAActualRecipientName(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
2779   offset = dissect_x411_ORAddressAndOptionalDirectoryName(implicit_tag, tvb, offset, pinfo, tree, hf_index);
2780
2781   return offset;
2782 }
2783 static int dissect_mta_actual_recipient_name_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
2784   return dissect_x411_MTAActualRecipientName(TRUE, tvb, offset, pinfo, tree, hf_x411_mta_actual_recipient_name);
2785 }
2786
2787
2788
2789 int
2790 dissect_x411_MessageDeliveryTime(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
2791   offset = dissect_x411_Time(implicit_tag, tvb, offset, pinfo, tree, hf_index);
2792
2793   return offset;
2794 }
2795 static int dissect_message_delivery_time(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
2796   return dissect_x411_MessageDeliveryTime(FALSE, tvb, offset, pinfo, tree, hf_x411_message_delivery_time);
2797 }
2798 static int dissect_message_delivery_time_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
2799   return dissect_x411_MessageDeliveryTime(TRUE, tvb, offset, pinfo, tree, hf_x411_message_delivery_time);
2800 }
2801
2802
2803 static const value_string x411_TypeOfMTSUser_vals[] = {
2804   {   0, "public" },
2805   {   1, "private" },
2806   {   2, "ms" },
2807   {   3, "dl" },
2808   {   4, "pdau" },
2809   {   5, "physical-recipient" },
2810   {   6, "other" },
2811   { 0, NULL }
2812 };
2813
2814
2815 static int
2816 dissect_x411_TypeOfMTSUser(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
2817   offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
2818                                   NULL);
2819
2820   return offset;
2821 }
2822 static int dissect_type_of_MTS_user(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
2823   return dissect_x411_TypeOfMTSUser(FALSE, tvb, offset, pinfo, tree, hf_x411_type_of_MTS_user);
2824 }
2825 static int dissect_type_of_MTS_user_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
2826   return dissect_x411_TypeOfMTSUser(TRUE, tvb, offset, pinfo, tree, hf_x411_type_of_MTS_user);
2827 }
2828
2829
2830 static const ber_sequence_t DeliveryReport_set[] = {
2831   { BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_message_delivery_time_impl },
2832   { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_type_of_MTS_user_impl },
2833   { 0, 0, 0, NULL }
2834 };
2835
2836 static int
2837 dissect_x411_DeliveryReport(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
2838   offset = dissect_ber_set(implicit_tag, pinfo, tree, tvb, offset,
2839                               DeliveryReport_set, hf_index, ett_x411_DeliveryReport);
2840
2841   return offset;
2842 }
2843 static int dissect_delivery_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
2844   return dissect_x411_DeliveryReport(TRUE, tvb, offset, pinfo, tree, hf_x411_delivery);
2845 }
2846
2847
2848 static const value_string x411_NonDeliveryReasonCode_vals[] = {
2849   {   0, "transfer-failure" },
2850   {   1, "unable-to-transfer" },
2851   {   2, "conversion-not-performed" },
2852   {   3, "physical-rendition-not-performed" },
2853   {   4, "physical-delivery-not-performed" },
2854   {   5, "restricted-delivery" },
2855   {   6, "directory-operation-unsuccessful" },
2856   {   7, "deferred-delivery-not-performed" },
2857   {   8, "transfer-failure-for-security-reason" },
2858   { 0, NULL }
2859 };
2860
2861
2862 static int
2863 dissect_x411_NonDeliveryReasonCode(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
2864   offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
2865                                   NULL);
2866
2867   return offset;
2868 }
2869 static int dissect_non_delivery_reason_code(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
2870   return dissect_x411_NonDeliveryReasonCode(FALSE, tvb, offset, pinfo, tree, hf_x411_non_delivery_reason_code);
2871 }
2872 static int dissect_non_delivery_reason_code_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
2873   return dissect_x411_NonDeliveryReasonCode(TRUE, tvb, offset, pinfo, tree, hf_x411_non_delivery_reason_code);
2874 }
2875
2876
2877 static const value_string x411_NonDeliveryDiagnosticCode_vals[] = {
2878   {   0, "unrecognised-OR-name" },
2879   {   1, "ambiguous-OR-name" },
2880   {   2, "mts-congestion" },
2881   {   3, "loop-detected" },
2882   {   4, "recipient-unavailable" },
2883   {   5, "maximum-time-expired" },
2884   {   6, "encoded-information-types-unsupported" },
2885   {   7, "content-too-long" },
2886   {   8, "conversion-impractical" },
2887   {   9, "implicit-conversion-prohibited" },
2888   {  10, "implicit-conversion-not-subscribed" },
2889   {  11, "invalid-arguments" },
2890   {  12, "content-syntax-error" },
2891   {  13, "size-constraint-violation" },
2892   {  14, "protocol-violation" },
2893   {  15, "content-type-not-supported" },
2894   {  16, "too-many-recipients" },
2895   {  17, "no-bilateral-agreement" },
2896   {  18, "unsupported-critical-function" },
2897   {  19, "conversion-with-loss-prohibited" },
2898   {  20, "line-too-long" },
2899   {  21, "page-split" },
2900   {  22, "pictorial-symbol-loss" },
2901   {  23, "punctuation-symbol-loss" },
2902   {  24, "alphabetic-character-loss" },
2903   {  25, "multiple-information-loss" },
2904   {  26, "recipient-reassignment-prohibited" },
2905   {  27, "redirection-loop-detected" },
2906   {  28, "dl-expansion-prohibited" },
2907   {  29, "no-dl-submit-permission" },
2908   {  30, "dl-expansion-failure" },
2909   {  31, "physical-rendition-attributes-not-supported" },
2910   {  32, "undeliverable-mail-physical-delivery-address-incorrect" },
2911   {  33, "undeliverable-mail-physical-delivery-office-incorrect-or-invalid" },
2912   {  34, "undeliverable-mail-physical-delivery-address-incomplete" },
2913   {  35, "undeliverable-mail-recipient-unknown" },
2914   {  36, "undeliverable-mail-recipient-deceased" },
2915   {  37, "undeliverable-mail-organization-expired" },
2916   {  38, "undeliverable-mail-recipient-refused-to-accept" },
2917   {  39, "undeliverable-mail-recipient-did-not-claim" },
2918   {  40, "undeliverable-mail-recipient-changed-address-permanently" },
2919   {  41, "undeliverable-mail-recipient-changed-address-temporarily" },
2920   {  42, "undeliverable-mail-recipient-changed-temporary-address" },
2921   {  43, "undeliverable-mail-new-address-unknown" },
2922   {  44, "undeliverable-mail-recipient-did-not-want-forwarding" },
2923   {  45, "undeliverable-mail-originator-prohibited-forwarding" },
2924   {  46, "secure-messaging-error" },
2925   {  47, "unable-to-downgrade" },
2926   {  48, "unable-to-complete-transfer" },
2927   {  49, "transfer-attempts-limit-reached" },
2928   {  50, "incorrect-notification-type" },
2929   {  51, "dl-expansion-prohibited-by-security-policy" },
2930   {  52, "forbidden-alternate-recipient" },
2931   {  53, "security-policy-violation" },
2932   {  54, "security-services-refusal" },
2933   {  55, "unauthorised-dl-member" },
2934   {  56, "unauthorised-dl-name" },
2935   {  57, "unauthorised-originally-intended-recipient-name" },
2936   {  58, "unauthorised-originator-name" },
2937   {  59, "unauthorised-recipient-name" },
2938   {  60, "unreliable-system" },
2939   {  61, "authentication-failure-on-subject-message" },
2940   {  62, "decryption-failed" },
2941   {  63, "decryption-key-unobtainable" },
2942   {  64, "double-envelope-creation-failure" },
2943   {  65, "double-enveloping-message-restoring-failure" },
2944   {  66, "failure-of-proof-of-message" },
2945   {  67, "integrity-failure-on-subject-message" },
2946   {  68, "invalid-security-label" },
2947   {  69, "key-failure" },
2948   {  70, "mandatory-parameter-absence" },
2949   {  71, "operation-security-failure" },
2950   {  72, "repudiation-failure-of-message" },
2951   {  73, "security-context-failure" },
2952   {  74, "token-decryption-failed" },
2953   {  75, "token-error" },
2954   {  76, "unknown-security-label" },
2955   {  77, "unsupported-algorithm-identifier" },
2956   {  78, "unsupported-security-policy" },
2957   { 0, NULL }
2958 };
2959
2960
2961 static int
2962 dissect_x411_NonDeliveryDiagnosticCode(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
2963   offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
2964                                   NULL);
2965
2966   return offset;
2967 }
2968 static int dissect_non_delivery_diagnostic_code(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
2969   return dissect_x411_NonDeliveryDiagnosticCode(FALSE, tvb, offset, pinfo, tree, hf_x411_non_delivery_diagnostic_code);
2970 }
2971 static int dissect_non_delivery_diagnostic_code_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
2972   return dissect_x411_NonDeliveryDiagnosticCode(TRUE, tvb, offset, pinfo, tree, hf_x411_non_delivery_diagnostic_code);
2973 }
2974
2975
2976 static const ber_sequence_t NonDeliveryReport_set[] = {
2977   { BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_non_delivery_reason_code_impl },
2978   { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_non_delivery_diagnostic_code_impl },
2979   { 0, 0, 0, NULL }
2980 };
2981
2982 static int
2983 dissect_x411_NonDeliveryReport(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
2984   offset = dissect_ber_set(implicit_tag, pinfo, tree, tvb, offset,
2985                               NonDeliveryReport_set, hf_index, ett_x411_NonDeliveryReport);
2986
2987   return offset;
2988 }
2989 static int dissect_non_delivery_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
2990   return dissect_x411_NonDeliveryReport(TRUE, tvb, offset, pinfo, tree, hf_x411_non_delivery);
2991 }
2992
2993
2994 static const value_string x411_ReportType_vals[] = {
2995   {   0, "delivery" },
2996   {   1, "non-delivery" },
2997   { 0, NULL }
2998 };
2999
3000 static const ber_choice_t ReportType_choice[] = {
3001   {   0, BER_CLASS_CON, 0, 0, dissect_delivery_impl },
3002   {   1, BER_CLASS_CON, 1, 0, dissect_non_delivery_impl },
3003   { 0, 0, 0, 0, NULL }
3004 };
3005
3006 static int
3007 dissect_x411_ReportType(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
3008   offset = dissect_ber_choice(pinfo, tree, tvb, offset,
3009                                  ReportType_choice, hf_index, ett_x411_ReportType,
3010                                  NULL);
3011
3012   return offset;
3013 }
3014 static int dissect_trace_report_type_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
3015   return dissect_x411_ReportType(TRUE, tvb, offset, pinfo, tree, hf_x411_trace_report_type);
3016 }
3017 static int dissect_delivery_report_type_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
3018   return dissect_x411_ReportType(TRUE, tvb, offset, pinfo, tree, hf_x411_delivery_report_type);
3019 }
3020
3021
3022 static const ber_sequence_t LastTraceInformation_set[] = {
3023   { BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_arrival_time_impl },
3024   { BER_CLASS_APP, 5, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_converted_encoded_information_types },
3025   { BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG|BER_FLAGS_NOTCHKTAG, dissect_trace_report_type_impl },
3026   { 0, 0, 0, NULL }
3027 };
3028
3029 static int
3030 dissect_x411_LastTraceInformation(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
3031   offset = dissect_ber_set(implicit_tag, pinfo, tree, tvb, offset,
3032                               LastTraceInformation_set, hf_index, ett_x411_LastTraceInformation);
3033
3034   return offset;
3035 }
3036 static int dissect_last_trace_information_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
3037   return dissect_x411_LastTraceInformation(TRUE, tvb, offset, pinfo, tree, hf_x411_last_trace_information);
3038 }
3039
3040
3041
3042 static int
3043 dissect_x411_MTAOriginallyIntendedRecipientName(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
3044   offset = dissect_x411_ORAddressAndOptionalDirectoryName(implicit_tag, tvb, offset, pinfo, tree, hf_index);
3045
3046   return offset;
3047 }
3048 static int dissect_report_originally_intended_recipient_name_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
3049   return dissect_x411_MTAOriginallyIntendedRecipientName(TRUE, tvb, offset, pinfo, tree, hf_x411_report_originally_intended_recipient_name);
3050 }
3051
3052
3053
3054 int
3055 dissect_x411_SupplementaryInformation(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
3056   offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_PrintableString,
3057                                             pinfo, tree, tvb, offset, hf_index,
3058                                             NULL);
3059
3060   return offset;
3061 }
3062 static int dissect_supplementary_information_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
3063   return dissect_x411_SupplementaryInformation(TRUE, tvb, offset, pinfo, tree, hf_x411_supplementary_information);
3064 }
3065
3066
3067 static const ber_sequence_t PerRecipientReportTransferFields_set[] = {
3068   { BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_mta_actual_recipient_name_impl },
3069   { BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_originally_specified_recipient_number_impl },
3070   { BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_per_recipient_indicators_impl },
3071   { BER_CLASS_CON, 3, BER_FLAGS_IMPLTAG, dissect_last_trace_information_impl },
3072   { BER_CLASS_CON, 4, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_report_originally_intended_recipient_name_impl },
3073   { BER_CLASS_CON, 5, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_supplementary_information_impl },
3074   { BER_CLASS_CON, 6, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_extensions_impl },
3075   { 0, 0, 0, NULL }
3076 };
3077
3078 static int
3079 dissect_x411_PerRecipientReportTransferFields(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
3080   offset = dissect_ber_set(implicit_tag, pinfo, tree, tvb, offset,
3081                               PerRecipientReportTransferFields_set, hf_index, ett_x411_PerRecipientReportTransferFields);
3082
3083   return offset;
3084 }
3085 static int dissect_per_recipient_fields_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
3086   return dissect_x411_PerRecipientReportTransferFields(FALSE, tvb, offset, pinfo, tree, hf_x411_per_recipient_fields_item);
3087 }
3088
3089
3090 static const ber_sequence_t SEQUENCE_OF_PerRecipientReportTransferFields_sequence_of[1] = {
3091   { BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_per_recipient_fields_item },
3092 };
3093
3094 static int
3095 dissect_x411_SEQUENCE_OF_PerRecipientReportTransferFields(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
3096   offset = dissect_ber_sequence_of(implicit_tag, pinfo, tree, tvb, offset,
3097                                       SEQUENCE_OF_PerRecipientReportTransferFields_sequence_of, hf_index, ett_x411_SEQUENCE_OF_PerRecipientReportTransferFields);
3098
3099   return offset;
3100 }
3101 static int dissect_per_recipient_report_fields_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
3102   return dissect_x411_SEQUENCE_OF_PerRecipientReportTransferFields(TRUE, tvb, offset, pinfo, tree, hf_x411_per_recipient_report_fields);
3103 }
3104
3105
3106 static const ber_sequence_t ReportTransferContent_set[] = {
3107   { BER_CLASS_APP, 4, BER_FLAGS_NOOWNTAG, dissect_subject_identifier },
3108   { BER_CLASS_APP, 9, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_subject_intermediate_trace_information },
3109   { BER_CLASS_APP, 5, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_original_encoded_information_types },
3110   { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_content_type },
3111   { BER_CLASS_APP, 10, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_content_identifier },
3112   { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_returned_content_impl },
3113   { BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_additional_information_impl },
3114   { BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_extensions_impl },
3115   { BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_per_recipient_report_fields_impl },
3116   { 0, 0, 0, NULL }
3117 };
3118
3119 static int
3120 dissect_x411_ReportTransferContent(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
3121   offset = dissect_ber_set(implicit_tag, pinfo, tree, tvb, offset,
3122                               ReportTransferContent_set, hf_index, ett_x411_ReportTransferContent);
3123
3124   return offset;
3125 }
3126 static int dissect_report_content(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
3127   return dissect_x411_ReportTransferContent(FALSE, tvb, offset, pinfo, tree, hf_x411_report_content);
3128 }
3129
3130
3131 static const ber_sequence_t Report_sequence[] = {
3132   { BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_report_envelope },
3133   { BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_report_content },
3134   { 0, 0, 0, NULL }
3135 };
3136
3137 static int
3138 dissect_x411_Report(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
3139   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
3140                                    Report_sequence, hf_index, ett_x411_Report);
3141
3142   return offset;
3143 }
3144 static int dissect_report_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
3145   return dissect_x411_Report(TRUE, tvb, offset, pinfo, tree, hf_x411_report);
3146 }
3147
3148
3149 static const value_string x411_MTS_APDU_vals[] = {
3150   {   0, "message" },
3151   {   2, "probe" },
3152   {   1, "report" },
3153   { 0, NULL }
3154 };
3155
3156 static const ber_choice_t MTS_APDU_choice[] = {
3157   {   0, BER_CLASS_CON, 0, 0, dissect_message_impl },
3158   {   2, BER_CLASS_CON, 2, 0, dissect_probe_impl },
3159   {   1, BER_CLASS_CON, 1, 0, dissect_report_impl },
3160   { 0, 0, 0, 0, NULL }
3161 };
3162
3163 static int
3164 dissect_x411_MTS_APDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
3165   offset = dissect_ber_choice(pinfo, tree, tvb, offset,
3166                                  MTS_APDU_choice, hf_index, ett_x411_MTS_APDU,
3167                                  NULL);
3168
3169   return offset;
3170 }
3171
3172
3173
3174 static int
3175 dissect_x411_MTAOriginatorRequestedAlternateRecipient(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
3176   offset = dissect_x411_ORAddressAndOptionalDirectoryName(implicit_tag, tvb, offset, pinfo, tree, hf_index);
3177
3178   return offset;
3179 }
3180
3181
3182 static const value_string x411_T_attempted_vals[] = {
3183   {   0, "mta" },
3184   {   1, "domain" },
3185   { 0, NULL }
3186 };
3187
3188 static const ber_choice_t T_attempted_choice[] = {
3189   {   0, BER_CLASS_UNI, BER_UNI_TAG_IA5String, BER_FLAGS_NOOWNTAG, dissect_mta },
3190   {   1, BER_CLASS_APP, 3, BER_FLAGS_NOOWNTAG, dissect_domain },
3191   { 0, 0, 0, 0, NULL }
3192 };
3193
3194 static int
3195 dissect_x411_T_attempted(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
3196   offset = dissect_ber_choice(pinfo, tree, tvb, offset,
3197                                  T_attempted_choice, hf_index, ett_x411_T_attempted,
3198                                  NULL);
3199
3200   return offset;
3201 }
3202 static int dissect_attempted(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
3203   return dissect_x411_T_attempted(FALSE, tvb, offset, pinfo, tree, hf_x411_attempted);
3204 }
3205
3206
3207 static const ber_sequence_t MTASuppliedInformation_set[] = {
3208   { BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_arrival_time_impl },
3209   { BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_routing_action_impl },
3210   { BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_attempted },
3211   { BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_deferred_time_impl },
3212   { BER_CLASS_APP, 5, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_converted_encoded_information_types },
3213   { BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_other_actions_impl },
3214   { 0, 0, 0, NULL }
3215 };
3216
3217 static int
3218 dissect_x411_MTASuppliedInformation(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
3219   offset = dissect_ber_set(implicit_tag, pinfo, tree, tvb, offset,
3220                               MTASuppliedInformation_set, hf_index, ett_x411_MTASuppliedInformation);
3221
3222   return offset;
3223 }
3224 static int dissect_mta_supplied_information(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
3225   return dissect_x411_MTASuppliedInformation(FALSE, tvb, offset, pinfo, tree, hf_x411_mta_supplied_information);
3226 }
3227
3228
3229 static const ber_sequence_t InternalTraceInformationElement_sequence[] = {
3230   { BER_CLASS_APP, 3, BER_FLAGS_NOOWNTAG, dissect_global_domain_identifier },
3231   { BER_CLASS_UNI, BER_UNI_TAG_IA5String, BER_FLAGS_NOOWNTAG, dissect_mta_name },
3232   { BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_mta_supplied_information },
3233   { 0, 0, 0, NULL }
3234 };
3235
3236 static int
3237 dissect_x411_InternalTraceInformationElement(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
3238   offset = dissect_ber_sequence(implicit_tag, pinfo, tree, tvb, offset,
3239                                    InternalTraceInformationElement_sequence, hf_index, ett_x411_InternalTraceInformationElement);
3240
3241   return offset;
3242 }
3243 static int dissect_InternalTraceInformation_item(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
3244   return dissect_x411_InternalTraceInformationElement(FALSE, tvb, offset, pinfo, tree, hf_x411_InternalTraceInformation_item);
3245 }
3246
3247