Google
 

Trailing-Edge - PDP-10 Archives - BB-R595B-SM_11-9-85 - mcb/nsp/nspdata.req
There is 1 other file named nspdata.req in the archive. Click here to see a list.
!                    COPYRIGHT (c) 1980, 1981, 1982
!                    DIGITAL EQUIPMENT CORPORATION
!                        Maynard, Massachusetts
!
!     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.
!
!++
!
!macros and other good stuff
!
!--
!

literal
	NSPbom = %O'40',
	NSPeom = %O'100';

$field
	LONG_WORD =
	set
	LOW = [$integer],
	HI = [$integer]
	tes;

compiletime
	$nsp$length = $field_set_size;

macro
	$long_word =
		$sub_block(%expand %number ($nsp$length))% ;

undeclare
	$nsp$length;

!+
! Macro to conditionally align addresses for 36-bit compilation
!-

macro
    CMQPT$( queue, ccb) =
	begin
	ccb = .queue;
	queue = ..ccb;
	if .ccb eql 0 then false else true
	end%;

macro
    CMP_LSS( a, b) =
	(2048 lssu ((((b) + 2048) - (a)) and %o'7777'))%;
macro
    CMP_LEQ( a, b) =
	(2048 lequ ((((b) + 2048) - (a)) and %o'7777'))%;
macro
    CMP_EQL( a, b) =
	(0 eqlu (((b) - (a)) and %o'7777'))%;

macro
    CMP_NEQ( a, b) =
	(0 nequ (((b) - (a)) and %o'7777'))%;

!
!
!++
!
!field mappings for Network Services Layer data bases
!
!--
!
!

$field
	NSP_FIELDS =
	set
	NSPtimer =  [$short_integer],	!short timer service word
	%if %bliss (bliss36) %then $align (fullword) %fi
	NSPself = [$short_integer],	!node addr this NSP
	%if %bliss (bliss36) %then $align (fullword) %fi
	NSPact_tim = [$short_integer],		!NSP's inactivity timer value
	%if %bliss (bliss36) %then $align (fullword) %fi
	NSPdelay = [$byte],		!NSP's delay factor
	%if %bliss (bliss36) %then $align (fullword) %fi
	NSPweight = [$byte],		!round trip delay factor
	%if %bliss (bliss36) %then $align (fullword) %fi
	NSPretrans = [$short_integer],	!retransmission threshold
	%if %bliss (bliss36) %then $align (fullword) %fi
	NSPmax = [$short_integer],	!number of ports other than OPEN
	%if %bliss (bliss36) %then $align (fullword) %fi

	NSPports = [$addresx],		!address of table of port descriptors
	$overlay(NSPports)
	BIASports = [$addresx],
	$continue
	ADDRports = [$addresx],

	%if %bliss (bliss36) %then $align (fullword) %fi
	NSPtotal = [$short_integer],	!total ports NSP can handle
	%if %bliss (bliss36) %then $align (fullword) %fi
	NSPt_rsv = [$short_integer],	!number of NSP reserve ports

	%if %bliss (bliss36) %then $align (fullword) %fi
	NSPreserved = [$addresx],	!address of reserved data base
	$overlay(NSPreserved)
	BIASresv = [$addresx],
	$continue
	ADDRresv = [$addresx],

	NSPnodes = [$addresx],		!address of table of node descriptors
	$overlay(NSPnodes)
	BIASnodes = [$addresx],
	$continue
	ADDRnodes = [$addresx],

	%if %bliss (bliss36) %then $align (fullword) %fi
	NSPevent_buf = [$pointer],	!byte pointer to event buffer
	NSPt_nodes = [$short_integer],	!total nodes NSP can handle
	NSPnxt_port = [$short_integer],	!next port-id for resource check
	NSPbuf = [$short_integer],	!NSP's segment size
	$overlay(NSPbuf)
	L_NSPbuf = [$byte],
	H_NSPbuf = [$byte],
	$continue
	NSPsc_pix = [$byte],		!Session Control's process index
	NSPns0_pix = [$byte],		!NSP's process 0 index
	NSPns1_pix = [$byte],		!NSP's process 1 index
	NSPns2_pix = [$byte],		!NSP's process 2 index
	NSPxpt_pix = [$byte],		!Transport's process index
	%if %bliss (bliss36) %then $align (fullword) %fi
	NSPversion = [$byte],		!NSP's version number
	$align(fullword)
	MSGFLG = [$byte],
	$overlay(MSGFLG)
	fill1 = [$bits(2)],
	TYPE = [$bits(2)],
	SUBTYPE = [$bits(3)],
	$continue
	L_DSTADDR = [$byte],
	H_DSTADDR = [$byte],
	L_SRCADDR = [$byte],
	H_SRCADDR = [$byte],
	LSFLAGS = [$byte],
	$overlay(LSFLAGS)
	FCMOD = [$bits(2)],
	FCVALINT = [$bits(2)],
	$align(fullword)
	ACKNUM = [$short_integer],
	$overlay(ACKNUM)
	NUMBER = [$bits(12)],
	QUAL = [$bits(3)],
	Q_FLG = [$bit],
	$continue
	$align(fullword)
	SEGNUM = [$short_integer],
	$align(fullword)
	REASON = [$short_integer],
	SEGSIZE = [$short_integer],
	SERVICES = [$byte],
	$overlay(SERVICES)
	fill5 = [$bits(2)],
	FCOPT = [$bits(2)],
	$continue
	FCVAL = [$byte],
	INFO = [$byte],
	$overlay(INFO)
	VER = [$bits(2)],
	NSPrunning = [$bit] 		!NSP's state
	tes;

