aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/asn1/p1/p1.cnf
blob: bed9cab2deb036e7a7153e14572331298eac7a67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
# p1.cnf
# X.411 (MTA Access and Transfer) conformance file

#.TYPE_ATTR
CountryName	TYPE = FT_UINT32  DISPLAY = BASE_DEC   STRINGS = VALS(p1_CountryName_U_vals)  BITMASK = 0
Time		TYPE = FT_STRING  DISPLAY = BASE_NONE  STRING = NULL BITMASK = 0

#.IMPORT ../x509ce/x509ce-exp.cnf
#.IMPORT ../x509if/x509if-exp.cnf
#.IMPORT ../x509sat/x509sat-exp.cnf
#.IMPORT ../x509af/x509af-exp.cnf
#.IMPORT ../ros/ros-exp.cnf
#.IMPORT ../rtse/rtse-exp.cnf

#.OMIT_ASSIGNMENT
# These gives unused code warnings
MTAOriginatorRequestedAlternateRecipient

#The following are only referenced through the SIGNATURE MACRO
#and so have no representation on the wire.
ProofOfDeliveryAlgorithmIdentifier
ContentIntegrityAlgorithmIdentifier
MessageOriginAuthenticationAlgorithmIdentifier
ProbeOriginAuthenticationAlgorithmIdentifier
ReportOriginAuthenticationAlgorithmIdentifier
ProofOfSubmissionAlgorithmIdentifier

BilateralDomain
DeliveryControls
RTSE-apdus
MTSInvokeIds
ID
RTTPapdu
RTTRapdu
RTABapdu
AbortReason
#.END

#.OMIT_ASSIGNMENT
PerRecipientReportFields
#PerRecipientReportFields/report-type

#.NO_EMIT
# These fields are only used through COMPONENTS OF,
# and consequently generate unused code warnings
PerMessageTransferFields
PerProbeTransferFields
PerReportTransferFields
PerMessageSubmissionFields
PerProbeSubmissionFields
PerReportDeliveryFields
PerRecipientDeliveryReportFields
PerRecipientNonDeliveryReportFields

InternalAdditionalActions
AdditionalActions
NonBasicParameters
#.END

#.EXPORTS
EXTENSION
Content
ContentIdentifier
ContentIntegrityCheck
ContentLength
ContentType
Credentials
EncodedInformationTypes
EncodedInformationTypesConstraints
ExtendedCertificates
ExtendedContentType
ExtensionField
G3FacsimileNonBasicParameters
ImproperlySpecifiedRecipients
InitiatorCredentials
MessageDeliveryIdentifier
MessageDeliveryTime
MessageOriginAuthenticationCheck
MessageSecurityLabel
MessageSecurityLabel_PDU
MessageSubmissionEnvelope
MessageSubmissionIdentifier
MessageSubmissionTime
MessageToken
ORAddress
ORAddressAndOrDirectoryName
OriginatorName
ORName
OriginalEncodedInformationTypes
OriginatingMTACertificate
OtherMessageDeliveryFields
PerMessageIndicators
PerRecipientProbeSubmissionFields
ProbeSubmissionEnvelope
ProbeSubmissionIdentifier
ProbeSubmissionTime
ProofOfSubmission
RequestedDeliveryMethod
ResponderCredentials
SecurityContext
SecurityLabel
SecurityProblem
SupplementaryInformation
TeletexNonBasicParameters
UniversalOrBMPString
NonDeliveryReasonCode
NonDeliveryDiagnosticCode

#.SYNTAX
ORAddress
ORName

# Forward declaration of Classes
# CONNECTION-PACKAGE CONTRACT from ROS
#.CLASS CONNECTION-PACKAGE
&bind                ClassReference OPERATION
&unbind              ClassReference OPERATION
&responderCanUnbind  BooleanType
&unbindCanFail       BooleanType
&id                  ObjectIdentifierType
#.END

#.CLASS APPLICATION-CONTEXT
&associationContract	ClassReference CONTRACT
&associationRealization
&transferRealization
&AbstractSyntaxes	ClassReference ABSTRACT-SYNTAX
&applicationContextName	ObjectIdentifierType
#.END


#.CLASS CONTRACT
&connection           ClassReference CONNECTION-PACKAGE
&OperationsOf         ClassReference OPERATION-PACKAGE
&InitiatorConsumerOf  ClassReference OPERATION-PACKAGE
&InitiatorSupplierOf  ClassReference OPERATION-PACKAGE
&id                   ObjectIdentifierType
#.END

#.CLASS MHS-OBJECT
&Is                    ClassReference MHS-OBJECT
&Initiates             ClassReference CONTRACT
&Responds              ClassReference CONTRACT
&InitiatesAndResponds  ClassReference CONTRACT
&id                    ObjectIdentifierType
#.END

# Ros OPERATION
#.CLASS ABSTRACT-OPERATION
&ArgumentType
&argumentTypeOptional  BooleanType
&returnResult          BooleanType
&ResultType
&resultTypeOptional    BooleanType
&Errors                ClassReference ERROR
&Linked                ClassReference OPERATION
&synchronous           BooleanType
&alwaysReturns         BooleanType
&InvokePriority        _FixedTypeValueSetFieldSpec
&ResultPriority        _FixedTypeValueSetFieldSpec
&operationCode         TypeReference Code
#.END

# ros ERROR
#.CLASS ABSTRACT-ERROR
&ParameterType
&parameterTypeOptional  BooleanType
&ErrorPriority          _FixedTypeValueSetFieldSpec
&errorCode              TypeReference Code
#.END

#.CLASS EXTENSION
&id			TypeReference ExtensionType
&Type
&absent			_VariableTypeValueSetFieldSpec
&recommended		TypeReference Criticality
#.END

#.CLASS EXTENSION-ATTRIBUTE
&id			IntegerType
&Type
#.END

#.CLASS TOKEN-DATA
&id			IntegerType
&Type
#.END


#.TYPE_RENAME
MTABindArgument/authenticated	AuthenticatedArgument
MTABindResult/authenticated	AuthenticatedResult

ExtensionField/value		ExtensionValue
SecurityCategory/value		CategoryValue

#.FIELD_RENAME
PrivateDomainName/printable		printable-private-domain-name
PrivateDomainName/numeric		numeric-private-domain-name
PrivateDomainIdentifier/printable	printable-private-domain-identifier
PrivateDomainIdentifier/numeric		numeric-private-domain-identifier

TeletexPersonalName/surname	teletex-surname
PersonalName/surname		printable-surname
UniversalPersonalName/surname	universal-surname

TeletexPersonalName/given-name	teletex-given-name
PersonalName/given-name		printable-given-name
UniversalPersonalName/given-name	universal-given-name

