Google
 

Trailing-Edge - PDP-10 Archives - BB-P363B-SM_1985 - mcb/drivers/dcpdat.r16
There are no other files named dcpdat.r16 in the archive.
! [Beginning of DCPDAT]
!
!
!                    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.
!

!++
!
! FACILITY: MCB DDCMP Process
!
! ABSTRACT:
!
!	This contains the data structure definitions for the DDCMP processor.
!
! ENVIRONMENT: MCB V3.0
!
! AUTHOR: Alan D. Peckham	CREATION DATE: 5-Apr-81
!
! MODIFIED BY:
!
!	Alan D. Peckham, 5-Apr-81: Version 1
! 01	- Rewrite from MACRO-11 to BLISS.
! 02	- Add cost entry.
! 03	- Add seconds-since-last-zeroed support for lines.
!--

%if not %declared (XPO$K_VERSION) %then library 'XPORT'; %fi

%if not %declared (MCB$K_VERSION) %then library 'MCBLIB'; %fi

library 'NMXLIB';

$SHOW (FIELDS) $SHOW (LITERALS)

!
! Synonyms for global routine names
!

macro
    PARAMETER_CIRCUIT_COUNTERS = CKCTRS %,
    PARAMETER_CIRCUIT_LINE = CP1110 %,
    PARAMETER_LINE_COUNTERS = LNCTRS %,
    PARAMETER_LINE_DEVICE = LP1000 %,
    SET_DEVICE = SETDEV %,
    SET_LINK = SETLNK %;

!
! Status Codes:
!

DECLARE_SEVERITY (DCP, INFO, WARNING, SEVERE);

$DCP_INFO (DCP$_EVT, 'Network Event')
$DCP_SEVERE (DCP$_LIB, 'Cannot find library process')
$DCP_SEVERE (DCP$_STA, 'No current station')
$DCP_SEVERE (DCP$_AST, 'Cannot handle AST from DDM')
$DCP_INFO (DCP$_LOG, 'Event logging buffer overflow')

!
!
!

literal
    DCP_K_LINE_PROVIDER = 0^1,
    DCP_K_LINE_OWNER = 1^1,
    DCP_K_CIRCUIT_PROVIDER = 2^1,
    DCP_K_NMID_HIGH = 2^1;

!
! Data base creation items
!

macro
    $SKIP_FIELD [] =
	%bliss36 [%bliss32 [%remaining]] %,
    $ALIGN_SIGN =
	%assign ($xpo$fill_index, $xpo$fill_index + 1)
	%assign ($xpo$fill_temp, 7 - ($xpo$bit_index mod 8))
	%if $xpo$fill_temp neq 0 %then $SKIP_FIELD ($BITS ($xpo$fill_temp)) %fi %,
    $SIGN_BIT =
	$XPO$FIELD (1, 1, 0) %;

compiletime
    $xpo$fill_index = 0,
    $xpo$fill_temp = 0;

$FIELD
    !
    ! List head definition
    !
    LIST_FIRST = [$ADDRESS],
    LIST_LAST = [$ADDRESS];

compiletime
    $dcp$length = $FIELD_SET_SIZE;

macro
    $LIST_HEAD =
	$SUB_BLOCK (%expand %number ($dcp$length)) %;

$FIELD
    !
    ! Physical 18 bit address
    !
    PHYSICAL_HIGH = [$BITS (16)],
    PHYSICAL_LOW = [$BITS (16)];

%assign ($dcp$length, $FIELD_SET_SIZE)

macro
    $BIAS =
	$SHORT_INTEGER %,
    $PHYSICAL_ADDRESS =
	$SUB_BLOCK (%expand %number ($dcp$length)) %,
    $SYNCH_BLOCK =
	$SUB_BLOCK (3) %;

undeclare
    $dcp$length;
!
! DDCMP header definitions
!
$FIELD
    HDR_FIELDS =
	set
	H_IDENTIFIER = [$BYTE],
	H_COUNT_LOW = [$BYTE],
	H_COUNT_HIGH = [$BITS (6)],
	H_QSYNC = [$BIT],
	H_SELECT = [$BIT],
	H_RESP = [$BYTE],
	H_NUM = [$BYTE],
	H_ADDR = [$BYTE],
	    $OVERLAY (H_COUNT_LOW)
	H_TYPE = [$BYTE],
	H_SUBTYPE = [$BYTE]
	    $CONTINUE
	tes;

literal
    H_LENGTH = $FIELD_SET_SIZE;

literal
    CM_ENQ = %o'005',			! ENQUIRE (control message)
    CM_SOH = %o'201',			! START OF HEADER (data message)
    CM_DLE = %o'220',			! DATA LINK ESCAPE (boot message)
    CM_SYN = %o'226';			! SYNCHRONIZE
