|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T r
Length: 6444 (0x192c) Types: TextFile Names: »ros.py«
└─⟦2d1937cfd⟧ Bits:30007241 EUUGD22: P.P 5.0 └─⟦35176feda⟧ »EurOpenD22/isode/isode-6.tar.Z« └─⟦de7628f85⟧ └─⟦this⟧ »isode-6.0/rosap/ros.py«
-- ros.py - ROS definitions -- lifted directly from ISO9072-2 -- $Header: /f/osi/rosap/RCS/ros.py,v 7.0 89/11/23 22:21:24 mrose Rel $ -- -- Based on an TCP-based implementation by George Michaelson of University -- College London. -- -- -- $Log: ros.py,v $ -- Revision 7.0 89/11/23 22:21:24 mrose -- Release 6.0 -- -- -- NOTICE -- -- Acquisition, use, and distribution of this module and related -- materials are subject to the restrictions of a license agreement. -- Consult the Preface in the User's Manual for the full terms of -- this agreement. -- -- --* Remote-Operations-APDUs *-- ROS --* { joint-iso-ccitt remote-operations(4) apdus(1) } *-- DEFINITIONS ::= %{ #ifndef lint static char *rcsid = "$Header: /f/osi/rosap/RCS/ros.py,v 7.0 89/11/23 22:21:24 mrose Rel $"; #endif #include <stdio.h> #include "ropkt.h" int rosap_operation; int rosap_error; int rosap_type; int rosap_id; int rosap_null; int rosap_linked; int rosap_lnull; PE rosap_data; int rosap_reason; /* \f */ %} BEGIN -- EXPORTS -- rOSE, InvokeIDType; -- IMPORTS -- OPERATION, ERROR -- FROM Remote-Operation-Notation -- { joint-ccitt-iso remote-operations(4) notation(0) } -- APPLICATION-SERVICE-ELEMENT -- FROM RemoteOperations-Notation-extension -- { joint-ccitt-iso remote-operations(4) notation-extension(2) }; -- rOSE APPLICATION-SERVICE-ELEMENT ::= -- { joint-iso-ccitt remote-opreations(4) aseID(3) } Operation ::= INTEGER %{ rosap_operation = $$; %} Error ::= INTEGER %{ rosap_error = $$; %} -- APDUs -- Types and values of operations and errors are defined in an ROSE-user -- protocol specification using the RO-notation. Operation values are either -- of object identifier type or integer type. If integer types are used they -- shall be distinct within an abstract syntax. Error values are either of -- object identifier type or integer type. If integer types are used they -- shall be distinct within an abstract syntax. There is no object identifier -- specified for the abstract syntax name for ROSE. However all ASN.1 data -- types defnied in this module shall be included in the name abstract syntax -- defined in the ROSE-user protocol specification. ROSEapdus ::= CHOICE { roiv-apdu[1] %{ rosap_type = APDU_INVOKE; %} IMPLICIT ROIVapdu, rors-apdu[2] %{ rosap_type = APDU_RESULT; %} IMPLICIT RORSapdu, roer-apdu[3] %{ rosap_type = APDU_ERROR; %} IMPLICIT ROERapdu, rorj-apdu [4] %{ rosap_type = APDU_REJECT; %} IMPLICIT RORJapdu } -- APDU types ROIVapdu ::= SEQUENCE { invokeID InvokeIDType, linked-ID[0] IMPLICIT --* InvokeIDType *-- INTEGER %{ rosap_linked = $$; rosap_lnull = 0; %} OPTIONAL, operation-value Operation, argument ANY DEFINED BY operation-value %{ rosap_data = $$; %} OPTIONAL -- ANY is filled by the single ASN.1 data type following the -- key word ARGUMENT in the type definition of a particular -- operation. } InvokeIDType ::= INTEGER %{ rosap_id = $$; %} RORSapdu ::= SEQUENCE { invokeID InvokeIDType, SEQUENCE { operation-value Operation, result ANY DEFINED BY operation-value %{ rosap_data = $$; %} -- ANY is filled by the single ASN.1 data type following -- the key word RESULT in the type definition of a -- particular operation. } OPTIONAL } ROERapdu ::= SEQUENCE { invokeID InvokeIDType, error-value Error, parameter ANY DEFINED BY error-value %{ rosap_data = $$; %} -- ANY is filled by the single ASN.1 data type following -- the key word PARAMETER in the type definition of a -- particular error. OPTIONAL } RORJapdu ::= SEQUENCE { invokeID CHOICE { InvokeIDType, NULL %{ rosap_null = 1; %} }, problem CHOICE { [0] IMPLICIT GeneralProblem, [1] IMPLICIT InvokeProblem, [2] IMPLICIT ReturnResultProblem, [3] IMPLICIT ReturnErrorProblem } } GeneralProblem ::= INTEGER { -- ROSE-provider detected unrecognizedAPDU(0) %{ rosap_reason = ROS_GP_UNRECOG; %}, mistypedAPDU(1) %{ rosap_reason = ROS_GP_MISTYPED; %}, badlyStructuredAPDU(2) %{ rosap_reason = ROS_GP_STRUCT; %} } InvokeProblem ::= INTEGER { -- ROSE-user detected duplicateInvocation(0) %{ rosap_reason = ROS_IP_DUP; %}, unrecognizedOperation(1) %{ rosap_reason = ROS_IP_UNRECOG; %}, mistypedArgument(2) %{ rosap_reason = ROS_IP_MISTYPED; %}, resourceLimitation(3) %{ rosap_reason = ROS_IP_LIMIT; %}, initiatorReleasing(4) %{ rosap_reason = ROS_IP_RELEASE; %}, unrecognizedLinkedID(5) %{ rosap_reason = ROS_IP_UNLINKED; %}, linkedResponseUnexpected(6) %{ rosap_reason = ROS_IP_LINKED; %}, unexpectedChildOperation(7) %{ rosap_reason = ROS_IP_CHILD; %} } ReturnResultProblem ::= INTEGER { -- ROSE-user detected unrecognizedInvocation(0) %{ rosap_reason = ROS_RRP_UNRECOG; %}, resultResponseUnexpected(1) %{ rosap_reason = ROS_RRP_UNEXP; %}, mistypedresult(2) %{ rosap_reason = ROS_RRP_MISTYPED; %} } ReturnErrorProblem ::= INTEGER { -- ROSE-user detected unrecognizedInvocation(0) %{ rosap_reason = ROS_REP_UNRECOG; %}, errorResponseUnexpected(1) %{ rosap_reason = ROS_REP_UNEXP; %}, unrecognizedError(2) %{ rosap_reason = ROS_REP_RECERR; %}, unexpectedError(3) %{ rosap_reason = ROS_REP_UNEXPERR; %}, mistypedParameter(4) %{ rosap_reason = ROS_REP_MISTYPED; %} } -- Note that although ISO 9072-2 uses different names for types, the syntax -- and semantics are nearly identical to the specifications in ECMA TR/31 -- and CCITT recommendation X.410 which are used here -- OPDU OPDU ::= CHOICE { [1] %{ rosap_type = APDU_INVOKE; %} Invoke, [2] %{ rosap_type = APDU_RESULT; %} ReturnResult, [3] %{ rosap_type = APDU_ERROR; %} ReturnError, [4] %{ rosap_type = APDU_REJECT; %} Reject } -- OPDU types Invoke ::= SEQUENCE { invokeID INTEGER %{ rosap_id = $$; %}, Operation, argument ANY %{ rosap_data = $$; %} OPTIONAL } ReturnResult ::= SEQUENCE { invokeID InvokeIDType, result ANY %{ rosap_data = $$; %} OPTIONAL } ReturnError ::= SEQUENCE { invokeID INTEGER %{ rosap_id = $$; %}, Error, parameter ANY %{ rosap_data = $$; %} OPTIONAL } Reject ::= RORJapdu END