⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ps.py

📁 ftam等标准协议服务器和客户端的源代码。
💻 PY
📖 第 1 页 / 共 2 页
字号:
-- **************************************************************--                                                              *--  ISODECL  -  HULA project for connectionless ISODE           *--                                             			*--  module:  	ps.py                                           *--  author:   	Bill Haggerty                                   *--  date:     	4/89                                            *--                                                              *--  This is an abstract syntax module for presentation PCI.     *--  It combines connection-oriented PCI with the connectionless *--  PCI for P-UNIT-DATA.                                        *--                                  				*-- **************************************************************--								*--			     NOTICE		   		*--								*--    Use of this module is subject to the restrictions of the  *--    ISODE license agreement.					*--								*    -- **************************************************************-- HULA changed ./psap2/ps.py for connectionless service-- no changes made to the ps.py header -- ps.py - presentation service definitions--	lifted directly from ISO8823----      Two kinds of changes to the ASN.1--	    - more commentary-tags for POSY--	    - shortening some names to make loader symbols unique to 24 bytes-- $Header: /f/iso/psap2/RCS/ps.py,v 5.0 88/07/21 14:42:49 mrose Rel $------ $Log$-- --* ISO8823-PRESENTATION *-- PS DEFINITIONS ::=%{#ifndef	lintstatic char *rcsid = "$Header: /f/iso/psap2/RCS/ps.py,v 5.0 88/07/21 14:42:49 mrose Rel $";#endif%}BEGIN-- HULA begins-- HULA is cheating by sticking P-UNIT-DATA here in this module-- even though P-UNIT-DATA is a separate abstract syntax-- to prevent dozens of duplicate encode/decode routines ---- The value of the SS-user data parameter of the S-UNIT-DATA-- request and indication session-service primitives shall be a UD-type value,-- followed as a requestor's opstion by zero or more UDC-type values.UD-type ::= SEQUENCE {	version --* *--[0]		IMPLICIT Protocol-version                DEFAULT { version-1 },        calling --* *--[1]                IMPLICIT Calling-presentation-selector                OPTIONAL,        called --* *--[2]                IMPLICIT Called-presentation-selector                OPTIONAL,        context-list --* *--[4]                IMPLICIT --* Presentation-context- *-- Definition-list                OPTIONAL,	user-data --* *--               User-data               OPTIONAL 	}		-- Shall be the parameters of the UD PPDU.       ---- As an initiator's option, the presentation data values contained in a UD-- PPDU may be encoded more than once, using UDC-type values, to allow the-- transfer of the same presentation data values using a number of different-- transfer syntaxes.--    UDC-type ::=        User-data-- Shall not be present if the Presentation-context-definition-list parameter-- is not present in the UD PPDU.-- Each instance of this data type shall contain all of the presentation data-- values which were contained in the User-data parameter of the UD PPDU.-- This shall be the same set of presentation data values which were contained-- in the UD-type.-- HULA ends cheating-- In X.410-1984 mode, the value of the SS-user data parameter of the S-CONNECT-- request and indication service-service primitives shall be a CP-type value.---- In normal mode, the value of the SS-user data parameter of the S-CONNECT-- request and indication session-service primtives shall be a CP-type value,-- followed as a requestor's option by zero or more CPC-type values.CP-type ::=        SET {            mode --* *--[0]                IMPLICIT Mode-selector,            x410-mode --* *--[1]                IMPLICIT SET		--* { COMPONENTS OF Reliable-Transfer.APDUs.RTORQapdu } *--                OPTIONAL		-- Shall be used for X.410 mode only.  Shall be bitwise		-- compatible with CCITT Recommendation X.410-1984.		-- This shall be the User data parameter of the CP PPDU --,            normal-mode --* *--[2]                IMPLICIT SEQUENCE {                    version --* *--[0]                        IMPLICIT Protocol-version                        DEFAULT { version-1 },                    calling --* *--[1]                        IMPLICIT Calling-presentation-selector                        OPTIONAL,                    called --* *--[2]                        IMPLICIT Called-presentation-selector                        OPTIONAL,                    context-list --* *--[4]                        IMPLICIT --* Presentation-context- *-- Definition-list                        OPTIONAL,                    default-context --* *--[6]                        IMPLICIT --* Default- *-- Context-name                        OPTIONAL,                    presentation-fu --* *--[8]                        IMPLICIT Presentation-requirements                        OPTIONAL,                    session-fu --* *--[9]                        IMPLICIT User-session-requirements                        OPTIONAL			-- shall not be present if equal to the Revised session			-- requirements parameter--,		    user-data --* *--                        User-data                        OPTIONAL                }                OPTIONAL		-- Shall be used for normal mode only.		-- Shall be the parameters of the CP PPDU.        }-- As an initiator's option, the presentation data values contained in a CP-- PPDU may be encoded more than once, using CPC-type values, to allow the-- transfer of the same presentation data values using a number of different-- transfer syntaxes.    CPC-type ::=        User-data-- Shall be used for normal mode only.-- Shall not be present if the Presentation-context-definition-list parameter-- is not present in the CP PPDU.-- Each instance of this data type shall contain all of the presentation data-- values which were contained in the User-data parameter of the CP PPDU.-- This shall be the same set of presentation data values which were contained-- in the CP-type.-- The SS-user data parameter value of the S-CONNECT response and confirm-- session-service primitives shall be a CPA-PPDU value when the Result-- parameter value is "accept".CPA-type ::=        SET {            mode --* *--[0]                IMPLICIT Mode-selector,            x410-mode --* *--[1]                IMPLICIT SET		--* { COMPONENTS OF Reliable-Transfer.APDUs.RTOACapdu } *--                OPTIONAL		-- Shall be used for X.410 mode only.  Shall be bitwise		-- compatible with CCITT Recommendation X.410-1984.		-- This shall be the User data parameter of the CPA PPDU --,            normal-mode --* *--[2]                IMPLICIT SEQUENCE {                    version --* *--[0]                        IMPLICIT Protocol-version                        DEFAULT { version-1 },                    responding --* *--[3]                        IMPLICIT Responding-presentation-selector                        OPTIONAL,                    context-list --* *--[5]                        IMPLICIT --* Presentation-context- *-- Definition-result-list                        OPTIONAL,                    presentation-fu --* *--[8]                        IMPLICIT Presentation-requirements                        OPTIONAL,                    session-fu --* *--[9]                        IMPLICIT User-session-requirements                        OPTIONAL			-- shall not be present if equal to the Revised session			-- requirements parameter--,		    user-data --* *--                        User-data                        OPTIONAL                }                OPTIONAL		-- Shall be used for normal mode only.        }-- The SS-user data parameter value of the S-CONNECT response and confirm-- session-service primitives shall be a CPR-PPDU value when the Result-- parameter value is "reject by SS-provider" or "reject by called SS-user".CPR-type ::=        CHOICE {	    x410-mode --* *--                SET		--* { COMPONENTS OF Reliable-Transfer.APDUs.RTORJapdu } *--		-- Shall be used for X.410 mode only.  Shall be bitwise		-- compatible with CCITT Recommendation X.410-1984.		-- This shall be the User data parameter of the CPR PPDU --,	    normal-mode --* *--                SEQUENCE {                    version --* *--[0]                        IMPLICIT Protocol-version                        DEFAULT { version-1 },                    responding --* *--[3]                        IMPLICIT Responding-presentation-selector                        OPTIONAL,                    context-list --* *--[5]                        IMPLICIT --* Presentation-context- *-- Definition-result-list                        OPTIONAL,                    default-context --* *--[7]                        IMPLICIT --* Default- *-- Context-result                        OPTIONAL,                    reason --* *--[10]                        IMPLICIT --* Provider-reason *--		        INTEGER {		            reason-not-specified(0),		            temporary-congestion(1),		            local-limit-exceeded(2),		            called-presentation-address-unknown(3),		            protocol-version-not-supported(4),		            default-context-not-supported(5),		            user-data-not-readable(6),		            no-PSAP-available(7)		        }                        --* OPTIONAL *-- DEFAULT reason-not-specified,		    user-data --* *--                        User-data                        OPTIONAL                }		-- Shall be used for normal mode only.        }-- The SS-user data parameter of the S-U-ABORT request and indication sevice-- primitives shall be an Abort-type value.Abort-type ::=        CHOICE {	    user-abort --* *--                ARU-PPDU	-- for a P-U-ABORT--,	    provider-abort --* *--                ARP-PPDU	-- for a P-P-ABORT--        }ARU-PPDU ::=        CHOICE {	    x410-mode --* *--                SET		--* { COMPONENTS OF Reliable-Transfer.APDUs.RTABapdu } *--		-- Shall be used for X.410 mode only.  Shall be bitwise		-- compatible with CCITT Recommendation X.410-1984.		-- This shall be the User data parameter of the ARU PPDU --,            normal-mode --* *--[0]                IMPLICIT SEQUENCE {                    context-list --* *--[0]                        IMPLICIT --* Presentation-context- *-- Identifier-list                        OPTIONAL,		    user-data --* *--                        User-data                        OPTIONAL                }		-- Shall be used for normal mode only.        }ARP-PPDU ::=        SEQUENCE {            provider-reason[0]                IMPLICIT Abort-reason                OPTIONAL,            event --* *--[1]                IMPLICIT Event-identifier                OPTIONAL        }-- The SS-user data parameter of the S-TYPED-DATA request and indication sevice-- primitives shall be an Typed-data-type value.Typed-data-type ::=        CHOICE {

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -