|
|
1.1 ! root 1: -- P1.py - MHS P1 definitions ! 2: ! 3: -- $Header: /f/osi/pepy/RCS/P1.py,v 7.0 89/11/23 22:11:31 mrose Rel $ ! 4: -- ! 5: -- ! 6: -- $Log: P1.py,v $ ! 7: -- Revision 7.0 89/11/23 22:11:31 mrose ! 8: -- Release 6.0 ! 9: -- ! 10: ! 11: -- ! 12: -- NOTICE ! 13: -- ! 14: -- Acquisition, use, and distribution of this module and related ! 15: -- materials are subject to the restrictions of a license agreement. ! 16: -- Consult the Preface in the User's Manual for the full terms of ! 17: -- this agreement. ! 18: -- ! 19: -- ! 20: ! 21: ! 22: P1 DEFINITIONS ::= ! 23: ! 24: %{ ! 25: #ifndef lint ! 26: static char *rcsid = "$Header: /f/osi/pepy/RCS/P1.py,v 7.0 89/11/23 22:11:31 mrose Rel $"; ! 27: #endif ! 28: ! 29: void parse_p2 (); ! 30: %} ! 31: ! 32: BEGIN ! 33: ! 34: PRINTER print ! 35: ! 36: -- P1 makes use of types defined in the following module: ! 37: -- Sa: Recommendation S.a[14] ! 38: -- T73: T.73, Section 5 ! 39: ! 40: MPDU ::= ! 41: CHOICE { ! 42: [0] ! 43: IMPLICIT UserMPDU, ! 44: ! 45: ServiceMPDU ! 46: } ! 47: ! 48: ServiceMPDU ::= ! 49: CHOICE { ! 50: [1] ! 51: IMPLICIT DeliveryReportMPDU, ! 52: ! 53: [2] ! 54: IMPLICIT ProbeMPDU ! 55: } ! 56: ! 57: UserMPDU ::= ! 58: SEQUENCE { ! 59: envelope ! 60: UMPDUEnvelope, ! 61: ! 62: content ! 63: UMPDUContent ! 64: } ! 65: ! 66: UMPDUEnvelope ::= ! 67: SET { ! 68: mpduID ! 69: MPDUIdentifier, ! 70: ! 71: originator ! 72: ORName, ! 73: ! 74: original ! 75: EncodedInformationTypes ! 76: OPTIONAL, ! 77: ! 78: ContentType, ! 79: ! 80: UAContentId OPTIONAL, ! 81: ! 82: Priority DEFAULT normal, ! 83: ! 84: PerMessageFlag DEFAULT {}, ! 85: ! 86: deferredDelivery[0] ! 87: IMPLICIT Time ! 88: OPTIONAL, ! 89: ! 90: [1] ! 91: IMPLICIT SEQUENCE OF PerDomainBilateralInfo ! 92: OPTIONAL, ! 93: ! 94: [2] ! 95: IMPLICIT SEQUENCE OF RecipientInfo, ! 96: ! 97: TraceInformation ! 98: ! 99: -- this one's for EAN --, ! 100: [UNIVERSAL 17] ! 101: IMPLICIT ANY ! 102: OPTIONAL ! 103: } ! 104: ! 105: UMPDUContent ::= ! 106: OCTETSTRING ! 107: %{ parse_p2 ($$, $$_len); %} ! 108: ! 109: ! 110: -- time ! 111: ! 112: Time ::= ! 113: UniversalTime ! 114: ! 115: ! 116: -- various envelope information ! 117: ! 118: MPDUIdentifier ::= ! 119: [APPLICATION 4] IMPLICIT SEQUENCE { ! 120: GlobalDomainIdentifier, ! 121: IA5String ! 122: } ! 123: ! 124: ContentType ::= ! 125: [APPLICATION 6] ! 126: IMPLICIT INTEGER { ! 127: p2(2) ! 128: } ! 129: ! 130: UAContentId ::= ! 131: [APPLICATION 10] ! 132: IMPLICIT PrintableString ! 133: ! 134: Priority ::= ! 135: [APPLICATION 7] ! 136: IMPLICIT INTEGER { ! 137: normal(0), ! 138: ! 139: nonUrgent(1), ! 140: ! 141: urgent(2) ! 142: } ! 143: ! 144: PerMessageFlag ::= ! 145: [APPLICATION 8] ! 146: IMPLICIT BITSTRING { ! 147: discloseRecipients(0), ! 148: conversionProhibited(1), ! 149: alternateRecipientAllowed(2), ! 150: contentReturnRequest(3) ! 151: } ! 152: ! 153: -- per-domain bilateral information ! 154: ! 155: PerDomainBilateralInfo ::= ! 156: SEQUENCE { ! 157: country ! 158: CountryName, ! 159: ! 160: AdministrationDomainName, ! 161: ! 162: BilateralInfo ! 163: } ! 164: ! 165: BilateralInfo ::= ! 166: ANY ! 167: ! 168: -- recipient information ! 169: ! 170: RecipientInfo ::= ! 171: SET { ! 172: recipient ! 173: ORName, ! 174: ! 175: [0] ! 176: IMPLICIT ExtensionIdentifier, ! 177: ! 178: [1] ! 179: IMPLICIT PerRecipientFlag, ! 180: ! 181: [2] ! 182: IMPLICIT ExplicitConversion DEFAULT {} ! 183: ! 184: -- this one's for EAN --, ! 185: [UNIVERSAL 2] ! 186: IMPLICIT INTEGER ! 187: OPTIONAL ! 188: } ! 189: ! 190: ExtensionIdentifier ::= ! 191: INTEGER ! 192: ! 193: PerRecipientFlag ::= ! 194: BITSTRING -- See Figure 23/X.411 ! 195: ! 196: ExplicitConversion ::= ! 197: INTEGER { ! 198: iA5TextTeletex(0), ! 199: ! 200: teletexTelex(1) ! 201: } ! 202: ! 203: ! 204: -- trace information ! 205: ! 206: TraceInformation ::= ! 207: [APPLICATION 9] ! 208: IMPLICIT SEQUENCE OF SEQUENCE { ! 209: domainid ! 210: GlobalDomainIdentifier, ! 211: ! 212: domaininfo ! 213: DomainSuppliedInfo ! 214: } ! 215: ! 216: DomainSuppliedInfo ::= ! 217: SET { ! 218: arrival[0] ! 219: IMPLICIT Time, ! 220: ! 221: deferred[1] ! 222: IMPLICIT Time ! 223: OPTIONAL, ! 224: ! 225: action[2] ! 226: IMPLICIT INTEGER { ! 227: relayed(0), ! 228: ! 229: rerouted(1) ! 230: }, ! 231: ! 232: converted ! 233: EncodedInformationTypes ! 234: OPTIONAL, ! 235: ! 236: previous ! 237: GlobalDomainIdentifier OPTIONAL ! 238: } ! 239: ! 240: ! 241: -- global domain identifier ! 242: ! 243: GlobalDomainIdentifier ::= ! 244: [APPLICATION 3] ! 245: IMPLICIT SEQUENCE { ! 246: CountryName, ! 247: AdministrationDomainName, ! 248: PrivateDomainIdentifier OPTIONAL ! 249: } ! 250: ! 251: CountryName ::= ! 252: [APPLICATION 1] ! 253: CHOICE { ! 254: NumericString, ! 255: PrintableString ! 256: } ! 257: ! 258: AdministrationDomainName ::= ! 259: [APPLICATION 2] ! 260: CHOICE { ! 261: NumericString, ! 262: PrintableString ! 263: } ! 264: ! 265: PrivateDomainIdentifier ::= ! 266: CHOICE { ! 267: NumericString, ! 268: ! 269: PrintableString ! 270: } ! 271: ! 272: ! 273: -- O/R name ! 274: ! 275: ORName ::= ! 276: [APPLICATION 0] ! 277: IMPLICIT SEQUENCE { ! 278: standard ! 279: StandardAttributeList, ! 280: ! 281: domaindefined ! 282: DomainDefinedAttributeList ! 283: OPTIONAL ! 284: } ! 285: ! 286: StandardAttributeList ::= ! 287: SEQUENCE { ! 288: CountryName OPTIONAL, ! 289: ! 290: AdministrationDomainName OPTIONAL, ! 291: ! 292: [0] ! 293: IMPLICIT X121Address OPTIONAL, ! 294: ! 295: [1] ! 296: IMPLICIT TerminalID OPTIONAL, ! 297: ! 298: [2] ! 299: PrivateDomainName OPTIONAL, ! 300: ! 301: [3] ! 302: IMPLICIT OrganizationName OPTIONAL, ! 303: ! 304: [4] ! 305: IMPLICIT UniqueUAIdentifier OPTIONAL, ! 306: ! 307: [5] ! 308: IMPLICIT PersonalName ! 309: OPTIONAL, ! 310: ! 311: [6] ! 312: IMPLICIT SEQUENCE OF OrganizationalUnit OPTIONAL ! 313: } ! 314: ! 315: DomainDefinedAttributeList ::= ! 316: SEQUENCE OF DomainDefinedAttribute ! 317: ! 318: DomainDefinedAttribute ::= ! 319: SEQUENCE { ! 320: type ! 321: PrintableString, ! 322: ! 323: value ! 324: PrintableString ! 325: } ! 326: ! 327: X121Address ::= ! 328: NumericString ! 329: ! 330: TerminalID ::= ! 331: PrintableString ! 332: ! 333: OrganizationName ::= ! 334: PrintableString ! 335: ! 336: UniqueUAIdentifier ::= ! 337: NumericString ! 338: ! 339: PersonalName ::= ! 340: SET { ! 341: surName[0] ! 342: IMPLICIT PrintableString, ! 343: ! 344: givenName[1] ! 345: IMPLICIT PrintableString ! 346: OPTIONAL, ! 347: ! 348: initials[2] ! 349: IMPLICIT PrintableString ! 350: OPTIONAL, ! 351: ! 352: generalQualifier[3] ! 353: IMPLICIT PrintableString ! 354: OPTIONAL ! 355: } ! 356: ! 357: OrganizationalUnit ::= ! 358: PrintableString ! 359: ! 360: PrivateDomainName ::= ! 361: CHOICE { ! 362: NumericString, ! 363: ! 364: PrintableString ! 365: } ! 366: ! 367: ! 368: -- encoded information types ! 369: ! 370: EncodedInformationTypes ::= ! 371: [APPLICATION 5] IMPLICIT SET { ! 372: [0] ! 373: IMPLICIT BITSTRING { ! 374: undefined(0), ! 375: tLX(1), ! 376: iA5Text(2), ! 377: g3Fax(3), ! 378: tIF0(4), ! 379: tTX(5), ! 380: videotex(6), ! 381: voice(7), ! 382: sFD(8), ! 383: tIF1(9) ! 384: } ! 385: -- this OPTIONAL is for EAN -- OPTIONAL, ! 386: ! 387: [1] ! 388: IMPLICIT G3NonBasicParams ! 389: OPTIONAL, ! 390: ! 391: [2] ! 392: IMPLICIT TeletexNonBasicParams ! 393: OPTIONAL, ! 394: ! 395: [3] ! 396: IMPLICIT PresentationCapabilities ! 397: OPTIONAL ! 398: ! 399: -- other non-basic parameters are for further study ! 400: ! 401: -- but this one's for EAN --, ! 402: [UNIVERSAL 3] ! 403: IMPLICIT BITSTRING { ! 404: undefined(0), ! 405: tLX(1), ! 406: iA5Text(2), ! 407: g3Fax(3), ! 408: tIF0(4), ! 409: tTX(5), ! 410: videotex(6), ! 411: voice(7), ! 412: sFD(8), ! 413: tIF1(9) ! 414: } ! 415: OPTIONAL ! 416: } ! 417: ! 418: G3NonBasicParams ::= ! 419: BITSTRING { ! 420: twoDimensional(8), ! 421: fineResolution(9), ! 422: unlimitedLength(20), ! 423: b4Length(21), ! 424: a3Width(22), ! 425: b4Width(23), ! 426: uncompressed(30) ! 427: } ! 428: ! 429: TeletexNonBasicParams ::= ! 430: SET { ! 431: graphicCharacterSets[0] ! 432: IMPLICIT T61String OPTIONAL, ! 433: ! 434: controlCharacterSets[1] ! 435: IMPLICIT T61String OPTIONAL, ! 436: ! 437: pageFormats[2] ! 438: IMPLICIT OCTETSTRING OPTIONAL, ! 439: ! 440: miscTerminalCapabilities[3] ! 441: IMPLICIT T61String OPTIONAL, ! 442: ! 443: privateUse[4] ! 444: IMPLICIT OCTETSTRING OPTIONAL ! 445: } ! 446: ! 447: PresentationCapabilities ::= ! 448: T73.PresentationCapabilities ! 449: ! 450: ! 451: -- Delivery Report MPDU ! 452: ! 453: DeliveryReportMPDU ::= ! 454: SEQUENCE { ! 455: envelope ! 456: DeliveryReportEnvelope, ! 457: ! 458: content ! 459: DeliveryReportContent ! 460: } ! 461: ! 462: DeliveryReportEnvelope ::= ! 463: SET { ! 464: report ! 465: MPDUIdentifier, ! 466: ! 467: originator ! 468: ORName, ! 469: ! 470: TraceInformation ! 471: } ! 472: ! 473: DeliveryReportContent ::= ! 474: SET { ! 475: original ! 476: MPDUIdentifier, ! 477: ! 478: intermediate ! 479: TraceInformation OPTIONAL, ! 480: ! 481: UAContentId OPTIONAL, ! 482: ! 483: [0] ! 484: IMPLICIT SEQUENCE OF ReportedRecipientInfo, ! 485: ! 486: returned[1] ! 487: IMPLICIT UMPDUContent OPTIONAL, ! 488: ! 489: billingInformation[2] ! 490: ANY ! 491: OPTIONAL ! 492: } ! 493: ! 494: ReportedRecipientInfo ::= ! 495: SET { ! 496: recipient[0] ! 497: IMPLICIT ORName, ! 498: ! 499: [1] ! 500: IMPLICIT ExtensionIdentifier, ! 501: ! 502: [2] ! 503: IMPLICIT PerRecipientFlag, ! 504: ! 505: [3] ! 506: IMPLICIT LastTraceInformation, ! 507: ! 508: intendedRecipient[4] ! 509: IMPLICIT ORName ! 510: OPTIONAL, ! 511: ! 512: [5] ! 513: IMPLICIT SupplementaryInformation OPTIONAL ! 514: } ! 515: ! 516: ! 517: -- last trace information ! 518: ! 519: LastTraceInformation ::= ! 520: SET { ! 521: arrival[0] ! 522: IMPLICIT Time, ! 523: ! 524: converted ! 525: EncodedInformationTypes ! 526: OPTIONAL, ! 527: ! 528: [1] ! 529: Report ! 530: } ! 531: ! 532: Report ::= ! 533: CHOICE { ! 534: [0] ! 535: IMPLICIT DeliveredInfo, ! 536: ! 537: [1] ! 538: IMPLICIT NonDeliveredInfo ! 539: } ! 540: ! 541: DeliveredInfo ::= ! 542: SET { ! 543: delivery[0] ! 544: IMPLICIT Time, ! 545: ! 546: typeOfUA[1] ! 547: IMPLICIT INTEGER { ! 548: public(0), ! 549: ! 550: private(1) ! 551: } DEFAULT public ! 552: } ! 553: ! 554: NonDeliveredInfo::= ! 555: SET { ! 556: [1] ! 557: IMPLICIT ReasonCode, ! 558: ! 559: [2] ! 560: IMPLICIT DiagnosticCode OPTIONAL ! 561: } ! 562: ! 563: ReasonCode ::= ! 564: INTEGER { ! 565: transferFailure(0), ! 566: ! 567: unableToTransfer(1), ! 568: ! 569: conversionNotPerformed(2) ! 570: } ! 571: ! 572: DiagnosticCode ::= ! 573: INTEGER { ! 574: unrecognizedORName(0), ! 575: ! 576: ambiguousORName(1), ! 577: ! 578: mtaCongestion(2), ! 579: ! 580: loopDetected(3), ! 581: ! 582: uaUnavailable(4), ! 583: ! 584: maximumTimeExpired(5), ! 585: ! 586: encodedInformationTypesUnsupported(6), ! 587: ! 588: contentTooLong(7), ! 589: ! 590: conversionImpractical(8), ! 591: ! 592: conversionProhibited(9), ! 593: ! 594: implicitConversionNotResgistered(10), ! 595: ! 596: invalidParameters(11) ! 597: } ! 598: ! 599: ! 600: -- supplementary information ! 601: ! 602: SupplementaryInformation ::= ! 603: PrintableString -- length limited and for further study ! 604: ! 605: ! 606: -- Probe MPDU ! 607: ! 608: ProbeMPDU ::= ! 609: ProbeEnvelope ! 610: ! 611: ProbeEnvelope ::= ! 612: SET { ! 613: probe ! 614: MPDUIdentifier, ! 615: ! 616: originator ! 617: ORName, ! 618: ! 619: ContentType, ! 620: ! 621: UAContentId OPTIONAL, ! 622: ! 623: original ! 624: EncodedInformationTypes ! 625: OPTIONAL, ! 626: ! 627: TraceInformation, ! 628: ! 629: PerMessageFlag DEFAULT {}, ! 630: ! 631: contentLength[0] ! 632: IMPLICIT INTEGER ! 633: OPTIONAL, ! 634: ! 635: [1] ! 636: IMPLICIT SEQUENCE OF PerDomainBilateralInfo ! 637: OPTIONAL, ! 638: ! 639: [2] ! 640: IMPLICIT SEQUENCE OF RecipientInfo ! 641: } ! 642: ! 643: END ! 644: ! 645: %{ ! 646: ! 647: void adios (); ! 648: ! 649: ! 650: void parse_p2 (octstr, len) ! 651: char *octstr; ! 652: int len; ! 653: { ! 654: PS ps; ! 655: PE pe; ! 656: ! 657: if ((ps = ps_alloc (str_open)) == NULLPS) ! 658: adios (NULLCP, "ps_alloc"); ! 659: if (str_setup (ps, octstr, len, 0) == NOTOK) ! 660: adios (NULLCP, "str_setup (%s)", ps_error (ps -> ps_errno)); ! 661: ! 662: if ((pe = ps2pe (ps)) == NULLPE) ! 663: adios (NULLCP, "ps2pe (%s)", ps_error (ps -> ps_errno)); ! 664: ! 665: (void) print_P2_UAPDU (pe, 1, NULLIP, NULLVP, NullParm); ! 666: ! 667: pe_free (pe); ! 668: ps_free (ps); ! 669: } ! 670: ! 671: %}
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.