Google
 

Trailing-Edge - PDP-10 Archives - bb-m780d-sm - monitor-sources/scpar.mac
There are 22 other files named scpar.mac in the archive. Click here to see a list.
; UPD ID= 8619, RIP:<7.MONITOR>SCPAR.MAC.2,  11-Feb-88 18:33:07 by GSCOTT
;TCO 7.1218 - Update copyright date.
; Edit 7181 to SCPAR.MAC by PALMIERI on 29-Oct-85
; foo 
; UPD ID= 2185, SNARK:<6.1.MONITOR>SCPAR.MAC.19,   5-Jun-85 11:05:21 by MCCOLLUM
;TCO 6.1.1406  - Update copyright notice.
; UPD ID= 1730, SNARK:<6.1.MONITOR>SCPAR.MAC.18,   8-Apr-85 14:46:22 by PALMIERI
;TCO 6.1.1312 Change definition of SAB indirect table
; UPD ID= 1630, SNARK:<6.1.MONITOR>SCPAR.MAC.17,  13-Mar-85 17:31:43 by PALMIERI
;Make maximum number of MAXPRT dependent on NJSBPG from STG
; UPD ID= 1152, SNARK:<6.1.MONITOR>SCPAR.MAC.16,   5-Dec-84 17:12:15 by PALMIERI
;Add PTWAK and redefine PTBLK bits.  Expand PTJFN to HWORD, since PT block
;is now 4 words long again.
; UPD ID= 697, SNARK:<6.1.MONITOR>SCPAR.MAC.12,  20-Jul-84 13:37:17 by GLINDELL
;Reinstate EVTDAT since it is now used...
; UPD ID= 656, SNARK:<6.1.MONITOR>SCPAR.MAC.11,   2-Jul-84 16:53:13 by GLINDELL
;Include layer in EVENT/SETEVT macros
;Add EVTCSE for CSSE event
;Remove EVTDAT since it is never used
; UPD ID= 518, SNARK:<6.1.MONITOR>SCPAR.MAC.10,  11-May-84 10:18:22 by GLINDELL
;Remove definition of unused BEGSTR NO since SCLINK now has such a BEGSTR
; UPD ID= 449, SNARK:<6.1.MONITOR>SCPAR.MAC.9,  25-Apr-84 09:29:18 by GLINDELL
;Keep node address instead of node name in CB (CBNAM =) CBNUM)
;Also, add word for loopback circuit in CB (CBCIR)
; UPD ID= 401, SNARK:<6.1.MONITOR>SCPAR.MAC.8,  21-Mar-84 13:47:13 by MCINTEE
;Make BEGSTR PT fit into 3 words again
; UPD ID= 379, SNARK:<6.1.MONITOR>SCPAR.MAC.7,  12-Mar-84 08:10:57 by MCINTEE
;Add PTSTS to BEGSTR PT
; UPD ID= 355, SNARK:<6.1.MONITOR>SCPAR.MAC.6,  27-Feb-84 07:41:35 by MCINTEE
;Remove previous edit. NJSBPG is not accessible, being in STG.REL
; UPD ID= 345, SNARK:<6.1.MONITOR>SCPAR.MAC.4,  24-Feb-84 13:28:12 by MCINTEE
;Make MAXPRT dependent on NJSBPG.
; UPD ID= 142, SNARK:<6.1.MONITOR>SCPAR.MAC.3,  25-May-83 10:44:19 by MCINTEE
;Update from the -10
; UPD ID= 14, SNARK:<6.1.MONITOR>SCPAR.MAC.2,   4-Feb-83 13:18:08 by CHALL
;ADD MAXPRT (NUMBER OF PORT BLOCKS PER JOB), FROM SCJSYS, WITH BEGSTR PT

;	COPYRIGHT (c) DIGITAL EQUIPMENT CORPORATION 1984, 1988.
;	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 THAT IS NOT SUPPLIED BY DIGITAL.


;TITLE SCPAR - Session Control Layer Parameters for DECnet-36 V022

	SUBTTL	V. Brownell	15 FEB 83

	SEARCH D36PAR,PROLOG
	SALL