TeletexPersonalName/initials	teletex-initials
PersonalName/initials		printable-initials
UniversalPersonalName/initials	universal-initials

TeletexPersonalName/generation-qualifier	teletex-generation-qualifier
PersonalName/generation-qualifier		printable-generation-qualifier
UniversalPersonalName/generation-qualifier	universal-generation-qualifier

BuiltInDomainDefinedAttribute/type	printable-type
UniversalDomainDefinedAttribute/type	universal-type
SecurityCategory/type			category-type
ExtensionField/type			extension-type

TeletexDomainDefinedAttribute/value	teletex-value
BuiltInDomainDefinedAttribute/value	printable-value
UniversalDomainDefinedAttribute/value	universal-value
SecurityCategory/value			category-value
ExtensionField/value			extension-value

LastTraceInformation/report-type	trace-report-type
PerRecipientReportDeliveryFields/report-type	delivery-report-type
#PerRecipientReportFields/report-type/delivery		report-type-delivery

PerRecipientMessageSubmissionFields/recipient-name	submission-recipient-name
PerRecipientProbeSubmissionFields/recipient-name	probe-recipient-name

PerRecipientReportTransferFields/actual-recipient-name	mta-actual-recipient-name

MessageClass/priority			class-priority
DeliveryQueue/octets			delivery-queue-octets
#PerRecipientReportFields/report-type/non-delivery	non-delivery-report

MTABindResult/authenticated	authenticated-result
MTABindArgument/authenticated	authenticated-argument

MTABindResult/authenticated/responder-name	authenticated-responder-name
MTABindArgument/authenticated/initiator-name	authenticated-initiator-name

RegistrationTypes/extensions		type-extensions
RegistrationTypes/extensions/_item	type-extensions-item

MessageSubmissionArgument/envelope	message-submission-envelope

OtherMessageDeliveryFields/content-type	delivered-content-type
Report/content				report-content

ReportDeliveryResult/extensions		max-extensions

OtherMessageDeliveryFields/originator-name	delivered-originator-name

PDSParameter/teletex-string		pds-teletex-string

PerDomainBilateralInformation/domain	bilateral-domain

Report/envelope				report-envelope
Message/envelope			message-envelope

PerRecipientReportTransferFields/originally-intended-recipient-name	report-originally-intended-recipient-name

MessageSubmissionEnvelope/originator-name	mts-originator-name
ProbeSubmissionEnvelope/originator-name		mts-originator-name

MessageTransferEnvelope/originator-name		mta-originator-name
ProbeTransferEnvelope/originator-name		mta-originator-name

MessageSubmissionEnvelope/per-recipient-fields	per-recipient-message-submission-fields
ProbeTransferEnvelope/per-recipient-fields	per-recipient-probe-transfer-fields
ProbeSubmissionEnvelope/per-recipient-fields	per-recipient-probe-submission-fields
ReportDeliveryArgument/per-recipient-fields	per-recipient-report-delivery-fields
ReportDeliveryEnvelope/per-recipient-fields	per-recipient-report-delivery-fields

MessageSubmissionEnvelope/per-recipient-fields/_item	per-recipient-message-submission-fields-item
ProbeTransferEnvelope/per-recipient-fields/_item	per-recipient-probe-transfer-fields-item
ProbeSubmissionEnvelope/per-recipient-fields/_item	per-recipient-probe-submission-fields-item
ReportDeliveryArgument/per-recipient-fields/_item	per-recipient-report-delivery-fields-item
ReportDeliveryEnvelope/per-recipient-fields/_item	per-recipient-report-delivery-fields-item

MessageTransferEnvelope/per-recipient-fields/_item	per-recipient-message-fields-item

MessageTransferEnvelope/per-recipient-fields		per-recipient-message-fields
ReportTransferContent/per-recipient-fields		per-recipient-report-fields

AsymmetricTokenData/name/mta				token-mta
AsymmetricTokenData/name/recipient-name			token-recipient-name

TokenData/type						token-data-type
CertificateSelectors/content-integrity-check		selectors-content-integrity-check
PerMessageTransferFields/originator-name			perMessageTransferFields_originator-name
PerProbeTransferFields/originator-name				perProbeTransferFields_originator-name
PerMessageSubmissionFields/originator-name			perMessageSubmissionFields_originator-name
PerProbeSubmissionFields/originator-name			perProbeSubmissionFields_originator-name

#.FIELD_ATTR
PerMessageTransferFields/originator-name			ABBREV=perMessageTransferFields.originator-name
PerProbeTransferFields/originator-name				ABBREV=perProbeTransferFields.originator-name
PerMessageSubmissionFields/originator-name			ABBREV=perMessageSubmissionFields.originator-name
PerProbeSubmissionFields/originator-name			ABBREV=perProbeSubmissionFields.originator-name
MTABindArgument/authenticated/initiator-name		ABBREV=authenticated.initiator-name
MTABindResult/authenticated/responder-name			ABBREV=authenticated.responder-name
DeliveryQueue/octets								ABBREV=delivery-queue.octets
BuiltInDomainDefinedAttribute/type					ABBREV=printable.type
UniversalDomainDefinedAttribute/type				ABBREV=universal.type
SecurityCategory/type								ABBREV=category.type
ExtensionField/type									ABBREV=extension.type
TokenData/type										ABBREV=token-data-type

# This table creates the value_sting to name P3 operation codes and errors
# in file packet-p3-table.c which is included in the template file
#
#.TABLE_HDR
/* P3 ABSTRACT-OPERATIONS */
const value_string p3_opr_code_string_vals[] = {
#.TABLE_BODY OPERATION
	{ %(&operationCode)s, "%(_ident)s" },
#.TABLE_FTR
	{ 0, NULL }
};
#.END

#.TABLE_HDR
/* P3 ERRORS */
static const value_string p3_err_code_string_vals[] = {
#.TABLE_BODY ERROR
	{ %(&errorCode)s, "%(_ident)s" },
#.TABLE_FTR
	  { 0, NULL }
};
#.END

# Create a table of opcode and corresponding args and res
#.TABLE11_HDR
static const ros_opr_t p3_opr_tab[] = {
#.TABLE11_BODY OPERATION
  /* %(_name)s */
  { %(&operationCode)-25s,	%(_argument_pdu)s,	%(_result_pdu)s },
#.TABLE11_FTR
  { 0,				(dissector_t)(-1),	(dissector_t)(-1) },
};
#.END

#.TABLE21_HDR
static const ros_err_t p3_err_tab[] = {
#.TABLE21_BODY ERROR
  /* %(_name)s*/
  { %(&errorCode)s,	%(_parameter_pdu)s },
#.TABLE21_FTR
  { 0,	(dissector_t)(-1) },
};
#.END

