aboutsummaryrefslogtreecommitdiffstats
path: root/asn1/x411/x411.cnf
blob: d863933fbe61685afba7e7947d9d28213e34f4ed (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
#.TYPE_ATTR
CountryName 	   	TYPE = FT_UINT32  DISPLAY = BASE_DEC   STRINGS = VALS(x411_CountryName_vals)  BITMASK = 0
Time			TYPE = FT_STRING  DISPLAY = BASE_NONE  STRING = NULL BITMASK = 0

#.MODULE_IMPORT
InformationFramework x509if
CertificateExtensions x509ce
SelectedAttributeTypes x509sat
AuthenticationFramework x509af

#.INCLUDE ../x509ce/x509ce-exp.cnf
#.INCLUDE ../x509if/x509if-exp.cnf
#.INCLUDE ../x509sat/x509sat-exp.cnf
#.INCLUDE ../x509af/x509af-exp.cnf

#.EXPORTS
ContentLength
EncodedInformationTypes
EncodedInformationTypesConstraints
ExtendedCertificates
ExtendedContentType
G3FacsimileNonBasicParameters
MessageDeliveryIdentifier
MessageDeliveryTime
MessageSubmissionEnvelope
ORAddress
ORName
OriginatingMTACertificate
OtherMessageDeliveryFields
ProofOfSubmission
RequestedDeliveryMethod
SecurityContext
SecurityLabel
SupplementaryInformation
TeletexNonBasicParameters
UniversalOrBMPString

#.TYPE_RENAME
MTABindArgument/authenticated	AuthenticatedArgument
MTABindResult/authenticated	AuthenticatedResult

ExtensionField/value		ExtensionValue
SecurityCategory/value		CategoryValue

#.FIELD_RENAME
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

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


#.PDU
MTABindArgument
MTABindResult
MTABindError
MTS-APDU

#.REGISTER
RecipientReassignmentProhibited B "x411.extension.1" "recipient-reassignment-prohibited"
MTSOriginatorRequestedAlternateRecipient B "x411.extension.2" "originator-requested-alternate-recipient"
DLExpansionProhibited B "x411.extension.3" "dl-expansion-prohibited"
ConversionWithLossProhibited B "x411.extension.4" "conversion-with-loss-prohibited"
LatestDeliveryTime B "x411.extension.5" "latest-delivery-time"
RequestedDeliveryMethod B "x411.extension.6" "requested-delivery-method"
PhysicalForwardingProhibited B "x411.extension.7" "physical-forwarding-prohibited"
PhysicalForwardingAddressRequest B "x411.extension.8" "physical-forwarding-address-request"
PhysicalDeliveryModes B "x411.extension.9" "physical-delivery-modes"
RegisteredMailType B "x411.extension.10" "registered-mail-type"
RecipientNumberForAdvice B "x411.extension.11" "recipient-number-for-advice"
PhysicalRenditionAttributes B "x411.extension.12" "physical-rendition-attributes"
OriginatorReturnAddress B "x411.extension.13" "originator-return-address"
PhysicalDeliveryReportRequest B "x411.extension.14" "physical-delivery-report-request"
OriginatorCertificate B "x411.extension.15" "originator-certificate"

ContentConfidentialityAlgorithmIdentifier B "x411.extension.17" "content-confidentiality-algorithm-identifier"
ContentIntegrityCheck B "x411.extension.18" "content-integrity-check"
MessageOriginAuthenticationCheck B "x411.extension.19" "message-origin-authentication-check"
MessageSecurityLabel B "x411.extension.20" "message-security-label"
ProofOfSubmissionRequest B "x411.extension.21" "proof-of-submission-request"
ProofOfDeliveryRequest B "x411.extension.22" "proof-of-delivery-request"
ContentCorrelator B "x411.extension.23" "content-correlator"
ProbeOriginAuthenticationCheck B "x411.extension.24" "probe-origin-authentication-check"
RedirectionHistory B "x411.extension.25" "redirection-history"
DLExpansionHistory B "x411.extension.26" "dl-expansion-history"
PhysicalForwardingAddress B "x411.extension.27" "physical-forwarding-address"


OriginatorAndDLExpansionHistory B "x411.extension.30" "originator-and-DL-expansion-history"
ReportingDLName B "x411.extension.31" "reporting-DL-name"
ReportingMTACertificate B "x411.extension.32" "reporting-MTA-certificate"
ReportOriginAuthenticationCheck B "x411.extension.33" "report-origin-authentication-check"
ProofOfSubmission	B "x411.extension.35" "proof-of-submission"

TraceInformation B "x411.extension.37" "trace-information"
InternalTraceInformation B "x411.extension.38" "internal-trace-information"
ReportingMTAName B "x411.extension.39" "reporting-MTA-name"
ExtendedCertificates B "x411.extension.40" "multiple-originator-certificates"

DLExemptedRecipients B "x411.extension.42" "dl-exempted-recipients"


CertificateSelectors B "x411.extension.45" "certificate-selectors"

CommonName B "x411.extension-attribute.1" "common-name"
TeletexCommonName B "x411.extension-attribute.2" "teletex-common-name"
TeletexOrganizationName B "x411.extension-attribute.3" "teletex-organization-name"
TeletexPersonalName B "x411.extension-attribute.4" "teletex-personal-name"
TeletexOrganizationalUnitNames B "x411.extension-attribute.5" "teletex-organizational-unit-names"

PDSName B "x411.extension-attribute.7" "pds-name"
PhysicalDeliveryCountryName B "x411.extension-attribute.8" "physical-delivery-country-name"
PostalCode B "x411.extension-attribute.9" "postal-code"
PhysicalDeliveryOfficeName B "x411.extension-attribute.10" "physical-delivery-office-name"

UniversalCommonName B "x411.extension-attribute.24" "universal-common-name"
UniversalOrganizationName B "x411.extension-attribute.25" "universal-organization-name"
UniversalPersonalName B "x411.extension-attribute.26" "universal-personal-name"
UniversalOrganizationalUnitNames B "x411.extension-attribute.27" "universal-organizational-unit-names"

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"

# 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"

#.FN_BODY AdditionalInformation
/*XXX not implemented yet */

#.FN_BODY T_extensions_item
/*XXX not implemented yet */

#.FN_BODY ExtensionValue
	const char *name;

	if(extension_id != -1) 
		offset=call_x411_oid_callback("x411.extension", tvb, offset, pinfo, tree);
	else if(object_identifier_id) {
		call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);
		name = get_ber_oid_name(object_identifier_id);
		proto_item_append_text(tree, " (%%s)", name ? name : object_identifier_id); 
	}
		