literal
	NSP_size = $field_set_size;

!
!
!
!
!++
!
!field mappings for Node Descriptors
!
!--
!
!

$field
	NODE_FIELDS =
	set
	NDaddr = [$integer],		!node address 
	NDactive = [$integer],		!number of ports to this node
        NDtime_zeroed = [$time],        !time zeroed
	NDb_rcv = [$long_word],		!user bytes received from this node
	NDb_xmt = [$long_word],		!user bytes transmitted to this node
	NDm_rcv = [$long_word],		!NSP messages reveived
	NDm_xmt = [$long_word],		!NSP messages transmitted
	NDc_rcv = [$integer],		!CI's received
	NDc_xmt = [$integer],		!CI's transmitted
	NDc_rej = [$integer],		!No-Resource messages sent to this node
	NDtimeout = [$integer],		!number of NSP message retransmissions
	NDdelay = [$integer]		!round trip delay in seconds
	tes;

literal
	ND_size = $field_set_size;
!
!
!++
!
!field mappings for Session Control Port Descriptors
!
!--
!
!

$field
	some_fields =
	set
	PORTstate = [$tiny_integer],		!state of port
	$overlay(PORTstate)
	MSGtyp = [$tiny_integer],
	$continue
	CHANNEL = [$byte],			!channel to transmit on
	NODErem = [$short_integer],		!remote node address
	ADDRloc = [$short_integer],		!local link address
	$overlay(ADDRloc)
	PID = [$byte],
	ADDran = [$byte],
	$continue
	ADDRrem = [$short_integer],		!remote link address
	$overlay(ADDRrem)
	L_rem_addr = [$byte],
	H_rem_addr = [$byte],
	$continue
	NODElnk = [$addresx],		!address of node descriptor to use
	SOME_END = [$sub_block(0)]
	tes;

literal
	RDB_size = $field_set_size;