; DATE		LOAD	EDIT #
; ----		----	------
;
XP SCPAR,022

	UNIVERAL SCPAR - Session Control Layer Parameters for DECnet-36
	Subttl	Table of Contents

;		     Table of Contents for SCPAR
;
;				  Section		      Page
;
;
;    1. Globals  . . . . . . . . . . . . . . . . . . . . . . .   3
;    2. Definitions
;        2.1    Internal Connect Block . . . . . . . . . . . .   4
;        2.2    Internal String Block  . . . . . . . . . . . .   5
;        2.3    Connect Data Format  . . . . . . . . . . . . .   6
;        2.4    Node Name Block  . . . . . . . . . . . . . . .   8
;        2.5    NSP. UUO . . . . . . . . . . . . . . . . . . .   9
;        2.6    NSP. UUO Errors  . . . . . . . . . . . . . . .  13
;    3. Macros
;        3.1    Code-Generating
;            3.1.1    Error Processors . . . . . . . . . . . .  14
;            3.1.2    EVENT  . . . . . . . . . . . . . . . . .  15
;            3.1.3    Miscellaneous  . . . . . . . . . . . . .  16
;    4. End of SCPAR . . . . . . . . . . . . . . . . . . . . .  17
	SUBTTL  Globals

	EXT NJSBPG
	SUBTTL	Definitions -- Internal Connect Block

;This is the SC internal representation of the NSP. UUO's process descriptor
;block.  There are two of these contained in the Connect Block, one for the
;destination name and one for the source name.

BEGSTR PB			;PROCESS DESCRIPTOR BLOCK
	HWORD SIZ		;THE LENGTH FIELD (SEE BELOW FOR LEGAL LENGTHS)
	FIELD FOR,9		;FORMAT
	FIELD OBJ,9		;OBJECT TYPE
	HWORD NCT		;NAME BYTE COUNT
	WORD NAM,<<^D16+3>/4>	;END USER NAME
	NXTWRD			;FORCE A NEW WORD, GRPCODE AND USRCODE
				; MUST BE IN ONE WORD
	HWORD GRP		;GRPCODE
	HWORD USR		;USRCODE (GRPCODE + USRCODE = PPN)
ENDSTR

;The process block length must be between the following:

	XP PBL.MN,^D3		;MINIMUM LENGTH
	XP PBL.MX,^D5		;MAXIMUM LENGTH


;This is the internal representation of the NSP. UUO's connect block.
;This gets passed across the SCLINK - SCxUUO interface.

BEGSTR CB			;THE INTERNAL CONNECT BLOCK
	WORD NUM		;Node number
	WORD CIR		;Loopback circuit ID
	WORD DST,PB.LEN		;DESTINATION END USER NAME
	WORD SRC,PB.LEN		;SOURCE END USER NAME
	WORD UID,<<^D39+3>/4>	;SOURCE USER IDENTIFICATION
	WORD PSW,<<^D39+3>/4>	;ACCESS VERIFICATION PASSWORD
	WORD ACC,<<^D39+3>/4>	;ACCOUNT DATA
	WORD UDA,<<^D16+3>/4>	;END USER CONNECT DATA
	HWORD UCT		;USER ID BYTE COUNT
	HWORD PCT		;PASSWORD BYTE COUNT
	HWORD ACT		;ACCOUNT DATA BYTE COUNT
	HWORD CCT		;USER CONNECT DATA COUNT
ENDSTR

;The length of the connect block must be between:

	XP CBL.MN,^D2		;MINIMUM LENGTH
	XP CBL.MX,^D8		;MAXIMUM LENGTH

;These are the possible format types that are legal at present.  They are
;given numerical symbols as defined in the spec.

	XP FRM.0,0		;[0][OBJ-TYPE (B)]
	XP FRM.1,1		;[1][NAME (I-16)]
	XP FRM.2,2		;[2][GRPCODE (2B)][USRCOD (2B)][DESCRPT (I-12)]
	XP FRM.MX,FRM.2		;LARGEST LEGAL FORMAT TYPE
	SUBTTL	Definitions -- Internal String Block

