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

📄 scs.h

📁 <B>Digital的Unix操作系统VAX 4.2源码</B>
💻 H
📖 第 1 页 / 共 2 页
字号:
/* @(#)scs.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 Communication Services * *   Abstract:	This module contains Systems Communication Services( SCS ) *		constants, data structure definitions, message definitions, *		and macros. * *   Creator:	Todd M. Katz	Creation Date:	March 23, 1985 * *   Modification History: * *   16-Oct-1989	Pete Keilty *	Changed Port_failure macro PF_ERROR check to PF_PORTERROR. *	This was done so that on path failures due to none port errors 	 *	connect resources would be returned. * *   14-Jun-1989	Pete Keilty *	Add locking around decrement of cbvte semaphore. * *   06-Apr-1989	Pete Keilty *	Added the new system smp locking. * *   06-Dec-1988	Todd M. Katz		TMK0006 *	1. Added to structure definition PCCB( union pd ) MSI specific fields. *	2. Add the SCS informational events: NEW_LISTENER, NEW_CONN. *	3. Add the SCS warning events: TERM_LISTENER, TERM_CONN, FAIL_CONN, *	   TERM_FCONN, FAIL_FCONN, REJECT_FCONN, ABORT_FCONN. *	4. Add the event logging macros Elscscommon(), Elscsconn(), *	   Elscsrreason(), and Elscsldirid(), Scs_clmaxcode(), Scs_clftab(), *	   Scs_cltabmsg(), and Scs_cltabcode(). *	5. Define constants for the types of events( CONN_EVENT, LSYSAP_EVENT). *	6. Add the console logging format code CF_NONE. *	7. Add the panic strings SCSPANIC_UNKCF and SCSPANIC_UNKCOD. *	8. Add union errlogopt to structure definition CB.  * *   28-Sep-1988	Todd M. Katz		TMK0005 *	Eliminate the following unused definition: SCSPANIC_DISCON. * *   22-Aug-1988	Todd M. Katz		TMK0004 *	Rename SE_BADMTYPE -> SE_BADSCSMTYPE to avoid name space conflict. * *   15-Aug-1988	Todd M. Katz		TMK0003 *	1. Moved definition of SCSPC back to ../vaxscs/sca.h. *	2. Remove opt13 as an optional PD function for use by PPDs. *	3. SCA event codes have been completely revised.  SCS path crash codes *	   are now divided between error events( SYSAP, TIMEOUT ) and severe *	   error events( BADCONNID, BADCSTATE, NEGCREDITS, BADMTYPE, *	   NOTRANSFERS, NOCREDITS ).  The path crash attribute is applied by *	   individual port driver path crash routines. *	4. E_MAX_SCS defines the maximum SCS error event code and SE_MAX_SCS *	   defines the maximum SCS severe error event code. *	5. Update the macro Port_failure() to return true if the path failure *	   reason is PF_{ POWER, ERROR, FATALERROR }. * *   23-Mar-1988	Todd M. Katz		TMK0002 *	Moved definition of SCSPC from ../vaxscs/sca.h to here. * *   08-Jan-1988	Todd M. Katz		TMK0001 *	Formated module, revised comments, increased robustness, and added *	SMP support. *//* SCS and SCS-PD Interface Constants. */					/* Additional Buffer Disposal Codes  */#define	RETURN_BUF		-1	/* Return Buffer		     */					/* Buffer Presence/Absence Codes     */#define	BUF			 1	/* Buffer present		     */#define	NO_BUF			 2	/* Buffer absent		     */					/* Console Logging Format Codes	     */#define	CF_NONE			0	/* No optional information is logged */					/* SCS Informational Event Codes     *//* SCS informational events are either connection or local SYSAP specific. * There are currently no path specific SCS informational events. * scs_conlog(), scs_log_event(), scs_cli[], and scs_cltab[][] must be updated * to reflect new additions. * * The following SCS informational events are connection specific: * *	NEW_CONN * * Connection specific information is always displayed by default during * console logging of connection specific SCS informational events. * * The following SCS informational events are local SYSAP specific: * *	NEW_LISTENER * * Local SYSAP specific information is always displayed by default during * console logging of local SYSAP specific SCS informational events. * * NOTE: When updating scs_cli[] with a new SCS informational event bear in *	 mind the information displayed by default when choosing an appropriate *	 console formatting code( CF ). */#define	I_NEW_LISTENER	( SCSI | 0x01 )	/* SYSAP established new listener    */#define	I_NEW_CONN	( SCSI | 0x02 )	/* SYSAP established new connection  */					/* SCS Warning Event Codes	     *//* SCS warning events are either connection or local SYSAP specific.  There are * currently no path specific SCS warning events.  scs_conlog(), * scs_log_event(), scs_clw[], and scs_cltab[][] must be updated to reflect new * additions. * * The following SCS warning events are connection specific: * *	TERM_CONN, FAIL_CONN, TERM_FCONN, FAIL_FCONN, REJECT_FCONN, ABORT_FCONN * * Connection specific information is always displayed by default during * console logging of connection specific SCS warning events. * * The following SCS warning events are local SYSAP specific: * *	TERM_LISTENER * * Local SYSAP specific information is always displayed by default during * console logging of local SYSAP specific SCS warning events. * * NOTE: When updating scs_clw[] with a new SCS warning event bear in mind the *	 information displayed by default when choosing an appropriate console *	 formatting code( CF ). */#define	W_TERM_LISTENER	( SCSW | 0x01 )	/* SYSAP terminated listener	     */#define	W_TERM_CONN	( SCSW | 0x02 )	/* SYSAP terminated connection	     */#define	W_FAIL_CONN	( SCSW | 0x03 )	/* Path failure terminated connection*/#define	W_TERM_FCONN	( SCSW | 0x04 )	/* Rem SCS rejected conn establish   */#define	W_FAIL_FCONN	( SCSW | 0x05 )	/* Path fail aborted conn establish  */#define	W_REJECT_FCONN	( SCSW | 0x06 )	/* SYSAP rejected connect establish  */#define	W_ABORT_FCONN	( SCSW | 0x07 )	/* SYSAP aborted conn establishment  */					/* SCS Remote Error Event Codes	     *//* No codes are defined because SCS currently never defines any remote error * events. */					/* SCS Error Event Codes	     *//* SCS error events are always path specific.  There are currently no * connection or local SYSAP specific SCS error events.  scs_map_pc[] must be * updated to reflect new additions.  All PD logging routines and data * structures must also be updated when a new SCS path specific error event is * added.  This is because SCS path specific error events are never logged by * SCS.  They are always logged within the port driver appropriate to the * specific path. * * The following SCS error events are path specific and may have the path crash * severity modifier( ESM_PC ) applied by the appropriate port driver specific * routine: * *	SYSAP, TIMEOUT * * Path specific information is always displayed by default during console * logging of path specific SCS error events by the appropriate port drivers. * * NOTE: Path specific SCS error events are ( currently ) always candidates for *	 application of the path crash severity modifier( ESM_PC ). * * NOTE: SCS may NOT directly request PD logging of path specific SCS error *	 events.  It can only indirectly request their logging by attempting to *	 crash the specific path through invocation of the appropriate PD *	 specific path crashing routine( Crash_path ). */#define	E_SYSAP       ( SCSE | 0x01 )	/* SYSAP requested failure	     */#define	E_TIMEOUT     ( SCSE | 0x02 )	/* SCS request timeout occurred	     */#define	E_MAX_SCS	E_TIMEOUT	/* Maximum SCS error event code	     */					/* SCS Severe Error Event Codes	     *//* SCS severe error events are always path specific.  There are currently no * connection or local SYSAP specific SCS severe error events.  scs_map_spc[] * must be updated to reflect new additions.  All PD logging routines and data * structures must also be updated when a new SCS path specific severe error * event is added.  This is because SCS path specific severe error events are * never logged by SCS.  They are always logged within the port driver * appropriate to the specific path. * * The following SCS severe error events are path specific and may have the * path crash severity modifier( ESM_PC ) applied by the appropriate port * driver specific routine: * *	BADCONNID, BADCSTATE, NEGCREDITS, BADSCSMTYPE, NOTRANSFERS, NOCREDITS * * Path specific information is always displayed by default during console * logging of path specific SCS severe error events by the appropriate port * drivers. * * NOTE: Path specific SCS severe error events are ( currently ) always *	 candidates for application of the path crash severity modifier( *	 ESM_PC ). * * NOTE: SCS may NOT directly request PD logging of path specific SCS severe *	 error events.  It can only indirectly request their logging by *	 attempting to crash the specific path through invocation of the *	 appropriate PD specific path crashing routine( Crash_path ). */#define	SE_BADCONNID   ( SCSSE | 0x01 )	/* Illegal connection identification */#define	SE_BADCSTATE   ( SCSSE | 0x02 )	/* Illegal connection state	     */#define	SE_NEGCREDITS  ( SCSSE | 0x03 )	/* Unsupported withdrawal of credits */#define	SE_BADSCSMTYPE ( SCSSE | 0x04 )	/* Unsupported SCS message type	     */#define	SE_NOTRANSFERS ( SCSSE | 0x05 )	/* Unexpected block data transfer    */#define	SE_NOCREDITS   ( SCSSE | 0x06 )	/* Message transmitted without credit*/#define	SE_MAX_SCS	SE_NOCREDITS	/* Max SCS severe error event code   */					/* SCS Fatal Error Event Codes	     *//* No codes are defined because SCS currently never defines any fatal error * events. */					/* PPD Message Types		     */#define	SCSDG			 3	/* SCS datagram			     */#define	SCSMSG			 4	/* SCS message			     */					/* SCS Message Types		     */#define	SCS_CONN_REQ		 0	/* SCS CONNECT request message       */#define	SCS_CONN_RSP		 1	/* SCS CONNECT response message      */#define	SCS_ACCEPT_REQ		 2	/* SCS ACCEPT request message	     */#define	SCS_ACCEPT_RSP		 3	/* SCS ACCEPT response message       */#define	SCS_REJECT_REQ		 4	/* SCS REJECT request message        */#define	SCS_REJECT_RSP		 5	/* SCS REJECT response message       */#define	SCS_DISCONN_REQ		 6	/* SCS DISCONNECT request message    */#define	SCS_DISCONN_RSP		 7	/* SCS DISCONNECT response message   */#define	SCS_CREDIT_REQ		 8	/* SCS CREDIT request message        */#define	SCS_CREDIT_RSP		 9	/* SCS CREDIT response message       */#define	SCS_APPL_MSG  		10	/* Application sequenced message     */#define	SCS_APPL_DG    		11	/* Application datagram		     */#define	SCS_MAX_SCSMSG	SCS_CREDIT_RSP	/* SCS maximum message type	     */					/* SCS Panic Strings		     */#define	SCSPANIC_ABORT	"scs\t- bad connid seen during connection abortion\n"#define	SCSPANIC_CSTATE	"scs\t- invalid connection state\n"#define	SCSPANIC_EVENT	"scs\t- invalid asynchronous event on connection\n"#define	SCSPANIC_LQUEUE	"scs\t- corrupted listening sysap queue\n"#define	SCSPANIC_NABORT	"scs\t- unexpected connection abortion occurred\n"#define	SCSPANIC_SANITY	"scs\t- broken sanity timer\n"#define	SCSPANIC_SCADB	"scs\t- corrupted sca configuration database\n"#define	SCSPANIC_SCSMSG	"scs\t- unknown scs message type requested\n"#define	SCSPANIC_UNKCF	"scs\t- unknown console logging formatting code\n"#define	SCSPANIC_UNKCOD	"scs\t- unknown/invalid event code\n"					/* Types of SCS Events		     */#define	CONN_EVENT		0	/* Connection specific event	     */#define	LSYSAP_EVENT		1	/* Local SYSAP specific event	     *//* SCS Data Structure Definitions. */typedef struct	_cb	{		/* Connection Block		     */    struct _cbq	     *flink;		/* System-wide configuration 	     */    struct _cbq	     *blink;		/*  database queue pointers 	     */    u_short	     size;		/* Size of data structure	     */    u_char	     type;		/* Structure type		     */    u_char			:  8;    struct _cbq	     scs_cb;		/* SCS waiting CB queue pointers     */    void	     ( *control )();	/* SYSAP control routine	     */    void	     ( *msg_event )();	/* Msg event notification routine    */    void	     ( *dg_event )();	/* Dg event notification routine     */    struct _pb	     *pb;		/* PB pointer			     */    struct _pdt	     *pdt;		/* PDT pointer			     */    struct _pccb     *pccb;		/* PCCB pointer			     */    u_char	     *aux;		/* SYSAP auxiliary structure pointer */    struct kschedblk forkb;		/* Fork block for connection abortion*/    union		{		/* Optional error logging information*/	u_long		rreason;	/*  SYSAP/SCS conn rejection reason  */    } errlogopt;    struct _cib	     cinfo;		/* Connection specific information   */} CB;typedef struct _cbvte	{		/* CB Vector Table Entry	     */    union		{		/* First overlaid field		     */	struct _cb	*cb;		/*  CB pointer			     */	struct _cbvte	*cbvte;		/*  Next free CBVTE pointer	     */    } ov1;    struct _connid connid;		/* Identification number	     */    u_short	   cbip;		/* Call back in progress semaphore   */    u_short	   		: 16;	/*  ( must be longword aligned )     */    struct lock_t  cbvte_lk;		/* Lock structure		     */} CBVTE;typedef struct	_cbvtdb	{		/* CB Vector Table Database	     */    CBVTE	 *free_cbvte;		/* Free CBVTE list head		     */    CBVTE	 *cbvt;			/* CB vector table pointer	     */    u_short	 size;			/* Size of data structure	     */    u_char	 type;			/* Structure type		     */    u_char			:  8;} CBVTDB;typedef struct _pb	{		/* Path Block			     */    struct _pbq	 *flink;		/* System-wide configuration	     */    struct _pbq	 *blink;		/*  database queue pointers	     */    u_short	 size;			/* Size of data structure	     */    u_char	 type;			/* Structure type		     */    u_char			:  8;    struct _pbq	 timeout;		/* SCS protocol seq timeout q ptrs   */    struct _cbq	 cbs;			/* CB queue head		     */    struct _cbq	 scs_cb;		/* SCS waiting CB queue head	     */    struct _sb	 *sb;			/* SB pointer			     */    struct _pccb *pccb;			/* PCCB pointer			     */    struct _pdt	 *pdt;			/* PDT pointer			     */    struct _scsh *scs_msgbuf;		/* SCS send message buffer pointer   */    struct lock_t pb_lk;		/* Lock structure		     */    union		{		/* PD dependent fields		     */	union	_gvppb	gvp;		/*  Generic Vaxport specific fields  */    } pd;    union		 {		/* PPD dependent fields		     */	struct	_cippdpb cippd;		/*  CI PPD specific fields	     */    } ppd;    struct _pib	 pinfo;			/* Path specific information	     */} PB;typedef struct _sb	{		/* System Block			     */    struct _sbq	*flink;			/* System-wide configuration	     */    struct _sbq	*blink;			/*  database queue pointers	     */    u_short	size;			/* Size of data structure	     */    u_char	type;			/* Structure type		     */    u_char			:  8;    struct _pbq pbs;			/* PB queue head		     */    struct _sib	sinfo;			/* System specific information	     */} SB; /* Generic Port Driver( PD ) Data Structure Definitions. */

⌨️ 快捷键说明

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