#.PDU
ERROR.&ParameterType
OPERATION.&ArgumentType
OPERATION.&ResultType
#.END


#.REGISTER
RecipientReassignmentProhibited				N p1.extension 1
OriginatorRequestedAlternateRecipient	N p1.extension 2
DLExpansionProhibited						N p1.extension 3
ConversionWithLossProhibited				N p1.extension 4
LatestDeliveryTime							N p1.extension 5
RequestedDeliveryMethod						N p1.extension 6
PhysicalForwardingProhibited				N p1.extension 7
PhysicalForwardingAddressRequest			N p1.extension 8
PhysicalDeliveryModes						N p1.extension 9
RegisteredMailType							N p1.extension 10
RecipientNumberForAdvice					N p1.extension 11
PhysicalRenditionAttributes					N p1.extension 12
OriginatorReturnAddress						N p1.extension 13
PhysicalDeliveryReportRequest				N p1.extension 14
OriginatorCertificate						N p1.extension 15
MessageToken								N p1.extension 16
ContentConfidentialityAlgorithmIdentifier	N p1.extension 17
ContentIntegrityCheck						N p1.extension 18
MessageOriginAuthenticationCheck			N p1.extension 19
MessageSecurityLabel						N p1.extension 20
ProofOfSubmissionRequest					N p1.extension 21
ProofOfDeliveryRequest						N p1.extension 22
ContentCorrelator							N p1.extension 23
ProbeOriginAuthenticationCheck				N p1.extension 24
RedirectionHistory							N p1.extension 25
DLExpansionHistory							N p1.extension 26
PhysicalForwardingAddress					N p1.extension 27
RecipientCertificate						N p1.extension 28
ProofOfDelivery								N p1.extension 29
OriginatorAndDLExpansionHistory				N p1.extension 30
ReportingDLName								N p1.extension 31
ReportingMTACertificate						N p1.extension 32
ReportOriginAuthenticationCheck				N p1.extension 33
OriginatingMTACertificate						N p1.extension 34
ProofOfSubmission							N p1.extension 35

TraceInformation							N p1.extension 37
InternalTraceInformation					N p1.extension 38
ReportingMTAName							N p1.extension 39
ExtendedCertificates						N p1.extension 40

DLExemptedRecipients						N p1.extension 42

CertificateSelectors						N p1.extension 45

CommonName									N p1.extension-attribute 1
TeletexCommonName							N p1.extension-attribute 2
TeletexOrganizationName						N p1.extension-attribute 3
TeletexPersonalName							N p1.extension-attribute 4
TeletexOrganizationalUnitNames				N p1.extension-attribute 5
TeletexDomainDefinedAttributes				N p1.extension-attribute 6
PDSName										N p1.extension-attribute 7
PhysicalDeliveryCountryName					N p1.extension-attribute 8
PostalCode									N p1.extension-attribute 9
PhysicalDeliveryOfficeName					N p1.extension-attribute 10
PhysicalDeliveryOfficeNumber				N p1.extension-attribute 11
ExtensionORAddressComponents				N p1.extension-attribute 12
PhysicalDeliveryPersonalName				N p1.extension-attribute 13
PhysicalDeliveryOrganizationName			N p1.extension-attribute 14
ExtensionPhysicalDeliveryAddressComponents	N p1.extension-attribute 15
UnformattedPostalAddress					N p1.extension-attribute 16
StreetAddress								N p1.extension-attribute 17
PostOfficeBoxAddress						N p1.extension-attribute 18
PosteRestanteAddress						N p1.extension-attribute 19
UniquePostalName							N p1.extension-attribute 20
LocalPostalAttributes						N p1.extension-attribute 21
ExtendedNetworkAddress						N p1.extension-attribute 22
TerminalType								N p1.extension-attribute 23
UniversalCommonName							N p1.extension-attribute 24
UniversalOrganizationName					N p1.extension-attribute 25
UniversalPersonalName						N p1.extension-attribute 26
UniversalOrganizationalUnitNames			N p1.extension-attribute 27
UniversalDomainDefinedAttributes			N p1.extension-attribute 28
UniversalPhysicalDeliveryOfficeName			N p1.extension-attribute 29
UniversalPhysicalDeliveryOfficeNumber		N p1.extension-attribute 30
UniversalExtensionORAddressComponents		N p1.extension-attribute 31
UniversalPhysicalDeliveryPersonalName		N p1.extension-attribute 32
UniversalPhysicalDeliveryOrganizationName	N p1.extension-attribute 33
UniversalExtensionPhysicalDeliveryAddressComponents N p1.extension-attribute 34
UniversalUnformattedPostalAddress			N p1.extension-attribute 35
UniversalStreetAddress						N p1.extension-attribute 36
UniversalPostOfficeBoxAddress				N p1.extension-attribute 37
UniversalPosteRestanteAddress				N p1.extension-attribute 38
UniversalUniquePostalName					N p1.extension-attribute 39
UniversalLocalPostalAttributes				N p1.extension-attribute 40

#ReportDeliveryArgument	B	"2.6.1.4.14"	"id-et-report"

AsymmetricToken			B	"2.6.3.6.0"	"id-tok-asymmetricToken"
MTANameAndOptionalGDI	B	"2.6.5.6.0"	"id-on-mtaName"

BindTokenSignedData			N	p1.tokendata 1
MessageTokenSignedData		N	p1.tokendata 2
# the next two are unlikely to ever be seen (unless in a bad encoding)
MessageTokenEncryptedData	N	p1.tokendata 3
BindTokenEncryptedData		N	p1.tokendata 4

# X402 - see master list in acp133.cnf

ContentLength					B "2.6.5.2.0" "id-at-mhs-maximum-content-length"
ExtendedContentType				B "2.6.5.2.1" "id-at-mhs-deliverable-content-types"
ExtendedEncodedInformationType	B "2.6.5.2.2" "id-at-mhs-exclusively-acceptable-eits"
ORName							B "2.6.5.2.3" "id-at-mhs-dl-members"
ORAddress						B "2.6.5.2.6" "id-at-mhs-or-addresses"
ExtendedContentType				B "2.6.5.2.9" "id-at-mhs-supported-content-types"
ORName							B "2.6.5.2.12" "id-at-mhs-dl-archive-service"
ORName							B "2.6.5.2.15" "id-at-mhs-dl-subscription-service"
ExtendedEncodedInformationType	B "2.6.5.2.17" "id-at-mhs-acceptable-eits"
ExtendedEncodedInformationType	B "2.6.5.2.18" "id-at-mhs-unacceptable-eits"


