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

📄 sysap.h

📁 <B>Digital的Unix操作系统VAX 4.2源码</B>
💻 H
📖 第 1 页 / 共 2 页
字号:
/* *	@(#)sysap.h	4.2	(ULTRIX)	10/16/90 *//************************************************************************ *                                                                      * *                      Copyright (c) 1988 - 1989 by                    * *              Digital Equipment Corporation, Maynard, MA              * *                      All rights reserved.                            * *                                                                      * *   This software is furnished under a license and may be used and     * *   copied  only  in accordance with the terms of such license and     * *   with the  inclusion  of  the  above  copyright  notice.   This     * *   software  or  any  other copies thereof may not be provided or     * *   otherwise made available to any other person.  No title to and     * *   ownership of the software is hereby transferred.                   * *                                                                      * *   The information in this software is subject to change  without     * *   notice  and should not be construed as a commitment by Digital     * *   Equipment Corporation.                                             * *                                                                      * *   Digital assumes no responsibility for the use  or  reliability     * *   of its software on equipment which is not supplied by Digital.     * *                                                                      * ************************************************************************ * * *   Facility:	Systems Communication Architecture *		Systems Applications * *   Abstract:	This module contains generic System Applications - Systems *		Communication Services( SYSAP - SCS ) constants, data *		structure definitions, and macros. * *   Creator:	Todd M. Katz	Creation Date:	March 23, 1985 * *   Modification History: * *   16-Oct-1990	Pete Keilty *	Added new path failure reason PF_PORTERROR for port errors *	and PF_ERROR now is for path failure other than port errors. * *   06-Jun-1990	Pete Keilty * 	Added CIKMF and SHAC hardware types to the local port info. *	block. Also packet multiple variable to the path info. block. * *   09-Nov-1989	David E. Eiche		DEE0080 *	Add the software port and interconnect type fields to *	the local port information block (LPIB).  Add definitions *	for the various software ports and interconnects. * *   19-Sep-1989	Pete Keilty *	1. Add XCD to port hardware type, remove XCB. *	2. Add expl flag bit to local port info. block (lpib.flags.expl). *	   New explicit command addressing ports.  * *   21-May-1989	Pete Keilty *	Add double mapping flag to local port info. block (lpib.flags.dm). *	Used for MIPS cpu's that support CI/BVP port. * *   06-Dec-1988	Todd M. Katz		TMK0009 *	1. Added to structure definitions PIB( union pd ) and LPIB( union pd ) *	   MSI specific fields. *	2. Add padding when it is necessary to keep longword alignment.  This *	   most often must be done following declarations of type c_scaaddr. *	   While some space is wasted such alignment is essential for ports of *	   SCA to hardware platforms which require field alignment and access *	   type to match( ie- only longword aligned entities may be longword *	   accessed ). *	3. Modify TMK0006.  The MSB field lproc_name has been moved into *	   union definition ov1( first overlaid field ) and shorthand notation *	   Lproc_name has been created. * *   29-Sep-1988	Todd M. Katz		TMK0008 *	Add the following return value: RET_INVPSTADDR. * *   23-Sep-1988	Todd M. Katz		TMK0007 *	Change size of field force within structure definition MSB from *	u_short -> u_long. * *   29-Aug-1988	Todd M. Katz		TMK0006 *	1. Add hardware port types: KFXSA, RF70, RF31, TF70, and TF31. *	2. Add field lproc_name( local SYSAP name ) to structure MSB. *	3. Increase the size of field reason( reason for path failure ) from a *	   u_short -> u_long. * *   29-Jul-1988	Todd M. Katz		TMK0005 *	Add reason codes ADR_CONNECTION and ADR_VERSION. * *   03-Jul-1988	Todd M. Katz		TMK0004 *	Added the constant NODENAME_SIZE and modified the SIB appropriately. * *   23-Mar-1988	Todd M. Katz		TMK0003 *	Rename HPT_CIBCA -> HPT_CIBCA_AA and HPT_CIBCAB -> HPT_CIBCA_BA. * *   23-Mar-1988	Todd M. Katz		TMK0002 *	1. Added hardware port type code for CIBCA-BA( HPT_CIBCAB ). *	2. Reserved range of Accept/Disconnect/Reject reason codes for use on *	   per-SYSAP basis.  Range begins at 0x100 << 0x3( 2048 decimal ). *	   This allows a maximum of 0xFF( 256 decimal ) reason codes common to *	   all SYSAPs.  The low order three bits of all reason codes are *	   reserved for use as a severity level. * *   08-Jan-1988	Todd M. Katz		TMK0001 *	Formated module, revised comments, increased robustness, and *	added SMP support. *//* SYSAP - SCS Constants. */					/* Accept/Disconnect/Reject Reasons  */					/* Severity values: bits 0-2	     */					/*	0 = warning		     */					/*	1 = success		     */					/*	2 = error		     */					/*	4 = severe error	     */#define	ADR_SUCCESS		 1	/* Normal or success		     */#define	ADR_NOLISTENER		10	/* No matching listener		     */#define	ADR_NORESOURCE		18	/* No resources for connection	     */#define	ADR_DISCONN		26	/* Disconnected			     */#define	ADR_NOCREDIT		34	/* Insufficient credit for connection*/#define	ADR_PATH_FAILURE	44	/* Path failed			     */#define	ADR_BUSY		50	/* Listener is busy		     */#define	ADR_NOSUPPORT		58	/* Connections to SYSAP NOT supported*/#define	ADR_CONNECTION		66	/* Connection exists or in progress  */#define	ADR_VERSION		74	/* Remote SYSAP runs bad protocol ver*/					/* Per-SYSAP reason codes( => 2048 ) */					/* Buffer Disposition Codes	     */#define	RECEIVE_BUF		 0	/* Make sent buffer a receive buffer */#define	DEALLOC_BUF	0x01000000	/* Deallocate sent buffer 	     */					/* Control Routine Event Codes	     */#define	CRE_CONN_REC		 1	/* Connect request received	     */#define	CRE_CONN_DONE		 2	/* Connect request completed	     */#define	CRE_ACCEPT_DONE		 3	/* Connection acceptance completed   */#define	CRE_REJECT_DONE		 4	/* Connection rejection completed    */#define	CRE_DISCONN_REC		 5	/* Disconnect request received	     */#define	CRE_DISCONN_DONE	 6	/* Disconnect request completed	     */#define	CRE_PATH_FAILURE	 7	/* Path failed			     */#define	CRE_NEW_PATH		 8	/* New path discovered		     */#define	CRE_BLOCK_DONE		 9	/* Block transfer completed	     */#define	CRE_CREDIT_AVAIL	10	/* Send credits received	     */#define	CRE_MAP_AVAIL		11	/* Mapping resources available	     */					/* IPL Codes			     */#define	IPL_SCS			21	/* IPL of SCS			     */#define	IPL_POWER		31	/* Highest IPL value		     */					/* Miscellaneous Constants	     */#define	DATA_SIZE		16	/* Size of connection data	     */#define	NAME_SIZE		16	/* Size of process names	     */#define	NODENAME_SIZE		 8	/* Size of node name		     */					/* Path Failure Reasons		     */					/* Severity values: bits 0-2	     */					/*	0 = warning		     */					/*	1 = success		     */					/*	2 = error		     */					/*	4 = severe error	     */#define	PF_SCSPROTOCOL		 2	/* 0x02 SCS protocol error 	     */#define	PF_PPDPROTOCOL		10	/* 0x0A PPD protocol required failure*/#define	PF_SCSTIMEOUT		18	/* 0x12 SCS timeout		     */#define	PF_SYSAP		24	/* 0x18 SYSAP requested failure	     */#define	PF_POWER		36	/* 0x24 Power failure occurred	     */#define	PF_FATALERROR		44	/* 0x2C Fatal port error occurred     */#define	PF_HOSTSHUTDWN		48	/* 0x30 Remote host requested shutdown*/#define	PF_ERROR		58	/* 0x3A Nonfatal port error occurred  */#define	PF_PORTERROR		68	/* 0x44 Severe  port error occurred  */					/* Return Values		     */					/* Severity values: bits 0-2	     */					/*	0 = warning		     */					/*	1 = success		     */					/*	2 = error		     */					/*	4 = severe error	     */#define	RET_SUCCESS	    0x0001	/* Success			     */#define	RET_ALLOCFAIL	    0x000A	/* Allocation failure		     */#define	RET_INVCSTATE	    0x0012	/* Connection in invalid state	     */#define	RET_INVCONNID	    0x001A	/* Invalid connection identification */#define	RET_INVLPSTATE	    0x0022	/* Local port in invalid state	     */#define	RET_INVPSTATE	    0x002A	/* Path in invalid state	     */#define	RET_FAILURE	    0x0032	/* Failure			     */#define	RET_MLOCK	    0x0038	/* Local port is maintenance locked  */#define	RET_NOCREDITS	    0x0040	/* No credits to send message	     */#define	RET_NOPATH	    0x004A	/* Path not exist		     */#define	RET_NORESOURCES	    0x0050	/* No resources available	     */#define	RET_NOCONN	    0x005A	/* SCS Connection not exist	     */#define	RET_NOLPORT	    0x0062	/* Local port not exist		     */#define	RET_NOSYSTEM	    0x006A	/* System not exist		     */#define	RET_NOSUPPORT	    0x0070	/* Function unsupported on local port*/#define	RET_ZEROSYSID	    0x0078	/* sca_system_id is un-initialized   */#define	RET_CONNBUSY	    0x0080	/* Connection busy - can't disconnect*/#define	RET_INVPSTADDR	    0x008A	/* Invalid port station address	     *//* SYSAP - SCS Data Structure Definitions. */typedef struct _bhandle	{		/* Buffer Handle		     */    union		   {		/* PD specific buffer handle	     */	struct _gvpbhandle gvp;		/*  Generic Vaxport buffer handle    */	struct _uqbhandle  uq;		/*  UQ buffer handle		     */    } pd;    u_long	scsid;			/* SCS Identification number         */} BHANDLE;typedef struct _connid	{		/* Connection Identification Number  */    u_short	index;			/* CBVTE index number		     */    u_short	seq_num;		/* CBVTE sequence number	     */} CONNID;typedef struct	{			/* Communication Services Block	     */    struct _connid connid;		/* Connection ID		     */    u_char	   *buf;		/* Application data buffer	     */    u_long	   size;		/* Application data transfer size    */    union		{		/* First overlaid field		     */	u_char		*aux;		/*  SYSAP's auxiliary structure	     */	u_long 		blockid;	/*  Block data transfer ID number    */    } ov1;#define	Aux			ov1.aux#define	Blockid			ov1.blockid    union		{		/* Second overlaid field   	     */	u_long		rboff;		/*  Remote buffer transfer offset    */	struct buf	*sbh;		/*  System buffer handle	     */    } ov2;#define	Rboff			ov2.rboff#define	Sbh			ov2.sbh    union		{		/* Third overlaid field		     */	short		nbufs;		/*  Number datagrams to add/subtract */	short		ncredits;	/*  Number to adjust max send credit */	u_long		disposal;	/*  Disposition of sent buffer	     */	u_long		lboff;		/*  Local buffer transfer offset     */    } ov3;#define	Nbufs			ov3.nbufs#define	Ncredits		ov3.ncredits#define	Disposal		ov3.disposal

⌨️ 快捷键说明

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