;This is the structure to which we copy the users string-block argument.
;As it turns out, this block is only used for DATA-CTL type fields, so we
;keep the length down to 39 bytes.

	SB.MAX==^D39		;MAX BYTES IN A STRING BLOCK

;A string block length must be between the following:

	XP SBL.MN,1		;MINIMUM (WE NEED AT LEAST A COUNT)
	XP SBL.MX,SB.LEN	;MAXIMUM

BEGSTR SB			;THE INTERNAL STRING BLOCK
	HWORD CNT		;COUNT OF BYTES IN BLOCK
	HWORD WDS		;THE LENGTH IN WORDS OF STRING BLOCK
	WORD DAT,<<SB.MAX+3>/4>	;SB.MAX 8-BIT BYTES OF DATA
ENDSTR

;The SAB indirect table pointed to by PSBSAB

BEGSTR ST
	WORD NP			;Normal priority
	WORD P1			;PSI level 1
	WORD P2
	WORD P3
ENDSTR
	SUBTTL	Definitions -- Connect Data Format

;The connect data is sent whenever one requests a connect.  The data is
;fairly ambiguous.

;The following is the definitions for the MENUVER field of the connect data.
;This field specifies what other connect data will follow and what version
;of Session Control we are talking to.

BEGSTR MN			;MENUVER
	FIELD RPA,1,35		;RQSTRID, PASSWRD, ACCOUNT FIELDS ARE INCLUDED
	FIELD USR,1,34		;USRDATA INCLUDED
	FIELD RSV,3,33		;RESERVED FIELD
	FIELD VER,2,30		;VERSION OF SESSION CONTROL
ENDSTR

;Our Session Control Version

	XP SC.VER,0		;VERSION 0
;PORT TABLE ENTRY

MAXPRT==NJSBPG/2		;Maximum port table entries per job

BEGSTR PT
	FIELD CON,6		;USER'S PSI CHANNEL FOR INCOMING CI OR CC
	FIELD INT,6		;USER'S PSI CHANNEL FOR INTERRUPT MESSAGES
	FIELD DAT,6		;USER'S PSI CHANNEL FOR DATA/DISCONNECT
	FIELD TYP,1		;OPEN TYPE:  0=PASSIVE  1=ACTIVE
	FIELD EMI,1		;EOM HAS ARRIVED
	FIELD PSI,1		;USER HAS BEEN "PSI"ED FOR DATA AVAILABLE
	FIELD LWC,1		;LINK WAS CONNECTED INDICATOR
	FIELD BLK,1		;THIS LINK IS BLOCKED (BLOCKING I/O)
	FIELD WAK,1		;WAKE THE NEXT PROCESS THAT TRIES TO BLOCK
	FIELD NRR,1		;NULL RECORD RECEIVED.
	HWORD JFN		;JFN ASSOCIATED WITH CHANNEL
	HWORD FRK		;FORK NUMBER
	HWORD STS		;LINK STATUS
	WORD DEV		;STORAGE FOR DEV DURING A BLOCK
ENDSTR
Repeat 0,<
	SUBTTL	Definitions -- Node Name Block

;There is one node name block for each node.  They are kept on doubly linked
;lists, with the head each list in a vector MAX-NODES long.