!
! Control message types
!
literal
    MT_ACK = 1,				! ACKNOWLEDGE
    MT_NAK = 2,				! NEGATIVE ACKNOWLEDGE
    MT_REP = 3,				! REPLY
    MT_STR = 6,				! START
    MT_STK = 7,				! START ACKNOWLEDGE
    MT_LOW = min (MT_ACK, MT_NAK, MT_REP, MT_STR, MT_STK),
    MT_HIGH = max (MT_ACK, MT_NAK, MT_REP, MT_STR, MT_STK);
!
! DDCMP defined NAK reason error codes
!
literal
    RN_HBC = %o'1',			! Header block check error
    RN_DBC = %o'2',			! Data block check error
    RN_REP = %o'3',			! REP response
    RN_BUF = %o'10',			! Receive buffer allocation error
    RN_ROV = %o'11',			! Receiver overrun failure
    RN_MTL = %o'20',			! Received message too long
    RN_HFE = %o'21';			! Received header format error
!
! DDCMP data bases
!

literal
    !
    ! Line Duplex
    !
    DL_FULL = 0,			! FULL DUPLEX
    DL_HALF = 1,			! HALF DUPLEX
    !
    ! Line state
    !
    DL_ON = 0,				! Line ON
    DL_OFF = 1,				! Line OFF
    !
    ! Protocol type
    !
    DP_POINT = 0,			! DDCMP POINT
    DP_DMC = 4;				! DDCMP DMC