# ACP133 - see master list in acp133.cnf
ORName								B "2.16.840.1.101.2.1.5.47" "id-at-aLExemptedAddressProcessor"
ORAddress							B "2.16.840.1.101.2.2.1.134.1" "id-at-collective-mhs-or-addresses"

# MSGeneralAttributeTypes - see master list in p7.cnf
CertificateSelectors				B	"2.6.4.3.80"	"id-att-certificate-selectors"
Content								B	"2.6.4.3.1"		"id-att-content"
ContentCorrelator					B	"2.6.4.3.3"		"id-att-content-correlator"
ContentIdentifier					B	"2.6.4.3.4"		"id-att-content-identifier"
ContentIntegrityCheck				B	"2.6.4.3.5"		"id-att-content-inetgrity-check"
ContentLength						B	"2.6.4.3.6"		"id-att-content-length"
ExtendedContentType					B	"2.6.4.3.8"		"id-att-content-type"
ConversionWithLossProhibited		B	"2.6.4.3.9"		"id-att-conversion-with-loss-prohibited"
DeferredDeliveryTime				B	"2.6.4.3.51"	"id-att-deferred-delivery-time"
DeliveryFlags						B	"2.6.4.3.13"	"id-att-delivery-flags"
ORName								B	"2.6.4.3.78"	"id-att-dl-exempted-recipients"
DLExpansion							B	"2.6.4.3.14"	"id-att-dl-expansion-history"
DLExpansionProhibited				B	"2.6.4.3.53"	"id-att-dl-expansion-prohibited"
InternalTraceInformationElement		B	"2.6.4.3.54"	"id-att-internal-trace-information"
LatestDeliveryTime					B	"2.6.4.3.55"	"id-att-latest-delivery-time"
MessageDeliveryEnvelope				B	"2.6.4.3.18"	"id-att-message-delivery-envelope"
MessageDeliveryTime					B	"2.6.4.3.20"	"id-att-message-delivery-time"
MTSIdentifier						B	"2.6.4.3.19"	"id-att-message-identifier"
MessageOriginAuthenticationCheck	B	"2.6.4.3.21"	"id-at-message-orgin-authentication-check"
MessageSecurityLabel				B	"2.6.4.3.22"	"id-att-message-security-label"
MessageSubmissionEnvelope			B	"2.6.4.3.59"	"id-att-message-submission-envelope"
MessageSubmissionTime				B	"2.6.4.3.23"	"id-att-message-submission-time"
MessageToken						B	"2.6.4.3.24"	"id-att-message-token"
ExtendedCertificates				B	"2.6.4.3.81"	"id-att-multiple-originator-certificates"
ORName								B	"2.6.4.3.17"	"id-att-originally-intended-recipient-name"
OriginatingMTACertificate			B	"2.6.4.3.62"	"id-att-originating-MTA-certificate"
OriginatorCertificate				B	"2.6.4.3.26"	"id-att-originator-certificate"
ORName								B	"2.6.4.3.27"	"id-att-originator-name"
OriginatorReportRequest				B	"2.6.4.3.63"	"id-att-originator-report-request"
OriginatorReturnAddress				B	"2.6.4.3.64"	"id-att-originator-return-address"
ORName								B	"2.6.4.3.28"	"id-att-other-recipient-names"
PerMessageIndicators				B	"2.6.4.3.65"	"id-att-per-message-indicators"
PerRecipientMessageSubmissionFields	B	"2.6.4.3.66"	"id-att-per-recipient-message-submission-fields"
PerRecipientProbeSubmissionFields	B	"2.6.4.3.67"	"id-att-per-recipient-probe-submission-fields"
PerRecipientReportDeliveryFields	B	"2.6.4.3.30"	"id-att-per-recipient-report-delivery-fields"
Priority							B	"2.6.4.3.31"	"id-att-priority"
ProbeOriginAuthenticationCheck		B	"2.6.4.3.68"	"id-att-probe-origin-authentication-check"
ProbeSubmissionEnvelope				B	"2.6.4.3.69"	"id-att-probe-submission-envelope"
ProofOfDeliveryRequest				B	"2.6.4.3.32"	"id-att-proof-of-delivery-request"
ProofOfSubmission					B	"2.6.4.3.70"	"id-att-proof-of-submission"
ExtendedCertificates				B	"2.6.4.3.82"	"id-att-recipient-certificate"
ORName								B	"2.6.4.3.71"	"id-att-recipient-names"
RecipientReassignmentProhibited		B	"2.6.4.3.72"	"id-att-recipient-reassignment-prohibited"
Redirection							B	"2.6.4.3.33"	"id-at-redirection-history"
ReportDeliveryEnvelope				B	"2.6.4.3.34"	"id-att-report-delivery-envelope"
ReportingDLName						B	"2.6.4.3.35"	"id-att-reporting-DL-name"
ReportingMTACertificate				B	"2.6.4.3.36"	"id-att-reporting-MTA-certificate"
ReportOriginAuthenticationCheck		B	"2.6.4.3.37"	"id-att-report-origin-authentication-check"
SecurityClassification				B	"2.6.4.3.38"	"id-att-security-classification"
SubjectSubmissionIdentifier			B	"2.6.4.3.40"	"id-att-subject-submission-identifier"
ORName								B	"2.6.4.3.41"	"id-att-this-recipient-name"
TraceInformationElement				B	"2.6.4.3.75"	"id-att-trace-information"

# IPMSMessageStoreAttributes - see master list in p22.cnf
MessageToken						B	"2.6.1.7.36"	"id-hat-forwarded-token"

#.FN_BODY AdditionalInformation
   proto_item *item = NULL;
   int         loffset = 0;
   guint32     len = 0;

   /* work out the length */
   loffset = dissect_ber_identifier(actx->pinfo, tree, tvb, offset, NULL, NULL, NULL);
   (void) dissect_ber_length(actx->pinfo, tree, tvb, loffset, &len, NULL);

   item = proto_tree_add_item(tree, hf_index, tvb, offset, len, ENC_BIG_ENDIAN);
   tree = proto_item_add_subtree(item, ett_p1_additional_information);
   proto_item_append_text(tree, " (The use of this field is \"strongly deprecated\".)");

   offset = dissect_unknown_ber(actx->pinfo, tvb, offset, tree);

#.FN_BODY RegistrationTypes/extensions/_item
/*XXX not implemented yet */