field
	more_fields =
	set
	$overlay(SOME_END)
	TIMERdat = [$short_integer],		!Data Segment timer
	$continue
	TIMERoth = [$short_integer],		!Other Data timer
	TIMERcon = [$short_integer],		!connect timer
	$align( fullword)
	NUMdat = [$short_integer],	!next segment number to transmit
	$align( fullword)
	NUMsent = [$short_integer],	!highest segment transmitted
	$align( fullword)
	NUMoth = [$short_integer],	!next Other Data msg to transmit
	$align( fullword)
	NUMhigh = [$short_integer],	!highest segment number from SC
	$align( fullword)
	ACKdat_xmt = [$short_integer],	!# last Data ACK sent
	$align( fullword)
	ACKoth_xmt = [$short_integer],	!# last Other Data ACK sent
	$align( fullword)
	ACKrcv_dat = [$short_integer],	!# last Data ACK received
	$align( fullword)
	TIMERinact = [$byte],		!inactivity timer
	FLOWdat_rem = [$byte],		!data permission count
	FLOWint_rem = [$byte],		!interrupt permission count
	FLOWloc_typ = [$bits(2)],	!flow control type
	FLOWsw_rem = [$bit],		!send/no-send switch
	FLOWtyp_rem = [$bits(2)],	!remote flow control type
	FLAGdat_ack = [$bit],		!send Data ACK flag
	FLAGoth_ack = [$bit],		!send Other ACK flag
	FLAGsnd_dc = [$bit],		!DC message to send flag
	FLAGinuse = [$bit],		!port in use by SC flag
	FLAGnew_msg = [$bit],		!complete message has been sent flag
	VERSIONrem = [$bits(2)],	!remote version number
	CONFIDENCE = [$bit],		!confidence variable
	FLAGseg = [$bit],		!segmentation flag
	$align(fullword)
	BUFFsync_dsc = [$addresx],	!holding spot for DI CCB's
	BUFFrcv_int = [$addresx],	!addr of Interrupt msg needing CCB
	BUFFctl = [$addresx],		!addr of stalled control msg CCB
	COUNTdat_retrans = [$byte],	!number of Data retransmissions
	COUNToth_retrans = [$byte],	!number of Other retransmissions
	COUNTres = [$integer],		!number of CCB's held by this port
	COUNTloc_int = [$short_integer],!Interrupt permissions outstanding
	DELAYmsg_num = [$short_integer],	!segment being timed
	$align( fullword)
	DELAYstr_tim = [$short_integer],	!round trip delay start time
	OTHstate = [$byte],		!state of Other sub-channel
	OTHtyp = [$byte],		!Other message being sent
	DATres = [$addresx],		!addr of stalled data queue head
	OTHres = [$addresx],		!addr of stalled other queue head
	SIZEseg = [$short_integer],		!seg size for transmission
	$overlay(SIZEseg)
	L_SIZEseg = [$byte],
	H_SIZEseg = [$byte],
	$continue
	MSG_chain = [$addresx],		!current CCB being segmented
	INT_queue = [$addresx],		!data message queue
		$overlay(INT_queue)
		INThead = [$addresx],
		$continue
		INTtail = [$addresx],
	MSG_queue = [$addresx],		!data message queue
		$overlay(MSG_queue)
		MSGhead = [$addresx],
		$continue
		MSGtail = [$addresx],
	INTR_queue = [$addresx],	!Interrupt request queue
		$overlay(INTR_queue)
		INTRhead = [$addresx],
		$continue
		INTRtail = [$addresx],
	DATR_queue = [$addresx],	!Data request queue
		$overlay(DATR_queue)
		DATRhead = [$addresx],
		$continue
		DATRtail = [$addresx],
	ACK_queue = [$addresx],		!waiting to be ACK'ed queue
		$overlay(ACK_queue)
		ACKhead = [$addresx],
		$continue
		ACKtail = [$addresx],
	OTHack_queue = [$addresx],	!Other Data waiting to be ACK'ed
		$overlay(OTHack_queue)
		OTHhead = [$addresx],
		$continue
		OTHtail = [$addresx],
	REAS_PTR = [$addresx],		!reassembly message pointer
	BUFF_queue = [$addresx],	!queue of receive buffers
		$overlay(BUFF_queue)
		BUFFhead = [$addresx],
		$continue
		BUFFtail = [$addresx],
	RCVmsg_queue = [$addresx],	!queue of stalled receives
		$overlay(RCVmsg_queue)
		RCVhead = [$addresx],
		$continue
		RCVtail = [$addresx]
	tes;

literal
	PDB_size = $field_set_size;

macro
	PORT_fields = some_fields, more_fields%;

