e3bb442188ea8da27735930c43ee875c92a01ed8
[metze/wireshark/wip.git] / epan / dissectors / packet-p1.c
1 /* Do not modify this file. Changes will be overwritten.                      */
2 /* Generated automatically by the ASN.1 to Wireshark dissector compiler       */
3 /* packet-p1.c                                                                */
4 /* ../../tools/asn2wrs.py -b -C -p p1 -c ./p1.cnf -s ./packet-p1-template -D . -O ../../epan/dissectors MTAAbstractService.asn MTSAbstractService.asn MTSAccessProtocol.asn MHSProtocolObjectIdentifiers.asn MTSUpperBounds.asn */
5
6 /* Input file: packet-p1-template.c */
7
8 #line 1 "../../asn1/p1/packet-p1-template.c"
9 /* packet-p1.c
10  * Routines for X.411 (X.400 Message Transfer)  packet dissection
11  * Graeme Lunt 2005
12  *
13  * $Id$
14  *
15  * Wireshark - Network traffic analyzer
16  * By Gerald Combs <gerald@wireshark.org>
17  * Copyright 1998 Gerald Combs
18  *
19  * This program is free software; you can redistribute it and/or
20  * modify it under the terms of the GNU General Public License
21  * as published by the Free Software Foundation; either version 2
22  * of the License, or (at your option) any later version.
23  *
24  * This program is distributed in the hope that it will be useful,
25  * but WITHOUT ANY WARRANTY; without even the implied warranty of
26  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
27  * GNU General Public License for more details.
28  *
29  * You should have received a copy of the GNU General Public License
30  * along with this program; if not, write to the Free Software
31  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
32  */
33
34 #include "config.h"
35
36 #include <glib.h>
37 #include <epan/packet.h>
38 #include <epan/prefs.h>
39 #include <epan/oids.h>
40 #include <epan/asn1.h>
41 #include <epan/expert.h>
42
43 #include "packet-ber.h"
44 #include "packet-acse.h"
45 #include "packet-ros.h"
46 #include "packet-rtse.h"
47
48 #include "packet-x509af.h"
49 #include "packet-x509ce.h"
50 #include "packet-x509if.h"
51 #include "packet-x509sat.h"
52
53 #include "packet-p1.h"
54 #include <epan/strutil.h>
55
56 #define PNAME  "X.411 Message Transfer Service"
57 #define PSNAME "P1"
58 #define PFNAME "p1"
59
60 static guint global_p1_tcp_port = 102;
61 static dissector_handle_t tpkt_handle;
62 static void prefs_register_p1(void); /* forward declaration for use in preferences registration */
63
64 /* Initialize the protocol and registered fields */
65 static int proto_p1 = -1;
66 static int proto_p3 = -1;
67
68 static struct SESSION_DATA_STRUCTURE* session = NULL;
69 static int extension_id = -1; /* integer extension id */
70 static const char *object_identifier_id = NULL; /* extensions identifier */
71 static const char *content_type_id = NULL; /* content type identifier */
72 static gboolean report_unknown_content_type = FALSE;
73
74 #define MAX_ORA_STR_LEN     256
75 static char *oraddress = NULL;
76 static char *ddatype = NULL;
77 static gboolean doing_address=FALSE;
78 static gboolean doing_subjectid=FALSE;
79 static proto_item *address_item = NULL;
80
81 static proto_tree *top_tree=NULL;
82
83 static int hf_p1_MTS_APDU_PDU = -1;
84 static int hf_p1_MTABindArgument_PDU = -1;
85 static int hf_p1_MTABindResult_PDU = -1;
86 static int hf_p1_MTABindError_PDU = -1;
87
88
89 /*--- Included file: packet-p1-hf.c ---*/
90 #line 1 "../../asn1/p1/packet-p1-hf.c"
91 static int hf_p1_InternalTraceInformation_PDU = -1;  /* InternalTraceInformation */
92 static int hf_p1_InternalTraceInformationElement_PDU = -1;  /* InternalTraceInformationElement */
93 static int hf_p1_TraceInformation_PDU = -1;       /* TraceInformation */
94 static int hf_p1_TraceInformationElement_PDU = -1;  /* TraceInformationElement */
95 static int hf_p1_MTSBindArgument_PDU = -1;        /* MTSBindArgument */
96 static int hf_p1_MTSBindResult_PDU = -1;          /* MTSBindResult */
97 static int hf_p1_PAR_mts_bind_error_PDU = -1;     /* PAR_mts_bind_error */
98 static int hf_p1_MessageSubmissionArgument_PDU = -1;  /* MessageSubmissionArgument */
99 static int hf_p1_MessageSubmissionResult_PDU = -1;  /* MessageSubmissionResult */
100 static int hf_p1_ProbeSubmissionArgument_PDU = -1;  /* ProbeSubmissionArgument */
101 static int hf_p1_ProbeSubmissionResult_PDU = -1;  /* ProbeSubmissionResult */
102 static int hf_p1_CancelDeferredDeliveryArgument_PDU = -1;  /* CancelDeferredDeliveryArgument */
103 static int hf_p1_CancelDeferredDeliveryResult_PDU = -1;  /* CancelDeferredDeliveryResult */
104 static int hf_p1_SubmissionControlArgument_PDU = -1;  /* SubmissionControlArgument */
105 static int hf_p1_SubmissionControlResult_PDU = -1;  /* SubmissionControlResult */
106 static int hf_p1_PAR_submission_control_violated_PDU = -1;  /* PAR_submission_control_violated */
107 static int hf_p1_PAR_element_of_service_not_subscribed_PDU = -1;  /* PAR_element_of_service_not_subscribed */
108 static int hf_p1_PAR_deferred_delivery_cancellation_rejected_PDU = -1;  /* PAR_deferred_delivery_cancellation_rejected */
109 static int hf_p1_PAR_originator_invalid_PDU = -1;  /* PAR_originator_invalid */
110 static int hf_p1_ImproperlySpecifiedRecipients_PDU = -1;  /* ImproperlySpecifiedRecipients */
111 static int hf_p1_PAR_message_submission_identifier_invalid_PDU = -1;  /* PAR_message_submission_identifier_invalid */
112 static int hf_p1_PAR_inconsistent_request_PDU = -1;  /* PAR_inconsistent_request */
113 static int hf_p1_SecurityProblem_PDU = -1;        /* SecurityProblem */
114 static int hf_p1_PAR_unsupported_critical_function_PDU = -1;  /* PAR_unsupported_critical_function */
115 static int hf_p1_PAR_remote_bind_error_PDU = -1;  /* PAR_remote_bind_error */
116 static int hf_p1_MessageSubmissionTime_PDU = -1;  /* MessageSubmissionTime */
117 static int hf_p1_MessageDeliveryArgument_PDU = -1;  /* MessageDeliveryArgument */
118 static int hf_p1_MessageDeliveryResult_PDU = -1;  /* MessageDeliveryResult */
119 static int hf_p1_ReportDeliveryArgument_PDU = -1;  /* ReportDeliveryArgument */
120 static int hf_p1_ReportDeliveryResult_PDU = -1;   /* ReportDeliveryResult */
121 static int hf_p1_DeliveryControlArgument_PDU = -1;  /* DeliveryControlArgument */
122 static int hf_p1_DeliveryControlResult_PDU = -1;  /* DeliveryControlResult */
123 static int hf_p1_PAR_delivery_control_violated_PDU = -1;  /* PAR_delivery_control_violated */
124 static int hf_p1_PAR_control_violates_registration_PDU = -1;  /* PAR_control_violates_registration */
125 static int hf_p1_RefusedOperation_PDU = -1;       /* RefusedOperation */
126 static int hf_p1_RecipientCertificate_PDU = -1;   /* RecipientCertificate */
127 static int hf_p1_ProofOfDelivery_PDU = -1;        /* ProofOfDelivery */
128 static int hf_p1_RegisterArgument_PDU = -1;       /* RegisterArgument */
129 static int hf_p1_RegisterResult_PDU = -1;         /* RegisterResult */
130 static int hf_p1_ChangeCredentialsArgument_PDU = -1;  /* ChangeCredentialsArgument */
131 static int hf_p1_RES_change_credentials_PDU = -1;  /* RES_change_credentials */
132 static int hf_p1_PAR_register_rejected_PDU = -1;  /* PAR_register_rejected */
133 static int hf_p1_PAR_new_credentials_unacceptable_PDU = -1;  /* PAR_new_credentials_unacceptable */
134 static int hf_p1_PAR_old_credentials_incorrectly_specified_PDU = -1;  /* PAR_old_credentials_incorrectly_specified */
135 static int hf_p1_MessageSubmissionEnvelope_PDU = -1;  /* MessageSubmissionEnvelope */
136 static int hf_p1_PerRecipientMessageSubmissionFields_PDU = -1;  /* PerRecipientMessageSubmissionFields */
137 static int hf_p1_ProbeSubmissionEnvelope_PDU = -1;  /* ProbeSubmissionEnvelope */
138 static int hf_p1_PerRecipientProbeSubmissionFields_PDU = -1;  /* PerRecipientProbeSubmissionFields */
139 static int hf_p1_MessageDeliveryEnvelope_PDU = -1;  /* MessageDeliveryEnvelope */
140 static int hf_p1_ReportDeliveryEnvelope_PDU = -1;  /* ReportDeliveryEnvelope */
141 static int hf_p1_PerRecipientReportDeliveryFields_PDU = -1;  /* PerRecipientReportDeliveryFields */
142 static int hf_p1_ExtendedContentType_PDU = -1;    /* ExtendedContentType */
143 static int hf_p1_ContentIdentifier_PDU = -1;      /* ContentIdentifier */
144 static int hf_p1_PerMessageIndicators_PDU = -1;   /* PerMessageIndicators */
145 static int hf_p1_OriginatorReportRequest_PDU = -1;  /* OriginatorReportRequest */
146 static int hf_p1_DeferredDeliveryTime_PDU = -1;   /* DeferredDeliveryTime */
147 static int hf_p1_Priority_PDU = -1;               /* Priority */
148 static int hf_p1_ContentLength_PDU = -1;          /* ContentLength */
149 static int hf_p1_MessageDeliveryTime_PDU = -1;    /* MessageDeliveryTime */
150 static int hf_p1_DeliveryFlags_PDU = -1;          /* DeliveryFlags */
151 static int hf_p1_SubjectSubmissionIdentifier_PDU = -1;  /* SubjectSubmissionIdentifier */
152 static int hf_p1_RecipientReassignmentProhibited_PDU = -1;  /* RecipientReassignmentProhibited */
153 static int hf_p1_OriginatorRequestedAlternateRecipient_PDU = -1;  /* OriginatorRequestedAlternateRecipient */
154 static int hf_p1_DLExpansionProhibited_PDU = -1;  /* DLExpansionProhibited */
155 static int hf_p1_ConversionWithLossProhibited_PDU = -1;  /* ConversionWithLossProhibited */
156 static int hf_p1_LatestDeliveryTime_PDU = -1;     /* LatestDeliveryTime */
157 static int hf_p1_RequestedDeliveryMethod_PDU = -1;  /* RequestedDeliveryMethod */
158 static int hf_p1_PhysicalForwardingProhibited_PDU = -1;  /* PhysicalForwardingProhibited */
159 static int hf_p1_PhysicalForwardingAddressRequest_PDU = -1;  /* PhysicalForwardingAddressRequest */
160 static int hf_p1_PhysicalDeliveryModes_PDU = -1;  /* PhysicalDeliveryModes */
161 static int hf_p1_RegisteredMailType_PDU = -1;     /* RegisteredMailType */
162 static int hf_p1_RecipientNumberForAdvice_PDU = -1;  /* RecipientNumberForAdvice */
163 static int hf_p1_PhysicalRenditionAttributes_PDU = -1;  /* PhysicalRenditionAttributes */
164 static int hf_p1_OriginatorReturnAddress_PDU = -1;  /* OriginatorReturnAddress */
165 static int hf_p1_PhysicalDeliveryReportRequest_PDU = -1;  /* PhysicalDeliveryReportRequest */
166 static int hf_p1_OriginatorCertificate_PDU = -1;  /* OriginatorCertificate */
167 static int hf_p1_MessageToken_PDU = -1;           /* MessageToken */
168 static int hf_p1_ContentConfidentialityAlgorithmIdentifier_PDU = -1;  /* ContentConfidentialityAlgorithmIdentifier */
169 static int hf_p1_ContentIntegrityCheck_PDU = -1;  /* ContentIntegrityCheck */
170 static int hf_p1_MessageOriginAuthenticationCheck_PDU = -1;  /* MessageOriginAuthenticationCheck */
171 static int hf_p1_p1_MessageSecurityLabel_PDU = -1;  /* MessageSecurityLabel */
172 static int hf_p1_ProofOfSubmissionRequest_PDU = -1;  /* ProofOfSubmissionRequest */
173 static int hf_p1_ProofOfDeliveryRequest_PDU = -1;  /* ProofOfDeliveryRequest */
174 static int hf_p1_ContentCorrelator_PDU = -1;      /* ContentCorrelator */
175 static int hf_p1_ProbeOriginAuthenticationCheck_PDU = -1;  /* ProbeOriginAuthenticationCheck */
176 static int hf_p1_RedirectionHistory_PDU = -1;     /* RedirectionHistory */
177 static int hf_p1_Redirection_PDU = -1;            /* Redirection */
178 static int hf_p1_DLExpansionHistory_PDU = -1;     /* DLExpansionHistory */
179 static int hf_p1_DLExpansion_PDU = -1;            /* DLExpansion */
180 static int hf_p1_PhysicalForwardingAddress_PDU = -1;  /* PhysicalForwardingAddress */
181 static int hf_p1_OriginatorAndDLExpansionHistory_PDU = -1;  /* OriginatorAndDLExpansionHistory */
182 static int hf_p1_ReportingDLName_PDU = -1;        /* ReportingDLName */
183 static int hf_p1_ReportingMTACertificate_PDU = -1;  /* ReportingMTACertificate */
184 static int hf_p1_ReportOriginAuthenticationCheck_PDU = -1;  /* ReportOriginAuthenticationCheck */
185 static int hf_p1_OriginatingMTACertificate_PDU = -1;  /* OriginatingMTACertificate */
186 static int hf_p1_ProofOfSubmission_PDU = -1;      /* ProofOfSubmission */
187 static int hf_p1_ReportingMTAName_PDU = -1;       /* ReportingMTAName */
188 static int hf_p1_ExtendedCertificates_PDU = -1;   /* ExtendedCertificates */
189 static int hf_p1_DLExemptedRecipients_PDU = -1;   /* DLExemptedRecipients */
190 static int hf_p1_CertificateSelectors_PDU = -1;   /* CertificateSelectors */
191 static int hf_p1_Content_PDU = -1;                /* Content */
192 static int hf_p1_MTSIdentifier_PDU = -1;          /* MTSIdentifier */
193 static int hf_p1_ORName_PDU = -1;                 /* ORName */
194 static int hf_p1_ORAddress_PDU = -1;              /* ORAddress */
195 static int hf_p1_CommonName_PDU = -1;             /* CommonName */
196 static int hf_p1_TeletexCommonName_PDU = -1;      /* TeletexCommonName */
197 static int hf_p1_UniversalCommonName_PDU = -1;    /* UniversalCommonName */
198 static int hf_p1_TeletexOrganizationName_PDU = -1;  /* TeletexOrganizationName */
199 static int hf_p1_UniversalOrganizationName_PDU = -1;  /* UniversalOrganizationName */
200 static int hf_p1_TeletexPersonalName_PDU = -1;    /* TeletexPersonalName */
201 static int hf_p1_UniversalPersonalName_PDU = -1;  /* UniversalPersonalName */
202 static int hf_p1_TeletexOrganizationalUnitNames_PDU = -1;  /* TeletexOrganizationalUnitNames */
203 static int hf_p1_UniversalOrganizationalUnitNames_PDU = -1;  /* UniversalOrganizationalUnitNames */
204 static int hf_p1_PDSName_PDU = -1;                /* PDSName */
205 static int hf_p1_PhysicalDeliveryCountryName_PDU = -1;  /* PhysicalDeliveryCountryName */
206 static int hf_p1_PostalCode_PDU = -1;             /* PostalCode */
207 static int hf_p1_PhysicalDeliveryOfficeName_PDU = -1;  /* PhysicalDeliveryOfficeName */
208 static int hf_p1_UniversalPhysicalDeliveryOfficeName_PDU = -1;  /* UniversalPhysicalDeliveryOfficeName */
209 static int hf_p1_PhysicalDeliveryOfficeNumber_PDU = -1;  /* PhysicalDeliveryOfficeNumber */
210 static int hf_p1_UniversalPhysicalDeliveryOfficeNumber_PDU = -1;  /* UniversalPhysicalDeliveryOfficeNumber */
211 static int hf_p1_ExtensionORAddressComponents_PDU = -1;  /* ExtensionORAddressComponents */
212 static int hf_p1_UniversalExtensionORAddressComponents_PDU = -1;  /* UniversalExtensionORAddressComponents */
213 static int hf_p1_PhysicalDeliveryPersonalName_PDU = -1;  /* PhysicalDeliveryPersonalName */
214 static int hf_p1_UniversalPhysicalDeliveryPersonalName_PDU = -1;  /* UniversalPhysicalDeliveryPersonalName */
215 static int hf_p1_PhysicalDeliveryOrganizationName_PDU = -1;  /* PhysicalDeliveryOrganizationName */
216 static int hf_p1_UniversalPhysicalDeliveryOrganizationName_PDU = -1;  /* UniversalPhysicalDeliveryOrganizationName */
217 static int hf_p1_ExtensionPhysicalDeliveryAddressComponents_PDU = -1;  /* ExtensionPhysicalDeliveryAddressComponents */
218 static int hf_p1_UniversalExtensionPhysicalDeliveryAddressComponents_PDU = -1;  /* UniversalExtensionPhysicalDeliveryAddressComponents */
219 static int hf_p1_UnformattedPostalAddress_PDU = -1;  /* UnformattedPostalAddress */
220 static int hf_p1_UniversalUnformattedPostalAddress_PDU = -1;  /* UniversalUnformattedPostalAddress */
221 static int hf_p1_StreetAddress_PDU = -1;          /* StreetAddress */
222 static int hf_p1_UniversalStreetAddress_PDU = -1;  /* UniversalStreetAddress */
223 static int hf_p1_PostOfficeBoxAddress_PDU = -1;   /* PostOfficeBoxAddress */
224 static int hf_p1_UniversalPostOfficeBoxAddress_PDU = -1;  /* UniversalPostOfficeBoxAddress */
225 static int hf_p1_PosteRestanteAddress_PDU = -1;   /* PosteRestanteAddress */
226 static int hf_p1_UniversalPosteRestanteAddress_PDU = -1;  /* UniversalPosteRestanteAddress */
227 static int hf_p1_UniquePostalName_PDU = -1;       /* UniquePostalName */
228 static int hf_p1_UniversalUniquePostalName_PDU = -1;  /* UniversalUniquePostalName */
229 static int hf_p1_LocalPostalAttributes_PDU = -1;  /* LocalPostalAttributes */
230 static int hf_p1_UniversalLocalPostalAttributes_PDU = -1;  /* UniversalLocalPostalAttributes */
231 static int hf_p1_ExtendedNetworkAddress_PDU = -1;  /* ExtendedNetworkAddress */
232 static int hf_p1_TerminalType_PDU = -1;           /* TerminalType */
233 static int hf_p1_TeletexDomainDefinedAttributes_PDU = -1;  /* TeletexDomainDefinedAttributes */
234 static int hf_p1_UniversalDomainDefinedAttributes_PDU = -1;  /* UniversalDomainDefinedAttributes */
235 static int hf_p1_ExtendedEncodedInformationType_PDU = -1;  /* ExtendedEncodedInformationType */
236 static int hf_p1_MTANameAndOptionalGDI_PDU = -1;  /* MTANameAndOptionalGDI */
237 static int hf_p1_AsymmetricToken_PDU = -1;        /* AsymmetricToken */
238 static int hf_p1_BindTokenSignedData_PDU = -1;    /* BindTokenSignedData */
239 static int hf_p1_MessageTokenSignedData_PDU = -1;  /* MessageTokenSignedData */
240 static int hf_p1_MessageTokenEncryptedData_PDU = -1;  /* MessageTokenEncryptedData */
241 static int hf_p1_BindTokenEncryptedData_PDU = -1;  /* BindTokenEncryptedData */
242 static int hf_p1_SecurityClassification_PDU = -1;  /* SecurityClassification */
243 static int hf_p1_unauthenticated = -1;            /* NULL */
244 static int hf_p1_authenticated_argument = -1;     /* AuthenticatedArgument */
245 static int hf_p1_authenticated_initiator_name = -1;  /* MTAName */
246 static int hf_p1_initiator_credentials = -1;      /* InitiatorCredentials */
247 static int hf_p1_security_context = -1;           /* SecurityContext */
248 static int hf_p1_authenticated_result = -1;       /* AuthenticatedResult */
249 static int hf_p1_authenticated_responder_name = -1;  /* MTAName */
250 static int hf_p1_responder_credentials = -1;      /* ResponderCredentials */
251 static int hf_p1_message = -1;                    /* Message */
252 static int hf_p1_probe = -1;                      /* Probe */
253 static int hf_p1_report = -1;                     /* Report */
254 static int hf_p1_message_envelope = -1;           /* MessageTransferEnvelope */
255 static int hf_p1_content = -1;                    /* Content */
256 static int hf_p1_report_envelope = -1;            /* ReportTransferEnvelope */
257 static int hf_p1_report_content = -1;             /* ReportTransferContent */
258 static int hf_p1_message_identifier = -1;         /* MessageIdentifier */
259 static int hf_p1_originator_name = -1;            /* MTAOriginatorName */
260 static int hf_p1_original_encoded_information_types = -1;  /* OriginalEncodedInformationTypes */
261 static int hf_p1_content_type = -1;               /* ContentType */
262 static int hf_p1_content_identifier = -1;         /* ContentIdentifier */
263 static int hf_p1_priority = -1;                   /* Priority */
264 static int hf_p1_per_message_indicators = -1;     /* PerMessageIndicators */
265 static int hf_p1_deferred_delivery_time = -1;     /* DeferredDeliveryTime */
266 static int hf_p1_per_domain_bilateral_information = -1;  /* SEQUENCE_SIZE_1_ub_transfers_OF_PerDomainBilateralInformation */
267 static int hf_p1_per_domain_bilateral_information_item = -1;  /* PerDomainBilateralInformation */
268 static int hf_p1_trace_information = -1;          /* TraceInformation */
269 static int hf_p1_extensions = -1;                 /* SET_OF_ExtensionField */
270 static int hf_p1_extensions_item = -1;            /* ExtensionField */
271 static int hf_p1_recipient_name = -1;             /* MTARecipientName */
272 static int hf_p1_originally_specified_recipient_number = -1;  /* OriginallySpecifiedRecipientNumber */
273 static int hf_p1_per_recipient_indicators = -1;   /* PerRecipientIndicators */
274 static int hf_p1_explicit_conversion = -1;        /* ExplicitConversion */
275 static int hf_p1_probe_identifier = -1;           /* ProbeIdentifier */
276 static int hf_p1_content_length = -1;             /* ContentLength */
277 static int hf_p1_report_identifier = -1;          /* ReportIdentifier */
278 static int hf_p1_report_destination_name = -1;    /* ReportDestinationName */
279 static int hf_p1_subject_identifier = -1;         /* SubjectIdentifier */
280 static int hf_p1_subject_intermediate_trace_information = -1;  /* SubjectIntermediateTraceInformation */
281 static int hf_p1_returned_content = -1;           /* Content */
282 static int hf_p1_additional_information = -1;     /* AdditionalInformation */
283 static int hf_p1_mta_actual_recipient_name = -1;  /* MTAActualRecipientName */
284 static int hf_p1_last_trace_information = -1;     /* LastTraceInformation */
285 static int hf_p1_report_originally_intended_recipient_name = -1;  /* OriginallyIntendedRecipientName */
286 static int hf_p1_supplementary_information = -1;  /* SupplementaryInformation */
287 static int hf_p1_country_name = -1;               /* CountryName */
288 static int hf_p1_bilateral_domain = -1;           /* T_bilateral_domain */
289 static int hf_p1_administration_domain_name = -1;  /* AdministrationDomainName */
290 static int hf_p1_private_domain = -1;             /* T_private_domain */
291 static int hf_p1_private_domain_identifier = -1;  /* PrivateDomainIdentifier */
292 static int hf_p1_bilateral_information = -1;      /* T_bilateral_information */
293 static int hf_p1_arrival_time = -1;               /* ArrivalTime */
294 static int hf_p1_converted_encoded_information_types = -1;  /* ConvertedEncodedInformationTypes */
295 static int hf_p1_trace_report_type = -1;          /* ReportType */
296 static int hf_p1_InternalTraceInformation_item = -1;  /* InternalTraceInformationElement */
297 static int hf_p1_global_domain_identifier = -1;   /* GlobalDomainIdentifier */
298 static int hf_p1_mta_name = -1;                   /* MTAName */
299 static int hf_p1_mta_supplied_information = -1;   /* MTASuppliedInformation */
300 static int hf_p1__untag_item = -1;                /* TraceInformationElement */
301 static int hf_p1_domain_supplied_information = -1;  /* DomainSuppliedInformation */
302 static int hf_p1_deferred_time = -1;              /* DeferredTime */
303 static int hf_p1_other_actions = -1;              /* OtherActions */
304 static int hf_p1_initiator_name = -1;             /* ObjectName */
305 static int hf_p1_messages_waiting = -1;           /* MessagesWaiting */
306 static int hf_p1_responder_name = -1;             /* ObjectName */
307 static int hf_p1_user_agent = -1;                 /* ORAddressAndOptionalDirectoryName */
308 static int hf_p1_mTA = -1;                        /* MTAName */
309 static int hf_p1_message_store = -1;              /* ORAddressAndOptionalDirectoryName */
310 static int hf_p1_urgent = -1;                     /* DeliveryQueue */
311 static int hf_p1_normal = -1;                     /* DeliveryQueue */
312 static int hf_p1_non_urgent = -1;                 /* DeliveryQueue */
313 static int hf_p1_messages = -1;                   /* INTEGER_0_ub_queue_size */
314 static int hf_p1_delivery_queue_octets = -1;      /* INTEGER_0_ub_content_length */
315 static int hf_p1_simple = -1;                     /* Password */
316 static int hf_p1_strong = -1;                     /* StrongCredentials */
317 static int hf_p1_protected = -1;                  /* ProtectedPassword */
318 static int hf_p1_ia5_string = -1;                 /* IA5String_SIZE_0_ub_password_length */
319 static int hf_p1_octet_string = -1;               /* OCTET_STRING_SIZE_0_ub_password_length */
320 static int hf_p1_bind_token = -1;                 /* Token */
321 static int hf_p1_certificate = -1;                /* Certificates */
322 static int hf_p1_certificate_selector = -1;       /* CertificateAssertion */
323 static int hf_p1_signature = -1;                  /* Signature */
324 static int hf_p1_time1 = -1;                      /* UTCTime */
325 static int hf_p1_time2 = -1;                      /* UTCTime */
326 static int hf_p1_random1 = -1;                    /* BIT_STRING */
327 static int hf_p1_random2 = -1;                    /* BIT_STRING */
328 static int hf_p1_algorithmIdentifier = -1;        /* AlgorithmIdentifier */
329 static int hf_p1_encrypted = -1;                  /* BIT_STRING */
330 static int hf_p1_SecurityContext_item = -1;       /* SecurityLabel */
331 static int hf_p1_message_submission_envelope = -1;  /* MessageSubmissionEnvelope */
332 static int hf_p1_message_submission_identifier = -1;  /* MessageSubmissionIdentifier */
333 static int hf_p1_message_submission_time = -1;    /* MessageSubmissionTime */
334 static int hf_p1_probe_submission_identifier = -1;  /* ProbeSubmissionIdentifier */
335 static int hf_p1_probe_submission_time = -1;      /* ProbeSubmissionTime */
336 static int hf_p1_ImproperlySpecifiedRecipients_item = -1;  /* RecipientName */
337 static int hf_p1_waiting_operations = -1;         /* Operations */
338 static int hf_p1_waiting_messages = -1;           /* WaitingMessages */
339 static int hf_p1_waiting_content_types = -1;      /* SET_SIZE_0_ub_content_types_OF_ContentType */
340 static int hf_p1_waiting_content_types_item = -1;  /* ContentType */
341 static int hf_p1_waiting_encoded_information_types = -1;  /* EncodedInformationTypes */
342 static int hf_p1_recipient_certificate = -1;      /* RecipientCertificate */
343 static int hf_p1_proof_of_delivery = -1;          /* ProofOfDelivery */
344 static int hf_p1_empty_result = -1;               /* NULL */
345 static int hf_p1_max_extensions = -1;             /* SET_SIZE_1_MAX_OF_ExtensionField */
346 static int hf_p1_max_extensions_item = -1;        /* ExtensionField */
347 static int hf_p1_restrict = -1;                   /* BOOLEAN */
348 static int hf_p1_permissible_operations = -1;     /* Operations */
349 static int hf_p1_permissible_maximum_content_length = -1;  /* ContentLength */
350 static int hf_p1_permissible_lowest_priority = -1;  /* Priority */
351 static int hf_p1_permissible_content_types = -1;  /* ContentTypes */
352 static int hf_p1_permissible_encoded_information_types = -1;  /* PermissibleEncodedInformationTypes */
353 static int hf_p1_permissible_security_context = -1;  /* SecurityContext */
354 static int hf_p1_refused_argument = -1;           /* T_refused_argument */
355 static int hf_p1_built_in_argument = -1;          /* RefusedArgument */
356 static int hf_p1_refused_extension = -1;          /* T_refused_extension */
357 static int hf_p1_refusal_reason = -1;             /* RefusalReason */
358 static int hf_p1_user_name = -1;                  /* UserName */
359 static int hf_p1_user_address = -1;               /* UserAddress */
360 static int hf_p1_deliverable_class = -1;          /* SET_SIZE_1_ub_deliverable_class_OF_DeliverableClass */
361 static int hf_p1_deliverable_class_item = -1;     /* DeliverableClass */
362 static int hf_p1_default_delivery_controls = -1;  /* DefaultDeliveryControls */
363 static int hf_p1_redirections = -1;               /* Redirections */
364 static int hf_p1_restricted_delivery = -1;        /* RestrictedDelivery */
365 static int hf_p1_retrieve_registrations = -1;     /* RegistrationTypes */
366 static int hf_p1_non_empty_result = -1;           /* T_non_empty_result */
367 static int hf_p1_registered_information = -1;     /* RegisterArgument */
368 static int hf_p1_old_credentials = -1;            /* Credentials */
369 static int hf_p1_new_credentials = -1;            /* Credentials */
370 static int hf_p1_x121 = -1;                       /* T_x121 */
371 static int hf_p1_x121_address = -1;               /* T_x121_address */
372 static int hf_p1_tsap_id = -1;                    /* PrintableString_SIZE_1_ub_tsap_id_length */
373 static int hf_p1_presentation = -1;               /* PSAPAddress */
374 static int hf_p1_Redirections_item = -1;          /* RecipientRedirection */
375 static int hf_p1_redirection_classes = -1;        /* SET_SIZE_1_ub_redirection_classes_OF_RedirectionClass */
376 static int hf_p1_redirection_classes_item = -1;   /* RedirectionClass */
377 static int hf_p1_recipient_assigned_alternate_recipient = -1;  /* RecipientAssignedAlternateRecipient */
378 static int hf_p1_content_types = -1;              /* ContentTypes */
379 static int hf_p1_maximum_content_length = -1;     /* ContentLength */
380 static int hf_p1_encoded_information_types_constraints = -1;  /* EncodedInformationTypesConstraints */
381 static int hf_p1_security_labels = -1;            /* SecurityContext */
382 static int hf_p1_class_priority = -1;             /* SET_OF_Priority */
383 static int hf_p1_class_priority_item = -1;        /* Priority */
384 static int hf_p1_objects = -1;                    /* T_objects */
385 static int hf_p1_applies_only_to = -1;            /* SEQUENCE_OF_Restriction */
386 static int hf_p1_applies_only_to_item = -1;       /* Restriction */
387 static int hf_p1_unacceptable_eits = -1;          /* ExtendedEncodedInformationTypes */
388 static int hf_p1_acceptable_eits = -1;            /* ExtendedEncodedInformationTypes */
389 static int hf_p1_exclusively_acceptable_eits = -1;  /* ExtendedEncodedInformationTypes */
390 static int hf_p1_RestrictedDelivery_item = -1;    /* Restriction */
391 static int hf_p1_permitted = -1;                  /* BOOLEAN */
392 static int hf_p1_source_type = -1;                /* T_source_type */
393 static int hf_p1_source_name = -1;                /* ExactOrPattern */
394 static int hf_p1_exact_match = -1;                /* ORName */
395 static int hf_p1_pattern_match = -1;              /* ORName */
396 static int hf_p1_standard_parameters = -1;        /* T_standard_parameters */
397 static int hf_p1_type_extensions = -1;            /* T_type_extensions */
398 static int hf_p1_type_extensions_item = -1;       /* T_type_extensions_item */
399 static int hf_p1_originator_name_01 = -1;         /* OriginatorName */
400 static int hf_p1_submission_recipient_name = -1;  /* RecipientName */
401 static int hf_p1_originator_report_request = -1;  /* OriginatorReportRequest */
402 static int hf_p1_probe_recipient_name = -1;       /* RecipientName */
403 static int hf_p1_message_delivery_identifier = -1;  /* MessageDeliveryIdentifier */
404 static int hf_p1_message_delivery_time = -1;      /* MessageDeliveryTime */
405 static int hf_p1_other_fields = -1;               /* OtherMessageDeliveryFields */
406 static int hf_p1_delivered_content_type = -1;     /* DeliveredContentType */
407 static int hf_p1_delivered_originator_name = -1;  /* DeliveredOriginatorName */
408 static int hf_p1_delivery_flags = -1;             /* DeliveryFlags */
409 static int hf_p1_other_recipient_names = -1;      /* OtherRecipientNames */
410 static int hf_p1_this_recipient_name = -1;        /* ThisRecipientName */
411 static int hf_p1_originally_intended_recipient_name = -1;  /* OriginallyIntendedRecipientName */
412 static int hf_p1_subject_submission_identifier = -1;  /* SubjectSubmissionIdentifier */
413 static int hf_p1_actual_recipient_name = -1;      /* ActualRecipientName */
414 static int hf_p1_delivery_report_type = -1;       /* ReportType */
415 static int hf_p1_delivery = -1;                   /* DeliveryReport */
416 static int hf_p1_non_delivery = -1;               /* NonDeliveryReport */
417 static int hf_p1_type_of_MTS_user = -1;           /* TypeOfMTSUser */
418 static int hf_p1_non_delivery_reason_code = -1;   /* NonDeliveryReasonCode */
419 static int hf_p1_non_delivery_diagnostic_code = -1;  /* NonDeliveryDiagnosticCode */
420 static int hf_p1_ContentTypes_item = -1;          /* ContentType */
421 static int hf_p1_built_in = -1;                   /* BuiltInContentType */
422 static int hf_p1_extended = -1;                   /* ExtendedContentType */
423 static int hf_p1_OtherRecipientNames_item = -1;   /* OtherRecipientName */
424 static int hf_p1_standard_extension = -1;         /* StandardExtension */
425 static int hf_p1_private_extension = -1;          /* T_private_extension */
426 static int hf_p1_extension_type = -1;             /* ExtensionType */
427 static int hf_p1_criticality = -1;                /* Criticality */
428 static int hf_p1_extension_value = -1;            /* ExtensionValue */
429 static int hf_p1_RequestedDeliveryMethod_item = -1;  /* RequestedDeliveryMethod_item */
430 static int hf_p1_ia5text = -1;                    /* IA5String */
431 static int hf_p1_octets = -1;                     /* OCTET_STRING */
432 static int hf_p1_RedirectionHistory_item = -1;    /* Redirection */
433 static int hf_p1_intended_recipient_name = -1;    /* IntendedRecipientName */
434 static int hf_p1_redirection_reason = -1;         /* RedirectionReason */
435 static int hf_p1_intended_recipient = -1;         /* ORAddressAndOptionalDirectoryName */
436 static int hf_p1_redirection_time = -1;           /* Time */
437 static int hf_p1_DLExpansionHistory_item = -1;    /* DLExpansion */
438 static int hf_p1_dl = -1;                         /* ORAddressAndOptionalDirectoryName */
439 static int hf_p1_dl_expansion_time = -1;          /* Time */
440 static int hf_p1_OriginatorAndDLExpansionHistory_item = -1;  /* OriginatorAndDLExpansion */
441 static int hf_p1_originator_or_dl_name = -1;      /* ORAddressAndOptionalDirectoryName */
442 static int hf_p1_origination_or_expansion_time = -1;  /* Time */
443 static int hf_p1_report_type = -1;                /* T_report_type */
444 static int hf_p1_report_type_delivery = -1;       /* PerRecipientDeliveryReportFields */
445 static int hf_p1_non_delivery_report = -1;        /* PerRecipientNonDeliveryReportFields */
446 static int hf_p1_domain = -1;                     /* GlobalDomainIdentifier */
447 static int hf_p1_mta_directory_name = -1;         /* Name */
448 static int hf_p1_ExtendedCertificates_item = -1;  /* ExtendedCertificate */
449 static int hf_p1_directory_entry = -1;            /* Name */
450 static int hf_p1_DLExemptedRecipients_item = -1;  /* ORAddressAndOrDirectoryName */
451 static int hf_p1_encryption_recipient = -1;       /* CertificateAssertion */
452 static int hf_p1_encryption_originator = -1;      /* CertificateAssertion */
453 static int hf_p1_selectors_content_integrity_check = -1;  /* CertificateAssertion */
454 static int hf_p1_token_signature = -1;            /* CertificateAssertion */
455 static int hf_p1_message_origin_authentication = -1;  /* CertificateAssertion */
456 static int hf_p1_local_identifier = -1;           /* LocalIdentifier */
457 static int hf_p1_numeric_private_domain_identifier = -1;  /* T_numeric_private_domain_identifier */
458 static int hf_p1_printable_private_domain_identifier = -1;  /* T_printable_private_domain_identifier */
459 static int hf_p1_built_in_standard_attributes = -1;  /* BuiltInStandardAttributes */
460 static int hf_p1_built_in_domain_defined_attributes = -1;  /* BuiltInDomainDefinedAttributes */
461 static int hf_p1_extension_attributes = -1;       /* ExtensionAttributes */
462 static int hf_p1_network_address = -1;            /* NetworkAddress */
463 static int hf_p1_terminal_identifier = -1;        /* TerminalIdentifier */
464 static int hf_p1_private_domain_name = -1;        /* PrivateDomainName */
465 static int hf_p1_organization_name = -1;          /* OrganizationName */
466 static int hf_p1_numeric_user_identifier = -1;    /* NumericUserIdentifier */
467 static int hf_p1_personal_name = -1;              /* PersonalName */
468 static int hf_p1_organizational_unit_names = -1;  /* OrganizationalUnitNames */
469 static int hf_p1_x121_dcc_code = -1;              /* T_x121_dcc_code */
470 static int hf_p1_iso_3166_alpha2_code = -1;       /* T_iso_3166_alpha2_code */
471 static int hf_p1_numeric = -1;                    /* T_numeric */
472 static int hf_p1_printable = -1;                  /* T_printable */
473 static int hf_p1_numeric_private_domain_name = -1;  /* T_numeric_private_domain_name */
474 static int hf_p1_printable_private_domain_name = -1;  /* T_printable_private_domain_name */
475 static int hf_p1_printable_surname = -1;          /* T_printable_surname */
476 static int hf_p1_printable_given_name = -1;       /* T_printable_given_name */
477 static int hf_p1_printable_initials = -1;         /* T_printable_initials */
478 static int hf_p1_printable_generation_qualifier = -1;  /* T_printable_generation_qualifier */
479 static int hf_p1_OrganizationalUnitNames_item = -1;  /* OrganizationalUnitName */
480 static int hf_p1_BuiltInDomainDefinedAttributes_item = -1;  /* BuiltInDomainDefinedAttribute */
481 static int hf_p1_printable_type = -1;             /* T_printable_type */
482 static int hf_p1_printable_value = -1;            /* T_printable_value */
483 static int hf_p1_ExtensionAttributes_item = -1;   /* ExtensionAttribute */
484 static int hf_p1_extension_attribute_type = -1;   /* ExtensionAttributeType */
485 static int hf_p1_extension_attribute_value = -1;  /* T_extension_attribute_value */
486 static int hf_p1_teletex_surname = -1;            /* T_teletex_surname */
487 static int hf_p1_teletex_given_name = -1;         /* T_teletex_given_name */
488 static int hf_p1_teletex_initials = -1;           /* T_teletex_initials */
489 static int hf_p1_teletex_generation_qualifier = -1;  /* T_teletex_generation_qualifier */
490 static int hf_p1_universal_surname = -1;          /* UniversalOrBMPString */
491 static int hf_p1_universal_given_name = -1;       /* UniversalOrBMPString */
492 static int hf_p1_universal_initials = -1;         /* UniversalOrBMPString */
493 static int hf_p1_universal_generation_qualifier = -1;  /* UniversalOrBMPString */
494 static int hf_p1_TeletexOrganizationalUnitNames_item = -1;  /* TeletexOrganizationalUnitName */
495 static int hf_p1_UniversalOrganizationalUnitNames_item = -1;  /* UniversalOrganizationalUnitName */
496 static int hf_p1_character_encoding = -1;         /* T_character_encoding */
497 static int hf_p1_two_octets = -1;                 /* BMPString_SIZE_1_ub_string_length */
498 static int hf_p1_four_octets = -1;                /* UniversalString_SIZE_1_ub_string_length */
499 static int hf_p1_iso_639_language_code = -1;      /* PrintableString_SIZE_CONSTR001 */
500 static int hf_p1_x121_dcc_code_01 = -1;           /* T_x121_dcc_code_01 */
501 static int hf_p1_iso_3166_alpha2_code_01 = -1;    /* T_iso_3166_alpha2_code_01 */
502 static int hf_p1_numeric_code = -1;               /* T_numeric_code */
503 static int hf_p1_printable_code = -1;             /* PrintableString_SIZE_1_ub_postal_code_length */
504 static int hf_p1_printable_address = -1;          /* T_printable_address */
505 static int hf_p1_printable_address_item = -1;     /* PrintableString_SIZE_1_ub_pds_parameter_length */
506 static int hf_p1_teletex_string = -1;             /* TeletexString_SIZE_1_ub_unformatted_address_length */
507 static int hf_p1_printable_string = -1;           /* PrintableString_SIZE_1_ub_pds_parameter_length */
508 static int hf_p1_pds_teletex_string = -1;         /* TeletexString_SIZE_1_ub_pds_parameter_length */
509 static int hf_p1_e163_4_address = -1;             /* T_e163_4_address */
510 static int hf_p1_number = -1;                     /* NumericString_SIZE_1_ub_e163_4_number_length */
511 static int hf_p1_sub_address = -1;                /* NumericString_SIZE_1_ub_e163_4_sub_address_length */
512 static int hf_p1_psap_address = -1;               /* PresentationAddress */
513 static int hf_p1_TeletexDomainDefinedAttributes_item = -1;  /* TeletexDomainDefinedAttribute */
514 static int hf_p1_type = -1;                       /* T_type */
515 static int hf_p1_teletex_value = -1;              /* T_teletex_value */
516 static int hf_p1_UniversalDomainDefinedAttributes_item = -1;  /* UniversalDomainDefinedAttribute */
517 static int hf_p1_universal_type = -1;             /* UniversalOrBMPString */
518 static int hf_p1_universal_value = -1;            /* UniversalOrBMPString */
519 static int hf_p1_ExtendedEncodedInformationTypes_item = -1;  /* ExtendedEncodedInformationType */
520 static int hf_p1_g3_facsimile = -1;               /* G3FacsimileNonBasicParameters */
521 static int hf_p1_teletex = -1;                    /* TeletexNonBasicParameters */
522 static int hf_p1_graphic_character_sets = -1;     /* TeletexString */
523 static int hf_p1_control_character_sets = -1;     /* TeletexString */
524 static int hf_p1_page_formats = -1;               /* OCTET_STRING */
525 static int hf_p1_miscellaneous_terminal_capabilities = -1;  /* TeletexString */
526 static int hf_p1_private_use = -1;                /* OCTET_STRING */
527 static int hf_p1_token_type_identifier = -1;      /* TokenTypeIdentifier */
528 static int hf_p1_token = -1;                      /* TokenTypeData */
529 static int hf_p1_signature_algorithm_identifier = -1;  /* AlgorithmIdentifier */
530 static int hf_p1_name = -1;                       /* T_name */
531 static int hf_p1_token_recipient_name = -1;       /* RecipientName */
532 static int hf_p1_token_mta = -1;                  /* MTANameAndOptionalGDI */
533 static int hf_p1_time = -1;                       /* Time */
534 static int hf_p1_signed_data = -1;                /* TokenData */
535 static int hf_p1_encryption_algorithm_identifier = -1;  /* AlgorithmIdentifier */
536 static int hf_p1_encrypted_data = -1;             /* BIT_STRING */
537 static int hf_p1_asymmetric_token_data = -1;      /* AsymmetricTokenData */
538 static int hf_p1_algorithm_identifier = -1;       /* AlgorithmIdentifier */
539 static int hf_p1_token_data_type = -1;            /* TokenDataType */
540 static int hf_p1_value = -1;                      /* T_value */
541 static int hf_p1_content_confidentiality_algorithm_identifier = -1;  /* ContentConfidentialityAlgorithmIdentifier */
542 static int hf_p1_content_integrity_check = -1;    /* ContentIntegrityCheck */
543 static int hf_p1_message_security_label = -1;     /* MessageSecurityLabel */
544 static int hf_p1_proof_of_delivery_request = -1;  /* ProofOfDeliveryRequest */
545 static int hf_p1_message_sequence_number = -1;    /* INTEGER */
546 static int hf_p1_content_confidentiality_key = -1;  /* EncryptionKey */
547 static int hf_p1_content_integrity_key = -1;      /* EncryptionKey */
548 static int hf_p1_security_policy_identifier = -1;  /* SecurityPolicyIdentifier */
549 static int hf_p1_security_classification = -1;    /* SecurityClassification */
550 static int hf_p1_privacy_mark = -1;               /* PrivacyMark */
551 static int hf_p1_security_categories = -1;        /* SecurityCategories */
552 static int hf_p1_SecurityCategories_item = -1;    /* SecurityCategory */
553 static int hf_p1_category_type = -1;              /* SecurityCategoryIdentifier */
554 static int hf_p1_category_value = -1;             /* CategoryValue */
555 static int hf_p1_mta_originator_name = -1;        /* MTAOriginatorName */
556 static int hf_p1_per_recipient_message_fields = -1;  /* SEQUENCE_SIZE_1_ub_recipients_OF_PerRecipientMessageTransferFields */
557 static int hf_p1_per_recipient_message_fields_item = -1;  /* PerRecipientMessageTransferFields */
558 static int hf_p1_per_recipient_probe_transfer_fields = -1;  /* SEQUENCE_SIZE_1_ub_recipients_OF_PerRecipientProbeTransferFields */
559 static int hf_p1_per_recipient_probe_transfer_fields_item = -1;  /* PerRecipientProbeTransferFields */
560 static int hf_p1_per_recipient_report_fields = -1;  /* SEQUENCE_SIZE_1_ub_recipients_OF_PerRecipientReportTransferFields */
561 static int hf_p1_per_recipient_report_fields_item = -1;  /* PerRecipientReportTransferFields */
562 static int hf_p1_routing_action = -1;             /* RoutingAction */
563 static int hf_p1_attempted = -1;                  /* T_attempted */
564 static int hf_p1_mta = -1;                        /* MTAName */
565 static int hf_p1_attempted_domain = -1;           /* GlobalDomainIdentifier */
566 static int hf_p1_per_recipient_report_delivery_fields = -1;  /* SEQUENCE_SIZE_1_ub_recipients_OF_PerRecipientReportDeliveryFields */
567 static int hf_p1_per_recipient_report_delivery_fields_item = -1;  /* PerRecipientReportDeliveryFields */
568 static int hf_p1_mts_originator_name = -1;        /* OriginatorName */
569 static int hf_p1_per_recipient_message_submission_fields = -1;  /* SEQUENCE_SIZE_1_ub_recipients_OF_PerRecipientMessageSubmissionFields */
570 static int hf_p1_per_recipient_message_submission_fields_item = -1;  /* PerRecipientMessageSubmissionFields */
571 static int hf_p1_per_recipient_probe_submission_fields = -1;  /* SEQUENCE_SIZE_1_ub_recipients_OF_PerRecipientProbeSubmissionFields */
572 static int hf_p1_per_recipient_probe_submission_fields_item = -1;  /* PerRecipientProbeSubmissionFields */
573 static int hf_p1_directory_name = -1;             /* Name */
574 static int hf_p1_built_in_encoded_information_types = -1;  /* BuiltInEncodedInformationTypes */
575 static int hf_p1_extended_encoded_information_types = -1;  /* ExtendedEncodedInformationTypes */
576 /* named bits */
577 static int hf_p1_PerRecipientIndicators_responsibility = -1;
578 static int hf_p1_PerRecipientIndicators_originating_MTA_report = -1;
579 static int hf_p1_PerRecipientIndicators_originating_MTA_non_delivery_report = -1;
580 static int hf_p1_PerRecipientIndicators_originator_report = -1;
581 static int hf_p1_PerRecipientIndicators_originator_non_delivery_report = -1;
582 static int hf_p1_PerRecipientIndicators_reserved_5 = -1;
583 static int hf_p1_PerRecipientIndicators_reserved_6 = -1;
584 static int hf_p1_PerRecipientIndicators_reserved_7 = -1;
585 static int hf_p1_OtherActions_redirected = -1;
586 static int hf_p1_OtherActions_dl_operation = -1;
587 static int hf_p1_Operations_probe_submission_or_report_delivery = -1;
588 static int hf_p1_Operations_message_submission_or_message_delivery = -1;
589 static int hf_p1_WaitingMessages_long_content = -1;
590 static int hf_p1_WaitingMessages_low_priority = -1;
591 static int hf_p1_WaitingMessages_other_security_labels = -1;
592 static int hf_p1_T_source_type_originated_by = -1;
593 static int hf_p1_T_source_type_redirected_by = -1;
594 static int hf_p1_T_source_type_dl_expanded_by = -1;
595 static int hf_p1_T_standard_parameters_user_name = -1;
596 static int hf_p1_T_standard_parameters_user_address = -1;
597 static int hf_p1_T_standard_parameters_deliverable_class = -1;
598 static int hf_p1_T_standard_parameters_default_delivery_controls = -1;
599 static int hf_p1_T_standard_parameters_redirections = -1;
600 static int hf_p1_T_standard_parameters_restricted_delivery = -1;
601 static int hf_p1_PerMessageIndicators_U_disclosure_of_other_recipients = -1;
602 static int hf_p1_PerMessageIndicators_U_implicit_conversion_prohibited = -1;
603 static int hf_p1_PerMessageIndicators_U_alternate_recipient_allowed = -1;
604 static int hf_p1_PerMessageIndicators_U_content_return_request = -1;
605 static int hf_p1_PerMessageIndicators_U_reserved = -1;
606 static int hf_p1_PerMessageIndicators_U_bit_5 = -1;
607 static int hf_p1_PerMessageIndicators_U_bit_6 = -1;
608 static int hf_p1_PerMessageIndicators_U_service_message = -1;
609 static int hf_p1_OriginatorReportRequest_report = -1;
610 static int hf_p1_OriginatorReportRequest_non_delivery_report = -1;
611 static int hf_p1_DeliveryFlags_implicit_conversion_prohibited = -1;
612 static int hf_p1_Criticality_for_submission = -1;
613 static int hf_p1_Criticality_for_transfer = -1;
614 static int hf_p1_Criticality_for_delivery = -1;
615 static int hf_p1_PhysicalDeliveryModes_ordinary_mail = -1;
616 static int hf_p1_PhysicalDeliveryModes_special_delivery = -1;
617 static int hf_p1_PhysicalDeliveryModes_express_mail = -1;
618 static int hf_p1_PhysicalDeliveryModes_counter_collection = -1;
619 static int hf_p1_PhysicalDeliveryModes_counter_collection_with_telephone_advice = -1;
620 static int hf_p1_PhysicalDeliveryModes_counter_collection_with_telex_advice = -1;
621 static int hf_p1_PhysicalDeliveryModes_counter_collection_with_teletex_advice = -1;
622 static int hf_p1_PhysicalDeliveryModes_bureau_fax_delivery = -1;
623 static int hf_p1_BuiltInEncodedInformationTypes_unknown = -1;
624 static int hf_p1_BuiltInEncodedInformationTypes_ia5_text = -1;
625 static int hf_p1_BuiltInEncodedInformationTypes_g3_facsimile = -1;
626 static int hf_p1_BuiltInEncodedInformationTypes_g4_class_1 = -1;
627 static int hf_p1_BuiltInEncodedInformationTypes_teletex = -1;
628 static int hf_p1_BuiltInEncodedInformationTypes_videotex = -1;
629 static int hf_p1_BuiltInEncodedInformationTypes_voice = -1;
630 static int hf_p1_BuiltInEncodedInformationTypes_sfd = -1;
631 static int hf_p1_BuiltInEncodedInformationTypes_mixed_mode = -1;
632 static int hf_p1_G3FacsimileNonBasicParameters_two_dimensional = -1;
633 static int hf_p1_G3FacsimileNonBasicParameters_fine_resolution = -1;
634 static int hf_p1_G3FacsimileNonBasicParameters_unlimited_length = -1;
635 static int hf_p1_G3FacsimileNonBasicParameters_b4_length = -1;
636 static int hf_p1_G3FacsimileNonBasicParameters_a3_width = -1;
637 static int hf_p1_G3FacsimileNonBasicParameters_b4_width = -1;
638 static int hf_p1_G3FacsimileNonBasicParameters_t6_coding = -1;
639 static int hf_p1_G3FacsimileNonBasicParameters_uncompressed = -1;
640 static int hf_p1_G3FacsimileNonBasicParameters_width_middle_864_of_1728 = -1;
641 static int hf_p1_G3FacsimileNonBasicParameters_width_middle_1216_of_1728 = -1;
642 static int hf_p1_G3FacsimileNonBasicParameters_resolution_type = -1;
643 static int hf_p1_G3FacsimileNonBasicParameters_resolution_400x400 = -1;
644 static int hf_p1_G3FacsimileNonBasicParameters_resolution_300x300 = -1;
645 static int hf_p1_G3FacsimileNonBasicParameters_resolution_8x15 = -1;
646 static int hf_p1_G3FacsimileNonBasicParameters_edi = -1;
647 static int hf_p1_G3FacsimileNonBasicParameters_dtm = -1;
648 static int hf_p1_G3FacsimileNonBasicParameters_bft = -1;
649 static int hf_p1_G3FacsimileNonBasicParameters_mixed_mode = -1;
650 static int hf_p1_G3FacsimileNonBasicParameters_character_mode = -1;
651 static int hf_p1_G3FacsimileNonBasicParameters_twelve_bits = -1;
652 static int hf_p1_G3FacsimileNonBasicParameters_preferred_huffmann = -1;
653 static int hf_p1_G3FacsimileNonBasicParameters_full_colour = -1;
654 static int hf_p1_G3FacsimileNonBasicParameters_jpeg = -1;
655 static int hf_p1_G3FacsimileNonBasicParameters_processable_mode_26 = -1;
656
657 /*--- End of included file: packet-p1-hf.c ---*/
658 #line 81 "../../asn1/p1/packet-p1-template.c"
659
660 /* Initialize the subtree pointers */
661 static gint ett_p1 = -1;
662 static gint ett_p3 = -1;
663 static gint ett_p1_content_unknown = -1;
664 static gint ett_p1_bilateral_information = -1;
665 static gint ett_p1_additional_information = -1;
666 static gint ett_p1_unknown_standard_extension = -1;
667 static gint ett_p1_unknown_extension_attribute_type = -1;
668 static gint ett_p1_unknown_tokendata_type = -1;
669
670 /*--- Included file: packet-p1-ett.c ---*/
671 #line 1 "../../asn1/p1/packet-p1-ett.c"
672 static gint ett_p1_MTABindArgument = -1;
673 static gint ett_p1_AuthenticatedArgument = -1;
674 static gint ett_p1_MTABindResult = -1;
675 static gint ett_p1_AuthenticatedResult = -1;
676 static gint ett_p1_MTS_APDU = -1;
677 static gint ett_p1_Message = -1;
678 static gint ett_p1_Report = -1;
679 static gint ett_p1_MessageTransferEnvelope = -1;
680 static gint ett_p1_PerMessageTransferFields = -1;
681 static gint ett_p1_SEQUENCE_SIZE_1_ub_transfers_OF_PerDomainBilateralInformation = -1;
682 static gint ett_p1_SET_OF_ExtensionField = -1;
683 static gint ett_p1_PerRecipientMessageTransferFields = -1;
684 static gint ett_p1_ProbeTransferEnvelope = -1;
685 static gint ett_p1_PerProbeTransferFields = -1;
686 static gint ett_p1_PerRecipientProbeTransferFields = -1;
687 static gint ett_p1_ReportTransferEnvelope = -1;
688 static gint ett_p1_ReportTransferContent = -1;
689 static gint ett_p1_PerReportTransferFields = -1;
690 static gint ett_p1_PerRecipientReportTransferFields = -1;
691 static gint ett_p1_PerDomainBilateralInformation = -1;
692 static gint ett_p1_T_bilateral_domain = -1;
693 static gint ett_p1_T_private_domain = -1;
694 static gint ett_p1_PerRecipientIndicators = -1;
695 static gint ett_p1_LastTraceInformation = -1;
696 static gint ett_p1_InternalTraceInformation = -1;
697 static gint ett_p1_InternalTraceInformationElement = -1;
698 static gint ett_p1_MTASuppliedInformation = -1;
699 static gint ett_p1_SEQUENCE_SIZE_1_ub_transfers_OF_TraceInformationElement = -1;
700 static gint ett_p1_TraceInformationElement = -1;
701 static gint ett_p1_DomainSuppliedInformation = -1;
702 static gint ett_p1_AdditionalActions = -1;
703 static gint ett_p1_OtherActions = -1;
704 static gint ett_p1_MTSBindArgument = -1;
705 static gint ett_p1_MTSBindResult = -1;
706 static gint ett_p1_ObjectName = -1;
707 static gint ett_p1_MessagesWaiting = -1;
708 static gint ett_p1_DeliveryQueue = -1;
709 static gint ett_p1_Credentials = -1;
710 static gint ett_p1_Password = -1;
711 static gint ett_p1_StrongCredentials = -1;
712 static gint ett_p1_ProtectedPassword = -1;
713 static gint ett_p1_Signature = -1;
714 static gint ett_p1_SecurityContext = -1;
715 static gint ett_p1_MessageSubmissionArgument = -1;
716 static gint ett_p1_MessageSubmissionResult = -1;
717 static gint ett_p1_ProbeSubmissionResult = -1;
718 static gint ett_p1_ImproperlySpecifiedRecipients = -1;
719 static gint ett_p1_Waiting = -1;
720 static gint ett_p1_SET_SIZE_0_ub_content_types_OF_ContentType = -1;
721 static gint ett_p1_Operations = -1;
722 static gint ett_p1_WaitingMessages = -1;
723 static gint ett_p1_MessageDeliveryArgument = -1;
724 static gint ett_p1_MessageDeliveryResult = -1;
725 static gint ett_p1_ReportDeliveryArgument = -1;
726 static gint ett_p1_ReportDeliveryResult = -1;
727 static gint ett_p1_SET_SIZE_1_MAX_OF_ExtensionField = -1;
728 static gint ett_p1_DeliveryControlArgument = -1;
729 static gint ett_p1_DeliveryControlResult = -1;
730 static gint ett_p1_RefusedOperation = -1;
731 static gint ett_p1_T_refused_argument = -1;
732 static gint ett_p1_Controls = -1;
733 static gint ett_p1_RegisterArgument = -1;
734 static gint ett_p1_SET_SIZE_1_ub_deliverable_class_OF_DeliverableClass = -1;
735 static gint ett_p1_RegisterResult = -1;
736 static gint ett_p1_T_non_empty_result = -1;
737 static gint ett_p1_ChangeCredentialsArgument = -1;
738 static gint ett_p1_UserAddress = -1;
739 static gint ett_p1_T_x121 = -1;
740 static gint ett_p1_Redirections = -1;
741 static gint ett_p1_RecipientRedirection = -1;
742 static gint ett_p1_SET_SIZE_1_ub_redirection_classes_OF_RedirectionClass = -1;
743 static gint ett_p1_MessageClass = -1;
744 static gint ett_p1_SET_OF_Priority = -1;
745 static gint ett_p1_SEQUENCE_OF_Restriction = -1;
746 static gint ett_p1_EncodedInformationTypesConstraints = -1;
747 static gint ett_p1_RestrictedDelivery = -1;
748 static gint ett_p1_Restriction = -1;
749 static gint ett_p1_T_source_type = -1;
750 static gint ett_p1_ExactOrPattern = -1;
751 static gint ett_p1_RegistrationTypes = -1;
752 static gint ett_p1_T_standard_parameters = -1;
753 static gint ett_p1_T_type_extensions = -1;
754 static gint ett_p1_MessageSubmissionEnvelope = -1;
755 static gint ett_p1_PerMessageSubmissionFields = -1;
756 static gint ett_p1_PerRecipientMessageSubmissionFields = -1;
757 static gint ett_p1_ProbeSubmissionEnvelope = -1;
758 static gint ett_p1_PerProbeSubmissionFields = -1;
759 static gint ett_p1_PerRecipientProbeSubmissionFields = -1;
760 static gint ett_p1_MessageDeliveryEnvelope = -1;
761 static gint ett_p1_OtherMessageDeliveryFields = -1;
762 static gint ett_p1_ReportDeliveryEnvelope = -1;
763 static gint ett_p1_PerReportDeliveryFields = -1;
764 static gint ett_p1_PerRecipientReportDeliveryFields = -1;
765 static gint ett_p1_ReportType = -1;
766 static gint ett_p1_DeliveryReport = -1;
767 static gint ett_p1_NonDeliveryReport = -1;
768 static gint ett_p1_ContentTypes = -1;
769 static gint ett_p1_ContentType = -1;
770 static gint ett_p1_DeliveredContentType = -1;
771 static gint ett_p1_PerMessageIndicators_U = -1;
772 static gint ett_p1_OriginatorReportRequest = -1;
773 static gint ett_p1_DeliveryFlags = -1;
774 static gint ett_p1_OtherRecipientNames = -1;
775 static gint ett_p1_ExtensionType = -1;
776 static gint ett_p1_Criticality = -1;
777 static gint ett_p1_ExtensionField = -1;
778 static gint ett_p1_RequestedDeliveryMethod = -1;
779 static gint ett_p1_PhysicalDeliveryModes = -1;
780 static gint ett_p1_ContentCorrelator = -1;
781 static gint ett_p1_RedirectionHistory = -1;
782 static gint ett_p1_Redirection = -1;
783 static gint ett_p1_IntendedRecipientName = -1;
784 static gint ett_p1_DLExpansionHistory = -1;
785 static gint ett_p1_DLExpansion = -1;
786 static gint ett_p1_OriginatorAndDLExpansionHistory = -1;
787 static gint ett_p1_OriginatorAndDLExpansion = -1;
788 static gint ett_p1_PerRecipientReportFields = -1;
789 static gint ett_p1_T_report_type = -1;
790 static gint ett_p1_PerRecipientDeliveryReportFields = -1;
791 static gint ett_p1_PerRecipientNonDeliveryReportFields = -1;
792 static gint ett_p1_ReportingMTAName = -1;
793 static gint ett_p1_ExtendedCertificates = -1;
794 static gint ett_p1_ExtendedCertificate = -1;
795 static gint ett_p1_DLExemptedRecipients = -1;
796 static gint ett_p1_CertificateSelectors = -1;
797 static gint ett_p1_MTSIdentifier_U = -1;
798 static gint ett_p1_GlobalDomainIdentifier_U = -1;
799 static gint ett_p1_PrivateDomainIdentifier = -1;
800 static gint ett_p1_ORName_U = -1;
801 static gint ett_p1_ORAddress = -1;
802 static gint ett_p1_BuiltInStandardAttributes = -1;
803 static gint ett_p1_CountryName_U = -1;
804 static gint ett_p1_AdministrationDomainName_U = -1;
805 static gint ett_p1_PrivateDomainName = -1;
806 static gint ett_p1_PersonalName = -1;
807 static gint ett_p1_OrganizationalUnitNames = -1;
808 static gint ett_p1_BuiltInDomainDefinedAttributes = -1;
809 static gint ett_p1_BuiltInDomainDefinedAttribute = -1;
810 static gint ett_p1_ExtensionAttributes = -1;
811 static gint ett_p1_ExtensionAttribute = -1;
812 static gint ett_p1_TeletexPersonalName = -1;
813 static gint ett_p1_UniversalPersonalName = -1;
814 static gint ett_p1_TeletexOrganizationalUnitNames = -1;
815 static gint ett_p1_UniversalOrganizationalUnitNames = -1;
816 static gint ett_p1_UniversalOrBMPString = -1;
817 static gint ett_p1_T_character_encoding = -1;
818 static gint ett_p1_PhysicalDeliveryCountryName = -1;
819 static gint ett_p1_PostalCode = -1;
820 static gint ett_p1_UnformattedPostalAddress = -1;
821 static gint ett_p1_T_printable_address = -1;
822 static gint ett_p1_PDSParameter = -1;
823 static gint ett_p1_ExtendedNetworkAddress = -1;
824 static gint ett_p1_T_e163_4_address = -1;
825 static gint ett_p1_TeletexDomainDefinedAttributes = -1;
826 static gint ett_p1_TeletexDomainDefinedAttribute = -1;
827 static gint ett_p1_UniversalDomainDefinedAttributes = -1;
828 static gint ett_p1_UniversalDomainDefinedAttribute = -1;
829 static gint ett_p1_EncodedInformationTypes_U = -1;
830 static gint ett_p1_BuiltInEncodedInformationTypes = -1;
831 static gint ett_p1_ExtendedEncodedInformationTypes = -1;
832 static gint ett_p1_NonBasicParameters = -1;
833 static gint ett_p1_G3FacsimileNonBasicParameters = -1;
834 static gint ett_p1_TeletexNonBasicParameters = -1;
835 static gint ett_p1_Token = -1;
836 static gint ett_p1_AsymmetricTokenData = -1;
837 static gint ett_p1_T_name = -1;
838 static gint ett_p1_MTANameAndOptionalGDI = -1;
839 static gint ett_p1_AsymmetricToken = -1;
840 static gint ett_p1_TokenData = -1;
841 static gint ett_p1_MessageTokenSignedData = -1;
842 static gint ett_p1_MessageTokenEncryptedData = -1;
843 static gint ett_p1_SecurityLabel = -1;
844 static gint ett_p1_SecurityCategories = -1;
845 static gint ett_p1_SecurityCategory = -1;
846 static gint ett_p1_SEQUENCE_SIZE_1_ub_recipients_OF_PerRecipientMessageTransferFields = -1;
847 static gint ett_p1_SEQUENCE_SIZE_1_ub_recipients_OF_PerRecipientProbeTransferFields = -1;
848 static gint ett_p1_SEQUENCE_SIZE_1_ub_recipients_OF_PerRecipientReportTransferFields = -1;
849 static gint ett_p1_T_attempted = -1;
850 static gint ett_p1_SEQUENCE_SIZE_1_ub_recipients_OF_PerRecipientReportDeliveryFields = -1;
851 static gint ett_p1_SEQUENCE_SIZE_1_ub_recipients_OF_PerRecipientMessageSubmissionFields = -1;
852 static gint ett_p1_SEQUENCE_SIZE_1_ub_recipients_OF_PerRecipientProbeSubmissionFields = -1;
853
854 /*--- End of included file: packet-p1-ett.c ---*/
855 #line 92 "../../asn1/p1/packet-p1-template.c"
856
857 /* Dissector tables */
858 static dissector_table_t p1_extension_dissector_table;
859 static dissector_table_t p1_extension_attribute_dissector_table;
860 static dissector_table_t p1_tokendata_dissector_table;
861
862
863 /*--- Included file: packet-p1-table.c ---*/
864 #line 1 "../../asn1/p1/packet-p1-table.c"
865
866 /* P3 ABSTRACT-OPERATIONS */
867 const value_string p3_opr_code_string_vals[] = {
868         { op_ros_bind, "mts_bind" },
869         { op_message_submission, "message_submission" },
870         { op_probe_submission, "probe_submission" },
871         { op_cancel_deferred_delivery, "cancel_deferred_delivery" },
872         { op_submission_control, "submission_control" },
873         { op_message_delivery, "message_delivery" },
874         { op_report_delivery, "report_delivery" },
875         { op_delivery_control, "delivery_control" },
876         { op_register, "register" },
877         { op_change_credentials, "change_credentials" },
878         { 0, NULL }
879 };
880
881
882 /* P3 ERRORS */
883 static const value_string p3_err_code_string_vals[] = {
884         { err_ros_bind, "mts_bind_error" },  
885         { err_submission_control_violated, "submission_control_violated" },  
886         { err_element_of_service_not_subscribed, "element_of_service_not_subscribed" },  
887         { err_deferred_delivery_cancellation_rejected, "deferred_delivery_cancellation_rejected" },  
888         { err_originator_invalid, "originator_invalid" },  
889         { err_recipient_improperly_specified, "recipient_improperly_specified" },  
890         { err_message_submission_identifier_invalid, "message_submission_identifier_invalid" },  
891         { err_inconsistent_request, "inconsistent_request" },  
892         { err_security_error, "security_error" },  
893         { err_unsupported_critical_function, "unsupported_critical_function" },  
894         { err_remote_bind_error, "remote_bind_error" },  
895         { err_delivery_control_violated, "delivery_control_violated" },  
896         { err_control_violates_registration, "control_violates_registration" },  
897         { err_operation_refused, "operation_refused" },  
898         { err_register_rejected, "register_rejected" },  
899         { err_new_credentials_unacceptable, "new_credentials_unacceptable" },  
900         { err_old_credentials_incorrectly_specified, "old_credentials_incorrectly_specified" },  
901           { 0, NULL }
902 };
903
904
905 /*--- End of included file: packet-p1-table.c ---*/
906 #line 99 "../../asn1/p1/packet-p1-template.c"
907
908
909 /*--- Included file: packet-p1-fn.c ---*/
910 #line 1 "../../asn1/p1/packet-p1-fn.c"
911
912
913 static int
914 dissect_p1_NULL(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
915   offset = dissect_ber_null(implicit_tag, actx, tree, tvb, offset, hf_index);
916
917   return offset;
918 }
919
920
921
922 static int
923 dissect_p1_MTAName(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
924 #line 682 "../../asn1/p1/p1.cnf"
925         tvbuff_t        *mtaname = NULL;
926
927           offset = dissect_ber_constrained_restricted_string(implicit_tag, BER_UNI_TAG_IA5String,
928                                                         actx, tree, tvb, offset,
929                                                         1, ub_mta_name_length, hf_index, &mtaname);
930
931
932         if(doing_address) {
933
934                 proto_item_append_text(address_item, " %s", tvb_format_text(mtaname, 0, tvb_length(mtaname)));
935
936         } else {
937
938         if (check_col(actx->pinfo->cinfo, COL_INFO) && mtaname) {
939                 col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %s", tvb_format_text(mtaname, 0, tvb_length(mtaname)));
940         }
941
942         }
943
944
945
946   return offset;
947 }
948
949
950
951 static int
952 dissect_p1_IA5String_SIZE_0_ub_password_length(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
953   offset = dissect_ber_constrained_restricted_string(implicit_tag, BER_UNI_TAG_IA5String,
954                                                         actx, tree, tvb, offset,
955                                                         0, ub_password_length, hf_index, NULL);
956
957   return offset;
958 }
959
960
961
962 static int
963 dissect_p1_OCTET_STRING_SIZE_0_ub_password_length(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
964   offset = dissect_ber_constrained_octet_string(implicit_tag, actx, tree, tvb, offset,
965                                                    0, ub_password_length, hf_index, NULL);
966
967   return offset;
968 }
969
970
971 static const value_string p1_Password_vals[] = {
972   {   0, "ia5-string" },
973   {   1, "octet-string" },
974   { 0, NULL }
975 };
976
977 static const ber_choice_t Password_choice[] = {
978   {   0, &hf_p1_ia5_string       , BER_CLASS_UNI, BER_UNI_TAG_IA5String, BER_FLAGS_NOOWNTAG, dissect_p1_IA5String_SIZE_0_ub_password_length },
979   {   1, &hf_p1_octet_string     , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_p1_OCTET_STRING_SIZE_0_ub_password_length },
980   { 0, NULL, 0, 0, 0, NULL }
981 };
982
983 static int
984 dissect_p1_Password(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
985   offset = dissect_ber_choice(actx, tree, tvb, offset,
986                                  Password_choice, hf_index, ett_p1_Password,
987                                  NULL);
988
989   return offset;
990 }
991
992
993
994 static int
995 dissect_p1_TokenTypeIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
996   offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_index, &object_identifier_id);
997
998   return offset;
999 }
1000
1001
1002
1003 static int
1004 dissect_p1_TokenTypeData(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1005 #line 1216 "../../asn1/p1/p1.cnf"
1006         
1007         if(object_identifier_id) 
1008            call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree);
1009
1010
1011
1012   return offset;
1013 }
1014
1015
1016 static const ber_sequence_t Token_sequence[] = {
1017   { &hf_p1_token_type_identifier, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_p1_TokenTypeIdentifier },
1018   { &hf_p1_token            , BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_p1_TokenTypeData },
1019   { NULL, 0, 0, 0, NULL }
1020 };
1021
1022 static int
1023 dissect_p1_Token(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1024   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
1025                                    Token_sequence, hf_index, ett_p1_Token);
1026
1027   return offset;
1028 }
1029
1030
1031 static const ber_sequence_t StrongCredentials_set[] = {
1032   { &hf_p1_bind_token       , BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_p1_Token },
1033   { &hf_p1_certificate      , BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_x509af_Certificates },
1034   { &hf_p1_certificate_selector, BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_x509ce_CertificateAssertion },
1035   { NULL, 0, 0, 0, NULL }
1036 };
1037
1038 static int
1039 dissect_p1_StrongCredentials(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1040   offset = dissect_ber_set(implicit_tag, actx, tree, tvb, offset,
1041                               StrongCredentials_set, hf_index, ett_p1_StrongCredentials);
1042
1043   return offset;
1044 }
1045
1046
1047
1048 static int
1049 dissect_p1_BIT_STRING(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1050   offset = dissect_ber_bitstring(implicit_tag, actx, tree, tvb, offset,
1051                                     NULL, hf_index, -1,
1052                                     NULL);
1053
1054   return offset;
1055 }
1056
1057
1058 static const ber_sequence_t Signature_sequence[] = {
1059   { &hf_p1_algorithmIdentifier, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_x509af_AlgorithmIdentifier },
1060   { &hf_p1_encrypted        , BER_CLASS_UNI, BER_UNI_TAG_BITSTRING, BER_FLAGS_NOOWNTAG, dissect_p1_BIT_STRING },
1061   { NULL, 0, 0, 0, NULL }
1062 };
1063
1064 static int
1065 dissect_p1_Signature(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1066   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
1067                                    Signature_sequence, hf_index, ett_p1_Signature);
1068
1069   return offset;
1070 }
1071
1072
1073
1074 static int
1075 dissect_p1_UTCTime(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1076   offset = dissect_ber_UTCTime(implicit_tag, actx, tree, tvb, offset, hf_index);
1077
1078   return offset;
1079 }
1080
1081
1082 static const ber_sequence_t ProtectedPassword_set[] = {
1083   { &hf_p1_signature        , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_p1_Signature },
1084   { &hf_p1_time1            , BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_p1_UTCTime },
1085   { &hf_p1_time2            , BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_p1_UTCTime },
1086   { &hf_p1_random1          , BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_p1_BIT_STRING },
1087   { &hf_p1_random2          , BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_p1_BIT_STRING },
1088   { NULL, 0, 0, 0, NULL }
1089 };
1090
1091 static int
1092 dissect_p1_ProtectedPassword(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1093   offset = dissect_ber_set(implicit_tag, actx, tree, tvb, offset,
1094                               ProtectedPassword_set, hf_index, ett_p1_ProtectedPassword);
1095
1096   return offset;
1097 }
1098
1099
1100 const value_string p1_Credentials_vals[] = {
1101   {   0, "simple" },
1102   {   1, "strong" },
1103   {   2, "protected" },
1104   { 0, NULL }
1105 };
1106
1107 static const ber_choice_t Credentials_choice[] = {
1108   {   0, &hf_p1_simple           , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG, dissect_p1_Password },
1109   {   1, &hf_p1_strong           , BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_p1_StrongCredentials },
1110   {   2, &hf_p1_protected        , BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_p1_ProtectedPassword },
1111   { 0, NULL, 0, 0, 0, NULL }
1112 };
1113
1114 int
1115 dissect_p1_Credentials(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1116 #line 1224 "../../asn1/p1/p1.cnf"
1117   gint credentials = -1;
1118
1119     offset = dissect_ber_choice(actx, tree, tvb, offset,
1120                                  Credentials_choice, hf_index, ett_p1_Credentials,
1121                                  &credentials);
1122
1123
1124   if( (credentials!=-1) && p1_Credentials_vals[credentials].strptr ){
1125     if (check_col(actx->pinfo->cinfo, COL_INFO)) {
1126       col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %s", p1_Credentials_vals[credentials].strptr);
1127     }
1128   }
1129
1130
1131
1132   return offset;
1133 }
1134
1135
1136
1137 int
1138 dissect_p1_InitiatorCredentials(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1139   offset = dissect_p1_Credentials(implicit_tag, tvb, offset, actx, tree, hf_index);
1140
1141   return offset;
1142 }
1143
1144
1145
1146 static int
1147 dissect_p1_SecurityPolicyIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1148   offset = dissect_ber_object_identifier(implicit_tag, actx, tree, tvb, offset, hf_index, NULL);
1149
1150   return offset;
1151 }
1152
1153
1154 static const value_string p1_SecurityClassification_vals[] = {
1155   {   0, "unmarked" },
1156   {   1, "unclassified" },
1157   {   2, "restricted" },
1158   {   3, "confidential" },
1159   {   4, "secret" },
1160   {   5, "top-secret" },
1161   { 0, NULL }
1162 };
1163
1164
1165 static int
1166 dissect_p1_SecurityClassification(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1167   offset = dissect_ber_constrained_integer(implicit_tag, actx, tree, tvb, offset,
1168                                                             0U, ub_integer_options, hf_index, NULL);
1169
1170   return offset;
1171 }
1172
1173
1174
1175 static int
1176 dissect_p1_PrivacyMark(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1177   offset = dissect_ber_constrained_restricted_string(implicit_tag, BER_UNI_TAG_PrintableString,
1178                                                         actx, tree, tvb, offset,
1179                                                         1, ub_privacy_mark_length, hf_index, NULL);
1180
1181   return offset;
1182 }
1183
1184
1185
1186 static int
1187 dissect_p1_SecurityCategoryIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1188   offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_index, &object_identifier_id);
1189
1190   return offset;
1191 }
1192
1193
1194
1195 static int
1196 dissect_p1_SecurityCategoryValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1197 #line 562 "../../asn1/p1/p1.cnf"
1198         const char *name;
1199
1200         if (object_identifier_id) {
1201                 offset = call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree);
1202                 name = oid_resolved_from_string(object_identifier_id);
1203                 proto_item_append_text(tree, " (%s)", name ? name : object_identifier_id); 
1204         } else {
1205                 offset = dissect_unknown_ber(actx->pinfo, tvb, offset, tree);
1206         }
1207
1208
1209
1210   return offset;
1211 }
1212
1213
1214
1215 static int
1216 dissect_p1_CategoryValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1217   offset = dissect_p1_SecurityCategoryValue(implicit_tag, tvb, offset, actx, tree, hf_index);
1218
1219   return offset;
1220 }
1221
1222
1223 static const ber_sequence_t SecurityCategory_sequence[] = {
1224   { &hf_p1_category_type    , BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_p1_SecurityCategoryIdentifier },
1225   { &hf_p1_category_value   , BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_p1_CategoryValue },
1226   { NULL, 0, 0, 0, NULL }
1227 };
1228
1229 static int
1230 dissect_p1_SecurityCategory(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1231   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
1232                                    SecurityCategory_sequence, hf_index, ett_p1_SecurityCategory);
1233
1234   return offset;
1235 }
1236
1237
1238 static const ber_sequence_t SecurityCategories_set_of[1] = {
1239   { &hf_p1_SecurityCategories_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_p1_SecurityCategory },
1240 };
1241
1242 static int
1243 dissect_p1_SecurityCategories(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1244   offset = dissect_ber_constrained_set_of(implicit_tag, actx, tree, tvb, offset,
1245                                              1, ub_security_categories, SecurityCategories_set_of, hf_index, ett_p1_SecurityCategories);
1246
1247   return offset;
1248 }
1249
1250
1251 static const ber_sequence_t SecurityLabel_set[] = {
1252   { &hf_p1_security_policy_identifier, BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_p1_SecurityPolicyIdentifier },
1253   { &hf_p1_security_classification, BER_CLASS_UNI, BER_UNI_TAG_INTEGER, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_p1_SecurityClassification },
1254   { &hf_p1_privacy_mark     , BER_CLASS_UNI, BER_UNI_TAG_PrintableString, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_p1_PrivacyMark },
1255   { &hf_p1_security_categories, BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_p1_SecurityCategories },
1256   { NULL, 0, 0, 0, NULL }
1257 };
1258
1259 int
1260 dissect_p1_SecurityLabel(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1261   offset = dissect_ber_set(implicit_tag, actx, tree, tvb, offset,
1262                               SecurityLabel_set, hf_index, ett_p1_SecurityLabel);
1263
1264   return offset;
1265 }
1266
1267
1268 static const ber_sequence_t SecurityContext_set_of[1] = {
1269   { &hf_p1_SecurityContext_item, BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_p1_SecurityLabel },
1270 };
1271
1272 int
1273 dissect_p1_SecurityContext(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1274   offset = dissect_ber_constrained_set_of(implicit_tag, actx, tree, tvb, offset,
1275                                              1, ub_security_labels, SecurityContext_set_of, hf_index, ett_p1_SecurityContext);
1276
1277   return offset;
1278 }
1279
1280
1281 static const ber_sequence_t AuthenticatedArgument_set[] = {
1282   { &hf_p1_authenticated_initiator_name, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_p1_MTAName },
1283   { &hf_p1_initiator_credentials, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG|BER_FLAGS_NOTCHKTAG, dissect_p1_InitiatorCredentials },
1284   { &hf_p1_security_context , BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_p1_SecurityContext },
1285   { NULL, 0, 0, 0, NULL }
1286 };
1287
1288 static int
1289 dissect_p1_AuthenticatedArgument(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1290   offset = dissect_ber_set(implicit_tag, actx, tree, tvb, offset,
1291                               AuthenticatedArgument_set, hf_index, ett_p1_AuthenticatedArgument);
1292
1293   return offset;
1294 }
1295
1296
1297 static const value_string p1_MTABindArgument_vals[] = {
1298   {   0, "unauthenticated" },
1299   {   1, "authenticated" },
1300   { 0, NULL }
1301 };
1302
1303 static const ber_choice_t MTABindArgument_choice[] = {
1304   {   0, &hf_p1_unauthenticated  , BER_CLASS_UNI, BER_UNI_TAG_NULL, BER_FLAGS_NOOWNTAG, dissect_p1_NULL },
1305   {   1, &hf_p1_authenticated_argument, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_p1_AuthenticatedArgument },
1306   { 0, NULL, 0, 0, 0, NULL }
1307 };
1308
1309 static int
1310 dissect_p1_MTABindArgument(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1311   offset = dissect_ber_choice(actx, tree, tvb, offset,
1312                                  MTABindArgument_choice, hf_index, ett_p1_MTABindArgument,
1313                                  NULL);
1314
1315   return offset;
1316 }
1317
1318
1319
1320 int
1321 dissect_p1_ResponderCredentials(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1322   offset = dissect_p1_Credentials(implicit_tag, tvb, offset, actx, tree, hf_index);
1323
1324   return offset;
1325 }
1326
1327
1328 static const ber_sequence_t AuthenticatedResult_set[] = {
1329   { &hf_p1_authenticated_responder_name, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_p1_MTAName },
1330   { &hf_p1_responder_credentials, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG|BER_FLAGS_NOTCHKTAG, dissect_p1_ResponderCredentials },
1331   { NULL, 0, 0, 0, NULL }
1332 };
1333
1334 static int
1335 dissect_p1_AuthenticatedResult(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1336   offset = dissect_ber_set(implicit_tag, actx, tree, tvb, offset,
1337                               AuthenticatedResult_set, hf_index, ett_p1_AuthenticatedResult);
1338
1339   return offset;
1340 }
1341
1342
1343 static const value_string p1_MTABindResult_vals[] = {
1344   {   0, "unauthenticated" },
1345   {   1, "authenticated" },
1346   { 0, NULL }
1347 };
1348
1349 static const ber_choice_t MTABindResult_choice[] = {
1350   {   0, &hf_p1_unauthenticated  , BER_CLASS_UNI, BER_UNI_TAG_NULL, BER_FLAGS_NOOWNTAG, dissect_p1_NULL },
1351   {   1, &hf_p1_authenticated_result, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_p1_AuthenticatedResult },
1352   { 0, NULL, 0, 0, 0, NULL }
1353 };
1354
1355 static int
1356 dissect_p1_MTABindResult(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1357   offset = dissect_ber_choice(actx, tree, tvb, offset,
1358                                  MTABindResult_choice, hf_index, ett_p1_MTABindResult,
1359                                  NULL);
1360
1361   return offset;
1362 }
1363
1364
1365 static const value_string p1_MTABindError_vals[] = {
1366   {   0, "busy" },
1367   {   2, "authentication-error" },
1368   {   3, "unacceptable-dialogue-mode" },
1369   {   4, "unacceptable-security-context" },
1370   {   5, "inadequate-association-confidentiality" },
1371   { 0, NULL }
1372 };
1373
1374
1375 static int
1376 dissect_p1_MTABindError(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1377 #line 1207 "../../asn1/p1/p1.cnf"
1378   int error = -1;
1379     offset = dissect_ber_constrained_integer(implicit_tag, actx, tree, tvb, offset,
1380                                                             0U, ub_integer_options, hf_index, &error);
1381
1382   if((error != -1) && check_col(actx->pinfo->cinfo, COL_INFO))
1383     col_append_fstr(actx->pinfo->cinfo, COL_INFO, " (%s)", val_to_str(error, p1_MTABindError_vals, "error(%d)"));
1384
1385
1386
1387   return offset;
1388 }
1389
1390
1391
1392 static int
1393 dissect_p1_T_x121_dcc_code(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1394 #line 866 "../../asn1/p1/p1.cnf"
1395         tvbuff_t        *nstring = NULL;
1396
1397           offset = dissect_ber_constrained_restricted_string(implicit_tag, BER_UNI_TAG_NumericString,
1398                                                         actx, tree, tvb, offset,
1399                                                         ub_country_name_numeric_length, ub_country_name_numeric_length, hf_index, &nstring);
1400
1401
1402         if(doing_address && nstring)
1403                 g_strlcat(oraddress, tvb_format_text(nstring, 0, tvb_length(nstring)), MAX_ORA_STR_LEN);
1404
1405
1406
1407   return offset;
1408 }
1409
1410
1411
1412 static int
1413 dissect_p1_T_iso_3166_alpha2_code(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1414 #line 818 "../../asn1/p1/p1.cnf"
1415         tvbuff_t        *nstring = NULL;
1416
1417           offset = dissect_ber_constrained_restricted_string(implicit_tag, BER_UNI_TAG_PrintableString,
1418                                                         actx, tree, tvb, offset,
1419                                                         ub_country_name_alpha_length, ub_country_name_alpha_length, hf_index, &nstring);
1420
1421
1422         if(doing_address && nstring)
1423                 g_strlcat(oraddress, tvb_format_text(nstring, 0, tvb_length(nstring)), MAX_ORA_STR_LEN);
1424
1425
1426
1427   return offset;
1428 }
1429
1430
1431 static const value_string p1_CountryName_U_vals[] = {
1432   {   0, "x121-dcc-code" },
1433   {   1, "iso-3166-alpha2-code" },
1434   { 0, NULL }
1435 };
1436
1437 static const ber_choice_t CountryName_U_choice[] = {
1438   {   0, &hf_p1_x121_dcc_code    , BER_CLASS_UNI, BER_UNI_TAG_NumericString, BER_FLAGS_NOOWNTAG, dissect_p1_T_x121_dcc_code },
1439   {   1, &hf_p1_iso_3166_alpha2_code, BER_CLASS_UNI, BER_UNI_TAG_PrintableString, BER_FLAGS_NOOWNTAG, dissect_p1_T_iso_3166_alpha2_code },
1440   { 0, NULL, 0, 0, 0, NULL }
1441 };
1442
1443 static int
1444 dissect_p1_CountryName_U(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1445   offset = dissect_ber_choice(actx, tree, tvb, offset,
1446                                  CountryName_U_choice, hf_index, ett_p1_CountryName_U,
1447                                  NULL);
1448
1449   return offset;
1450 }
1451
1452
1453
1454 static int
1455 dissect_p1_CountryName(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1456 #line 596 "../../asn1/p1/p1.cnf"
1457  if(doing_address)
1458     g_strlcat(oraddress, "/C=", MAX_ORA_STR_LEN);
1459  
1460    offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
1461                                       hf_index, BER_CLASS_APP, 1, TRUE, dissect_p1_CountryName_U);
1462
1463
1464
1465
1466
1467   return offset;
1468 }
1469
1470
1471
1472 static int
1473 dissect_p1_T_numeric(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1474 #line 874 "../../asn1/p1/p1.cnf"
1475         tvbuff_t        *nstring = NULL;
1476
1477           offset = dissect_ber_constrained_restricted_string(implicit_tag, BER_UNI_TAG_NumericString,
1478                                                         actx, tree, tvb, offset,
1479                                                         0, ub_domain_name_length, hf_index, &nstring);
1480
1481
1482         if(doing_address && nstring)
1483                 g_strlcat(oraddress, tvb_format_text(nstring, 0, tvb_length(nstring)), MAX_ORA_STR_LEN);
1484
1485
1486
1487   return offset;
1488 }
1489
1490
1491
1492 static int
1493 dissect_p1_T_printable(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1494 #line 826 "../../asn1/p1/p1.cnf"
1495         tvbuff_t        *nstring = NULL;
1496
1497           offset = dissect_ber_constrained_restricted_string(implicit_tag, BER_UNI_TAG_PrintableString,
1498                                                         actx, tree, tvb, offset,
1499                                                         0, ub_domain_name_length, hf_index, &nstring);
1500
1501
1502         if(doing_address && nstring)
1503                 g_strlcat(oraddress, tvb_format_text(nstring, 0, tvb_length(nstring)), MAX_ORA_STR_LEN);
1504
1505
1506
1507   return offset;
1508 }
1509
1510
1511 static const value_string p1_AdministrationDomainName_U_vals[] = {
1512   {   0, "numeric" },
1513   {   1, "printable" },
1514   { 0, NULL }
1515 };
1516
1517 static const ber_choice_t AdministrationDomainName_U_choice[] = {
1518   {   0, &hf_p1_numeric          , BER_CLASS_UNI, BER_UNI_TAG_NumericString, BER_FLAGS_NOOWNTAG, dissect_p1_T_numeric },
1519   {   1, &hf_p1_printable        , BER_CLASS_UNI, BER_UNI_TAG_PrintableString, BER_FLAGS_NOOWNTAG, dissect_p1_T_printable },
1520   { 0, NULL, 0, 0, 0, NULL }
1521 };
1522
1523 static int
1524 dissect_p1_AdministrationDomainName_U(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1525   offset = dissect_ber_choice(actx, tree, tvb, offset,
1526                                  AdministrationDomainName_U_choice, hf_index, ett_p1_AdministrationDomainName_U,
1527                                  NULL);
1528
1529   return offset;
1530 }
1531
1532
1533
1534 static int
1535 dissect_p1_AdministrationDomainName(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1536 #line 603 "../../asn1/p1/p1.cnf"
1537   if(doing_address)
1538     g_strlcat(oraddress, "/A=", MAX_ORA_STR_LEN);
1539
1540    offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
1541                                       hf_index, BER_CLASS_APP, 2, TRUE, dissect_p1_AdministrationDomainName_U);
1542
1543
1544
1545
1546
1547   return offset;
1548 }
1549
1550
1551
1552 static int
1553 dissect_p1_T_numeric_private_domain_identifier(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1554 #line 890 "../../asn1/p1/p1.cnf"
1555         tvbuff_t        *nstring = NULL;
1556
1557           offset = dissect_ber_constrained_restricted_string(implicit_tag, BER_UNI_TAG_NumericString,
1558                                                         actx, tree, tvb, offset,
1559                                                         1, ub_domain_name_length, hf_index, &nstring);
1560
1561
1562         if(doing_address && nstring)
1563                 g_strlcat(oraddress, tvb_format_text(nstring, 0, tvb_length(nstring)), MAX_ORA_STR_LEN);
1564
1565
1566
1567   return offset;
1568 }
1569
1570
1571
1572 static int
1573 dissect_p1_T_printable_private_domain_identifier(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1574 #line 842 "../../asn1/p1/p1.cnf"
1575         tvbuff_t        *nstring = NULL;
1576
1577           offset = dissect_ber_constrained_restricted_string(implicit_tag, BER_UNI_TAG_PrintableString,
1578                                                         actx, tree, tvb, offset,
1579                                                         1, ub_domain_name_length, hf_index, &nstring);
1580
1581
1582         if(doing_address && nstring)
1583                 g_strlcat(oraddress, tvb_format_text(nstring, 0, tvb_length(nstring)), MAX_ORA_STR_LEN);
1584
1585
1586
1587   return offset;
1588 }
1589
1590
1591 static const value_string p1_PrivateDomainIdentifier_vals[] = {
1592   {   0, "numeric" },
1593   {   1, "printable" },
1594   { 0, NULL }
1595 };
1596
1597 static const ber_choice_t PrivateDomainIdentifier_choice[] = {
1598   {   0, &hf_p1_numeric_private_domain_identifier, BER_CLASS_UNI, BER_UNI_TAG_NumericString, BER_FLAGS_NOOWNTAG, dissect_p1_T_numeric_private_domain_identifier },
1599   {   1, &hf_p1_printable_private_domain_identifier, BER_CLASS_UNI, BER_UNI_TAG_PrintableString, BER_FLAGS_NOOWNTAG, dissect_p1_T_printable_private_domain_identifier },
1600   { 0, NULL, 0, 0, 0, NULL }
1601 };
1602
1603 static int
1604 dissect_p1_PrivateDomainIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1605 #line 733 "../../asn1/p1/p1.cnf"
1606
1607         if(doing_address)
1608                 g_strlcat(oraddress, "/P=", MAX_ORA_STR_LEN);
1609
1610           offset = dissect_ber_choice(actx, tree, tvb, offset,
1611                                  PrivateDomainIdentifier_choice, hf_index, ett_p1_PrivateDomainIdentifier,
1612                                  NULL);
1613
1614
1615
1616
1617   return offset;
1618 }
1619
1620
1621 static const ber_sequence_t GlobalDomainIdentifier_U_sequence[] = {
1622   { &hf_p1_country_name     , BER_CLASS_APP, 1, BER_FLAGS_NOOWNTAG, dissect_p1_CountryName },
1623   { &hf_p1_administration_domain_name, BER_CLASS_APP, 2, BER_FLAGS_NOOWNTAG, dissect_p1_AdministrationDomainName },
1624   { &hf_p1_private_domain_identifier, BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_p1_PrivateDomainIdentifier },
1625   { NULL, 0, 0, 0, NULL }
1626 };
1627
1628 static int
1629 dissect_p1_GlobalDomainIdentifier_U(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1630   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
1631                                    GlobalDomainIdentifier_U_sequence, hf_index, ett_p1_GlobalDomainIdentifier_U);
1632
1633   return offset;
1634 }
1635
1636
1637
1638 static int
1639 dissect_p1_GlobalDomainIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1640 #line 1087 "../../asn1/p1/p1.cnf"
1641         
1642         oraddress = (char *)ep_alloc(MAX_ORA_STR_LEN); oraddress[0] = '\0';     
1643         address_item = tree;
1644
1645           offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
1646                                       hf_index, BER_CLASS_APP, 3, TRUE, dissect_p1_GlobalDomainIdentifier_U);
1647
1648
1649         if(*oraddress) {
1650                 proto_item_append_text(address_item, " (%s/", oraddress);
1651
1652                 if(doing_subjectid  && check_col(actx->pinfo->cinfo, COL_INFO)) {
1653                         col_append_fstr(actx->pinfo->cinfo, COL_INFO, " (%s/", oraddress);
1654                 }
1655         }
1656
1657
1658
1659
1660   return offset;
1661 }
1662
1663
1664
1665 static int
1666 dissect_p1_LocalIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1667 #line 1106 "../../asn1/p1/p1.cnf"
1668         tvbuff_t        *id = NULL;
1669         
1670           offset = dissect_ber_constrained_restricted_string(implicit_tag, BER_UNI_TAG_IA5String,
1671                                                         actx, tree, tvb, offset,
1672                                                         1, ub_local_id_length, hf_index, &id);
1673
1674         
1675         if(id) {
1676           if(doing_address) 
1677                   proto_item_append_text(address_item, " $ %s)", tvb_format_text(id, 0, tvb_length(id)));
1678
1679           if(doing_subjectid  && check_col(actx->pinfo->cinfo, COL_INFO)) 
1680                 col_append_fstr(actx->pinfo->cinfo, COL_INFO, " $ %s)", tvb_format_text(id, 0, tvb_length(id)));
1681         }
1682
1683
1684
1685   return offset;
1686 }
1687
1688
1689 static const ber_sequence_t MTSIdentifier_U_sequence[] = {
1690   { &hf_p1_global_domain_identifier, BER_CLASS_APP, 3, BER_FLAGS_NOOWNTAG, dissect_p1_GlobalDomainIdentifier },
1691   { &hf_p1_local_identifier , BER_CLASS_UNI, BER_UNI_TAG_IA5String, BER_FLAGS_NOOWNTAG, dissect_p1_LocalIdentifier },
1692   { NULL, 0, 0, 0, NULL }
1693 };
1694
1695 static int
1696 dissect_p1_MTSIdentifier_U(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1697   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
1698                                    MTSIdentifier_U_sequence, hf_index, ett_p1_MTSIdentifier_U);
1699
1700   return offset;
1701 }
1702
1703
1704
1705 static int
1706 dissect_p1_MTSIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1707 #line 1119 "../../asn1/p1/p1.cnf"
1708
1709         doing_address = TRUE;
1710
1711         if(hf_index == hf_p1_subject_identifier)
1712                 doing_subjectid = TRUE;
1713
1714           offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
1715                                       hf_index, BER_CLASS_APP, 4, TRUE, dissect_p1_MTSIdentifier_U);
1716
1717
1718         doing_address = FALSE;
1719
1720         if(hf_index == hf_p1_subject_identifier)
1721                 doing_subjectid = FALSE;
1722
1723
1724
1725
1726   return offset;
1727 }
1728
1729
1730
1731 static int
1732 dissect_p1_MessageIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1733 #line 1081 "../../asn1/p1/p1.cnf"
1734
1735         address_item = NULL;
1736
1737           offset = dissect_p1_MTSIdentifier(implicit_tag, tvb, offset, actx, tree, hf_index);
1738
1739
1740
1741
1742   return offset;
1743 }
1744
1745
1746
1747 static int
1748 dissect_p1_X121Address(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1749 #line 702 "../../asn1/p1/p1.cnf"
1750         tvbuff_t        *string = NULL;
1751
1752           offset = dissect_ber_constrained_restricted_string(implicit_tag, BER_UNI_TAG_NumericString,
1753                                                         actx, tree, tvb, offset,
1754                                                         1, ub_x121_address_length, hf_index, &string);
1755
1756
1757         if(doing_address && string) {
1758                 g_strlcat(oraddress, "/X121=", MAX_ORA_STR_LEN);
1759                 g_strlcat(oraddress, tvb_format_text(string, 0, tvb_length(string)), MAX_ORA_STR_LEN);
1760         }
1761
1762
1763
1764
1765   return offset;
1766 }
1767
1768
1769
1770 static int
1771 dissect_p1_NetworkAddress(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1772   offset = dissect_p1_X121Address(implicit_tag, tvb, offset, actx, tree, hf_index);
1773
1774   return offset;
1775 }
1776
1777
1778
1779 static int
1780 dissect_p1_TerminalIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1781 #line 716 "../../asn1/p1/p1.cnf"
1782         tvbuff_t        *string = NULL;
1783
1784           offset = dissect_ber_constrained_restricted_string(implicit_tag, BER_UNI_TAG_PrintableString,
1785                                                         actx, tree, tvb, offset,
1786                                                         1, ub_terminal_id_length, hf_index, &string);
1787
1788
1789         if(doing_address && string) {
1790                 g_strlcat(oraddress, "/UA-ID=", MAX_ORA_STR_LEN);
1791                 g_strlcat(oraddress, tvb_format_text(string, 0, tvb_length(string)), MAX_ORA_STR_LEN);
1792         }
1793
1794
1795
1796   return offset;
1797 }
1798
1799
1800
1801 static int
1802 dissect_p1_T_numeric_private_domain_name(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1803 #line 882 "../../asn1/p1/p1.cnf"
1804         tvbuff_t        *nstring = NULL;
1805
1806           offset = dissect_ber_constrained_restricted_string(implicit_tag, BER_UNI_TAG_NumericString,
1807                                                         actx, tree, tvb, offset,
1808                                                         1, ub_domain_name_length, hf_index, &nstring);
1809
1810
1811         if(doing_address && nstring)
1812                 g_strlcat(oraddress, tvb_format_text(nstring, 0, tvb_length(nstring)), MAX_ORA_STR_LEN);
1813
1814
1815
1816   return offset;
1817 }
1818
1819
1820
1821 static int
1822 dissect_p1_T_printable_private_domain_name(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1823 #line 834 "../../asn1/p1/p1.cnf"
1824         tvbuff_t        *nstring = NULL;
1825
1826           offset = dissect_ber_constrained_restricted_string(implicit_tag, BER_UNI_TAG_PrintableString,
1827                                                         actx, tree, tvb, offset,
1828                                                         1, ub_domain_name_length, hf_index, &nstring);
1829
1830
1831         if(doing_address && nstring)
1832                 g_strlcat(oraddress, tvb_format_text(nstring, 0, tvb_length(nstring)), MAX_ORA_STR_LEN);
1833
1834
1835
1836   return offset;
1837 }
1838
1839
1840 static const value_string p1_PrivateDomainName_vals[] = {
1841   {   0, "numeric" },
1842   {   1, "printable" },
1843   { 0, NULL }
1844 };
1845
1846 static const ber_choice_t PrivateDomainName_choice[] = {
1847   {   0, &hf_p1_numeric_private_domain_name, BER_CLASS_UNI, BER_UNI_TAG_NumericString, BER_FLAGS_NOOWNTAG, dissect_p1_T_numeric_private_domain_name },
1848   {   1, &hf_p1_printable_private_domain_name, BER_CLASS_UNI, BER_UNI_TAG_PrintableString, BER_FLAGS_NOOWNTAG, dissect_p1_T_printable_private_domain_name },
1849   { 0, NULL, 0, 0, 0, NULL }
1850 };
1851
1852 static int
1853 dissect_p1_PrivateDomainName(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1854 #line 726 "../../asn1/p1/p1.cnf"
1855
1856         if(doing_address)
1857                 g_strlcat(oraddress, "/P=", MAX_ORA_STR_LEN);
1858
1859           offset = dissect_ber_choice(actx, tree, tvb, offset,
1860                                  PrivateDomainName_choice, hf_index, ett_p1_PrivateDomainName,
1861                                  NULL);
1862
1863
1864
1865
1866   return offset;
1867 }
1868
1869
1870
1871 static int
1872 dissect_p1_OrganizationName(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1873 #line 743 "../../asn1/p1/p1.cnf"
1874         tvbuff_t        *string = NULL;
1875
1876           offset = dissect_ber_constrained_restricted_string(implicit_tag, BER_UNI_TAG_PrintableString,
1877                                                         actx, tree, tvb, offset,
1878                                                         1, ub_organization_name_length, hf_index, &string);
1879
1880
1881         if(doing_address && string) {
1882                 g_strlcat(oraddress, "/O=", MAX_ORA_STR_LEN);
1883                 g_strlcat(oraddress, tvb_format_text(string, 0, tvb_length(string)), MAX_ORA_STR_LEN);
1884         }
1885
1886
1887
1888   return offset;
1889 }
1890
1891
1892
1893 static int
1894 dissect_p1_NumericUserIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1895   offset = dissect_ber_constrained_restricted_string(implicit_tag, BER_UNI_TAG_NumericString,
1896                                                         actx, tree, tvb, offset,
1897                                                         1, ub_numeric_user_id_length, hf_index, NULL);
1898
1899   return offset;
1900 }
1901
1902
1903
1904 static int
1905 dissect_p1_T_printable_surname(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1906 #line 946 "../../asn1/p1/p1.cnf"
1907         tvbuff_t        *pstring = NULL;
1908
1909           offset = dissect_ber_constrained_restricted_string(implicit_tag, BER_UNI_TAG_PrintableString,
1910                                                         actx, tree, tvb, offset,
1911                                                         1, ub_surname_length, hf_index, &pstring);
1912
1913
1914         if(doing_address && pstring) {
1915             g_strlcat(oraddress, "/S=", MAX_ORA_STR_LEN);
1916           g_strlcat(oraddress, tvb_format_text(pstring, 0, tvb_length(pstring)), MAX_ORA_STR_LEN);
1917         }
1918
1919
1920
1921   return offset;
1922 }
1923
1924
1925
1926 static int
1927 dissect_p1_T_printable_given_name(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1928 #line 956 "../../asn1/p1/p1.cnf"
1929         tvbuff_t        *pstring = NULL;
1930
1931           offset = dissect_ber_constrained_restricted_string(implicit_tag, BER_UNI_TAG_PrintableString,
1932                                                         actx, tree, tvb, offset,
1933                                                         1, ub_given_name_length, hf_index, &pstring);
1934
1935
1936         if(doing_address && pstring) {
1937             g_strlcat(oraddress, "/G=", MAX_ORA_STR_LEN);
1938           g_strlcat(oraddress, tvb_format_text(pstring, 0, tvb_length(pstring)), MAX_ORA_STR_LEN);
1939         }
1940
1941
1942
1943   return offset;
1944 }
1945
1946
1947
1948 static int
1949 dissect_p1_T_printable_initials(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1950 #line 966 "../../asn1/p1/p1.cnf"
1951         tvbuff_t        *pstring = NULL;
1952
1953           offset = dissect_ber_constrained_restricted_string(implicit_tag, BER_UNI_TAG_PrintableString,
1954                                                         actx, tree, tvb, offset,
1955                                                         1, ub_initials_length, hf_index, &pstring);
1956
1957
1958         if(doing_address && pstring) {
1959             g_strlcat(oraddress, "/I=", MAX_ORA_STR_LEN);
1960           g_strlcat(oraddress, tvb_format_text(pstring, 0, tvb_length(pstring)), MAX_ORA_STR_LEN);
1961         }
1962
1963
1964
1965   return offset;
1966 }
1967
1968
1969
1970 static int
1971 dissect_p1_T_printable_generation_qualifier(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
1972 #line 976 "../../asn1/p1/p1.cnf"
1973         tvbuff_t        *pstring = NULL;
1974
1975           offset = dissect_ber_constrained_restricted_string(implicit_tag, BER_UNI_TAG_PrintableString,
1976                                                         actx, tree, tvb, offset,
1977                                                         1, ub_generation_qualifier_length, hf_index, &pstring);
1978
1979
1980         if(doing_address && pstring) {
1981             g_strlcat(oraddress, "/Q=", MAX_ORA_STR_LEN);
1982           g_strlcat(oraddress, tvb_format_text(pstring, 0, tvb_length(pstring)), MAX_ORA_STR_LEN);
1983         }
1984
1985
1986
1987   return offset;
1988 }
1989
1990
1991 static const ber_sequence_t PersonalName_set[] = {
1992   { &hf_p1_printable_surname, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_p1_T_printable_surname },
1993   { &hf_p1_printable_given_name, BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_p1_T_printable_given_name },
1994   { &hf_p1_printable_initials, BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_p1_T_printable_initials },
1995   { &hf_p1_printable_generation_qualifier, BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_p1_T_printable_generation_qualifier },
1996   { NULL, 0, 0, 0, NULL }
1997 };
1998
1999 static int
2000 dissect_p1_PersonalName(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2001   offset = dissect_ber_set(implicit_tag, actx, tree, tvb, offset,
2002                               PersonalName_set, hf_index, ett_p1_PersonalName);
2003
2004   return offset;
2005 }
2006
2007
2008
2009 static int
2010 dissect_p1_OrganizationalUnitName(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2011 #line 769 "../../asn1/p1/p1.cnf"
2012         tvbuff_t        *string = NULL;
2013
2014           offset = dissect_ber_constrained_restricted_string(implicit_tag, BER_UNI_TAG_PrintableString,
2015                                                         actx, tree, tvb, offset,
2016                                                         1, ub_organizational_unit_name_length, hf_index, &string);
2017
2018
2019         if(doing_address && string) {
2020                 g_strlcat(oraddress, "/OU=", MAX_ORA_STR_LEN);
2021                 g_strlcat(oraddress, tvb_format_text(string, 0, tvb_length(string)), MAX_ORA_STR_LEN);
2022         }
2023
2024
2025
2026   return offset;
2027 }
2028
2029
2030 static const ber_sequence_t OrganizationalUnitNames_sequence_of[1] = {
2031   { &hf_p1_OrganizationalUnitNames_item, BER_CLASS_UNI, BER_UNI_TAG_PrintableString, BER_FLAGS_NOOWNTAG, dissect_p1_OrganizationalUnitName },
2032 };
2033
2034 static int
2035 dissect_p1_OrganizationalUnitNames(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2036   offset = dissect_ber_constrained_sequence_of(implicit_tag, actx, tree, tvb, offset,
2037                                                   1, ub_organizational_units, OrganizationalUnitNames_sequence_of, hf_index, ett_p1_OrganizationalUnitNames);
2038
2039   return offset;
2040 }
2041
2042
2043 static const ber_sequence_t BuiltInStandardAttributes_sequence[] = {
2044   { &hf_p1_country_name     , BER_CLASS_APP, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_p1_CountryName },
2045   { &hf_p1_administration_domain_name, BER_CLASS_APP, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_p1_AdministrationDomainName },
2046   { &hf_p1_network_address  , BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_p1_NetworkAddress },
2047   { &hf_p1_terminal_identifier, BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_p1_TerminalIdentifier },
2048   { &hf_p1_private_domain_name, BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG|BER_FLAGS_NOTCHKTAG, dissect_p1_PrivateDomainName },
2049   { &hf_p1_organization_name, BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_p1_OrganizationName },
2050   { &hf_p1_numeric_user_identifier, BER_CLASS_CON, 4, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_p1_NumericUserIdentifier },
2051   { &hf_p1_personal_name    , BER_CLASS_CON, 5, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_p1_PersonalName },
2052   { &hf_p1_organizational_unit_names, BER_CLASS_CON, 6, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_p1_OrganizationalUnitNames },
2053   { NULL, 0, 0, 0, NULL }
2054 };
2055
2056 static int
2057 dissect_p1_BuiltInStandardAttributes(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2058 #line 1143 "../../asn1/p1/p1.cnf"
2059
2060         address_item = tree;    
2061
2062           offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
2063                                    BuiltInStandardAttributes_sequence, hf_index, ett_p1_BuiltInStandardAttributes);
2064
2065
2066
2067
2068   return offset;
2069 }
2070
2071
2072
2073 static int
2074 dissect_p1_T_printable_type(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2075 #line 1026 "../../asn1/p1/p1.cnf"
2076         tvbuff_t        *pstring = NULL;
2077
2078           offset = dissect_ber_constrained_restricted_string(implicit_tag, BER_UNI_TAG_PrintableString,
2079                                                         actx, tree, tvb, offset,
2080                                                         1, ub_domain_defined_attribute_type_length, hf_index, &pstring);
2081
2082
2083         if(doing_address && pstring) {
2084             g_strlcat(oraddress, "/DD.", MAX_ORA_STR_LEN);
2085             g_strlcat(oraddress, tvb_format_text(pstring, 0, tvb_length(pstring)), MAX_ORA_STR_LEN);
2086             g_strlcat(ddatype, tvb_format_text(pstring, 0, tvb_length(pstring)), MAX_ORA_STR_LEN);
2087         }
2088         
2089
2090
2091   return offset;
2092 }
2093
2094
2095
2096 static int
2097 dissect_p1_T_printable_value(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2098 #line 1037 "../../asn1/p1/p1.cnf"
2099         tvbuff_t        *pstring = NULL;
2100
2101           offset = dissect_ber_constrained_restricted_string(implicit_tag, BER_UNI_TAG_PrintableString,
2102                                                         actx, tree, tvb, offset,
2103                                                         1, ub_domain_defined_attribute_value_length, hf_index, &pstring);
2104
2105
2106         if(doing_address && pstring) {
2107             g_strlcat(oraddress, "=", MAX_ORA_STR_LEN);
2108             g_strlcat(oraddress, tvb_format_text(pstring, 0, tvb_length(pstring)), MAX_ORA_STR_LEN);
2109             if (*ddatype) {
2110                proto_item_append_text (tree, " (%s=%s)", ddatype, tvb_format_text(pstring, 0, tvb_length(pstring)));
2111             }
2112         }
2113         
2114
2115
2116   return offset;
2117 }
2118
2119
2120 static const ber_sequence_t BuiltInDomainDefinedAttribute_sequence[] = {
2121   { &hf_p1_printable_type   , BER_CLASS_UNI, BER_UNI_TAG_PrintableString, BER_FLAGS_NOOWNTAG, dissect_p1_T_printable_type },
2122   { &hf_p1_printable_value  , BER_CLASS_UNI, BER_UNI_TAG_PrintableString, BER_FLAGS_NOOWNTAG, dissect_p1_T_printable_value },
2123   { NULL, 0, 0, 0, NULL }
2124 };
2125
2126 static int
2127 dissect_p1_BuiltInDomainDefinedAttribute(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2128 #line 1050 "../../asn1/p1/p1.cnf"
2129         ddatype = (char *)ep_alloc(MAX_ORA_STR_LEN); ddatype[0] = '\0';
2130
2131           offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
2132                                    BuiltInDomainDefinedAttribute_sequence, hf_index, ett_p1_BuiltInDomainDefinedAttribute);
2133
2134
2135
2136
2137   return offset;
2138 }
2139
2140
2141 static const ber_sequence_t BuiltInDomainDefinedAttributes_sequence_of[1] = {
2142   { &hf_p1_BuiltInDomainDefinedAttributes_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_p1_BuiltInDomainDefinedAttribute },
2143 };
2144
2145 static int
2146 dissect_p1_BuiltInDomainDefinedAttributes(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2147   offset = dissect_ber_constrained_sequence_of(implicit_tag, actx, tree, tvb, offset,
2148                                                   1, ub_domain_defined_attributes, BuiltInDomainDefinedAttributes_sequence_of, hf_index, ett_p1_BuiltInDomainDefinedAttributes);
2149
2150   return offset;
2151 }
2152
2153
2154 static const value_string p1_ExtensionAttributeType_vals[] = {
2155   {   1, "common-name" },
2156   {   2, "teletex-common-name" },
2157   {   3, "teletex-organization-name" },
2158   {   4, "teletex-personal-name" },
2159   {   5, "teletex-organizational-unit-names" },
2160   {   6, "teletex-domain-defined-attributes" },
2161   {   7, "pds-name" },
2162   {   8, "physical-delivery-country-name" },
2163   {   9, "postal-code" },
2164   {  10, "physical-delivery-office-name" },
2165   {  11, "physical-delivery-office-number" },
2166   {  12, "extension-OR-address-components" },
2167   {  13, "physical-delivery-personal-name" },
2168   {  14, "physical-delivery-organization-name" },
2169   {  15, "extension-physical-delivery-address-components" },
2170   {  16, "unformatted-postal-address" },
2171   {  17, "street-address" },
2172   {  18, "post-office-box-address" },
2173   {  19, "poste-restante-address" },
2174   {  20, "unique-postal-name" },
2175   {  21, "local-postal-attributes" },
2176   {  22, "extended-network-address" },
2177   {  23, "terminal-type" },
2178   {  24, "universal-common-name" },
2179   {  25, "universal-organization-name" },
2180   {  26, "universal-personal-name" },
2181   {  27, "universal-organizational-unit-names" },
2182   {  28, "universal-domain-defined-attributes" },
2183   {  29, "universal-physical-delivery-office-name" },
2184   {  30, "universal-physical-delivery-office-number" },
2185   {  31, "universal-extension-OR-address-components" },
2186   {  32, "universal-physical-delivery-personal-name" },
2187   {  33, "universal-physical-delivery-organization-name" },
2188   {  34, "universal-extension-physical-delivery-address-components" },
2189   {  35, "universal-unformatted-postal-address" },
2190   {  36, "universal-street-address" },
2191   {  37, "universal-post-office-box-address" },
2192   {  38, "universal-poste-restante-address" },
2193   {  39, "universal-unique-postal-name" },
2194   {  40, "universal-local-postal-attributes" },
2195   { 0, NULL }
2196 };
2197
2198
2199 static int
2200 dissect_p1_ExtensionAttributeType(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2201   offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
2202                                                 &extension_id);
2203
2204   return offset;
2205 }
2206
2207
2208
2209 static int
2210 dissect_p1_T_extension_attribute_value(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2211 #line 576 "../../asn1/p1/p1.cnf"
2212
2213         proto_item_append_text(tree, " (%s)", val_to_str(extension_id, p1_ExtensionAttributeType_vals, "extension-attribute-type %d")); 
2214         if (dissector_try_uint(p1_extension_attribute_dissector_table, extension_id, tvb, actx->pinfo, tree)) {
2215                 offset =tvb_length(tvb);
2216         } else {
2217                 proto_item *item = NULL;
2218                 proto_tree *next_tree = NULL;
2219
2220                 item = proto_tree_add_text(tree, tvb, 0, tvb_length_remaining(tvb, offset), 
2221                         "Dissector for extension-attribute-type %d not implemented.  Contact Wireshark developers if you want this supported", extension_id);
2222                 next_tree = proto_item_add_subtree(item, ett_p1_unknown_extension_attribute_type);
2223                 offset = dissect_unknown_ber(actx->pinfo, tvb, offset, next_tree);
2224                 expert_add_info_format(actx->pinfo, item, PI_UNDECODED, PI_WARN, "Unknown extension-attribute-type");
2225         }
2226
2227
2228
2229
2230   return offset;
2231 }
2232
2233
2234 static const ber_sequence_t ExtensionAttribute_sequence[] = {
2235   { &hf_p1_extension_attribute_type, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_p1_ExtensionAttributeType },
2236   { &hf_p1_extension_attribute_value, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_p1_T_extension_attribute_value },
2237   { NULL, 0, 0, 0, NULL }
2238 };
2239
2240 static int
2241 dissect_p1_ExtensionAttribute(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2242   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
2243                                    ExtensionAttribute_sequence, hf_index, ett_p1_ExtensionAttribute);
2244
2245   return offset;
2246 }
2247
2248
2249 static const ber_sequence_t ExtensionAttributes_set_of[1] = {
2250   { &hf_p1_ExtensionAttributes_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_p1_ExtensionAttribute },
2251 };
2252
2253 static int
2254 dissect_p1_ExtensionAttributes(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2255   offset = dissect_ber_constrained_set_of(implicit_tag, actx, tree, tvb, offset,
2256                                              1, ub_extension_attributes, ExtensionAttributes_set_of, hf_index, ett_p1_ExtensionAttributes);
2257
2258   return offset;
2259 }
2260
2261
2262 static const ber_sequence_t ORName_U_sequence[] = {
2263   { &hf_p1_built_in_standard_attributes, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_p1_BuiltInStandardAttributes },
2264   { &hf_p1_built_in_domain_defined_attributes, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_p1_BuiltInDomainDefinedAttributes },
2265   { &hf_p1_extension_attributes, BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_p1_ExtensionAttributes },
2266   { &hf_p1_directory_name   , BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_x509if_Name },
2267   { NULL, 0, 0, 0, NULL }
2268 };
2269
2270 static int
2271 dissect_p1_ORName_U(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2272   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
2273                                    ORName_U_sequence, hf_index, ett_p1_ORName_U);
2274
2275   return offset;
2276 }
2277
2278
2279
2280 int
2281 dissect_p1_ORName(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2282 #line 1068 "../../asn1/p1/p1.cnf"
2283         
2284         oraddress = (char *)ep_alloc(MAX_ORA_STR_LEN); oraddress[0] = '\0';     
2285         address_item = NULL;
2286         doing_address = TRUE;
2287
2288           offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
2289                                       hf_index, BER_CLASS_APP, 0, TRUE, dissect_p1_ORName_U);
2290
2291
2292         if(*oraddress && address_item)
2293                 proto_item_append_text(address_item, " (%s/)", oraddress);
2294
2295         doing_address = FALSE;
2296
2297
2298
2299   return offset;
2300 }
2301
2302
2303
2304 static int
2305 dissect_p1_ORAddressAndOptionalDirectoryName(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2306   offset = dissect_p1_ORName(implicit_tag, tvb, offset, actx, tree, hf_index);
2307
2308   return offset;
2309 }
2310
2311
2312
2313 static int
2314 dissect_p1_MTAOriginatorName(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2315   offset = dissect_p1_ORAddressAndOptionalDirectoryName(implicit_tag, tvb, offset, actx, tree, hf_index);
2316
2317   return offset;
2318 }
2319
2320
2321 static const asn_namedbit BuiltInEncodedInformationTypes_bits[] = {
2322   {  0, &hf_p1_BuiltInEncodedInformationTypes_unknown, -1, -1, "unknown", NULL },
2323   {  2, &hf_p1_BuiltInEncodedInformationTypes_ia5_text, -1, -1, "ia5-text", NULL },
2324   {  3, &hf_p1_BuiltInEncodedInformationTypes_g3_facsimile, -1, -1, "g3-facsimile", NULL },
2325   {  4, &hf_p1_BuiltInEncodedInformationTypes_g4_class_1, -1, -1, "g4-class-1", NULL },
2326   {  5, &hf_p1_BuiltInEncodedInformationTypes_teletex, -1, -1, "teletex", NULL },
2327   {  6, &hf_p1_BuiltInEncodedInformationTypes_videotex, -1, -1, "videotex", NULL },
2328   {  7, &hf_p1_BuiltInEncodedInformationTypes_voice, -1, -1, "voice", NULL },
2329   {  8, &hf_p1_BuiltInEncodedInformationTypes_sfd, -1, -1, "sfd", NULL },
2330   {  9, &hf_p1_BuiltInEncodedInformationTypes_mixed_mode, -1, -1, "mixed-mode", NULL },
2331   { 0, NULL, 0, 0, NULL, NULL }
2332 };
2333
2334 static int
2335 dissect_p1_BuiltInEncodedInformationTypes(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2336   offset = dissect_ber_constrained_bitstring(implicit_tag, actx, tree, tvb, offset,
2337                                                 0, ub_built_in_encoded_information_types, BuiltInEncodedInformationTypes_bits, hf_index, ett_p1_BuiltInEncodedInformationTypes,
2338                                                 NULL);
2339
2340   return offset;
2341 }
2342
2343
2344 static const asn_namedbit G3FacsimileNonBasicParameters_bits[] = {
2345   {  8, &hf_p1_G3FacsimileNonBasicParameters_two_dimensional, -1, -1, "two-dimensional", NULL },
2346   {  9, &hf_p1_G3FacsimileNonBasicParameters_fine_resolution, -1, -1, "fine-resolution", NULL },
2347   { 20, &hf_p1_G3FacsimileNonBasicParameters_unlimited_length, -1, -1, "unlimited-length", NULL },
2348   { 21, &hf_p1_G3FacsimileNonBasicParameters_b4_length, -1, -1, "b4-length", NULL },
2349   { 22, &hf_p1_G3FacsimileNonBasicParameters_a3_width, -1, -1, "a3-width", NULL },
2350   { 23, &hf_p1_G3FacsimileNonBasicParameters_b4_width, -1, -1, "b4-width", NULL },
2351   { 25, &hf_p1_G3FacsimileNonBasicParameters_t6_coding, -1, -1, "t6-coding", NULL },
2352   { 30, &hf_p1_G3FacsimileNonBasicParameters_uncompressed, -1, -1, "uncompressed", NULL },
2353   { 37, &hf_p1_G3FacsimileNonBasicParameters_width_middle_864_of_1728, -1, -1, "width-middle-864-of-1728", NULL },
2354   { 38, &hf_p1_G3FacsimileNonBasicParameters_width_middle_1216_of_1728, -1, -1, "width-middle-1216-of-1728", NULL },
2355   { 44, &hf_p1_G3FacsimileNonBasicParameters_resolution_type, -1, -1, "resolution-type", NULL },
2356   { 45, &hf_p1_G3FacsimileNonBasicParameters_resolution_400x400, -1, -1, "resolution-400x400", NULL },
2357   { 46, &hf_p1_G3FacsimileNonBasicParameters_resolution_300x300, -1, -1, "resolution-300x300", NULL },
2358   { 47, &hf_p1_G3FacsimileNonBasicParameters_resolution_8x15, -1, -1, "resolution-8x15", NULL },
2359   { 49, &hf_p1_G3FacsimileNonBasicParameters_edi, -1, -1, "edi", NULL },
2360   { 50, &hf_p1_G3FacsimileNonBasicParameters_dtm, -1, -1, "dtm", NULL },
2361   { 51, &hf_p1_G3FacsimileNonBasicParameters_bft, -1, -1, "bft", NULL },
2362   { 58, &hf_p1_G3FacsimileNonBasicParameters_mixed_mode, -1, -1, "mixed-mode", NULL },
2363   { 60, &hf_p1_G3FacsimileNonBasicParameters_character_mode, -1, -1, "character-mode", NULL },
2364   { 65, &hf_p1_G3FacsimileNonBasicParameters_twelve_bits, -1, -1, "twelve-bits", NULL },
2365   { 66, &hf_p1_G3FacsimileNonBasicParameters_preferred_huffmann, -1, -1, "preferred-huffmann", NULL },
2366   { 67, &hf_p1_G3FacsimileNonBasicParameters_full_colour, -1, -1, "full-colour", NULL },
2367   { 68, &hf_p1_G3FacsimileNonBasicParameters_jpeg, -1, -1, "jpeg", NULL },
2368   { 71, &hf_p1_G3FacsimileNonBasicParameters_processable_mode_26, -1, -1, "processable-mode-26", NULL },
2369   { 0, NULL, 0, 0, NULL, NULL }
2370 };
2371
2372 int
2373 dissect_p1_G3FacsimileNonBasicParameters(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2374   offset = dissect_ber_bitstring(implicit_tag, actx, tree, tvb, offset,
2375                                     G3FacsimileNonBasicParameters_bits, hf_index, ett_p1_G3FacsimileNonBasicParameters,
2376                                     NULL);
2377
2378   return offset;
2379 }
2380
2381
2382
2383 static int
2384 dissect_p1_TeletexString(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2385   offset = dissect_ber_restricted_string(implicit_tag, BER_UNI_TAG_TeletexString,
2386                                             actx, tree, tvb, offset, hf_index,
2387                                             NULL);
2388
2389   return offset;
2390 }
2391
2392
2393
2394 static int
2395 dissect_p1_OCTET_STRING(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2396   offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
2397                                        NULL);
2398
2399   return offset;
2400 }
2401
2402
2403 static const ber_sequence_t TeletexNonBasicParameters_set[] = {
2404   { &hf_p1_graphic_character_sets, BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_p1_TeletexString },
2405   { &hf_p1_control_character_sets, BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_p1_TeletexString },
2406   { &hf_p1_page_formats     , BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_p1_OCTET_STRING },
2407   { &hf_p1_miscellaneous_terminal_capabilities, BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_p1_TeletexString },
2408   { &hf_p1_private_use      , BER_CLASS_CON, 4, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_p1_OCTET_STRING },
2409   { NULL, 0, 0, 0, NULL }
2410 };
2411
2412 int
2413 dissect_p1_TeletexNonBasicParameters(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2414   offset = dissect_ber_set(implicit_tag, actx, tree, tvb, offset,
2415                               TeletexNonBasicParameters_set, hf_index, ett_p1_TeletexNonBasicParameters);
2416
2417   return offset;
2418 }
2419
2420
2421
2422 static int
2423 dissect_p1_ExtendedEncodedInformationType(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2424   offset = dissect_ber_object_identifier(implicit_tag, actx, tree, tvb, offset, hf_index, NULL);
2425
2426   return offset;
2427 }
2428
2429
2430 static const ber_sequence_t ExtendedEncodedInformationTypes_set_of[1] = {
2431   { &hf_p1_ExtendedEncodedInformationTypes_item, BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_p1_ExtendedEncodedInformationType },
2432 };
2433
2434 static int
2435 dissect_p1_ExtendedEncodedInformationTypes(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2436   offset = dissect_ber_constrained_set_of(implicit_tag, actx, tree, tvb, offset,
2437                                              1, ub_encoded_information_types, ExtendedEncodedInformationTypes_set_of, hf_index, ett_p1_ExtendedEncodedInformationTypes);
2438
2439   return offset;
2440 }
2441
2442
2443 static const ber_sequence_t EncodedInformationTypes_U_set[] = {
2444   { &hf_p1_built_in_encoded_information_types, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_p1_BuiltInEncodedInformationTypes },
2445   { &hf_p1_g3_facsimile     , BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_p1_G3FacsimileNonBasicParameters },
2446   { &hf_p1_teletex          , BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_p1_TeletexNonBasicParameters },
2447   { &hf_p1_extended_encoded_information_types, BER_CLASS_CON, 4, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_p1_ExtendedEncodedInformationTypes },
2448   { NULL, 0, 0, 0, NULL }
2449 };
2450
2451 static int
2452 dissect_p1_EncodedInformationTypes_U(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2453   offset = dissect_ber_set(implicit_tag, actx, tree, tvb, offset,
2454                               EncodedInformationTypes_U_set, hf_index, ett_p1_EncodedInformationTypes_U);
2455
2456   return offset;
2457 }
2458
2459
2460
2461 int
2462 dissect_p1_EncodedInformationTypes(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2463   offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
2464                                       hf_index, BER_CLASS_APP, 5, TRUE, dissect_p1_EncodedInformationTypes_U);
2465
2466   return offset;
2467 }
2468
2469
2470
2471 int
2472 dissect_p1_OriginalEncodedInformationTypes(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2473   offset = dissect_p1_EncodedInformationTypes(implicit_tag, tvb, offset, actx, tree, hf_index);
2474
2475   return offset;
2476 }
2477
2478
2479 static const value_string p1_BuiltInContentType_U_vals[] = {
2480   {   0, "unidentified" },
2481   {   1, "external" },
2482   {   2, "interpersonal-messaging-1984" },
2483   {  22, "interpersonal-messaging-1988" },
2484   {  35, "edi-messaging" },
2485   {  40, "voice-messaging" },
2486   { 0, NULL }
2487 };
2488
2489
2490 static int
2491 dissect_p1_BuiltInContentType_U(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2492 #line 636 "../../asn1/p1/p1.cnf"
2493   static guint32        ict = -1;       
2494
2495     offset = dissect_ber_constrained_integer(implicit_tag, actx, tree, tvb, offset,
2496                                                             0U, ub_built_in_content_type, hf_index, &ict);
2497
2498
2499   /* convert integer content type to oid for dispatch when the content is found */
2500   switch(ict) {
2501         case 2:
2502         content_type_id = ep_strdup("2.6.1.10.0");
2503         break;
2504         case 22:
2505         content_type_id = ep_strdup("2.6.1.10.1");
2506         break;
2507         default:
2508         content_type_id = NULL;
2509         break;
2510         }
2511
2512
2513
2514   return offset;
2515 }
2516
2517
2518
2519 static int
2520 dissect_p1_BuiltInContentType(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2521   offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
2522                                       hf_index, BER_CLASS_APP, 6, TRUE, dissect_p1_BuiltInContentType_U);
2523
2524   return offset;
2525 }
2526
2527
2528
2529 int
2530 dissect_p1_ExtendedContentType(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2531 #line 621 "../../asn1/p1/p1.cnf"
2532         const char *name = NULL;
2533
2534           offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_index, &content_type_id);
2535
2536
2537         if(content_type_id) {
2538           name = oid_resolved_from_string(content_type_id);
2539
2540           if(!name) name = content_type_id;
2541
2542           proto_item_append_text(tree, " (%s)", name);
2543         }
2544
2545
2546
2547   return offset;
2548 }
2549
2550
2551 const value_string p1_ContentType_vals[] = {
2552   {   0, "built-in" },
2553   {   1, "extended" },
2554   { 0, NULL }
2555 };
2556
2557 static const ber_choice_t ContentType_choice[] = {
2558   {   0, &hf_p1_built_in         , BER_CLASS_APP, 6, BER_FLAGS_NOOWNTAG, dissect_p1_BuiltInContentType },
2559   {   1, &hf_p1_extended         , BER_CLASS_UNI, BER_UNI_TAG_OID, BER_FLAGS_NOOWNTAG, dissect_p1_ExtendedContentType },
2560   { 0, NULL, 0, 0, 0, NULL }
2561 };
2562
2563 int
2564 dissect_p1_ContentType(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2565   offset = dissect_ber_choice(actx, tree, tvb, offset,
2566                                  ContentType_choice, hf_index, ett_p1_ContentType,
2567                                  NULL);
2568
2569   return offset;
2570 }
2571
2572
2573
2574 static int
2575 dissect_p1_PrintableString_SIZE_1_ub_content_id_length(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2576   offset = dissect_ber_constrained_restricted_string(implicit_tag, BER_UNI_TAG_PrintableString,
2577                                                         actx, tree, tvb, offset,
2578                                                         1, ub_content_id_length, hf_index, NULL);
2579
2580   return offset;
2581 }
2582
2583
2584
2585 int
2586 dissect_p1_ContentIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2587   offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
2588                                       hf_index, BER_CLASS_APP, 10, TRUE, dissect_p1_PrintableString_SIZE_1_ub_content_id_length);
2589
2590   return offset;
2591 }
2592
2593
2594 static const value_string p1_Priority_U_vals[] = {
2595   {   0, "normal" },
2596   {   1, "non-urgent" },
2597   {   2, "urgent" },
2598   { 0, NULL }
2599 };
2600
2601
2602 static int
2603 dissect_p1_Priority_U(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2604   offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
2605                                   NULL);
2606
2607   return offset;
2608 }
2609
2610
2611
2612 static int
2613 dissect_p1_Priority(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2614   offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
2615                                       hf_index, BER_CLASS_APP, 7, TRUE, dissect_p1_Priority_U);
2616
2617   return offset;
2618 }
2619
2620
2621 static const asn_namedbit PerMessageIndicators_U_bits[] = {
2622   {  0, &hf_p1_PerMessageIndicators_U_disclosure_of_other_recipients, -1, -1, "disclosure-of-other-recipients", NULL },
2623   {  1, &hf_p1_PerMessageIndicators_U_implicit_conversion_prohibited, -1, -1, "implicit-conversion-prohibited", NULL },
2624   {  2, &hf_p1_PerMessageIndicators_U_alternate_recipient_allowed, -1, -1, "alternate-recipient-allowed", NULL },
2625   {  3, &hf_p1_PerMessageIndicators_U_content_return_request, -1, -1, "content-return-request", NULL },
2626   {  4, &hf_p1_PerMessageIndicators_U_reserved, -1, -1, "reserved", NULL },
2627   {  5, &hf_p1_PerMessageIndicators_U_bit_5, -1, -1, "bit-5", NULL },
2628   {  6, &hf_p1_PerMessageIndicators_U_bit_6, -1, -1, "bit-6", NULL },
2629   {  7, &hf_p1_PerMessageIndicators_U_service_message, -1, -1, "service-message", NULL },
2630   { 0, NULL, 0, 0, NULL, NULL }
2631 };
2632
2633 static int
2634 dissect_p1_PerMessageIndicators_U(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2635   offset = dissect_ber_constrained_bitstring(implicit_tag, actx, tree, tvb, offset,
2636                                                 0, ub_bit_options, PerMessageIndicators_U_bits, hf_index, ett_p1_PerMessageIndicators_U,
2637                                                 NULL);
2638
2639   return offset;
2640 }
2641
2642
2643
2644 int
2645 dissect_p1_PerMessageIndicators(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2646   offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
2647                                       hf_index, BER_CLASS_APP, 8, TRUE, dissect_p1_PerMessageIndicators_U);
2648
2649   return offset;
2650 }
2651
2652
2653
2654 static int
2655 dissect_p1_Time(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2656 #line 1186 "../../asn1/p1/p1.cnf"
2657         tvbuff_t *arrival = NULL;
2658
2659           offset = dissect_ber_UTCTime(implicit_tag, actx, tree, tvb, offset, hf_index);
2660
2661
2662         if(arrival && doing_address)
2663                 proto_item_append_text(address_item, " %s", tvb_format_text(arrival, 0, tvb_length(arrival)));
2664
2665
2666
2667   return offset;
2668 }
2669
2670
2671
2672 static int
2673 dissect_p1_DeferredDeliveryTime(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2674   offset = dissect_p1_Time(implicit_tag, tvb, offset, actx, tree, hf_index);
2675
2676   return offset;
2677 }
2678
2679
2680 static const ber_sequence_t T_private_domain_sequence[] = {
2681   { &hf_p1_administration_domain_name, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_p1_AdministrationDomainName },
2682   { &hf_p1_private_domain_identifier, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG|BER_FLAGS_NOTCHKTAG, dissect_p1_PrivateDomainIdentifier },
2683   { NULL, 0, 0, 0, NULL }
2684 };
2685
2686 static int
2687 dissect_p1_T_private_domain(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2688   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
2689                                    T_private_domain_sequence, hf_index, ett_p1_T_private_domain);
2690
2691   return offset;
2692 }
2693
2694
2695 static const value_string p1_T_bilateral_domain_vals[] = {
2696   {   0, "administration-domain-name" },
2697   {   1, "private-domain" },
2698   { 0, NULL }
2699 };
2700
2701 static const ber_choice_t T_bilateral_domain_choice[] = {
2702   {   0, &hf_p1_administration_domain_name, BER_CLASS_APP, 2, BER_FLAGS_NOOWNTAG, dissect_p1_AdministrationDomainName },
2703   {   1, &hf_p1_private_domain   , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_p1_T_private_domain },
2704   { 0, NULL, 0, 0, 0, NULL }
2705 };
2706
2707 static int
2708 dissect_p1_T_bilateral_domain(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2709   offset = dissect_ber_choice(actx, tree, tvb, offset,
2710                                  T_bilateral_domain_choice, hf_index, ett_p1_T_bilateral_domain,
2711                                  NULL);
2712
2713   return offset;
2714 }
2715
2716
2717
2718 static int
2719 dissect_p1_T_bilateral_information(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2720 #line 1254 "../../asn1/p1/p1.cnf"
2721         proto_item *item = NULL;
2722         int         loffset = 0;
2723         guint32     len = 0;
2724
2725         /* work out the length */
2726         loffset = dissect_ber_identifier(actx->pinfo, tree, tvb, offset, NULL, NULL, NULL);
2727         (void) dissect_ber_length(actx->pinfo, tree, tvb, loffset, &len, NULL);
2728
2729         /* create some structure so we can tell what this unknown ASN.1 represents */   
2730         item = proto_tree_add_item(tree, hf_index, tvb, offset, len, ENC_BIG_ENDIAN);
2731         tree = proto_item_add_subtree(item, ett_p1_bilateral_information);
2732
2733         offset = dissect_unknown_ber(actx->pinfo, tvb, offset, tree);
2734
2735
2736
2737   return offset;
2738 }
2739
2740
2741 static const ber_sequence_t PerDomainBilateralInformation_sequence[] = {
2742   { &hf_p1_country_name     , BER_CLASS_APP, 1, BER_FLAGS_NOOWNTAG, dissect_p1_CountryName },
2743   { &hf_p1_bilateral_domain , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_p1_T_bilateral_domain },
2744   { &hf_p1_bilateral_information, BER_CLASS_ANY, 0, BER_FLAGS_NOOWNTAG, dissect_p1_T_bilateral_information },
2745   { NULL, 0, 0, 0, NULL }
2746 };
2747
2748 static int
2749 dissect_p1_PerDomainBilateralInformation(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2750   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
2751                                    PerDomainBilateralInformation_sequence, hf_index, ett_p1_PerDomainBilateralInformation);
2752
2753   return offset;
2754 }
2755
2756
2757 static const ber_sequence_t SEQUENCE_SIZE_1_ub_transfers_OF_PerDomainBilateralInformation_sequence_of[1] = {
2758   { &hf_p1_per_domain_bilateral_information_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_p1_PerDomainBilateralInformation },
2759 };
2760
2761 static int
2762 dissect_p1_SEQUENCE_SIZE_1_ub_transfers_OF_PerDomainBilateralInformation(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2763   offset = dissect_ber_constrained_sequence_of(implicit_tag, actx, tree, tvb, offset,
2764                                                   1, ub_transfers, SEQUENCE_SIZE_1_ub_transfers_OF_PerDomainBilateralInformation_sequence_of, hf_index, ett_p1_SEQUENCE_SIZE_1_ub_transfers_OF_PerDomainBilateralInformation);
2765
2766   return offset;
2767 }
2768
2769
2770
2771 static int
2772 dissect_p1_ArrivalTime(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2773   offset = dissect_p1_Time(implicit_tag, tvb, offset, actx, tree, hf_index);
2774
2775   return offset;
2776 }
2777
2778
2779 static const value_string p1_RoutingAction_vals[] = {
2780   {   0, "relayed" },
2781   {   1, "rerouted" },
2782   { 0, NULL }
2783 };
2784
2785
2786 static int
2787 dissect_p1_RoutingAction(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2788 #line 1197 "../../asn1/p1/p1.cnf"
2789         int action = 0;
2790
2791           offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
2792                                   &action);
2793
2794
2795         proto_item_append_text(address_item, " %s", val_to_str(action, p1_RoutingAction_vals, "action(%d)"));
2796
2797
2798
2799   return offset;
2800 }
2801
2802
2803
2804 static int
2805 dissect_p1_DeferredTime(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2806   offset = dissect_p1_Time(implicit_tag, tvb, offset, actx, tree, hf_index);
2807
2808   return offset;
2809 }
2810
2811
2812
2813 static int
2814 dissect_p1_ConvertedEncodedInformationTypes(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2815   offset = dissect_p1_EncodedInformationTypes(implicit_tag, tvb, offset, actx, tree, hf_index);
2816
2817   return offset;
2818 }
2819
2820
2821 static const asn_namedbit OtherActions_bits[] = {
2822   {  0, &hf_p1_OtherActions_redirected, -1, -1, "redirected", NULL },
2823   {  1, &hf_p1_OtherActions_dl_operation, -1, -1, "dl-operation", NULL },
2824   { 0, NULL, 0, 0, NULL, NULL }
2825 };
2826
2827 static int
2828 dissect_p1_OtherActions(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2829   offset = dissect_ber_constrained_bitstring(implicit_tag, actx, tree, tvb, offset,
2830                                                 0, ub_bit_options, OtherActions_bits, hf_index, ett_p1_OtherActions,
2831                                                 NULL);
2832
2833   return offset;
2834 }
2835
2836
2837 static const ber_sequence_t DomainSuppliedInformation_set[] = {
2838   { &hf_p1_arrival_time     , BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_p1_ArrivalTime },
2839   { &hf_p1_routing_action   , BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_p1_RoutingAction },
2840   { &hf_p1_attempted_domain , BER_CLASS_APP, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_p1_GlobalDomainIdentifier },
2841   { &hf_p1_deferred_time    , BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_p1_DeferredTime },
2842   { &hf_p1_converted_encoded_information_types, BER_CLASS_APP, 5, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_p1_ConvertedEncodedInformationTypes },
2843   { &hf_p1_other_actions    , BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_p1_OtherActions },
2844   { NULL, 0, 0, 0, NULL }
2845 };
2846
2847 static int
2848 dissect_p1_DomainSuppliedInformation(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2849 #line 1165 "../../asn1/p1/p1.cnf"
2850
2851         doing_address = FALSE;
2852
2853           offset = dissect_ber_set(implicit_tag, actx, tree, tvb, offset,
2854                               DomainSuppliedInformation_set, hf_index, ett_p1_DomainSuppliedInformation);
2855
2856
2857         doing_address = TRUE;
2858         proto_item_append_text(tree, ")");
2859
2860
2861
2862   return offset;
2863 }
2864
2865
2866 static const ber_sequence_t TraceInformationElement_sequence[] = {
2867   { &hf_p1_global_domain_identifier, BER_CLASS_APP, 3, BER_FLAGS_NOOWNTAG, dissect_p1_GlobalDomainIdentifier },
2868   { &hf_p1_domain_supplied_information, BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_p1_DomainSuppliedInformation },
2869   { NULL, 0, 0, 0, NULL }
2870 };
2871
2872 static int
2873 dissect_p1_TraceInformationElement(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2874 #line 1149 "../../asn1/p1/p1.cnf"
2875
2876         doing_address = TRUE;
2877
2878           offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
2879                                    TraceInformationElement_sequence, hf_index, ett_p1_TraceInformationElement);
2880
2881
2882         doing_address = FALSE;
2883
2884
2885
2886   return offset;
2887 }
2888
2889
2890 static const ber_sequence_t SEQUENCE_SIZE_1_ub_transfers_OF_TraceInformationElement_sequence_of[1] = {
2891   { &hf_p1__untag_item      , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_p1_TraceInformationElement },
2892 };
2893
2894 static int
2895 dissect_p1_SEQUENCE_SIZE_1_ub_transfers_OF_TraceInformationElement(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2896   offset = dissect_ber_constrained_sequence_of(implicit_tag, actx, tree, tvb, offset,
2897                                                   1, ub_transfers, SEQUENCE_SIZE_1_ub_transfers_OF_TraceInformationElement_sequence_of, hf_index, ett_p1_SEQUENCE_SIZE_1_ub_transfers_OF_TraceInformationElement);
2898
2899   return offset;
2900 }
2901
2902
2903
2904 static int
2905 dissect_p1_TraceInformation(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2906   offset = dissect_ber_tagged_type(implicit_tag, actx, tree, tvb, offset,
2907                                       hf_index, BER_CLASS_APP, 9, TRUE, dissect_p1_SEQUENCE_SIZE_1_ub_transfers_OF_TraceInformationElement);
2908
2909   return offset;
2910 }
2911
2912
2913 static const value_string p1_StandardExtension_vals[] = {
2914   {   1, "recipient-reassignment-prohibited" },
2915   {   2, "originator-requested-alternate-recipient" },
2916   {   3, "dl-expansion-prohibited" },
2917   {   4, "conversion-with-loss-prohibited" },
2918   {   5, "latest-delivery-time" },
2919   {   6, "requested-delivery-method" },
2920   {   7, "physical-forwarding-prohibited" },
2921   {   8, "physical-forwarding-address-request" },
2922   {   9, "physical-delivery-modes" },
2923   {  10, "registered-mail-type" },
2924   {  11, "recipient-number-for-advice" },
2925   {  12, "physical-rendition-attributes" },
2926   {  13, "originator-return-address" },
2927   {  14, "physical-delivery-report-request" },
2928   {  15, "originator-certificate" },
2929   {  16, "message-token" },
2930   {  17, "content-confidentiality-algorithm-identifier" },
2931   {  18, "content-integrity-check" },
2932   {  19, "message-origin-authentication-check" },
2933   {  20, "message-security-label" },
2934   {  21, "proof-of-submission-request" },
2935   {  22, "proof-of-delivery-request" },
2936   {  23, "content-correlator" },
2937   {  24, "probe-origin-authentication-check" },
2938   {  25, "redirection-history" },
2939   {  26, "dl-expansion-history" },
2940   {  27, "physical-forwarding-address" },
2941   {  28, "recipient-certificate" },
2942   {  29, "proof-of-delivery" },
2943   {  30, "originator-and-DL-expansion-history" },
2944   {  31, "reporting-DL-name" },
2945   {  32, "reporting-MTA-certificate" },
2946   {  33, "report-origin-authentication-check" },
2947   {  34, "originating-MTA-certificate" },
2948   {  35, "proof-of-submission" },
2949   {  36, "forwarding-request" },
2950   {  37, "trace-information" },
2951   {  38, "internal-trace-information" },
2952   {  39, "reporting-MTA-name" },
2953   {  40, "multiple-originator-certificates" },
2954   {  41, "blind-copy-recipients" },
2955   {  42, "dl-exempted-recipients" },
2956   {  43, "body-part-encryption-token" },
2957   {  44, "forwarded-content-token" },
2958   {  45, "certificate-selectors" },
2959   { 0, NULL }
2960 };
2961
2962
2963 static int
2964 dissect_p1_StandardExtension(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2965   offset = dissect_ber_integer(implicit_tag, actx, tree, tvb, offset, hf_index,
2966                                                 &extension_id);
2967
2968   return offset;
2969 }
2970
2971
2972
2973 static int
2974 dissect_p1_T_private_extension(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
2975 #line 613 "../../asn1/p1/p1.cnf"
2976
2977           offset = dissect_ber_object_identifier_str(implicit_tag, actx, tree, tvb, offset, hf_index, &object_identifier_id);
2978
2979         extension_id = -1;
2980
2981
2982
2983   return offset;
2984 }
2985
2986
2987 static const value_string p1_ExtensionType_vals[] = {
2988   {   0, "standard-extension" },
2989   {   3, "private-extension" },
2990   { 0, NULL }
2991 };
2992
2993 static const ber_choice_t ExtensionType_choice[] = {
2994   {   0, &hf_p1_standard_extension, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_p1_StandardExtension },
2995   {   3, &hf_p1_private_extension, BER_CLASS_CON, 3, BER_FLAGS_IMPLTAG, dissect_p1_T_private_extension },
2996   { 0, NULL, 0, 0, 0, NULL }
2997 };
2998
2999 static int
3000 dissect_p1_ExtensionType(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
3001   offset = dissect_ber_choice(actx, tree, tvb, offset,
3002                                  ExtensionType_choice, hf_index, ett_p1_ExtensionType,
3003                                  NULL);
3004
3005   return offset;
3006 }
3007
3008
3009 static const asn_namedbit Criticality_bits[] = {
3010   {  0, &hf_p1_Criticality_for_submission, -1, -1, "for-submission", NULL },
3011   {  1, &hf_p1_Criticality_for_transfer, -1, -1, "for-transfer", NULL },
3012   {  2, &hf_p1_Criticality_for_delivery, -1, -1, "for-delivery", NULL },
3013   { 0, NULL, 0, 0, NULL, NULL }
3014 };
3015
3016 static int
3017 dissect_p1_Criticality(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
3018   offset = dissect_ber_constrained_bitstring(implicit_tag, actx, tree, tvb, offset,
3019                                                 0, ub_bit_options, Criticality_bits, hf_index, ett_p1_Criticality,
3020                                                 NULL);
3021
3022   return offset;
3023 }
3024
3025
3026
3027 static int
3028 dissect_p1_ExtensionValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
3029 #line 535 "../../asn1/p1/p1.cnf"
3030         const char *name;
3031
3032         if(extension_id != -1) {
3033                 proto_item_append_text(tree, " (%s)", val_to_str(extension_id, p1_StandardExtension_vals, "standard-extension %d")); 
3034                 if (dissector_try_uint(p1_extension_dissector_table, extension_id, tvb, actx->pinfo, tree)) {
3035                         offset = tvb_length(tvb);
3036                 } else {
3037                         proto_item *item = NULL;
3038                         proto_tree *next_tree = NULL;
3039
3040                         item = proto_tree_add_text(tree, tvb, 0, tvb_length_remaining(tvb, offset), 
3041                                 "Dissector for standard-extension %d not implemented.  Contact Wireshark developers if you want this supported", extension_id);
3042                         next_tree = proto_item_add_subtree(item, ett_p1_unknown_standard_extension);
3043                         offset = dissect_unknown_ber(actx->pinfo, tvb, offset, next_tree);
3044                         expert_add_info_format(actx->pinfo, item, PI_UNDECODED, PI_WARN, "Unknown standard-extension");
3045                 }
3046         } else if (object_identifier_id) {
3047                 offset = call_ber_oid_callback(object_identifier_id, tvb, offset, actx->pinfo, tree);
3048                 name = oid_resolved_from_string(object_identifier_id);
3049                 proto_item_append_text(tree, " (%s)", name ? name : object_identifier_id); 
3050         }
3051                 
3052
3053
3054
3055   return offset;
3056 }
3057
3058
3059 static const ber_sequence_t ExtensionField_sequence[] = {
3060   { &hf_p1_extension_type   , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_p1_ExtensionType },
3061   { &hf_p1_criticality      , BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_p1_Criticality },
3062   { &hf_p1_extension_value  , BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_p1_ExtensionValue },
3063   { NULL, 0, 0, 0, NULL }
3064 };
3065
3066 int
3067 dissect_p1_ExtensionField(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
3068   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
3069                                    ExtensionField_sequence, hf_index, ett_p1_ExtensionField);
3070
3071   return offset;
3072 }
3073
3074
3075 static const ber_sequence_t SET_OF_ExtensionField_set_of[1] = {
3076   { &hf_p1_extensions_item  , BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_p1_ExtensionField },
3077 };
3078
3079 static int
3080 dissect_p1_SET_OF_ExtensionField(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
3081   offset = dissect_ber_set_of(implicit_tag, actx, tree, tvb, offset,
3082                                  SET_OF_ExtensionField_set_of, hf_index, ett_p1_SET_OF_ExtensionField);
3083
3084   return offset;
3085 }
3086
3087
3088
3089 static int
3090 dissect_p1_MTARecipientName(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
3091   offset = dissect_p1_ORAddressAndOptionalDirectoryName(implicit_tag, tvb, offset, actx, tree, hf_index);
3092
3093   return offset;
3094 }
3095
3096
3097
3098 static int
3099 dissect_p1_OriginallySpecifiedRecipientNumber(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
3100   offset = dissect_ber_constrained_integer(implicit_tag, actx, tree, tvb, offset,
3101                                                             1U, ub_recipients, hf_index, NULL);
3102
3103   return offset;
3104 }
3105
3106
3107 static const asn_namedbit PerRecipientIndicators_bits[] = {
3108   {  0, &hf_p1_PerRecipientIndicators_responsibility, -1, -1, "responsibility", NULL },
3109   {  1, &hf_p1_PerRecipientIndicators_originating_MTA_report, -1, -1, "originating-MTA-report", NULL },
3110   {  2, &hf_p1_PerRecipientIndicators_originating_MTA_non_delivery_report, -1, -1, "originating-MTA-non-delivery-report", NULL },
3111   {  3, &hf_p1_PerRecipientIndicators_originator_report, -1, -1, "originator-report", NULL },
3112   {  4, &hf_p1_PerRecipientIndicators_originator_non_delivery_report, -1, -1, "originator-non-delivery-report", NULL },
3113   {  5, &hf_p1_PerRecipientIndicators_reserved_5, -1, -1, "reserved-5", NULL },
3114   {  6, &hf_p1_PerRecipientIndicators_reserved_6, -1, -1, "reserved-6", NULL },
3115   {  7, &hf_p1_PerRecipientIndicators_reserved_7, -1, -1, "reserved-7", NULL },
3116   { 0, NULL, 0, 0, NULL, NULL }
3117 };
3118
3119 static int
3120 dissect_p1_PerRecipientIndicators(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
3121   offset = dissect_ber_constrained_bitstring(implicit_tag, actx, tree, tvb, offset,
3122                                                 8, ub_bit_options, PerRecipientIndicators_bits, hf_index, ett_p1_PerRecipientIndicators,
3123                                                 NULL);
3124
3125   return offset;
3126 }
3127
3128
3129 static const value_string p1_ExplicitConversion_vals[] = {
3130   {   0, "ia5-text-to-teletex" },
3131   {   8, "ia5-text-to-g3-facsimile" },
3132   {   9, "ia5-text-to-g4-class-1" },
3133   {  10, "ia5-text-to-videotex" },
3134   {  11, "teletex-to-ia5-text" },
3135   {  12, "teletex-to-g3-facsimile" },
3136   {  13, "teletex-to-g4-class-1" },
3137   {  14, "teletex-to-videotex" },
3138   {  16, "videotex-to-ia5-text" },
3139   {  17, "videotex-to-teletex" },
3140   { 0, NULL }
3141 };
3142
3143
3144 static int
3145 dissect_p1_ExplicitConversion(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
3146   offset = dissect_ber_constrained_integer(implicit_tag, actx, tree, tvb, offset,
3147                                                             0U, ub_integer_options, hf_index, NULL);
3148
3149   return offset;
3150 }
3151
3152
3153 static const ber_sequence_t PerRecipientMessageTransferFields_set[] = {
3154   { &hf_p1_recipient_name   , BER_CLASS_APP, 0, BER_FLAGS_NOOWNTAG, dissect_p1_MTARecipientName },
3155   { &hf_p1_originally_specified_recipient_number, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_p1_OriginallySpecifiedRecipientNumber },
3156   { &hf_p1_per_recipient_indicators, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_p1_PerRecipientIndicators },
3157   { &hf_p1_explicit_conversion, BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_p1_ExplicitConversion },
3158   { &hf_p1_extensions       , BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_p1_SET_OF_ExtensionField },
3159   { NULL, 0, 0, 0, NULL }
3160 };
3161
3162 static int
3163 dissect_p1_PerRecipientMessageTransferFields(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
3164   offset = dissect_ber_set(implicit_tag, actx, tree, tvb, offset,
3165                               PerRecipientMessageTransferFields_set, hf_index, ett_p1_PerRecipientMessageTransferFields);
3166
3167   return offset;
3168 }
3169
3170
3171 static const ber_sequence_t SEQUENCE_SIZE_1_ub_recipients_OF_PerRecipientMessageTransferFields_sequence_of[1] = {
3172   { &hf_p1_per_recipient_message_fields_item, BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_p1_PerRecipientMessageTransferFields },
3173 };
3174
3175 static int
3176 dissect_p1_SEQUENCE_SIZE_1_ub_recipients_OF_PerRecipientMessageTransferFields(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
3177   offset = dissect_ber_constrained_sequence_of(implicit_tag, actx, tree, tvb, offset,
3178                                                   1, ub_recipients, SEQUENCE_SIZE_1_ub_recipients_OF_PerRecipientMessageTransferFields_sequence_of, hf_index, ett_p1_SEQUENCE_SIZE_1_ub_recipients_OF_PerRecipientMessageTransferFields);
3179
3180   return offset;
3181 }
3182
3183
3184 static const ber_sequence_t MessageTransferEnvelope_set[] = {
3185   { &hf_p1_message_identifier, BER_CLASS_APP, 4, BER_FLAGS_NOOWNTAG, dissect_p1_MessageIdentifier },
3186   { &hf_p1_mta_originator_name, BER_CLASS_APP, 0, BER_FLAGS_NOOWNTAG, dissect_p1_MTAOriginatorName },
3187   { &hf_p1_original_encoded_information_types, BER_CLASS_APP, 5, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_p1_OriginalEncodedInformationTypes },
3188   { &hf_p1_content_type     , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_p1_ContentType },
3189   { &hf_p1_content_identifier, BER_CLASS_APP, 10, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_p1_ContentIdentifier },
3190   { &hf_p1_priority         , BER_CLASS_APP, 7, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_p1_Priority },
3191   { &hf_p1_per_message_indicators, BER_CLASS_APP, 8, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_p1_PerMessageIndicators },
3192   { &hf_p1_deferred_delivery_time, BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_p1_DeferredDeliveryTime },
3193   { &hf_p1_per_domain_bilateral_information, BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_p1_SEQUENCE_SIZE_1_ub_transfers_OF_PerDomainBilateralInformation },
3194   { &hf_p1_trace_information, BER_CLASS_APP, 9, BER_FLAGS_NOOWNTAG, dissect_p1_TraceInformation },
3195   { &hf_p1_extensions       , BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_p1_SET_OF_ExtensionField },
3196   { &hf_p1_per_recipient_message_fields, BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_p1_SEQUENCE_SIZE_1_ub_recipients_OF_PerRecipientMessageTransferFields },
3197   { NULL, 0, 0, 0, NULL }
3198 };
3199
3200 static int
3201 dissect_p1_MessageTransferEnvelope(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
3202   offset = dissect_ber_set(implicit_tag, actx, tree, tvb, offset,
3203                               MessageTransferEnvelope_set, hf_index, ett_p1_MessageTransferEnvelope);
3204
3205   return offset;
3206 }
3207
3208
3209
3210 int
3211 dissect_p1_Content(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
3212 #line 654 "../../asn1/p1/p1.cnf"
3213   tvbuff_t *next_tvb;
3214
3215   /* we can do this now constructed octet strings are supported */
3216   offset = dissect_ber_octet_string(FALSE, actx, tree, tvb, offset, hf_index, &next_tvb);
3217   proto_item_set_text(actx->created_item, "content (%u bytes)", tvb_length (next_tvb));
3218
3219   if (next_tvb) {
3220     if (content_type_id) {
3221       (void) call_ber_oid_callback(content_type_id, next_tvb, 0, actx->pinfo, top_tree ? top_tree : tree);
3222     } else if (report_unknown_content_type) {
3223       proto_item *item = NULL;
3224       proto_tree *next_tree = NULL;
3225
3226       item = proto_tree_add_text(top_tree ? top_tree : tree, next_tvb, 0, tvb_length_remaining(tvb, offset), "P1 Unknown Content (unknown built-in content-type)");
3227       expert_add_info_format(actx->pinfo, item, PI_UNDECODED, PI_WARN, "Unknown built-in content-type");
3228       if (item) {
3229         next_tree=proto_item_add_subtree(item, ett_p1_content_unknown);
3230       }
3231       dissect_unknown_ber(actx->pinfo, next_tvb, 0, next_tree);
3232     } else {
3233       proto_item_append_text (actx->created_item, " (unknown content-type)");
3234     }
3235   }
3236
3237
3238
3239   return offset;
3240 }
3241
3242
3243 static const ber_sequence_t Message_sequence[] = {
3244   { &hf_p1_message_envelope , BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_p1_MessageTransferEnvelope },
3245   { &hf_p1_content          , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_p1_Content },
3246   { NULL, 0, 0, 0, NULL }
3247 };
3248
3249 static int
3250 dissect_p1_Message(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
3251   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
3252                                    Message_sequence, hf_index, ett_p1_Message);
3253
3254   return offset;
3255 }
3256
3257
3258
3259 static int
3260 dissect_p1_ProbeIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
3261   offset = dissect_p1_MTSIdentifier(implicit_tag, tvb, offset, actx, tree, hf_index);
3262
3263   return offset;
3264 }
3265
3266
3267
3268 int
3269 dissect_p1_ContentLength(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
3270   offset = dissect_ber_constrained_integer(implicit_tag, actx, tree, tvb, offset,
3271                                                             0U, ub_content_length, hf_index, NULL);
3272
3273   return offset;
3274 }
3275
3276
3277 static const ber_sequence_t PerRecipientProbeTransferFields_set[] = {
3278   { &hf_p1_recipient_name   , BER_CLASS_APP, 0, BER_FLAGS_NOOWNTAG, dissect_p1_MTARecipientName },
3279   { &hf_p1_originally_specified_recipient_number, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_p1_OriginallySpecifiedRecipientNumber },
3280   { &hf_p1_per_recipient_indicators, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_p1_PerRecipientIndicators },
3281   { &hf_p1_explicit_conversion, BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_p1_ExplicitConversion },
3282   { &hf_p1_extensions       , BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_p1_SET_OF_ExtensionField },
3283   { NULL, 0, 0, 0, NULL }
3284 };
3285
3286 static int
3287 dissect_p1_PerRecipientProbeTransferFields(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
3288   offset = dissect_ber_set(implicit_tag, actx, tree, tvb, offset,
3289                               PerRecipientProbeTransferFields_set, hf_index, ett_p1_PerRecipientProbeTransferFields);
3290
3291   return offset;
3292 }
3293
3294
3295 static const ber_sequence_t SEQUENCE_SIZE_1_ub_recipients_OF_PerRecipientProbeTransferFields_sequence_of[1] = {
3296   { &hf_p1_per_recipient_probe_transfer_fields_item, BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_p1_PerRecipientProbeTransferFields },
3297 };
3298
3299 static int
3300 dissect_p1_SEQUENCE_SIZE_1_ub_recipients_OF_PerRecipientProbeTransferFields(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
3301   offset = dissect_ber_constrained_sequence_of(implicit_tag, actx, tree, tvb, offset,
3302                                                   1, ub_recipients, SEQUENCE_SIZE_1_ub_recipients_OF_PerRecipientProbeTransferFields_sequence_of, hf_index, ett_p1_SEQUENCE_SIZE_1_ub_recipients_OF_PerRecipientProbeTransferFields);
3303
3304   return offset;
3305 }
3306
3307
3308 static const ber_sequence_t ProbeTransferEnvelope_set[] = {
3309   { &hf_p1_probe_identifier , BER_CLASS_APP, 4, BER_FLAGS_NOOWNTAG, dissect_p1_ProbeIdentifier },
3310   { &hf_p1_mta_originator_name, BER_CLASS_APP, 0, BER_FLAGS_NOOWNTAG, dissect_p1_MTAOriginatorName },
3311   { &hf_p1_original_encoded_information_types, BER_CLASS_APP, 5, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_p1_OriginalEncodedInformationTypes },
3312   { &hf_p1_content_type     , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_p1_ContentType },
3313   { &hf_p1_content_identifier, BER_CLASS_APP, 10, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_p1_ContentIdentifier },
3314   { &hf_p1_content_length   , BER_CLASS_CON, 0, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_p1_ContentLength },
3315   { &hf_p1_per_message_indicators, BER_CLASS_APP, 8, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_p1_PerMessageIndicators },
3316   { &hf_p1_per_domain_bilateral_information, BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_p1_SEQUENCE_SIZE_1_ub_transfers_OF_PerDomainBilateralInformation },
3317   { &hf_p1_trace_information, BER_CLASS_APP, 9, BER_FLAGS_NOOWNTAG, dissect_p1_TraceInformation },
3318   { &hf_p1_extensions       , BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_p1_SET_OF_ExtensionField },
3319   { &hf_p1_per_recipient_probe_transfer_fields, BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_p1_SEQUENCE_SIZE_1_ub_recipients_OF_PerRecipientProbeTransferFields },
3320   { NULL, 0, 0, 0, NULL }
3321 };
3322
3323 static int
3324 dissect_p1_ProbeTransferEnvelope(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
3325   offset = dissect_ber_set(implicit_tag, actx, tree, tvb, offset,
3326                               ProbeTransferEnvelope_set, hf_index, ett_p1_ProbeTransferEnvelope);
3327
3328   return offset;
3329 }
3330
3331
3332
3333 static int
3334 dissect_p1_Probe(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
3335   offset = dissect_p1_ProbeTransferEnvelope(implicit_tag, tvb, offset, actx, tree, hf_index);
3336
3337   return offset;
3338 }
3339
3340
3341
3342 static int
3343 dissect_p1_ReportIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
3344   offset = dissect_p1_MTSIdentifier(implicit_tag, tvb, offset, actx, tree, hf_index);
3345
3346   return offset;
3347 }
3348
3349
3350
3351 static int
3352 dissect_p1_ReportDestinationName(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
3353   offset = dissect_p1_ORAddressAndOptionalDirectoryName(implicit_tag, tvb, offset, actx, tree, hf_index);
3354
3355   return offset;
3356 }
3357
3358
3359 static const ber_sequence_t ReportTransferEnvelope_set[] = {
3360   { &hf_p1_report_identifier, BER_CLASS_APP, 4, BER_FLAGS_NOOWNTAG, dissect_p1_ReportIdentifier },
3361   { &hf_p1_report_destination_name, BER_CLASS_APP, 0, BER_FLAGS_NOOWNTAG, dissect_p1_ReportDestinationName },
3362   { &hf_p1_trace_information, BER_CLASS_APP, 9, BER_FLAGS_NOOWNTAG, dissect_p1_TraceInformation },
3363   { &hf_p1_extensions       , BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_p1_SET_OF_ExtensionField },
3364   { NULL, 0, 0, 0, NULL }
3365 };
3366
3367 static int
3368 dissect_p1_ReportTransferEnvelope(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
3369   offset = dissect_ber_set(implicit_tag, actx, tree, tvb, offset,
3370                               ReportTransferEnvelope_set, hf_index, ett_p1_ReportTransferEnvelope);
3371
3372   return offset;
3373 }
3374
3375
3376
3377 static int
3378 dissect_p1_MessageOrProbeIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
3379   offset = dissect_p1_MTSIdentifier(implicit_tag, tvb, offset, actx, tree, hf_index);
3380
3381   return offset;
3382 }
3383
3384
3385
3386 static int
3387 dissect_p1_SubjectIdentifier(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
3388   offset = dissect_p1_MessageOrProbeIdentifier(implicit_tag, tvb, offset, actx, tree, hf_index);
3389
3390   return offset;
3391 }
3392
3393
3394
3395 static int
3396 dissect_p1_SubjectIntermediateTraceInformation(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
3397   offset = dissect_p1_TraceInformation(implicit_tag, tvb, offset, actx, tree, hf_index);
3398
3399   return offset;
3400 }
3401
3402
3403
3404 static int
3405 dissect_p1_AdditionalInformation(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
3406 #line 517 "../../asn1/p1/p1.cnf"
3407    proto_item *item = NULL;
3408    int         loffset = 0;
3409    guint32     len = 0;
3410
3411    /* work out the length */
3412    loffset = dissect_ber_identifier(actx->pinfo, tree, tvb, offset, NULL, NULL, NULL);
3413    (void) dissect_ber_length(actx->pinfo, tree, tvb, loffset, &len, NULL);
3414
3415    item = proto_tree_add_item(tree, hf_index, tvb, offset, len, ENC_BIG_ENDIAN);
3416    tree = proto_item_add_subtree(item, ett_p1_additional_information);
3417    proto_item_append_text(tree, " (The use of this field is \"strongly deprecated\".)"); 
3418
3419    offset = dissect_unknown_ber(actx->pinfo, tvb, offset, tree);
3420
3421
3422
3423   return offset;
3424 }
3425
3426
3427
3428 static int
3429 dissect_p1_MTAActualRecipientName(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
3430   offset = dissect_p1_ORAddressAndOptionalDirectoryName(implicit_tag, tvb, offset, actx, tree, hf_index);
3431
3432   return offset;
3433 }
3434
3435
3436
3437 int
3438 dissect_p1_MessageDeliveryTime(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
3439   offset = dissect_p1_Time(implicit_tag, tvb, offset, actx, tree, hf_index);
3440
3441   return offset;
3442 }
3443
3444
3445 static const value_string p1_TypeOfMTSUser_vals[] = {
3446   {   0, "public" },
3447   {   1, "private" },
3448   {   2, "ms" },
3449   {   3, "dl" },
3450   {   4, "pdau" },
3451   {   5, "physical-recipient" },
3452   {   6, "other" },
3453   { 0, NULL }
3454 };
3455
3456
3457 static int
3458 dissect_p1_TypeOfMTSUser(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
3459   offset = dissect_ber_constrained_integer(implicit_tag, actx, tree, tvb, offset,
3460                                                             0U, ub_mts_user_types, hf_index, NULL);
3461
3462   return offset;
3463 }
3464
3465
3466 static const ber_sequence_t DeliveryReport_set[] = {
3467   { &hf_p1_message_delivery_time, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_p1_MessageDeliveryTime },
3468   { &hf_p1_type_of_MTS_user , BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_p1_TypeOfMTSUser },
3469   { NULL, 0, 0, 0, NULL }
3470 };
3471
3472 static int
3473 dissect_p1_DeliveryReport(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
3474   offset = dissect_ber_set(implicit_tag, actx, tree, tvb, offset,
3475                               DeliveryReport_set, hf_index, ett_p1_DeliveryReport);
3476
3477   return offset;
3478 }
3479
3480
3481 const value_string p1_NonDeliveryReasonCode_vals[] = {
3482   {   0, "transfer-failure" },
3483   {   1, "unable-to-transfer" },
3484   {   2, "conversion-not-performed" },
3485   {   3, "physical-rendition-not-performed" },
3486   {   4, "physical-delivery-not-performed" },
3487   {   5, "restricted-delivery" },
3488   {   6, "directory-operation-unsuccessful" },
3489   {   7, "deferred-delivery-not-performed" },
3490   {   8, "transfer-failure-for-security-reason" },
3491   { 0, NULL }
3492 };
3493
3494
3495 int
3496 dissect_p1_NonDeliveryReasonCode(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
3497   offset = dissect_ber_constrained_integer(implicit_tag, actx, tree, tvb, offset,
3498                                                             0U, ub_reason_codes, hf_index, NULL);
3499
3500   return offset;
3501 }
3502
3503
3504 const value_string p1_NonDeliveryDiagnosticCode_vals[] = {
3505   {   0, "unrecognised-OR-name" },
3506   {   1, "ambiguous-OR-name" },
3507   {   2, "mts-congestion" },
3508   {   3, "loop-detected" },
3509   {   4, "recipient-unavailable" },
3510   {   5, "maximum-time-expired" },
3511   {   6, "encoded-information-types-unsupported" },
3512   {   7, "content-too-long" },
3513   {   8, "conversion-impractical" },
3514   {   9, "implicit-conversion-prohibited" },
3515   {  10, "implicit-conversion-not-subscribed" },
3516   {  11, "invalid-arguments" },
3517   {  12, "content-syntax-error" },
3518   {  13, "size-constraint-violation" },
3519   {  14, "protocol-violation" },
3520   {  15, "content-type-not-supported" },
3521   {  16, "too-many-recipients" },
3522   {  17, "no-bilateral-agreement" },
3523   {  18, "unsupported-critical-function" },
3524   {  19, "conversion-with-loss-prohibited" },
3525   {  20, "line-too-long" },
3526   {  21, "page-split" },
3527   {  22, "pictorial-symbol-loss" },
3528   {  23, "punctuation-symbol-loss" },
3529   {  24, "alphabetic-character-loss" },
3530   {  25, "multiple-information-loss" },
3531   {  26, "recipient-reassignment-prohibited" },
3532   {  27, "redirection-loop-detected" },
3533   {  28, "dl-expansion-prohibited" },
3534   {  29, "no-dl-submit-permission" },
3535   {  30, "dl-expansion-failure" },
3536   {  31, "physical-rendition-attributes-not-supported" },
3537   {  32, "undeliverable-mail-physical-delivery-address-incorrect" },
3538   {  33, "undeliverable-mail-physical-delivery-office-incorrect-or-invalid" },
3539   {  34, "undeliverable-mail-physical-delivery-address-incomplete" },
3540   {  35, "undeliverable-mail-recipient-unknown" },
3541   {  36, "undeliverable-mail-recipient-deceased" },
3542   {  37, "undeliverable-mail-organization-expired" },
3543   {  38, "undeliverable-mail-recipient-refused-to-accept" },
3544   {  39, "undeliverable-mail-recipient-did-not-claim" },
3545   {  40, "undeliverable-mail-recipient-changed-address-permanently" },
3546   {  41, "undeliverable-mail-recipient-changed-address-temporarily" },
3547   {  42, "undeliverable-mail-recipient-changed-temporary-address" },
3548   {  43, "undeliverable-mail-new-address-unknown" },
3549   {  44, "undeliverable-mail-recipient-did-not-want-forwarding" },
3550   {  45, "undeliverable-mail-originator-prohibited-forwarding" },
3551   {  46, "secure-messaging-error" },
3552   {  47, "unable-to-downgrade" },
3553   {  48, "unable-to-complete-transfer" },
3554   {  49, "transfer-attempts-limit-reached" },
3555   {  50, "incorrect-notification-type" },
3556   {  51, "dl-expansion-prohibited-by-security-policy" },
3557   {  52, "forbidden-alternate-recipient" },
3558   {  53, "security-policy-violation" },
3559   {  54, "security-services-refusal" },
3560   {  55, "unauthorised-dl-member" },
3561   {  56, "unauthorised-dl-name" },
3562   {  57, "unauthorised-originally-intended-recipient-name" },
3563   {  58, "unauthorised-originator-name" },
3564   {  59, "unauthorised-recipient-name" },
3565   {  60, "unreliable-system" },
3566   {  61, "authentication-failure-on-subject-message" },
3567   {  62, "decryption-failed" },
3568   {  63, "decryption-key-unobtainable" },
3569   {  64, "double-envelope-creation-failure" },
3570   {  65, "double-enveloping-message-restoring-failure" },
3571   {  66, "failure-of-proof-of-message" },
3572   {  67, "integrity-failure-on-subject-message" },
3573   {  68, "invalid-security-label" },
3574   {  69, "key-failure" },
3575   {  70, "mandatory-parameter-absence" },
3576   {  71, "operation-security-failure" },
3577   {  72, "repudiation-failure-of-message" },
3578   {  73, "security-context-failure" },
3579   {  74, "token-decryption-failed" },
3580   {  75, "token-error" },
3581   {  76, "unknown-security-label" },
3582   {  77, "unsupported-algorithm-identifier" },
3583   {  78, "unsupported-security-policy" },
3584   { 0, NULL }
3585 };
3586
3587
3588 int
3589 dissect_p1_NonDeliveryDiagnosticCode(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
3590   offset = dissect_ber_constrained_integer(implicit_tag, actx, tree, tvb, offset,
3591                                                             0U, ub_diagnostic_codes, hf_index, NULL);
3592
3593   return offset;
3594 }
3595
3596
3597 static const ber_sequence_t NonDeliveryReport_set[] = {
3598   { &hf_p1_non_delivery_reason_code, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_p1_NonDeliveryReasonCode },
3599   { &hf_p1_non_delivery_diagnostic_code, BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_p1_NonDeliveryDiagnosticCode },
3600   { NULL, 0, 0, 0, NULL }
3601 };
3602
3603 static int
3604 dissect_p1_NonDeliveryReport(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
3605   offset = dissect_ber_set(implicit_tag, actx, tree, tvb, offset,
3606                               NonDeliveryReport_set, hf_index, ett_p1_NonDeliveryReport);
3607
3608   return offset;
3609 }
3610
3611
3612 static const value_string p1_ReportType_vals[] = {
3613   {   0, "delivery" },
3614   {   1, "non-delivery" },
3615   { 0, NULL }
3616 };
3617
3618 static const ber_choice_t ReportType_choice[] = {
3619   {   0, &hf_p1_delivery         , BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_p1_DeliveryReport },
3620   {   1, &hf_p1_non_delivery     , BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_p1_NonDeliveryReport },
3621   { 0, NULL, 0, 0, 0, NULL }
3622 };
3623
3624 static int
3625 dissect_p1_ReportType(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
3626 #line 1286 "../../asn1/p1/p1.cnf"
3627         gint report = -1;
3628
3629           offset = dissect_ber_choice(actx, tree, tvb, offset,
3630                                  ReportType_choice, hf_index, ett_p1_ReportType,
3631                                  &report);
3632
3633         
3634         if( (report!=-1) && p1_ReportType_vals[report].strptr ){
3635                 if(check_col(actx->pinfo->cinfo, COL_INFO)) {
3636                         col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %s", p1_ReportType_vals[report].strptr);
3637                 }
3638         }
3639
3640
3641
3642   return offset;
3643 }
3644
3645
3646 static const ber_sequence_t LastTraceInformation_set[] = {
3647   { &hf_p1_arrival_time     , BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_p1_ArrivalTime },
3648   { &hf_p1_converted_encoded_information_types, BER_CLASS_APP, 5, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_p1_ConvertedEncodedInformationTypes },
3649   { &hf_p1_trace_report_type, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG|BER_FLAGS_NOTCHKTAG, dissect_p1_ReportType },
3650   { NULL, 0, 0, 0, NULL }
3651 };
3652
3653 static int
3654 dissect_p1_LastTraceInformation(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
3655   offset = dissect_ber_set(implicit_tag, actx, tree, tvb, offset,
3656                               LastTraceInformation_set, hf_index, ett_p1_LastTraceInformation);
3657
3658   return offset;
3659 }
3660
3661
3662
3663 static int
3664 dissect_p1_OriginallyIntendedRecipientName(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
3665   offset = dissect_p1_ORAddressAndOptionalDirectoryName(implicit_tag, tvb, offset, actx, tree, hf_index);
3666
3667   return offset;
3668 }
3669
3670
3671
3672 int
3673 dissect_p1_SupplementaryInformation(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
3674   offset = dissect_ber_constrained_restricted_string(implicit_tag, BER_UNI_TAG_PrintableString,
3675                                                         actx, tree, tvb, offset,
3676                                                         1, ub_supplementary_info_length, hf_index, NULL);
3677
3678   return offset;
3679 }
3680
3681
3682 static const ber_sequence_t PerRecipientReportTransferFields_set[] = {
3683   { &hf_p1_mta_actual_recipient_name, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_p1_MTAActualRecipientName },
3684   { &hf_p1_originally_specified_recipient_number, BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_p1_OriginallySpecifiedRecipientNumber },
3685   { &hf_p1_per_recipient_indicators, BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_p1_PerRecipientIndicators },
3686   { &hf_p1_last_trace_information, BER_CLASS_CON, 3, BER_FLAGS_IMPLTAG, dissect_p1_LastTraceInformation },
3687   { &hf_p1_report_originally_intended_recipient_name, BER_CLASS_CON, 4, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_p1_OriginallyIntendedRecipientName },
3688   { &hf_p1_supplementary_information, BER_CLASS_CON, 5, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_p1_SupplementaryInformation },
3689   { &hf_p1_extensions       , BER_CLASS_CON, 6, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_p1_SET_OF_ExtensionField },
3690   { NULL, 0, 0, 0, NULL }
3691 };
3692
3693 static int
3694 dissect_p1_PerRecipientReportTransferFields(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
3695   offset = dissect_ber_set(implicit_tag, actx, tree, tvb, offset,
3696                               PerRecipientReportTransferFields_set, hf_index, ett_p1_PerRecipientReportTransferFields);
3697
3698   return offset;
3699 }
3700
3701
3702 static const ber_sequence_t SEQUENCE_SIZE_1_ub_recipients_OF_PerRecipientReportTransferFields_sequence_of[1] = {
3703   { &hf_p1_per_recipient_report_fields_item, BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_p1_PerRecipientReportTransferFields },
3704 };
3705
3706 static int
3707 dissect_p1_SEQUENCE_SIZE_1_ub_recipients_OF_PerRecipientReportTransferFields(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
3708   offset = dissect_ber_constrained_sequence_of(implicit_tag, actx, tree, tvb, offset,
3709                                                   1, ub_recipients, SEQUENCE_SIZE_1_ub_recipients_OF_PerRecipientReportTransferFields_sequence_of, hf_index, ett_p1_SEQUENCE_SIZE_1_ub_recipients_OF_PerRecipientReportTransferFields);
3710
3711   return offset;
3712 }
3713
3714
3715 static const ber_sequence_t ReportTransferContent_set[] = {
3716   { &hf_p1_subject_identifier, BER_CLASS_APP, 4, BER_FLAGS_NOOWNTAG, dissect_p1_SubjectIdentifier },
3717   { &hf_p1_subject_intermediate_trace_information, BER_CLASS_APP, 9, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_p1_SubjectIntermediateTraceInformation },
3718   { &hf_p1_original_encoded_information_types, BER_CLASS_APP, 5, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_p1_OriginalEncodedInformationTypes },
3719   { &hf_p1_content_type     , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_p1_ContentType },
3720   { &hf_p1_content_identifier, BER_CLASS_APP, 10, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_p1_ContentIdentifier },
3721   { &hf_p1_returned_content , BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_p1_Content },
3722   { &hf_p1_additional_information, BER_CLASS_CON, 2, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_p1_AdditionalInformation },
3723   { &hf_p1_extensions       , BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_p1_SET_OF_ExtensionField },
3724   { &hf_p1_per_recipient_report_fields, BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_p1_SEQUENCE_SIZE_1_ub_recipients_OF_PerRecipientReportTransferFields },
3725   { NULL, 0, 0, 0, NULL }
3726 };
3727
3728 static int
3729 dissect_p1_ReportTransferContent(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
3730   offset = dissect_ber_set(implicit_tag, actx, tree, tvb, offset,
3731                               ReportTransferContent_set, hf_index, ett_p1_ReportTransferContent);
3732
3733   return offset;
3734 }
3735
3736
3737 static const ber_sequence_t Report_sequence[] = {
3738   { &hf_p1_report_envelope  , BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_p1_ReportTransferEnvelope },
3739   { &hf_p1_report_content   , BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_p1_ReportTransferContent },
3740   { NULL, 0, 0, 0, NULL }
3741 };
3742
3743 static int
3744 dissect_p1_Report(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
3745   offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
3746                                    Report_sequence, hf_index, ett_p1_Report);
3747
3748   return offset;
3749 }
3750
3751
3752 static const value_string p1_MTS_APDU_vals[] = {
3753   {   0, "message" },
3754   {   2, "probe" },
3755   {   1, "report" },
3756   { 0, NULL }
3757 };
3758
3759 static const ber_choice_t MTS_APDU_choice[] = {
3760   {   0, &hf_p1_message          , BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_p1_Message },
3761   {   2, &hf_p1_probe            , BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_p1_Probe },
3762   {   1, &hf_p1_report           , BER_CLASS_CON, 1, BER_FLAGS_IMPLTAG, dissect_p1_Report },
3763   { 0, NULL, 0, 0, 0, NULL }
3764 };
3765
3766 static int
3767 dissect_p1_MTS_APDU(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
3768 #line 1272 "../../asn1/p1/p1.cnf"
3769         gint apdu = -1;
3770
3771           offset = dissect_ber_choice(actx, tree, tvb, offset,
3772                                  MTS_APDU_choice, hf_index, ett_p1_MTS_APDU,
3773                                  &apdu);
3774
3775         
3776         if( (apdu!=-1) && p1_MTS_APDU_vals[apdu].strptr ){
3777                 if(check_col(actx->pinfo->cinfo, COL_INFO) && (apdu != 0)) { /* we don't show "message" - sub-dissectors have better idea */
3778                         col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %s", p1_MTS_APDU_vals[apdu].strptr);
3779                 }
3780         }
3781
3782
3783
3784   return offset;
3785 }
3786
3787
3788
3789
3790
3791 static const value_string p1_T_attempted_vals[] = {
3792   {   0, "mta" },
3793   {   1, "domain" },
3794   { 0, NULL }
3795 };
3796
3797 static const ber_choice_t T_attempted_choice[] = {
3798   {   0, &hf_p1_mta              , BER_CLASS_UNI, BER_UNI_TAG_IA5String, BER_FLAGS_NOOWNTAG, dissect_p1_MTAName },
3799   {   1, &hf_p1_domain           , BER_CLASS_APP, 3, BER_FLAGS_NOOWNTAG, dissect_p1_GlobalDomainIdentifier },
3800   { 0, NULL, 0, 0, 0, NULL }
3801 };
3802
3803 static int
3804 dissect_p1_T_attempted(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
3805   offset = dissect_ber_choice(actx, tree, tvb, offset,
3806                                  T_attempted_choice, hf_index, ett_p1_T_attempted,
3807                                  NULL);
3808
3809   return offset;
3810 }
3811
3812
3813 static const ber_sequence_t MTASuppliedInformation_set[] = {
3814   { &hf_p1_arrival_time     , BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, dissect_p1_ArrivalTime },
3815   { &hf_p1_routing_action   , BER_CLASS_CON, 2, BER_FLAGS_IMPLTAG, dissect_p1_RoutingAction },
3816   { &hf_p1_attempted        , BER_CLASS_ANY/*choice*/, -1/*choice*/, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG|BER_FLAGS_NOTCHKTAG, dissect_p1_T_attempted },
3817   { &hf_p1_deferred_time    , BER_CLASS_CON, 1, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_p1_DeferredTime },
3818   { &hf_p1_converted_encoded_information_types, BER_CLASS_APP, 5, BER_FLAGS_OPTIONAL|BER_FLAGS_NOOWNTAG, dissect_p1_ConvertedEncodedInformationTypes },
3819   { &hf_p1_other_actions    , BER_CLASS_CON, 3, BER_FLAGS_OPTIONAL|BER_FLAGS_IMPLTAG, dissect_p1_OtherActions },
3820   { NULL, 0, 0, 0, NULL }
3821 };
3822
3823 static int
3824 dissect_p1_MTASuppliedInformation(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
3825 #line 1174 "../../asn1/p1/p1.cnf"
3826
3827         doing_address = FALSE;
3828
3829           offset = dissect_ber_set(implicit_tag, actx, tree, tvb, offset,
3830                               MTASuppliedInformation_set, hf_index, ett_p1_MTASuppliedInformation);
3831
3832
3833         doing_address = TRUE;
3834         proto_item_append_text(tree, ")");
3835
3836
3837
3838   return offset;
3839 }
3840
3841
3842 static const ber_sequence_t InternalTraceInformationElement_sequence[] = {
3843   { &hf_p1_global_domain_identifier, BER_CLASS_APP, 3, BER_FLAGS_NOOWNTAG, dissect_p1_GlobalDomainIdentifier },
3844   { &hf_p1_mta_name         , BER_CLASS_UNI, BER_UNI_TAG_IA5String, BER_FLAGS_NOOWNTAG, dissect_p1_MTAName },
3845   { &hf_p1_mta_supplied_information, BER_CLASS_UNI, BER_UNI_TAG_SET, BER_FLAGS_NOOWNTAG, dissect_p1_MTASuppliedInformation },
3846   { NULL, 0, 0, 0, NULL }
3847 };
3848
3849 static int
3850 dissect_p1_InternalTraceInformationElement(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
3851 #line 1157 "../../asn1/p1/p1.cnf"
3852
3853         doing_address = TRUE;
3854
3855           offset = dissect_ber_sequence(implicit_tag, actx, tree, tvb, offset,
3856                                    InternalTraceInformationElement_sequence, hf_index, ett_p1_InternalTraceInformationElement);
3857
3858
3859         doing_address = FALSE;
3860
3861
3862
3863   return offset;
3864 }
3865
3866
3867 static const ber_sequence_t InternalTraceInformation_sequence_of[1] = {
3868   { &hf_p1_InternalTraceInformation_item, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_p1_InternalTraceInformationElement },
3869 };
3870
3871 static int
3872 dissect_p1_InternalTraceInformation(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
3873   offset = dissect_ber_constrained_sequence_of(implicit_tag, actx, tree, tvb, offset,
3874                                                   1, ub_transfers, InternalTraceInformation_sequence_of, hf_index, ett_p1_InternalTraceInformation);
3875
3876   return offset;
3877 }
3878
3879
3880
3881
3882 static const value_string p1_ObjectName_vals[] = {
3883   {   0, "user-agent" },
3884   {   1, "mTA" },
3885   {   2, "message-store" },
3886   { 0, NULL }
3887 };
3888
3889 static const ber_choice_t ObjectName_choice[] = {
3890   {   0, &hf_p1_user_agent       , BER_CLASS_APP, 0, BER_FLAGS_NOOWNTAG, dissect_p1_ORAddressAndOptionalDirectoryName },
3891   {   1, &hf_p1_mTA              , BER_CLASS_CON, 0, BER_FLAGS_IMPLTAG, di