#.FN_BODY ExtensionField/value
	const char *name;

	if(actx->external.indirect_ref_present) {
		proto_item_append_text(tree, " (%%s)", val_to_str(actx->external.indirect_reference, p1_StandardExtension_vals, "standard-extension %%d"));
		if (dissector_try_uint(p1_extension_dissector_table, actx->external.indirect_reference, tvb, actx->pinfo, tree)) {
			offset = tvb_reported_length(tvb);
		} else {
			proto_item *item;
			proto_tree *next_tree;

			next_tree = proto_tree_add_subtree_format(tree, tvb, 0, -1, ett_p1_unknown_standard_extension, &item,
				"Dissector for standard-extension %%d not implemented.  Contact Wireshark developers if you want this supported", actx->external.indirect_reference);
			offset = dissect_unknown_ber(actx->pinfo, tvb, offset, next_tree);
			expert_add_info(actx->pinfo, item, &ei_p1_unknown_standard_extension);
		}
	} else if (actx->external.direct_ref_present) {
		offset = call_ber_oid_callback(actx->external.direct_reference, tvb, offset, actx->pinfo, tree, actx->private_data);
		name = oid_resolved_from_string(actx->pinfo->pool, actx->external.direct_reference);
		proto_item_append_text(tree, " (%%s)", name ? name : actx->external.direct_reference);
	}


#.FN_PARS SecurityCategoryIdentifier
	FN_VARIANT = _str  VAL_PTR = &actx->external.direct_reference

#.FN_BODY SecurityCategoryValue
	const char *name;

	if (actx->external.direct_reference) {
		offset = call_ber_oid_callback(actx->external.direct_reference, tvb, offset, actx->pinfo, tree, actx->private_data);
		name = oid_resolved_from_string(actx->pinfo->pool, actx->external.direct_reference);
		proto_item_append_text(tree, " (%%s)", name ? name : actx->external.direct_reference);
	} else {
		offset = dissect_unknown_ber(actx->pinfo, tvb, offset, tree);
	}

#.FN_PARS ExtensionAttributeType
	VAL_PTR = &actx->external.indirect_reference

#.FN_BODY ExtensionAttribute/extension-attribute-value

	proto_item_append_text(tree, " (%%s)", val_to_str(actx->external.indirect_reference, p1_ExtensionAttributeType_vals, "extension-attribute-type %%d"));
	p_add_proto_data(actx->pinfo->pool, actx->pinfo, proto_p1, 0, actx->subtree.tree_ctx);
	if (dissector_try_uint(p1_extension_attribute_dissector_table, actx->external.indirect_reference, tvb, actx->pinfo, tree)) {
		offset =tvb_reported_length(tvb);
	} else {
		proto_item *item;
		proto_tree *next_tree;

		next_tree = proto_tree_add_subtree_format(tree, tvb, 0, -1, ett_p1_unknown_extension_attribute_type, &item,
			"Dissector for extension-attribute-type %%d not implemented.  Contact Wireshark developers if you want this supported", actx->external.indirect_reference);
		offset = dissect_unknown_ber(actx->pinfo, tvb, offset, next_tree);
		expert_add_info(actx->pinfo, item, &ei_p1_unknown_extension_attribute_type);
	}
	p_remove_proto_data(actx->pinfo->pool, actx->pinfo, proto_p1, 0);


#.FN_BODY RefusedOperation/refused-argument/refused-extension
/*XXX not implemented yet */

#.FN_BODY CountryName
	do_address("/C=", NULL, actx);

	%(DEFAULT_BODY)s

#.FN_BODY AdministrationDomainName
	do_address("/A=", NULL, actx);

	%(DEFAULT_BODY)s

#.FN_PARS StandardExtension VAL_PTR = &actx->external.indirect_reference

#.FN_BODY StandardExtension
	actx->external.indirect_ref_present = TRUE;
	actx->external.direct_ref_present = FALSE;
	%(DEFAULT_BODY)s

#.FN_BODY ExtensionType/private-extension  FN_VARIANT = _str  VAL_PTR = &actx->external.direct_reference
	actx->external.indirect_ref_present = FALSE;
	actx->external.direct_reference = NULL;
	%(DEFAULT_BODY)s
	actx->external.direct_ref_present = (actx->external.direct_reference != NULL) ? TRUE : FALSE;

#.FN_PARS ExtendedContentType
	FN_VARIANT = _str  VAL_PTR = &ctx->content_type_id

#.FN_BODY ExtendedContentType
	const char *name = NULL;
	p1_address_ctx_t* ctx;

	if (actx->subtree.tree_ctx == NULL)
		actx->subtree.tree_ctx = wmem_new0(actx->pinfo->pool, p1_address_ctx_t);

	ctx = (p1_address_ctx_t*)actx->subtree.tree_ctx;

	%(DEFAULT_BODY)s

	if(ctx->content_type_id) {
		name = oid_resolved_from_string(actx->pinfo->pool, ctx->content_type_id);

		if(!name) name = ctx->content_type_id;

		proto_item_append_text(tree, " (%%s)", name);
	}

#.FN_PARS BuiltInContentType/_untag VAL_PTR = &ict

#.FN_BODY BuiltInContentType/_untag
	static guint32	ict = -1;
	p1_address_ctx_t* ctx;

	if (actx->subtree.tree_ctx == NULL)
		actx->subtree.tree_ctx = wmem_new0(actx->pinfo->pool, p1_address_ctx_t);

	ctx = (p1_address_ctx_t*)actx->subtree.tree_ctx;

  %(DEFAULT_BODY)s

	/* convert integer content type to oid for dispatch when the content is found */
	switch(ict) {
	case 2:
		ctx->content_type_id = wmem_strdup(actx->pinfo->pool, "2.6.1.10.0");
		break;
	case 22:
		ctx->content_type_id = wmem_strdup(actx->pinfo->pool, "2.6.1.10.1");
		break;
	default:
		ctx->content_type_id = NULL;
		break;
	}

#.FN_BODY Content VAL_PTR = &next_tvb
	tvbuff_t *next_tvb;
	p1_address_ctx_t* ctx = (p1_address_ctx_t*)actx->subtree.tree_ctx;

	%(DEFAULT_BODY)s

	if (next_tvb) {
		proto_item_set_text(actx->created_item, "content (%%u bytes)", tvb_reported_length (next_tvb));
		if (ctx && ctx->content_type_id) {
			(void) call_ber_oid_callback(ctx->content_type_id, next_tvb, 0, actx->pinfo, actx->subtree.top_tree ? actx->subtree.top_tree : tree, actx->private_data);
		} else if (ctx && ctx->report_unknown_content_type) {
			proto_item *item;
			proto_tree *next_tree;

			item = proto_tree_add_expert(actx->subtree.top_tree ? actx->subtree.top_tree : tree, actx->pinfo, &ei_p1_unknown_built_in_content_type,
							  next_tvb, 0, tvb_reported_length_remaining(tvb, offset));
			next_tree=proto_item_add_subtree(item, ett_p1_content_unknown);

			dissect_unknown_ber(actx->pinfo, next_tvb, 0, next_tree);
		} else {
			proto_item_append_text (actx->created_item, " (unknown content-type)");
		}
	}