#.FN_BODY CategoryValue

	offset = dissect_unknown_ber(pinfo, tvb, offset, tree);

#.FN_BODY T_extension_attribute_value

	offset=call_x411_oid_callback("x411.extension-attribute", tvb, offset, pinfo, tree);

#.FN_BODY T_refused_extension
/*XXX not implemented yet */

#.FN_BODY CountryName
 gint8 class;
 gboolean pc, ind_field;
 gint32 tag;
 guint32 len1;

 if(!implicit_tag){
   /* XXX  asn2wrs can not yet handle tagged assignment yes so this
    * XXX is some conformance file magic to work around that bug
    */
    offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
    offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
 }

 if(doing_address)
    g_strlcat(oraddress, "/C=", MAX_ORA_STR_LEN);

  offset = dissect_ber_choice(pinfo, tree, tvb, offset,
                              CountryName_choice, hf_index, ett_x411_CountryName, NULL);



#.FN_BODY AdministrationDomainName
 gint8 class;
 gboolean pc, ind_field;
 gint32 tag;
 guint32 len1;

 if(!implicit_tag){
   /* XXX  asn2wrs can not yet handle tagged assignment yes so this
    * XXX is some conformance file magic to work around that bug
    */
    offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
    offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
 }

  if(doing_address)
    g_strlcat(oraddress, "/A=", MAX_ORA_STR_LEN);

  offset = dissect_ber_choice(pinfo, tree, tvb, offset,
                              AdministrationDomainName_choice, hf_index, ett_x411_AdministrationDomainName, NULL);

#.FN_BODY ContentIdentifier
 gint8 class;
 gboolean pc, ind_field;
 gint32 tag;
 guint32 len1;

 if(!implicit_tag){
   /* XXX  asn2wrs can not yet handle tagged assignment yes so this
    * XXX is some conformance file magic to work around that bug
    */
    offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
    offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
 }

  /* this is magic I haven't seen used before - I've stripped the tag - but now I'm going to say it is IMPLICIT! */
  offset = dissect_ber_restricted_string(TRUE, BER_UNI_TAG_PrintableString,
                                         pinfo, tree, tvb, offset, hf_index,
                                         NULL);


#.FN_PARS INTEGER
	VAL_PTR = &extension_id

#.FN_PARS OBJECT_IDENTIFIER
	FN_VARIANT = _str  VAL_PTR = &object_identifier_id

#.FN_BODY OBJECT_IDENTIFIER

	%(DEFAULT_BODY)s
	extension_id = -1;

#.FN_PARS ExtendedContentType
	FN_VARIANT = _str  VAL_PTR = &content_type_id