!
!++
!
!

literal
	False = (1 eql 0),
	True = (1 eql 1),
	V3_1 = 1,
	V3_2 = 0,
	FLOWnone = 0,
	CI_SIZE = 9,
	CC_SIZE = 9,
	CA_SIZE = 3,
	DI_SIZE = 5,
	FLOWseg = 1,
	FLOWmsg = 2,
	FLOWrsv = 3,
	OTHready = 0,
	OTHsent = 1,
	OTHtimeout = 2,
	OTHinterrupt = 1,
	OTHirequest = 2,
	OTHdrequest = 4,
	FLG_BOM = %O'40',
	FLG_EOM = %O'100',
	FLG_BEOM = %O'140',
	FLG_NBEOM = 0,
	FLG_CI = %O'30',
	FLG_CC = %O'50',
	FLG_CA = %O'44',
	FLG_DI = %O'70',
	FLG_DC = %O'110',
	FLG_REQ = %O'20',
	FLG_INT = %O'60',
	FLG_DAT_ACK = %O'4',
	FLG_OTH_ACK = %O'24',
	FLG_NOP = %O'10',
	FC_SEND = %O'2',
	FC_DONT = %O'1',
	FC_NCHG = %O'0',
	FC_DATA = %O'0',
	FC_INTERRUPT = %O'1',
	LS_RSV = %O'2',
	Q_ACK = 0,
	Q_NAK = 1,
	N_RES = -2,
	N_LNK = -1,
	MSG_NONE = -3,
	hdb_size = 12,
	NSP_class_event = 3,
	evb_size = 40,
	invmsg = 0,
	invflw = 1,
	dbruse = 2;


macro	PUT2BYTES( val, ptr) =
	begin
	local temp;
	temp = val;
	ch$wchar_a( .temp<0,8>, ptr);
	ch$wchar_a( .temp<8,8>, ptr);
	end%;

macro	GET2BYTES( ptr) =
	begin
	local temp;
	temp<0,8> = ch$rchar_a( ptr);
	temp<8,8> = ch$rchar_a( ptr);
	.temp
	end%;

structure
    BYTE_VECTOR [I; N] =
    %if %bliss (bliss16)
    %then
	[N] (BYTE_VECTOR + I)<0, 8>
    %fi
    %if %bliss (bliss36)
    %then
	[N/4] (BYTE_VECTOR + I/4)<(I mod 4)*9, 9>
    %fi;

bind SC = %if %bliss(bliss36)
	%then %rad50_10'SC'
	%else %rad50_11'SC'
	%fi;
bind NSP = %if %bliss(bliss36)
	%then %rad50_10'NSP'
	%else %rad50_11'NSP'
	%fi;
bind XPT = %if %bliss(bliss36)
	%then %rad50_10'XPT'
	%else %rad50_11'XPT'
	%fi;

bind XPE = %if %bliss(bliss36)
	%then %rad50_10'XPE'
	%else %rad50_11'XPE'
	%fi;

bind NS1 = %if %bliss(bliss36)
	%then %rad50_10'NS1'
	%else %rad50_11'NS1'
	%fi;

bind NS2 = %if %bliss(bliss36)
	%then %rad50_10'NS2'
	%else %rad50_11'NS2'
	%fi;

DECLARE_SEVERITY( NSP, SEVERE, INFO);

$NSP_SEVERE( NSP$_ERR, ' CE_ERR from Transport')
$NSP_SEVERE( NSP$_NTE, ' CE_NTE from Transport')
$NSP_SEVERE( NSP$_RNG, ' Dispatch out of range')
$NSP_SEVERE( NSP$_DSP, ' Illegial dispatch')
$NSP_SEVERE( NSP$_ICE, ' NSP Internal Confusion Error')


$NSP_INFO( NSP$_MSG, 'Invalid received msg')
$NSP_INFO( NSP$_RTE, 'Transport Congestion Rejection')
$NSP_INFO( NSP$_RUS, 'Node Data Base Reused')
$NSP_INFO( NSP$_CFN, 'Confidence has gone false')

! End of [NSPDATA]