#.FN_PARS MTAName
	VAL_PTR = &mtaname

#.FN_BODY MTAName
	tvbuff_t	*mtaname = NULL;
	p1_address_ctx_t* ctx = (p1_address_ctx_t*)actx->subtree.tree_ctx;

	%(DEFAULT_BODY)s

	if (ctx && ctx->do_address) {
		proto_item_append_text(actx->subtree.tree, " %%s", tvb_format_text(actx->pinfo->pool, mtaname, 0, tvb_reported_length(mtaname)));
	} else {
		if (mtaname) {
			col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", tvb_format_text(actx->pinfo->pool, mtaname, 0, tvb_reported_length(mtaname)));
		}
	}

#.FN_PARS X121Address
	VAL_PTR=&string

#.FN_BODY X121Address
	tvbuff_t	*string = NULL;

	%(DEFAULT_BODY)s

	do_address("/PX121=", string, actx);

#.FN_PARS TerminalIdentifier
	VAL_PTR=&string

#.FN_BODY TerminalIdentifier
	tvbuff_t	*string = NULL;

	%(DEFAULT_BODY)s

	do_address("/UA-ID=", string, actx);

#.FN_BODY PrivateDomainName

	do_address("/P=", NULL, actx);

	%(DEFAULT_BODY)s

#.FN_BODY PrivateDomainIdentifier

	do_address("/P=", NULL, actx);

	%(DEFAULT_BODY)s

#.FN_PARS OrganizationName
	VAL_PTR=&string

#.FN_BODY OrganizationName
	tvbuff_t	*string = NULL;

	%(DEFAULT_BODY)s

	do_address("/O=", string, actx);

#.FN_PARS TeletexOrganizationName
	VAL_PTR=&string

#.FN_BODY TeletexOrganizationName
	tvbuff_t	*string = NULL;

	%(DEFAULT_BODY)s

	do_address("/O=", string, actx);

#.FN_PARS OrganizationalUnitName
	VAL_PTR=&string

#.FN_BODY OrganizationalUnitName
	tvbuff_t	*string = NULL;

	%(DEFAULT_BODY)s

	do_address("/OU=", string, actx);

#.FN_PARS TeletexOrganizationalUnitName
	VAL_PTR=&string

#.FN_BODY TeletexOrganizationalUnitName
	tvbuff_t	*string = NULL;

	%(DEFAULT_BODY)s

	do_address("/OU=", string, actx);

#.FN_PARS CommonName
	VAL_PTR=&string

#.FN_BODY CommonName
	tvbuff_t	*string = NULL;

	%(DEFAULT_BODY)s

	do_address("/CN=", string, actx);

#.FN_PARS TeletexCommonName
	VAL_PTR=&string

#.FN_BODY TeletexCommonName
	tvbuff_t	*string = NULL;

	%(DEFAULT_BODY)s

	do_address("/CN=", string, actx);

#.FN_BODY CountryName/_untag/iso-3166-alpha2-code  VAL_PTR=&nstring
	tvbuff_t	*nstring = NULL;

	%(DEFAULT_BODY)s

	do_address(NULL, nstring, actx);

#.FN_BODY AdministrationDomainName/_untag/printable  VAL_PTR=&nstring
	tvbuff_t	*nstring = NULL;

	%(DEFAULT_BODY)s

	do_address(NULL, nstring, actx);

#.FN_BODY PrivateDomainName/printable  VAL_PTR=&nstring
	tvbuff_t	*nstring = NULL;

	%(DEFAULT_BODY)s

	do_address(NULL, nstring, actx);

#.FN_BODY PrivateDomainIdentifier/printable  VAL_PTR=&nstring
	tvbuff_t	*nstring = NULL;

	%(DEFAULT_BODY)s

	do_address(NULL, nstring, actx);

#.FN_BODY PhysicalDeliveryCountryName/iso-3166-alpha2-code  VAL_PTR=&nstring
	tvbuff_t	*nstring = NULL;

	%(DEFAULT_BODY)s

	do_address(NULL, nstring, actx);

#.FN_BODY UserAddress/x121/x121-address  VAL_PTR=&nstring
	tvbuff_t	*nstring = NULL;

	%(DEFAULT_BODY)s

	do_address(NULL, nstring, actx);

#.FN_BODY CountryName/_untag/x121-dcc-code  VAL_PTR=&nstring
	tvbuff_t	*nstring = NULL;

	%(DEFAULT_BODY)s

	do_address(NULL, nstring, actx);

#.FN_BODY AdministrationDomainName/_untag/numeric  VAL_PTR=&nstring
	tvbuff_t	*nstring = NULL;

	%(DEFAULT_BODY)s

	do_address(NULL, nstring, actx);

#.FN_BODY PrivateDomainName/numeric  VAL_PTR=&nstring
	tvbuff_t	*nstring = NULL;

	%(DEFAULT_BODY)s

	do_address(NULL, nstring, actx);

#.FN_BODY PrivateDomainIdentifier/numeric  VAL_PTR=&nstring
	tvbuff_t	*nstring = NULL;

	%(DEFAULT_BODY)s

	do_address(NULL, nstring, actx);

#.FN_BODY PhysicalDeliveryCountryName/x121-dcc-code  VAL_PTR=&nstring
	tvbuff_t	*nstring = NULL;

	%(DEFAULT_BODY)s

	do_address(NULL, nstring, actx);

#.FN_BODY PostalCode/numeric-code  VAL_PTR=&nstring
	tvbuff_t	*nstring = NULL;

	%(DEFAULT_BODY)s

	do_address(NULL, nstring, actx);


#.FN_BODY TeletexDomainDefinedAttribute/type  VAL_PTR=&tstring
	tvbuff_t	*tstring = NULL;

	%(DEFAULT_BODY)s

	do_address_str("/DD.", tstring, actx);

#.FN_BODY TeletexDomainDefinedAttribute/value  VAL_PTR=&tstring
	tvbuff_t	*tstring = NULL;

	%(DEFAULT_BODY)s

	do_address_str_tree("=", tstring, actx, tree);

#.FN_BODY TeletexDomainDefinedAttribute
	actx->value_ptr = wmem_strbuf_new(actx->pinfo->pool, "");

	%(DEFAULT_BODY)s

#.FN_BODY PersonalName/surname  VAL_PTR=&pstring
	tvbuff_t	*pstring = NULL;

	%(DEFAULT_BODY)s

	do_address("/S=", pstring, actx);