#.FN_BODY ExtendedContentType
	const char *name = NULL;

	%(DEFAULT_BODY)s

	if(content_type_id) {
	  name = get_ber_oid_name(content_type_id);

  	  if(!name) name = content_type_id;

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

#.FN_PARS BuiltInContentType
	VAL_PTR = &ict

#.FN_BODY BuiltInContentType
  guint32	ict = -1;	

  %(DEFAULT_BODY)s

  /* convert integer content type to oid for dispatch when the content is found */
  switch(ict) {
	case 2:
	content_type_id = ep_strdup("2.6.1.10.0");
	break;
	case 22:
	content_type_id = ep_strdup("2.6.1.10.1");
	break;
	default:
	break;
	}

#.FN_BODY Content
  tvbuff_t *next_tvb;

  /* we can do this now constructed octet strings are supported */
  offset = dissect_ber_octet_string(FALSE, pinfo, NULL, tvb, offset, hf_index, &next_tvb);

  if (next_tvb && content_type_id)
    (void) call_ber_oid_callback(content_type_id, next_tvb, 0, pinfo, top_tree ? top_tree : tree);

#.FN_PARS MTAName
	VAL_PTR = &mtaname

#.FN_BODY MTAName
	tvbuff_t	*mtaname = NULL;

	%(DEFAULT_BODY)s

	if(doing_address) {

		proto_item_append_text(address_item, " %%s", tvb_format_text(mtaname, 0, tvb_length(mtaname)));

	} else {

	if (check_col(pinfo->cinfo, COL_INFO) && mtaname) {
		col_append_fstr(pinfo->cinfo, COL_INFO, " %%s", tvb_format_text(mtaname, 0, tvb_length(mtaname)));
	}

	}

#.FN_PARS X121Address
	VAL_PTR=&string

#.FN_BODY X121Address
	tvbuff_t	*string = NULL;

	%(DEFAULT_BODY)s

	if(doing_address && string) {
		g_strlcat(oraddress, "/X121=", MAX_ORA_STR_LEN);
		g_strlcat(oraddress, tvb_format_text(string, 0, tvb_length(string)), MAX_ORA_STR_LEN);
	}


#.FN_PARS TerminalIdentifier
	VAL_PTR=&string

#.FN_BODY TerminalIdentifier
	tvbuff_t	*string = NULL;

	%(DEFAULT_BODY)s

	if(doing_address && string) {
		g_strlcat(oraddress, "/UA-ID=", MAX_ORA_STR_LEN);
		g_strlcat(oraddress, tvb_format_text(string, 0, tvb_length(string)), MAX_ORA_STR_LEN);
	}

#.FN_BODY PrivateDomainName

	if(doing_address)
		g_strlcat(oraddress, "/P=", MAX_ORA_STR_LEN);

	%(DEFAULT_BODY)s

#.FN_BODY PrivateDomainIdentifier

	if(doing_address)
		g_strlcat(oraddress, "/P=", MAX_ORA_STR_LEN);

	%(DEFAULT_BODY)s

#.FN_PARS OrganizationName
	VAL_PTR=&string

#.FN_BODY OrganizationName
	tvbuff_t	*string = NULL;

	%(DEFAULT_BODY)s

	if(doing_address && string) {
		g_strlcat(oraddress, "/O=", MAX_ORA_STR_LEN);
		g_strlcat(oraddress, tvb_format_text(string, 0, tvb_length(string)), MAX_ORA_STR_LEN);
	}

#.FN_PARS CommonName
	VAL_PTR=&string

#.FN_BODY CommonName
	tvbuff_t	*string = NULL;

	%(DEFAULT_BODY)s

	if(doing_address && string) {
		g_strlcat(oraddress, "/CN=", MAX_ORA_STR_LEN);
		g_strlcat(oraddress, tvb_format_text(string, 0, tvb_length(string)), MAX_ORA_STR_LEN);
	}



#.FN_PARS NumericString
	VAL_PTR=&nstring

#.FN_BODY NumericString
	tvbuff_t	*nstring = NULL;

	%(DEFAULT_BODY)s

	if(doing_address && nstring)
		g_strlcat(oraddress, tvb_format_text(nstring, 0, tvb_length(nstring)), MAX_ORA_STR_LEN);

#.FN_PARS TeletexString

#.FN_BODY TeletexString
	tvbuff_t	*tstring = NULL;

	%(DEFAULT_BODY)s

	if(doing_address && tstring) 
		g_strlcat(oraddress, tvb_format_text(tstring, 0, tvb_length(tstring)), MAX_ORA_STR_LEN);


#.FN_PARS PrintableString
	VAL_PTR=&pstring

#.FN_BODY PrintableString
	tvbuff_t	*pstring = NULL;
	char 		*fmt = NULL;

	%(DEFAULT_BODY)s

	if(doing_address && pstring) {
  	  if(hf_index == hf_x411_printable_surname)			fmt = "/S=";
	  else if(hf_index == hf_x411_printable_given_name)		fmt = "/G=";
	  else if(hf_index == hf_x411_printable_initials)		fmt = "/I=";
	  else if(hf_index == hf_x411_printable_generation_qualifier)	fmt = "/GQ=";
	  else if(hf_index == hf_x411_printable_type)			fmt = "/DD.";
	  else if(hf_index == hf_x411_printable_value)			fmt = "=";
		
	  if(fmt)
	    g_strlcat(oraddress, fmt, MAX_ORA_STR_LEN);

	  g_strlcat(oraddress, tvb_format_text(pstring, 0, tvb_length(pstring)), MAX_ORA_STR_LEN);

	}

#.FN_BODY ORAddress
	
	oraddress = ep_alloc(MAX_ORA_STR_LEN); oraddress[0] = '\0';	
	doing_address = TRUE;
	address_item = NULL;

	%(DEFAULT_BODY)s

	if(*oraddress && address_item)
		proto_item_append_text(address_item, " %%s/", oraddress);

	doing_address = FALSE;

#.FN_BODY ORName
	
	oraddress = ep_alloc(MAX_ORA_STR_LEN); oraddress[0] = '\0';	
	address_item = NULL;
	doing_address = TRUE;

	%(DEFAULT_BODY)s

	if(*oraddress && address_item)
		proto_item_append_text(address_item, " (%%s/)", oraddress);

	doing_address = FALSE;

#.FN_BODY GlobalDomainIdentifier
	
	oraddress = ep_alloc(MAX_ORA_STR_LEN); oraddress[0] = '\0';	
	address_item = tree;

	%(DEFAULT_BODY)s

	if(*oraddress)
		proto_item_append_text(address_item, " (%%s/", oraddress);


#.FN_PARS LocalIdentifier
	VAL_PTR=&id

#.FN_BODY LocalIdentifier
	tvbuff_t 	*id = NULL;
	
	%(DEFAULT_BODY)s
	
	if(doing_address && id)
	  proto_item_append_text(address_item, " $ %%s)", tvb_format_text(id, 0, tvb_length(id)));

#.FN_BODY MTSIdentifier

	doing_address = TRUE;

	%(DEFAULT_BODY)s

	doing_address = FALSE;

#.FN_BODY MTANameAndOptionalGDI

	doing_address = TRUE;

	%(DEFAULT_BODY)s

	doing_address = FALSE;
	proto_item_append_text(tree, ")");

#.FN_BODY BuiltInStandardAttributes

	address_item = tree;	

	%(DEFAULT_BODY)s

#.FN_BODY TraceInformationElement

	doing_address = TRUE;

	%(DEFAULT_BODY)s

	doing_address = FALSE;

#.FN_BODY InternalTraceInformationElement

	doing_address = TRUE;

	%(DEFAULT_BODY)s

	doing_address = FALSE;

#.FN_BODY DomainSuppliedInformation

	doing_address = FALSE;

	%(DEFAULT_BODY)s

	doing_address = TRUE;
	proto_item_append_text(tree, ")");

#.FN_BODY MTASuppliedInformation

	doing_address = FALSE;

	%(DEFAULT_BODY)s

	doing_address = TRUE;
	proto_item_append_text(tree, ")");

#.FN_PARS Time
	VAL_PTR = &arrival

#.FN_BODY Time
	tvbuff_t *arrival = NULL;

	%(DEFAULT_BODY)s

	if(arrival && doing_address)
		proto_item_append_text(address_item, " %%s", tvb_format_text(arrival, 0, tvb_length(arrival)));

#.FN_PARS RoutingAction
	VAL_PTR = &action

#.FN_BODY RoutingAction
	int action = 0;

	%(DEFAULT_BODY)s

	proto_item_append_text(address_item, " %%s", val_to_str(action, x411_RoutingAction_vals, "action(%%d)"));

#.FN_PARS MTABindError
  VAL_PTR=&error

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

#.FN_PARS TokenTypeIdentifier
	FN_VARIANT = _str  VAL_PTR = &object_identifier_id

#.FN_BODY TokenTypeData
	
	if(object_identifier_id) 
   	   call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);

#.FN_PARS Credentials
	VAL_PTR = &credentials

#.FN_BODY Credentials
  guint32 credentials;

  %(DEFAULT_BODY)s

  if (check_col(pinfo->cinfo, COL_INFO)) {
	if(credentials == -1) credentials = 0;
	col_append_fstr(pinfo->cinfo, COL_INFO, " %%s", val_to_str(credentials, x411_Credentials_vals, "Credentials(%%d)"));
  }

#.END