BEGSTR NO			;NOde name
	WORD NXT		;POINTER TO NEXT GUY
	WORD LST		;POINTER TO LAST GUY
	WORD CID		;CIRCUIT ID USED ONLY FOR LOOPBACK
	WORD CNT		;COUNT OF BYTES IN NODE NAME
				; (DOESN'T NEED FULL WORD, REST IS FREE)
	WORD NAM,<<^D6+3>/4>	;NODE NAME TEXT
ENDSTR
>
	SUBTTL	Definitions -- NSP. UUO

;All of these definitions should eventually be in UUOSYM, so we should
;be able to search UUOSYM and REPEAT 0 these definitions.

DEFINE INIOFF(PREFIX,START<0>),<
	%%%CTR==START-1

DEFINE OFFSET(ITEM),<%%%CTR==%%%CTR+1
	PREFIX''ITEM==%%%CTR>

DEFINE ENDOFF(MAXSYM<MX>),<
	PREFIX''MAXSYM==%%%CTR>
>

;Connection states

INIOFF .NSS,1
	OFFSET CW		;CONNECT WAIT
	OFFSET CR		;CONNECT RECEIVED
	OFFSET CS		;CONNECT SENT
	OFFSET RJ		;REMOTE REJECTED CONNECT INIT
	OFFSET RN		;LINK IS UP AND RUNNING
	OFFSET DR		;DISCONNECT RECEIVED
	OFFSET DS		;DISCONNECT SENT
	OFFSET DC		;DISCONNECT CONFIRMED
	OFFSET CF		;NO CONFIDENCE
	OFFSET LK		;NO LINK
	OFFSET CM		;NO COMMUNICATION
	OFFSET NR		;NO RESOURCES
ENDOFF

;DECnet-10 State variable fields

BEGSTR NS
	FIELD FLG,6		;FLAG FIELD
	  BIT WAI		; WAIT FOR CONDITION
	  BIT EOM		; END OF MESSAGE
	FILLER 12		;SPACE FOR FUTURE FLAGS
	FIELD STS,4		;STATUS BITS BITS 18-22
	  BIT IDA		;INTERRUPT DATA AVAILABLE
	  BIT IDR		;INTERRUPT DATA MAY BE SENT
	  BIT NDA		;NORMAL DATA AVAILABLE
	  BIT NDR		;NORMAL DATA MAY BE SENT
	FIELD STA,6,35		;THE CONNECTION STATE
ENDSTR
;Argument block offsets

INIOFF .NSA
	OFFSET FN		;FUNCTION CODE
	OFFSET CH		;STATUS,,CHANNEL ID
	OFFSET A1		;FIRST ARGUMENT
	OFFSET A2		;SECOND
	OFFSET A3		;THIRD
ENDOFF

;Function code word definitions

BEGSTR NF
	FIELD FLG,6		;Warning: Flags must be in the same order as
				; the NSFLG and SAFLG flags.  NFFLG must
				; be same size as SAFLG for LOAD SAFLG then
				; STOR NFFLG and vice versa.
	  BIT WAI		; WAIT FOR CONDITION
	  BIT EOM		; END OF MESSAGE
	FIELD FNC,6,17		;FUNCTION CODE
	HWORD SIZ		;SIZE OF BLOCK IN WORDS
ENDSTR

;String block offsets

INIOFF .NSA
	OFFSET SL		;STRING BLOCK LENGTH (BYTE COUNT)
	OFFSET ST		;START OF THE STRING
ENDOFF

;Process descriptor blocks

INIOFF .NSD
	OFFSET FM		;FORMAT TYPE (EITHER 0, 1, OR 2)
	OFFSET OB		;OBJECT TYPE
	OFFSET PP		;XWD PROJECT,PROGRAMMER
	OFFSET PN		;S-BLOCK POINTER TO TASK NAME
ENDOFF SZ

;Connect blocks

INIOFF .NSC
	OFFSET ND		;S-POINTER TO NODE NAME
	OFFSET SD		;PD-POINTER TO SOURCE PROCESS
	OFFSET DD		;PD-POINTER TO DESTINATION
	OFFSET US		;PD-POINTER TO USER ID
	OFFSET PW		;S-POINTER TO PASSWORD
	OFFSET AC		;S-POINTER TO ACCOUNT
	OFFSET UD		;S-POINTER TO USER DATA
ENDOFF SZ
;Argument block passed back from SCLINK on a call to SCTPSQ

BEGSTR PS			;PASSED IN T1 AND T2
	FIELD FLG,18		;FLAGS
	  BIT MOR		;SET IF MORE PSIs QUEUED
	HWORD PSM		;THE PSI MASK FOR THIS LINK
	NXTWRD			;NOW IN T1
	HWORD STS		;THE STATUS HALF-WORD
	HWORD CHN		;THE CHANNEL NUMBER
ENDSTR
;DECnet-10 Functions

INIOFF .NSF
	OFFSET RE		;RESET ALL LINKS
	OFFSET EA		;ENTER ACTIVE STATE
	OFFSET EP		;ENTER PASSIVE STATE
	OFFSET RI		;READ CONNECT INFORMATION
	OFFSET AC		;ACCEPT THE CONNECT
	OFFSET RJ		;REJECT THE CONNECT
	OFFSET RC		;READ CONNECT CONFIRM INFORMATION
	OFFSET SD		;SYNCHRONOUS DISCONNECT
	OFFSET AB		;ABORT
	OFFSET RD		;READ DISCONNECT DATA
	OFFSET RL		;RELEASE THE CHANNEL
	OFFSET RS		;READ THE CHANNEL STATUS
	OFFSET IS		;SEND INTERRUPT DATA
	OFFSET IR		;RECEIVE INTERRUPT DATA
	OFFSET DS		;SEND NORMAL DATA
	OFFSET DR		;RECEIVE NORMAL DATA
	OFFSET SQ		;SET QUOTAS AND GOALS
	OFFSET RQ		;READ QUOTAS AND GOALS
	OFFSET JS		;SET JOB QUOTAS AND GOALS
	OFFSET JR		;READ JOB QUOTAS AND GOALS
	OFFSET PI		;SET PSI REASON MASK
ENDOFF

;Flow control modes.

INIOFF NSF.,1
	OFFSET C0		;NO FLOW CONTROL
	OFFSET CS		;SEGMENT FLOW CONTROL
	OFFSET CM		;MESSAGE FLOW CONTROL
ENDOFF
	SUBTTL	Definitions -- NSP. UUO Errors

;The following are the values that we return to the user on NSP. error
;returns.  The errors are reported with the SCERR macro.

INIOFF %NE,1
	OFFSET ABE		;Argument Block Format Error
	OFFSET ALF		;Allocation failure
	OFFSET BCN		;Bad channel number
	OFFSET BFT		;Bad format type in process block
	OFFSET CFE		;Connect Block format error
	OFFSET IDL		;Interrupt data too long
	OFFSET IFM		;Illegal flow control mode
	OFFSET ILF		;Illegal function
	OFFSET JQX		;Job quota exhausted
	OFFSET LQX		;Link quota exhausted
	OFFSET NCD		;No connect data to read
	OFFSET PIO		;Percentage input out of bounds
	OFFSET PRV		;No Privileges to Perform Function
	OFFSET STB		;*** OBSOLETE ***
	OFFSET UKN		;Unknown node name
	OFFSET UXS		;Unexpected State: Unspecified
	OFFSET WNA		;Wrong number of arguments
	OFFSET WRS		;Function called in wrong state

;New error codes (to be re-ordered):

	OFFSET CBL		;Connect block length error
	OFFSET PBL		;Process block length error
	OFFSET SBL		;String block length error

	OFFSET UDS		;Unexpected State: Disconnect Sent
	OFFSET UDC		;Unexpected State: Disconnect Confirmed
	OFFSET UCF		;Unexpected State: No Confidence
	OFFSET ULK		;Unexpected State: No Link
	OFFSET UCM		;Unexpected State: No Communication
	OFFSET UNR		;Unexpected State: No Resources

;Error codes which correspond to DECnet disconnect codes.
;We do not intend any mapping other than table-lookup between
;the error code numbers and our error codes.

	OFFSET RBO		;REJECTED BY OBJECT
	OFFSET DBO		;DISCONNECTED BY OBJECT (WHEN RUNNING)
	OFFSET RES		;NO RESOURCES
	OFFSET UNN		;UNRECOGNIZED NODE NAME
	OFFSET RNS		;REMOTE NODE SHUT DOWN
	OFFSET URO		;UNRECOGNIZED OBJECT
	OFFSET IOF		;INVALID OBJECT NAME FORMAT
	OFFSET OTB		;OBJECT TOO BUSY
	OFFSET ABM		;ABORT BY MANAGEMENT
	OFFSET ABO		;ABORT BY OBJECT
	OFFSET INF		;INVALID NODE NAME FORMAT
	OFFSET LNS		;LOCAL NODE SHUT DOWN
	OFFSET ACR		;ACCESS CONTROL REJECTION
	OFFSET RNO		;NO RESPONSE FROM OBJECT
	OFFSET NUR		;NODE UNREACHABLE
	OFFSET NLK		;NO LINK
	OFFSET DSC		;DISCONNECT COMPLETE
	OFFSET IMG		;IMAGE FIELD TOO LONG
	OFFSET REJ		;UNSPECIFIED REJECT REASON

	OFFSET BCF		;BAD COMBINATION OF NS.EOM & NS.WAI FLAGS
	OFFSET ADE		;ADDRESS ERROR IN USER ARGS
	OFFSET IMF		;ILLEGAL MESSAGE FORMAT DETECTED

;Second-order reordering required:

	OFFSET UCW		;UNEXPECTED STATE: CONNECT WAIT
	OFFSET UCR		;UNEXPECTED STATE: CONNECT RECEIVED
	OFFSET UCS		;UNEXPECTED STATE: CONNECT SENT
	OFFSET URJ		;UNEXPECTED STATE: REJECT
	OFFSET URN		;UNEXPECTED STATE: RUN
ENDOFF
	SUBTTL	Macros -- Code-Generating -- Error Processors

;SCERR is called from SCSER and SCUUO to report a user error (NSP. error
;code).

DEFINE SCERR(errcod,return,text),<
	JRST [MOVX T1,errcod
IFB <return>,<RET>
IFNB <return>,<
   IFIDN <return><CPOPJ>,<RET>
   IFDIF <return><CPOPJ>,<JRST return>
   >
		]
>
	SUBTTL	Macros -- Code-Generating -- EVENT

;This macro used by LLINKS and SCLINK to call NSP's event routine.
;Note that MB & MS are assumed to be set up the same by both modules.

DEFINE EVENT(layer,type,text,glabel),<
  IFB <glabel>,<
	CALL [	SETEVT(layer,type,text)
		CALLRET NSPEVT]		;;PASSING T1,MB,MS
  >
  IFNB <glabel>,<
	JRST [	SETEVT(layer,type,text)
		CALL NSPEVT		;;PASSING T1,MB,MS
		JRST glabel]
  >
>

DEFINE SETEVT(layer,type,text),<
	SAVEAC <T1,T2,T3,T4,T5,T6,P1,P2>
IFN FTTRACE,<
	XMOVEI T1,.		;;ALL THE WAY TO TOP LITERAL LEVEL
IFNB <text>,<XMOVEI T2,[ASCIZ /text/]>
IFB <text>,<SETZ T2,>
	MOVX T3,EVT'type
	CALL EVTTRC		;;EVENT TRACER
>
	MOVX T1,.NC'layer
	MOVX T2,EVT'type
>;END OF DEFINE SETEVT


;The class 3 (NSP) event types:

	EVTMSG==0		;TYPE 0 IS INVALID MESSAGE
	EVTFLO==1		;TYPE 1 IS INVALID FLOW CONTROL
	EVTDAT==2		;TYPE 2 IS DATA BASE REUSED

;The class 96 (LCG( event types
	EVTCSE==0		;Type 0 is 'close-link' event for CSSE
	SUBTTL	Macros -- Code-Generating -- Miscellaneous

;BYTES(size,<byte1,byte2,...,byten>) will place the n bytes in bytes
;size wide.

DEFINE BYTES(SIZE,ARGS,%1,%2),<
	%1==0
	%2==0
	IRP ARGS,<
		%2==<%2_^D'SIZE>+<ARGS_<^D36/^D'SIZE>>
		%1==%1+1
		IFE %1-<^D36/^D'SIZE>,<
			EXP %2
			%1==0
			%2==0
		>>

	IFN %1,<
		%2==%2_<<<^D36/^D'SIZE>-%1>*^D'SIZE>
		EXP %2
	>
>
	SUBTTL	End of SCPAR

IFN FTOPS10,.XCMSY

	END