#.FN_BODY PersonalName/given-name  VAL_PTR=&pstring
	tvbuff_t	*pstring = NULL;

	%(DEFAULT_BODY)s

	do_address("/G=", pstring, actx);

#.FN_BODY PersonalName/initials  VAL_PTR=&pstring
	tvbuff_t	*pstring = NULL;

	%(DEFAULT_BODY)s

	do_address("/I=", pstring, actx);

#.FN_BODY PersonalName/generation-qualifier  VAL_PTR=&pstring
	tvbuff_t	*pstring = NULL;

	%(DEFAULT_BODY)s

	do_address("/Q=", pstring, actx);

#.FN_BODY TeletexPersonalName/surname  VAL_PTR=&tstring
	tvbuff_t	*tstring = NULL;

	%(DEFAULT_BODY)s

	do_address("/S=", tstring, actx);

#.FN_BODY TeletexPersonalName/given-name  VAL_PTR=&tstring
	tvbuff_t	*tstring = NULL;

	%(DEFAULT_BODY)s

	do_address("/G=", tstring, actx);

#.FN_BODY TeletexPersonalName/initials  VAL_PTR=&tstring
	tvbuff_t	*tstring = NULL;

	%(DEFAULT_BODY)s

	do_address("/I=", tstring, actx);

#.FN_BODY TeletexPersonalName/generation-qualifier  VAL_PTR=&tstring
	tvbuff_t	*tstring = NULL;

	%(DEFAULT_BODY)s

	do_address("/Q=", tstring, actx);

#.FN_BODY BuiltInDomainDefinedAttribute/type  VAL_PTR=&pstring
	tvbuff_t	*pstring = NULL;

	%(DEFAULT_BODY)s

	do_address_str("/DD.", pstring, actx);

#.FN_BODY BuiltInDomainDefinedAttribute/value  VAL_PTR=&pstring
	tvbuff_t	*pstring = NULL;

	%(DEFAULT_BODY)s

	do_address_str_tree("=", pstring, actx, tree);

#.FN_BODY BuiltInDomainDefinedAttribute
	actx->value_ptr = wmem_strbuf_new(actx->pinfo->pool, "");

	%(DEFAULT_BODY)s

#.FN_BODY ORAddress
	p1_address_ctx_t* ctx;

	if (actx->subtree.tree_ctx == NULL) {
		actx->subtree.tree_ctx = wmem_new0(actx->pinfo->pool, p1_address_ctx_t);
	}

	ctx = (p1_address_ctx_t*)actx->subtree.tree_ctx;
	ctx->oraddress = wmem_strbuf_new(actx->pinfo->pool, "");

	actx->subtree.tree = NULL;
	set_do_address(actx, TRUE);

	%(DEFAULT_BODY)s


	if (ctx->oraddress && (wmem_strbuf_get_len(ctx->oraddress) > 0) && actx->subtree.tree)
		proto_item_append_text(actx->subtree.tree, " (%%s/)", wmem_strbuf_get_str(ctx->oraddress));

	set_do_address(actx, FALSE);

#.FN_BODY ORName
	p1_address_ctx_t* ctx;

	if (actx->subtree.tree_ctx == NULL) {
		actx->subtree.tree_ctx = wmem_new0(actx->pinfo->pool, p1_address_ctx_t);
	}

	ctx = (p1_address_ctx_t*)actx->subtree.tree_ctx;
	ctx->oraddress = wmem_strbuf_new(actx->pinfo->pool, "");

	actx->subtree.tree = NULL;
	set_do_address(actx, TRUE);

	%(DEFAULT_BODY)s

	if (ctx->oraddress && (wmem_strbuf_get_len(ctx->oraddress) > 0) && actx->subtree.tree)
		proto_item_append_text(actx->subtree.tree, " (%%s/)", wmem_strbuf_get_str(ctx->oraddress));

	set_do_address(actx, FALSE);
#.FN_BODY MessageIdentifier
	actx->subtree.tree = NULL;

	%(DEFAULT_BODY)s

#.FN_BODY GlobalDomainIdentifier
	p1_address_ctx_t* ctx;

	if (actx->subtree.tree_ctx == NULL) {
		actx->subtree.tree_ctx = wmem_new0(actx->pinfo->pool, p1_address_ctx_t);
	}

	ctx = (p1_address_ctx_t*)actx->subtree.tree_ctx;
	ctx->oraddress = wmem_strbuf_new(actx->pinfo->pool, "");

	actx->subtree.tree = tree;

	%(DEFAULT_BODY)s

	if (ctx->oraddress && (wmem_strbuf_get_len(ctx->oraddress) > 0)) {
		proto_item_append_text(actx->subtree.tree, " (%%s/", wmem_strbuf_get_str(ctx->oraddress));

		if (hf_index == hf_p1_subject_identifier) {
			col_append_fstr(actx->pinfo->cinfo, COL_INFO, " (%%s/", wmem_strbuf_get_str(ctx->oraddress));
		}
	}


#.FN_PARS LocalIdentifier
	VAL_PTR=&id

#.FN_BODY LocalIdentifier
	tvbuff_t	*id = NULL;
	p1_address_ctx_t* ctx = (p1_address_ctx_t*)actx->subtree.tree_ctx;

	%(DEFAULT_BODY)s

	if(id) {
		if (ctx && ctx->do_address)
			proto_item_append_text(actx->subtree.tree, " $ %%s)", tvb_format_text(actx->pinfo->pool, id, 0, tvb_reported_length(id)));

		if (hf_index == hf_p1_subject_identifier)
			col_append_fstr(actx->pinfo->cinfo, COL_INFO, " $ %%s)", tvb_format_text(actx->pinfo->pool, id, 0, tvb_reported_length(id)));
	}

#.FN_BODY MTSIdentifier

	set_do_address(actx, TRUE);

	%(DEFAULT_BODY)s

	set_do_address(actx, FALSE);

#.FN_BODY MTANameAndOptionalGDI

	set_do_address(actx, TRUE);

	%(DEFAULT_BODY)s

	set_do_address(actx, FALSE);
	proto_item_append_text(tree, ")");

#.FN_BODY BuiltInStandardAttributes
	actx->subtree.tree = tree;

	%(DEFAULT_BODY)s

#.FN_BODY TraceInformationElement

	set_do_address(actx, TRUE);

	%(DEFAULT_BODY)s

	set_do_address(actx, FALSE);

#.FN_BODY InternalTraceInformationElement

	set_do_address(actx, TRUE);

	%(DEFAULT_BODY)s

	set_do_address(actx, FALSE);