$FIELD
    D_FIELDS =
	set
	D_TIM = [$BYTE],		! Timer byte
	S_FLAGS_1 = [$BYTE],
	    $OVERLAY (S_FLAGS_1)
	LS_RESYNCH_IN_PROGRESS = [$BIT], ! Set if station is in resync state
	SS_START_REP_TIMER = [$BIT],	!  Reply timer requested
	SS_RETRANSMIT = [$BIT],		!  Retransmission requested
	SS_TIMING_REP = [$BIT],		!  Reply timer active
	SS_HALF_DUPLEX = [$BIT],
	    $ALIGN_SIGN
	LS_STATION_ENABLED = [$SIGN_BIT], ! Set if station enabled
	    $CONTINUE
	S_PROTOCOL_STATE = [$TINY_INTEGER],
	S_FLAGS_2 = [$BYTE],
	    $OVERLAY (S_FLAGS_2)
	SS_SEND_STACK = [$BIT],		!  Set if send STACK message
	SS_SEND_START = [$BIT],		!  Set if send START message
	SS_SEND_NAK = [$BIT],		!  Set if send NAK message
	SS_SEND_REP = [$BIT],		!  Set if send REP message
	SS_SEND_ACK = [$BIT],		!  Set if send ACK message
	SS_SEND_SELECT = [$BIT],	!  Set if send SELECT on this message
	    $CONTINUE
	D_REPORTED_STATE = [$TINY_INTEGER],
	S_FLAGS_3 = [$BYTE],
	    $OVERLAY (S_FLAGS_3)
	SS_NOTIFY_OFF = [$BIT],
	SS_NOTIFY_STATE = [$BIT],
	SS_ACTIVE = [$BIT],		!  Station has been started
	SS_DEVICE_BEING_SET = [$BIT],
	    $ALIGN_SIGN
	SS_DEVICE_RUNNING = [$SIGN_BIT],
	    $CONTINUE
	S_REQUESTED_STATE = [$TINY_INTEGER],
	D_CONTROL_FLAGS = [$TINY_INTEGER],
	    $OVERLAY (D_CONTROL_FLAGS)
	DC_SHUT_DOWN = [$BIT],		!  Station being shut down
	DC_STOP_DEVICE = [$BIT],
	DC_START_DEVICE = [$BIT],
	DC_SET_REQUESTED_STATE = [$BIT],
	    $CONTINUE
	L_PROTOCOL = [$BYTE],
					! Line parameter 1001:
					!  0 = DDCMP POINT
					!  1 = DDCMP CONTROL
					!  2 = DDCMP TRIBUTARY
					!  4 = DDCMP DMC
	L_CONTROLLER = [$BYTE],
					! Line parameter 1110:
					!  0 = NORMAL
					!  1 = LOOPBACK
	L_DUPLEX = [$BYTE],
					! Line parameter 1005:
					!  0 = FULL
					!  1 = HALF
	L_CLOCK = [$BYTE],
					! Line parameter 1111:
					!  0 = EXTERNAL
					!  1 = INTERNAL
	L_LINE_STATE = [$TINY_INTEGER],	! Line parameter 0:
					!  0 = ON
					!  1 = OFF

	!
	! Threshold counters
	!

	S_RECEIVE_THRESHOLD = [$TINY_INTEGER],
	S_TRANSMIT_THRESHOLD = [$TINY_INTEGER],
	S_SELECT_THRESHOLD = [$TINY_INTEGER],

	!
	! Data link counters
	!

	S_BYTES_RECEIVED = [$COUNTER (32)],
					! Multipoint circuit counter 1000
	S_BYTES_TRANSMITTED = [$COUNTER (32)],
					! Multipoint circuit counter 1001
	S_DATA_BLOCKS_RECEIVED = [$COUNTER (32)],
					! Multipoint circuit counter 1010
	S_DATA_BLOCKS_TRANSMITTED = [$COUNTER (32)],
					! Multipoint circuit counter 1011
	S_SELECTION_INTERVALS = [$COUNTER (16)],
					! Multipoint circuit counter 1050
	S_DATA_ERRORS_OUTBOUND = [$COUNTER (8)],
	SO_N1 = [$BIT],			!  OHBCC - NAK's received
					!	   header block check error
	SO_N2 = [$BIT],			!  OBDCC - NAK's received
					!	   data block check error
	SO_N3 = [$BIT],			!  OREP  - NAK's received REP response
					! Multipoint circuit counter 1021:
					!  0 = NAKs received, header block check error
					!  1 = NAKs received, data block check error
					!  2 = NAKs received, REP response
	    $ALIGN (FULLWORD)
	S_DATA_ERRORS_INBOUND = [$COUNTER (8)],
	SI_N1 = [$BIT],			!  IHBCC - Header block check errors
	SI_N2 = [$BIT],			!  IDBCC - NAK's sent data block check error
	SI_N3 = [$BIT],			!  IREP  - NAK's sent REP response
					! Multipoint circuit counter 1020:
					!  0 = NAKs sent, header block check error
					!  1 = NAKs sent, data block check error
					!  2 = NAKs sent, REP response
	    $ALIGN (FULLWORD)
	S_LOCAL_BUFFER_ERRORS = [$COUNTER (8)],
	SL_N8 = [$BIT],			!  LBTU - NAK's sent
					!	  buffer temporarily unavailable
	SL_N16 = [$BIT],		!  LBTS - NAK's sent buffer too small
					! Multipoint circuit counter 1041:
					!  0 = NAKs sent, buffer unavailable
					!  1 = NAKs sent, buffer too small
	    $ALIGN (FULLWORD)
	S_REMOTE_BUFFER_ERRORS = [$COUNTER (8)],
	SR_N8 = [$BIT],			!  RBTU - NAK's rcvd
					!	  buffer temporarily unavailable
	SR_N16 = [$BIT],		!  RBTS - NAK's rcvd buffer too small
					! Multipoint circuit counter 1040:
					!  0 = NAKs received, buffer unavailable
					!  1 = NAKs received, buffer too small
	    $ALIGN (FULLWORD)
	S_SELECTION_TIMEOUTS = [$COUNTER (8)],
	SS_NRT = [$BIT],		!  NRTS - No reply timeout
	SS_IRT = [$BIT],		!  IRTS - Incomplete reply timeout
					! Multipoint circuit counter 1051:
					!  0 = no reply to select
					!  1 = incomplete reply to select
	    $ALIGN (FULLWORD)
	S_LOCAL_REPLY_TIMEOUTS = [$COUNTER (8)],
					! Multipoint circuit counter 1031
	S_REMOTE_REPLY_TIMEOUTS = [$COUNTER (8)],
					! Multipoint circuit counter 1030
	!
	! Station counters
	!
	L_TIME_LINE_ZEROED = [$TIME],	! Line counter 0:
					!  time since last zeroed
	L_REMOTE_STATION_ERRORS = [$COUNTER (8)],
	LR_N9 = [$BIT],			!  ROVRN - NAK's received receive overrun
	LR_N17 = [$BIT],		!  RMHFE - NAK's sent message header format error
	LR_SEL = [$BIT],		!  RSEL  - Selection address error
	LR_BAB = [$BIT],		!  RSTR  - Babbling tributaries
					! Line counter 1100:
					!  0 = NAKs received, receive overrun
					!  1 = NAKs sent, header format error
					!  2 = selection address errors
					!  3 = streaming tributaries
	    $ALIGN (FULLWORD)
	L_LOCAL_STATION_ERRORS = [$COUNTER (8)],
	LL_N9 = [$BIT],			!  LOVRN - NAK's sent receive overrun
	LL_NNS = [$BIT],		!  LOVR  - Receive overruns, NAK not sent
	LL_XMT = [$BIT],		!  LUNDR - Transmit underruns
	LL_N17 = [$BIT],		!  LMHFE - NAK's received
					! Line counter 1101:
					!  0 = NAKs sent, receive overrun
					!  1 = receive overruns, NAK not sent
					!  2 = transmit underruns
					!  3 = NAKs received, header format error
	    $ALIGN (FULLWORD)
	L_HEADER_BCC_ERRORS = [$COUNTER (8)], ! Header block check errors
	L_MAINTENANCE_BCC_ERRORS = [$COUNTER (8)], ! Maintenance data block check errors
	S_R = [$BYTE],			! No. of last message received
	S_TM1 = [$BYTE],		! No. of last message queued to transmitter
	S_X = [$BYTE],			! No. of last message returned from transmitter
	S_N = [$BYTE],			! No. of highest message returned from transmitter
	S_A = [$BYTE],			! No. of last acked transmitted message
	S_AR = [$BYTE],			! No. of last acked message returned
	S_MOTD = [$BYTE],		! Number of messages outstanding to the driver
	S_PENDING_NAK_REASON = [$BYTE],	! NAK reason to be sent in NAK message
	D_NMX_PIX = [$BYTE],		! NMX process index
	K_PRIORITY = [$BYTE],		! KMC device priority
	    $ALIGN (FULLWORD)
	K_REGISTER = [$ADDRESS],	! KMC CSR address
	K_VECTOR = [$ADDRESS],		! KMC interrupt vector address
	D_REGISTER = [$ADDRESS],	! DUP CSR address
	L_SERVICE_TIMER = [$SHORT_INTEGER],
					! Line parameter 1120:
					!  1-65535 milliseconds
	L_RETRANSMIT_TIMER = [$SHORT_INTEGER],
					! Line parameter 1121:
					!  1-65535 milliseconds
	S_WAITING_FOR_TRANSMIT = [$LIST_HEAD], ! Pretransmit queue
	S_WAITING_FOR_ACK = [$LIST_HEAD], ! Waiting for acknowledge queue
	S_CONTROL_CCB = [$ADDRESS],	! Control function pending
	S_CIRCUIT_ENTITY = [$SHORT_INTEGER], ! Circuit logging entity identification
	S_USER_HANDLE = [$SHORT_INTEGER],
	S_TRANSIENT_ERROR = [$SHORT_INTEGER],
	S_PERSISTENT_ERROR = [$SHORT_INTEGER],
	D_USER_BUFFERS = [$SHORT_INTEGER],
	S_CIRCUIT_COST = [$SHORT_INTEGER], ! ** FOR TRANSPORT **
	L_LINE_ENTITY = [$SHORT_INTEGER], ! Line logging entity identification
	L_DRIVER_HANDLE = [$SHORT_INTEGER], ! Process handle for driver process
	L_MESSAGES_AT_DRIVER = [$BYTE],	! Messages outstanding to the driver
	L_MAXIMUM_AT_DRIVER = [$BYTE],	! Maximum data messages pending at the driver.
	    $ALIGN (FULLWORD)
	L_PRE_TRANSMIT = [$LIST_HEAD],	! Station pre-transmit queue
	L_HEADER = [$SUB_BLOCK (H_LENGTH)], ! Header work area
	    $OVERLAY (L_HEADER)
	LI_HDX = [$BIT],		! Half duplex
	    $ALIGN (FULLWORD)
	    $SKIP_FIELD ($BITS (3))
	LI_MPT = [$BIT],		! Multipoint
	    $SKIP_FIELD ($BIT)
	LI_MPS = [$BIT],		! Multipoint slave
	    $CONTINUE
	L_BABBLE_COUNT = [$BYTE],	! Babbling count
	S_MAXIMUM_TRANSMITS = [$BYTE]	! maximum messages at one shot
	    $ALIGN (FULLWORD)
	tes;

literal
    D_LENGTH = $FIELD_SET_SIZE,		! Length of data base
    !
    ! Station states
    !
    SS_HALTED = 0,			!   Station is in HALTED state
    SS_ISTRT = 1,			!   Station is in ISTRT state
    SS_ASTRT = 2,			!   Station is in ASTRT state
    SS_RUNNING = 3,			!   Station is in RUN state
    SS_MAINTENANCE = 4,			!   Station is in MAINTENANCE state
    SS_LOW = min (SS_HALTED, SS_ISTRT, SS_ASTRT, SS_RUNNING, SS_MAINTENANCE),
    SS_HIGH = max (SS_HALTED, SS_ISTRT, SS_ASTRT, SS_RUNNING, SS_MAINTENANCE);

!
! [End of DCPDAT]