#.FN_BODY DomainSuppliedInformation

	set_do_address(actx, FALSE);

	%(DEFAULT_BODY)s

	set_do_address(actx, TRUE);
	proto_item_append_text(tree, ")");

#.FN_BODY MTASuppliedInformation

	set_do_address(actx, FALSE);

	%(DEFAULT_BODY)s

	set_do_address(actx, TRUE);
	proto_item_append_text(tree, ")");

#.FN_PARS Time
	VAL_PTR = &arrival

#.FN_BODY Time
	tvbuff_t *arrival = NULL;
	p1_address_ctx_t* ctx = (p1_address_ctx_t*)actx->subtree.tree_ctx;

	%(DEFAULT_BODY)s

	if(arrival && ctx && ctx->do_address)
		proto_item_append_text(actx->subtree.tree, " %%s", tvb_format_text(actx->pinfo->pool, arrival, 0, tvb_reported_length(arrival)));

#.FN_PARS RoutingAction
	VAL_PTR = &action

#.FN_BODY RoutingAction
	int action = 0;

	%(DEFAULT_BODY)s

	proto_item_append_text(actx->subtree.tree, " %%s", val_to_str(action, p1_RoutingAction_vals, "action(%%d)"));

#.FN_PARS MTABindError
  VAL_PTR=&error

#.FN_BODY MTABindError
  int error = -1;
  %(DEFAULT_BODY)s
  if((error != -1))
    col_append_fstr(actx->pinfo->cinfo, COL_INFO, " (%%s)", val_to_str(error, p1_MTABindError_vals, "error(%%d)"));

#.FN_PARS TokenTypeIdentifier
	FN_VARIANT = _str  VAL_PTR = &actx->external.direct_reference

#.FN_BODY TokenTypeData

	if(actx->external.direct_reference)
		call_ber_oid_callback(actx->external.direct_reference, tvb, offset, actx->pinfo, tree, actx->private_data);

#.FN_PARS Credentials
	VAL_PTR = &credentials

#.FN_BODY Credentials
  gint credentials = -1;

  %(DEFAULT_BODY)s

  if( (credentials!=-1) && p1_Credentials_vals[credentials].strptr ){
    col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", p1_Credentials_vals[credentials].strptr);
  }

#.FN_PARS TokenDataType
	VAL_PTR = &actx->external.indirect_reference

#.FN_BODY TokenData/value

	proto_item_append_text(tree, " (%%s)", val_to_str(actx->external.indirect_reference, p1_TokenDataType_vals, "tokendata-type %%d"));
	if (dissector_try_uint(p1_tokendata_dissector_table, actx->external.indirect_reference, tvb, actx->pinfo, tree)) {
		offset = tvb_reported_length(tvb);
	} else {
		proto_item *item;
		proto_tree *next_tree;

		next_tree = proto_tree_add_subtree_format(tree, tvb, 0, -1, ett_p1_unknown_tokendata_type, &item,
			"Dissector for tokendata-type %%d not implemented.  Contact Wireshark developers if you want this supported", actx->external.indirect_reference);
		offset = dissect_unknown_ber(actx->pinfo, tvb, offset, next_tree);
		expert_add_info(actx->pinfo, item, &ei_p1_unknown_tokendata_type);
	}

#.FN_BODY PerDomainBilateralInformation/bilateral-information
	proto_item *item = NULL;
	int	    loffset = 0;
	guint32	    len = 0;

	/* work out the length */
	loffset = dissect_ber_identifier(actx->pinfo, tree, tvb, offset, NULL, NULL, NULL);
	(void) dissect_ber_length(actx->pinfo, tree, tvb, loffset, &len, NULL);

	/* create some structure so we can tell what this unknown ASN.1 represents */
	item = proto_tree_add_item(tree, hf_index, tvb, offset, len, ENC_BIG_ENDIAN);
	tree = proto_item_add_subtree(item, ett_p1_bilateral_information);

	offset = dissect_unknown_ber(actx->pinfo, tvb, offset, tree);

#.FN_PARS MTS-APDU
	VAL_PTR = &apdu

#.FN_BODY MTS-APDU
	gint apdu = -1;

	%(DEFAULT_BODY)s

	if( (apdu!=-1) && p1_MTS_APDU_vals[apdu].strptr ){
		if(apdu != 0) { /* we don't show "message" - sub-dissectors have better idea */
			col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", p1_MTS_APDU_vals[apdu].strptr);
		}
	}

#.FN_PARS ReportType
	VAL_PTR = &report

#.FN_BODY ReportType
	gint report = -1;

	%(DEFAULT_BODY)s

		if( (report!=-1) && p1_ReportType_vals[report].strptr ){
			col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", p1_ReportType_vals[report].strptr);
	}

#.FN_BODY MessageSubmissionArgument
	p1_initialize_content_globals(actx, tree, TRUE);
	%(DEFAULT_BODY)s
	p1_initialize_content_globals(actx, NULL, FALSE);

#.FN_BODY MessageDeliveryArgument
	p1_initialize_content_globals(actx, tree, TRUE);
	%(DEFAULT_BODY)s
	p1_initialize_content_globals(actx, NULL, FALSE);

#.FN_BODY ReportDeliveryArgument
	p1_initialize_content_globals(actx, tree, TRUE);
	%(DEFAULT_BODY)s
	p1_initialize_content_globals(actx, NULL, FALSE);

#.FN_HDR MTSBindResult
	/* TODO: there may be other entry points where this global should be initialized... */
	actx->subtree.tree = NULL;

#.TYPE_ATTR
RecipientNumberForAdvice DISPLAY = BASE_NONE
TeletexCommonName DISPLAY = BASE_NONE
TeletexOrganizationName DISPLAY = BASE_NONE
TeletexPersonalName/surname DISPLAY = BASE_NONE
TeletexPersonalName/given-name DISPLAY = BASE_NONE
TeletexPersonalName/initials DISPLAY = BASE_NONE
TeletexPersonalName/generation-qualifier DISPLAY = BASE_NONE
TeletexOrganizationalUnitName DISPLAY = BASE_NONE
UnformattedPostalAddress/teletex-string DISPLAY = BASE_NONE
PDSParameter/teletex-string DISPLAY = BASE_NONE
TeletexDomainDefinedAttribute/type DISPLAY = BASE_NONE
TeletexDomainDefinedAttribute/value DISPLAY = BASE_NONE
TeletexNonBasicParameters/graphic-character-sets DISPLAY = BASE_NONE
TeletexNonBasicParameters/control-character-sets DISPLAY = BASE_NONE
TeletexNonBasicParameters/miscellaneous-terminal-capabilities DISPLAY = BASE_NONE

#.END