Trailing-Edge
-
PDP-10 Archives
-
tops10_703_distr_bb-x140b-sb
-
10,7/703mon/ethprm.mac
There are 3 other files named ethprm.mac in the archive. Click here to see a list.
UNIVERSAL ETHPRM - ETHERNET SERVICE DEFINITIONS V20
SUBTTL WILLIAM C. DAVENPORT/WXD 10-OCT-85
SEARCH F,S,MACSYM
SALL
;THIS FILE CONTAINS ALL DEFINITIONS RELATED TO ETHERNET SERVICE
;THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED
; OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE.
.CPYRT<1985,1986>
;COPYRIGHT (C) 1985,1986 BY
;DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
;ALL RIGHTS RESERVED.
XP VETHPR,20 ;ETHPRM VERSION NUMBER
SUBTTL TABLE OF CONTENTS
; TABLE OF CONTENTS FOR ETHPRM
;
;
; SECTION PAGE
; 1. TABLE OF CONTENTS......................................... 2
; 2. ETHERNET INTERFACE DEFINITIONS
; 2.1 FUNCTION CODES.................................... 3
; 2.2 ERROR CODES....................................... 4
; 2.3 UN BLOCK.......................................... 5
; 2.4 MSD BLOCK......................................... 6
; 2.5 CHANNEL INFORMATION BLOCK......................... 7
; 2.6 CHANNEL COUNTERS BLOCK............................ 8
; 2.7 PORTAL INFORMATION BLOCK.......................... 9
; 2.8 PORTAL COUNTERS BLOCK............................. 10
; 2.9 KONTROLLER INFORMATION BLOCK...................... 11
; 2.10 KONTROLLER COUNTERS BLOCK......................... 12
; 3. ETHERNET INTERNAL DEFINITIONS
; 3.1 MACROS............................................ 13
; 3.2 PROTOCOL TYPES.................................... 14
; 3.3 ETHERNET CHANNEL BLOCK............................ 15
; 3.4 ETHERNET PORTAL BLOCK............................. 16
; 3.5 MULTI-CAST ADDRESS BLOCK.......................... 18
; 3.6 KONTROLLER BLOCK.................................. 19
; 4. ETHERNET KONTROLLER INTERFACE
; 4.1 FUNCTION CODES.................................... 20
; 4.2 EA BLOCK.......................................... 21
; 5. ETHNT. UUO DEFINITIONS
; 5.1 FUNCTION CODES.................................... 23
; 5.2 ERROR CODES....................................... 24
; 5.3 USER ARGUMENT BLOCK............................... 25
; 5.4 USER BUFFER DESCRIPTOR BLOCK...................... 27
; 6. THE END................................................... 28
SUBTTL ETHERNET INTERFACE DEFINITIONS -- FUNCTION CODES
;THESE FUNCTION CODES ARE USED TO COMMUNICATE WITH ETHSER. FUNCTIONS
;MARKED WITH ASTERISK ARE USED BY ETHSER ON FUNCTION COMPLETION CALLBACK.
NU.OPN==1 ;OPEN PORTAL
NU.CLO==2 ;CLOSE PORTAL (*)
NU.RCV==3 ;RECEIVE DATAGRAM (*)
NU.XMT==4 ;TRANSMIT DATAGRAM (*)
NU.EMA==5 ;ENABLE MULTI-CAST ADDRESS
NU.DMA==6 ;DISABLE MULTI-CAST ADDRESS
NU.RCL==7 ;READ CHANNEL LIST
NU.RCI==10 ;READ CHANNEL INFORMATION
NU.RCC==11 ;READ CHANNEL COUNTERS (*)
NU.SCA==12 ;SET CHANNEL ADDRESS (*)
NU.RPL==13 ;READ PORTAL LIST
NU.RPI==14 ;READ PORTAL INFORMATION
NU.RPC==15 ;READ PORTAL COUNTERS (*)
NU.RKL==16 ;READ KONTROLLER LIST
NU.RKI==17 ;READ KONTROLLER INFORMATION
NU.RKC==20 ;READ KONTROLLER COUNTERS (*)
NU.MIN==NU.OPN ;MINIMUM DEFINED FUNCTION CODE
NU.MAX==NU.RKC ;MAXIMUM DEFINED FUNCTION CODE
SUBTTL ETHERNET INTERFACE DEFINITIONS -- ERROR CODES
UNIFC%==1 ;ILLEGAL FUNCTION CODE
UNRES%==2 ;NO RESOUCES
UNNSC%==3 ;NO SUCH CHANNEL
UNICR%==4 ;ILLEGAL CALLBACK ROUTINE
UNIVP%==5 ;ILLEGAL PROTOCOL TYPE
UNPIU%==6 ;PROTOCOL TYPE IN USE
UNPRA%==7 ;PROMISCUOUS RECEIVER ACTIVE
UNICL%==10 ;ILLEGAL FUNCTION AT CALLBACK LEVEL
UNNSP%==11 ;NO SUCH PORTAL
UNIFB%==12 ;IMPROPERLY FORMATTED BUFFER
UNIBS%==13 ;ILLEGAL BUFFER SIZE
UNRDL%==14 ;RECEIVED DATAGRAM TOO LONG
UNRAB%==15 ;RECEIVE ABORTED
UNLER%==16 ;LENGTH ERROR
UNNPE%==17 ;NO PROTOCOL TYPE ENABLED FOR THIS PORTAL
UNIBP%==20 ;ILLEGAL BYTE POINTER
UNEXC%==21 ;EXCESSIVE COLLISIONS
UNDNS%==22 ;DATAGRAM NOT SENT
UNNRE%==23 ;NO ROOM FOR ENTRY
UNANE%==24 ;ADDRESS NOT ENABLED
UNIMA%==25 ;ILLEGAL MULTICAST ADDRESS
UNICA%==26 ;ILLEGAL CHANNEL ADDRESS
UNPWS%==27 ;PORTAL IN WRONG STATE
UNIUA%==30 ;ILLEGAL UN BLOCK ADDRESS
UNCCF%==31 ;CARRIER CHECK FAILED
UNSHT%==32 ;SHORT CIRCUIT
UNOPN%==33 ;OPEN CIRCUIT
UNRFD%==34 ;REMOTE FAILURE TO DEFER
UNICS%==35 ;ILLEGAL CHANNEL STATE
UNCAB%==36 ;COMMAND ABORT
UNNSK%==37 ;NO SUCH KONTROLLER
UNMAX%==UNNSK% ;MAXIMUM ERROR CODE
SUBTTL ETHERNET INTERFACE DEFINITIONS -- UN BLOCK
;A UN BLOCK IS USED TO PASS ARGUMENTS FROM ETHERNET USERS TO ETHSER.
;IT CONTAINS ALL INFORMATION NEEDED FOR ALL SUPPORTED FUNCTIONS.
BEGSTR UN
WORD PID ;PORTAL ID ASSIGNED BY ETHSER
WORD SID ;SECONDARY ID (NU.RPI, NU.RPC, NU.RKI, NU.RKC)
WORD RID ;REQUEST ID FOR THIS FUNCTION
WORD STA,0 ;STATUS AND FLAGS WORD
FIELD RUN,1 ;PORTAL IS IN RUN STATE
FIELD ZRO,1 ;ZERO COUNTERS AFTER READING
FILLER 1 ;BYTE ALIGN NEXT FIELD
FIELD ADS,2 ;ADDRESS SPACE OF DATAGRAM BUFFER
UNA.EV==0 ;EXEC VIRTUAL
UNA.UV==1 ;USER VIRTUAL
UNA.PH==2 ;PHYSICAL
HWORD TDR ;TIME DOMAIN REFLECTOMETRY VALUE
WORD JCH ;JCH OF PORTAL OWNER
WORD UID ;USER ID FOR THIS PORTAL
WORD CBA ;USER CALLBACK ADDRESS
WORD PTY,0 ;PROTOCOL IDENTIFICATION WORD
FIELD PAD,1 ;PROTOCOL USES PADDING
FILLER 2 ;BYTE ALIGN NEXT FIELD
FIELD CHN,3 ;ETHERNET CHANNEL NUMBER
HWORD PRO ;PROTOCOL TYPE CODE
WORD DAD,2 ;DESTINATION ETHERNET ADDRESS
WORD SAD,2 ;SOURCE ETHERNET ADDRESS
WORD BSZ ;DATAGRAM BUFFER SIZE
WORD BFA,2 ;DATAGRAM BUFFER DESCRIPTOR
WORD CAR,2 ;CURRENT ETHERNET ADDRESS
WORD HAD,2 ;HARDWARE ETHERNET ADDRESS
ENDSTR
SUBTTL ETHERNET INTERFACE DEFINITIONS -- MSD BLOCK
;A CHAIN OF MSDS IS USED TO DESCRIBE RECEIVE AND TRANSMIT DATAGRAM
;BUFFERS.
BEGSTR MD
WORD NXT ;(RCV) MUST BE ZERO
;(XMT) POINTER TO NEXT MSD IN CHAIN
WORD PTR ;BYTE POINTER INTO DATA BUFFER
WORD AUX ;(RCV) NOT USED
;(XMT) BYTE POINTER TO START OF DATA BUFFER
WORD BYT ;(RCV) BYTES LEFT IN DATA BUFFER
;(XMT) BYTES WRITTEN IN DATA BUFFER
FIELD VMC,3 ;VIRTUAL MAP CONTEXT
VMC.XC==0 ;EXEC CONTEXT
VMC.US==1 ;USER CONTEXT
VMC.NO==2 ;PHYSICAL
HWORD ALL ;DATA BUFFER ALLOCATED LENGTH IN BYTES
WORD ALA ;DATA BUFFER ALLOCATED ADDRESS
ENDSTR
SUBTTL ETHERNET INTERFACE DEFINITIONS -- CHANNEL INFORMATION BLOCK
;ETHERNET CHANNEL INFORMATION IS RETURNED BY A NU.RCI FUNCTION.
BEGSTR CI
WORD CNM ;CHANNEL NUMBER
WORD EAD,2 ;ETHERNET ADDRESS
ENDSTR
SUBTTL ETHERNET INTERFACE DEFINITIONS -- CHANNEL COUNTERS BLOCK
;ETHERNET CHANNEL COUNTERS ARE RETURNED BY A NU.RCC FUNCTION.
BEGSTR CC
WORD SLZ ;SECONDS SINCE COUNTERS LAST ZEROED
WORD BYR ;BYTES RECEIVED
WORD BYX ;BYTES TRANSMITTED
WORD DGR ;DATAGRAMS RECEIVED
WORD DGX ;DATAGRAMS TRANSMITTED
WORD MBR ;MULTI-CAST BYTES RECEIVED
WORD MDR ;MULTI-CAST DATAGRAMS RECEIVED
WORD DXD ;DATAGRAMS TRANSMITTED, INITIALLY DEFERRED
WORD DX1 ;DATAGRAMS TRANSMITTED, SINGLE COLLISION
WORD DXM ;DATAGRAMS TRANSMITTED, MULTIPLE COLLISIONS
WORD XMF ;TRANSMIT FAILURES
WORD XFM,0 ;TRANSMIT FAILURE BIT MASK
FIELD XCL,1,28 ;CARRIER LOST
FIELD XBP,1,29 ;TRANSMIT BUFFER PARITY ERROR
FIELD XFD,1,30 ;REMOTE FAILURE TO DEFER
FIELD XFL,1,31 ;FRAME TOO LONG
FIELD XOC,1,32 ;OPEN CIRCUIT
FIELD XSC,1,33 ;SHORT CIRCUIT
FIELD XCC,1,34 ;CARRIER CHECK FAILED
FIELD XEC,1,35 ;EXCESSIVE COLLISIONS
WORD RCF ;RECEIVE FAILURES
WORD RFM,0 ;RECEIVE FAILURE BIT MASK
FIELD RFP,1,31 ;FREE LIST PARITY ERROR
FIELD RNB,1,32 ;NO FREE BUFFERS
FIELD RFL,1,33 ;FRAME TOO LONG
FIELD RFE,1,34 ;FRAMING ERROR
FIELD RBC,1,35 ;BLOCK CHECK ERROR
WORD UFD ;UNRECOGNIZED FRAME DESTINATION
WORD DOV ;DATA OVERRUN
WORD SBU ;SYSTEM BUFFER UNAVAILABLE
WORD UBU ;USER DATAGRAM BUFFER UNAVAILABLE
ENDSTR
;EQUIVALENT TOPS-20 DEFINITIONS
MSKSTR CCBYS,CC.BYX,CCBYX ;BYTES TRANSMITTED
MSKSTR CCDGS,CC.DGX,CCDGX ;DATAGRAMS TRANSMITTED
MSKSTR CCDSD,CC.DXD,CCDXD ;DATAGRAMS TRANSMITTED, INITIALLY DEFERRED
MSKSTR CCDS1,CC.DX1,CCDX1 ;DATAGRAMS TRANSMITTED, SINGLE COLLISION
MSKSTR CCDSM,CC.DXM,CCDXM ;DATAGRAMS TRANSMITTED, MULTIPLE COLLISIONS
MSKSTR CCSF,CC.XMF,CCXMF ;TRANSMIT FAILURES
MSKSTR CCSFM,CC.XFM,CCXFM ;TRANSMIT FAILURE BIT MASK
MSKSTR CCRF,CC.RCF,CCRCF ;RECEIVE FAILURES
SUBTTL ETHERNET INTERFACE DEFINITIONS -- PORTAL INFORMATION BLOCK
;ETHERNET PORTAL INFORMATION IS RETURNED BY A NU.RPI FUNCTION.
BEGSTR PI
WORD JCH ;JCH OF PORTAL OWNER
WORD PIW ;PROTOCOL IDENTIFICATION WORD
WORD CSW ;CHANNEL STATUS WORD
WORD KSW ;KONTROLLER STATUS WORD
ENDSTR
SUBTTL ETHERNET INTERFACE DEFINITIONS -- PORTAL COUNTERS BLOCK
;ETHERNET PORTAL COUNTERS ARE RETURNED BY A NU.RPC FUNCTION.
BEGSTR PC
WORD SLZ ;SECONDS SINCE COUNTERS LAST ZEROED
WORD BYR ;BYTES RECEIVED
WORD DGR ;DATAGRAMS RECEIVED
WORD BYX ;BYTES TRANSMITTED
WORD DGX ;DATAGRAMS TRANSMITTED
WORD UBU ;USER DATAGRAM BUFFER UNAVAILABLE
ENDSTR
;EQUIVALENT TOPS-20 DEFINITIONS
MSKSTR PCBYS,PC.BYX,PCBYX ;BYTES TRANSMITTED
MSKSTR PCDGS,PC.DGX,PCDGX ;DATAGRAMS TRANSMITTED
SUBTTL ETHERNET INTERFACE DEFINITIONS -- KONTROLLER INFORMATION BLOCK
;KONTROLLER INFORMATION IS RETURNED BY A NU.RKI FUNCTION.
BEGSTR KI
WORD CSW ;CHANNEL STATUS WORD
WORD CPU ;CPU NUMBER OF KONTROLLER
WORD TYP ;KONTROLLER TYPE
WORD KNO ;KONTROLLER NUMBER
WORD HEA,2 ;HARDWARE ETHERNET ADDRESS
ENDSTR
SUBTTL ETHERNET INTERFACE DEFINITIONS -- KONTROLLER COUNTERS BLOCK
;ETHERNET KONTROLLER COUNTERS ARE RETURNED BY A NU.RKC FUNCTION.
;THE FORMAT OF THESE COUNTERS IS IDENTICAL TO THE CHANNEL COUNTERS.
BEGSTR KC
WORD SLZ ;SECONDS SINCE COUNTERS LAST ZEROED
WORD BYR ;BYTES RECEIVED
WORD BYX ;BYTES TRANSMITTED
WORD DGR ;DATAGRAMS RECEIVED
WORD DGX ;DATAGRAMS TRANSMITTED
WORD MBR ;MULTI-CAST BYTES RECEIVED
WORD MDR ;MULTI-CAST DATAGRAMS RECEIVED
WORD DXD ;DATAGRAMS TRANSMITTED, INITIALLY DEFERRED
WORD DX1 ;DATAGRAMS TRANSMITTED, SINGLE COLLISION
WORD DXM ;DATAGRAMS TRANSMITTED, MULTIPLE COLLISIONS
WORD XMF ;TRANSMIT FAILURES
WORD XFM,0 ;TRANSMIT FAILURE BIT MASK
FIELD XCL,1,28 ;CARRIER LOST
FIELD XBP,1,29 ;TRANSMIT BUFFER PARITY ERROR
FIELD XFD,1,30 ;REMOTE FAILURE TO DEFER
FIELD XFL,1,31 ;FRAME TOO LONG
FIELD XOC,1,32 ;OPEN CIRCUIT
FIELD XSC,1,33 ;SHORT CIRCUIT
FIELD XCC,1,34 ;CARRIER CHECK FAILED
FIELD XEC,1,35 ;EXCESSIVE COLLISIONS
WORD RCF ;RECEIVE FAILURES
WORD RFM,0 ;RECEIVE FAILURE BIT MASK
FIELD RFP,1,31 ;FREE LIST PARITY ERROR
FIELD RNB,1,32 ;NO FREE BUFFERS
FIELD RFL,1,33 ;FRAME TOO LONG
FIELD RFE,1,34 ;FRAMING ERROR
FIELD RBC,1,35 ;BLOCK CHECK ERROR
WORD UFD ;UNRECOGNIZED FRAME DESTINATION
WORD DOV ;DATA OVERRUN
WORD SBU ;SYSTEM BUFFER UNAVAILABLE
WORD UBU ;USER DATAGRAM BUFFER UNAVAILABLE
ENDSTR
SUBTTL ETHERNET INTERNAL DEFINITIONS -- MACROS
;MACRO TO RETURN CPOPJ WITH AN ERROR CODE IN T1
DEFINE ERRRET(CODE,CONT),<
PJRST [MOVX T1,CODE
IFB <CONT>,<POPJ P,>
IFNB <CONT>,<PJRST CONT>]
>; END DEFINE ERRRET
SUBTTL ETHERNET INTERNAL DEFINITIONS -- PROTOCOL TYPES
;PORTAL ID FIELD DEFINITIONS
PI.ECI==000700,,000000 ;ETHERNET CHANNEL ID
PI.EPB==000077,,777777 ;ETHERNET PORTAL BLOCK ADDRESS
;PROTOCOL TYPE RESTRICTIONS
XP MINPTY,-3 ;MINIMUM ALLOWABLE PROTOCOL TYPE
XP MAXPTY,177777 ;MAXIMUM ALLOWABLE PROTOCOL TYPE
;PSEUDO PROTOCOL TYPES
PT%INF==-1 ;INFORMATION PROTOCOL TYPE
PT%PRM==-2 ;PROMISCUOUS RECEIVER PROTOCOL TYPE
PT%UNK==-3 ;UNKNOWN PROTOCOL RECEIVER PROTOCOL TYPE
SUBTTL ETHERNET INTERNAL DEFINITIONS -- ETHERNET CHANNEL BLOCK
;ONE ETHERNET CHANNEL BLOCK EXISTS FOR EACH ETHERNET TO WHICH A
;SYSTEM IS CONNECTED. IT CONTAINS INFORMATION NEEDED BY ETHSER
;TO MANAGE THAT ETHERNET FOR MULTIPLE PROTOCOLS. ADDITIONALLY,
;IT IS RESPONSIBILE FOR MANAGING MULTIPLE DEVICES CONNECTED TO
;THAT ETHERNET.
PHASE 0 ;THESE ARE OFFSETS
ECBSYS:! BLOCK 1 ;ADDRESS OF NEXT ETHERNET CHANNEL BLOCK
ECBCID:! BLOCK 1 ;ETHERNET CHANNEL ID
ECBSTS:! BLOCK 1 ;ETHERNET CHANNEL STATUS
ECSONL==400000,,000000 ;CHANNEL IS ONLINE
ECBEAD:! BLOCK 2 ;ETHERNET ADDRESS OF THIS CHANNEL
ECBEPB:! BLOCK 1 ;ADDRESS OF FIRST ETHERNET PORTAL BLOCK
; BELONGING TO THIS CHANNEL
ECBEKB:! BLOCK 1 ;ADDRESS OF FIRST ETHERNET KONTROLLER BLOCK
; BELONGING TO THIS CHANNEL
ECBCTR:! BLOCK CC.LEN ;CHANNEL COUNTERS AREA
ECBLEN:! ;LENGTH OF ETHERNET CHANNEL BLOCK
DEPHASE
SUBTTL ETHERNET INTERNAL DEFINITIONS -- ETHERNET PORTAL BLOCK
;AN ETHERNET PORTAL BLOCK IS CREATED FOR EACH PROTOCOL BEING
;USED ON AN ETHERNET CHANNEL. IT CONTAINS INFORMATION NEEDED
;TO MANAGE THAT PROTOCOL'S SHARING OF THE ETHERNET CHANNEL.
PHASE 0 ;THESE ARE OFFSETS
EPBNXT:! BLOCK 1 ;ADDRESS OF NEXT ETHERNET PORTAL BLOCK
; ON THIS ETHERNET CHANNEL
EPBEKB:! BLOCK 1 ;ADDRESS OF ETHERNET KONTROLLER BLOCK
; BEING USED BY THIS PORTAL
EPBPTY:! BLOCK 1 ;PROTOCOL TYPE
EPBJCH:! BLOCK 1 ;JCH OF PORTAL OWNER
EPBKPB:! BLOCK 1 ;ADDRESS OF KONTROLLER'S PROTOCOL BLOCK
EPBPID:! BLOCK 1 ;PORTAL ID
EPBSTS:! BLOCK 1 ;ETHERNET PORTAL STATUS
EPSOPN==400000,,000000 ;PORTAL IS OPEN
EPSPAD==200000,,000000 ;PROTOCOL USES PADDING
EPSINF==100000,,000000 ;INFORMATION ONLY PORTAL
EPSSTS==070000,,000000 ;CURRENT PROTOCOL STATE
.PSDIS==0 ;DISABLED
.PSDWE==1 ;DISABLED, WANT TO ENABLE
.PSEIP==2 ;ENABLE IN PROGRESS
.PSEPD==3 ;ENABLE IN PROGRESS, WANT TO DISABLE
.PSENA==4 ;ENABLED
.PSEWD==5 ;ENABLED, WANT TO DISABLE
.PSDIP==6 ;DISABLE IN PROGRESS
.PSMAX==.PSDIP ;MAXIMUM ASSIGNED STATE
EPSPST==007000,,000000 ;PREVIOUS PROTOCOL STATE
EPBEMB:! BLOCK 1 ;ADDRESS OF FIRST MULTI-CAST ADDRESS BLOCK
; BELONGING TO THIS PORTAL
;CONTINUED ON NEXT PAGE
;CONTINUED FROM PREVIOUS PAGE
EPBCBI:! BLOCK 1 ;USER'S CALLBACK ID
EPBCBA:! BLOCK 1 ;USER'S CALLBACK ROUTINE ADDRESS
EPBCBU:! BLOCK UN.LEN ;CALLBACK UN BLOCK
EPBBSZ:! BLOCK 1 ;RECEIVE BUFFER SIZE
EPBXBC:! BLOCK 1 ;CURRENT TRANSMIT BUFFER COUNT
EPBRBC:! BLOCK 1 ;CURRENT RECEIVE BUFFER COUNT
EPBCTR:! BLOCK PC.LEN ;PORTAL COUNTERS AREA
EPBLEN:! ;LENGTH OF ETHERNET PORTAL BLOCK
DEPHASE
SUBTTL ETHERNET INTERNAL DEFINITIONS -- MULTI-CAST ADDRESS BLOCK
;AN ETHERNET MULTI-CAST ADDRESS BLOCK IS CREATED FOR EACH UNIQUE
;MULTI-CAST ADDRESS ENABLED ON AN ETHERNET PORTAL.
PHASE 0 ;THESE ARE OFFSETS
EMBNXT:! BLOCK 1 ;ADDRESS OF NEXT MULTI-CAST ADDRESS BLOCK
EMBMCA:! BLOCK 2 ;MULTI-CAST ADDRESS
EMBLEN:! ;LENGTH OF MULTI-CAST ADDRESS BLOCK
DEPHASE
SUBTTL ETHERNET INTERNAL DEFINITIONS -- KONTROLLER BLOCK
;AN ETHERNET KONTROLLER BLOCK IS CREATED FOR EACH PHYSICAL DEVICE
;CONNECTED TO AN ETHERNET. IT CONTAINS INFORMATION NEEDED TO
;MANAGE THE PHYSICAL HARDWARE DEVICE.
PHASE 0 ;THESE ARE OFFSETS
EKBSYS:! BLOCK 1 ;ADDRESS OF NEXT ETHERNET KONTROLLER BLOCK
EKBECB:! BLOCK 1 ;ADDRESS OF ETHERNET CHANNEL BLOCK
; TO WHICH THIS KONTROLLER BELONGS
EKBNXT:! BLOCK 1 ;ADDRESS OF NEXT ETHERNET KONTROLLER BLOCK
; ON THIS ETHERNET CHANNEL
EKBKTY:! BLOCK 1 ;KONTROLLER TYPE WORD
EKYCPU==700000,,000000 ;CPU NUMBER OF KONTROLLER
EKYKTY==070000,,000000 ;KONTROLLER TYPE
.KTKNI==1 ;KLNI
.KTUNA==2 ;DEUNA
EKYKNO==007000,,000000 ;KONTROLLER NUMBER
EKBKID:! BLOCK 1 ;ETHERNET KONTROLLER ID
EKBSTS:! BLOCK 1 ;ETHERNET KONTROLLER STATUS
EKSONL==400000,,000000 ;KONTROLLER IS ONLINE
EKSSEA==000000,,400000 ;NEED TO SET ETHERNET ADDRESS
EKSSTS==070000,,000000 ;CURRENT KONTROLLER STATE
.KSDIS==0 ;DISABLED
.KSDWE==1 ;DISABLED, WANT TO ENABLE
.KSEIP==2 ;ENABLE IN PROGRESS
.KSEPD==3 ;ENABLE IN PROGRESS, WANT TO DISABLE
.KSENA==4 ;ENABLED
.KSEWD==5 ;ENABLED, WANT TO DISABLE
.KSDIP==6 ;DISABLE IN PROGRESS
.KSMAX==.KSDIP ;MAXIMUM ASSIGNED STATE
EKSPST==007000,,000000 ;PREVIOUS KONTROLLER STATE
EKBKKB:! BLOCK 1 ;ADDRESS OF KONTROLLER'S KONTROLLER BLOCK
EKBKDA:! BLOCK 1 ;ADDRESS OF KONTROLLER'S DISPATCH ROUTINE
EKBHEA:! BLOCK 2 ;HARDWARE ETHERNET ADDRESS OF THIS KONTROLLER
EKBCTR:! BLOCK KC.LEN ;KONTROLLER COUNTERS AREA
EKBLEN:! ;LENGTH OF ETHERNET KONTROLLER BLOCK
DEPHASE
SUBTTL ETHERNET KONTROLLER INTERFACE -- FUNCTION CODES
;THESE ARE THE FUNCTION CODES USED BETWEEN ETHSER AND AN ETHERNET KONTROLLER
EK.SEA==1 ;SET KONTROLLER ETHERNET ADDRESS
EK.RKC==2 ;READ AND CLEAR KONTROLLER COUNTERS
EK.RPC==3 ;READ AND CLEAR PROTOCOL COUNTERS
EK.EPT==4 ;ENABLE PROTOCOL TYPE
EK.DPT==5 ;DISABLE PROTOCOL TYPE
EK.EMA==6 ;ENABLE MULTI-CAST ADDRESS
EK.DMA==7 ;DISABLE MULTI-CAST ADDRESS
EK.RDG==10 ;RECEIVE DATAGRAM
EK.XDG==11 ;TRANSMIT DATAGRAM
EK.MAX==EK.XDG ;MAXIMUM ASSIGNED FUNCTION CODE
SUBTTL ETHERNET KONTROLLER INTERFACE -- EA BLOCK
;THESE BLOCKS ARE USED TO PASS ARGUMENTS TO/FROM THE ETHERNET
;KONTROLLER AND THE ETHSER MODULE.
PHASE 0 ;THESE ARE OFFSETS
.EAFCN:! BLOCK 1 ;FUNCTION CODE
.EAFCA:! BLOCK 1 ;FUNCTION COMPLETION ROUTINE ADDRESS
.EAFCD:! BLOCK 3 ;FUNCTION COMPLETION DATA
.EAFCP:! BLOCK 1 ;FUNCTION COMPLETION ETHERNET PORTAL BLOCK
.EAHLN:! ;LENGTH OF ARGUMENT BLOCK HEADER
.EALNX==. ;COMPUTE MAXIMUM LENGTH OF ARGUMENT BLOCK
DEPHASE
;ARGUMENT BLOCK FOR SET KONTROLLER ETHERNET ADDRESS FUNCTION
PHASE .EAHLN ;START AFTER HEADER
.EAEAD:! BLOCK 2 ;ETHERNET ADDRESS
DEPHASE
;ARGUMENT BLOCK FOR UPDATE KONTROLLER/PROTOCOL COUNTERS
PHASE .EAHLN ;START AFTER HEADER
.EACBS:! BLOCK 1 ;COUNTERS BUFFER SIZE
.EACBA:! BLOCK 1 ;COUNTERS BUFFER ADDRESS
IFG <.-.EALNX>,<.EALNX==.> ;COMPUTE MAXIMUM ARGUMENT BLOCK LENGTH
DEPHASE
;ARGUMENT BLOCK FOR ENABLE/DISABLE PROTOCOL FUNCTION
PHASE .EAHLN ;START AFTER HEADER
.EAPTY:! BLOCK 1 ;PROTOCOL TYPE
.EAPAD:! BLOCK 1 ;PROTOCOL PADDING FLAG
.EAPPB:! BLOCK 1 ;ADDRESS OF CALLER'S PROTOCOL BLOCK
IFG <.-.EALNX>,<.EALNX==.> ;COMPUTE MAXIMUM ARGUMENT BLOCK LENGTH
DEPHASE
;ARGUMENT BLOCK FOR ENABLE/DISABLE MULTI-CAST ADDRESS FUNCTIONS
PHASE .EAHLN ;START AFTER HEADER
.EAMCA:! BLOCK 2 ;MULTI-CAST ADDRESS
IFG <.-.EALNX>,<.EALNX==.> ;COMPUTE MAXIMUM ARGUMENT BLOCK LENGTH
DEPHASE
;ARGUMENT BLOCK FOR RECEIVE/TRANSMIT DATAGRAM FUNCTIONS
PHASE .EAHLN ;START AFTER HEADER
.EADPT:! BLOCK 1 ;PROTOCOL TYPE
.EADST:! BLOCK 1 ;DATAGRAM STATUS
.EADDA:! BLOCK 2 ;DESTINATION ETHERNET ADDRESS
.EADSA:! BLOCK 2 ;SOURCE ETHERNET ADDRESS
.EADSZ:! BLOCK 1 ;DATAGRAM SIZE IN BYTES
.EAMSD:! BLOCK MD.LEN ;START OF MSD CHAIN
IFG <.-.EALNX>,<.EALNX==.> ;COMPUTE MAXIMUM ARGUMENT BLOCK LENGTH
DEPHASE
;DEFINE ARGUMENT BLOCK LENGTH AS LENGTH OF LONGEST BLOCK
PHASE .EALNX
.EALEN:!
DEPHASE
SUBTTL ETHNT. UUO DEFINITIONS -- FUNCTION CODES
;ETHNT. UUO FUNCTION CODES
.ETOPN==1 ;OPEN USER PORTAL
.ETCLS==2 ;CLOSE USER PORTAL
.ETQRB==3 ;QUEUE RECEIVE DATAGRAM BUFFER
.ETRRQ==4 ;READ RECEIVE QUEUE
.ETQXB==5 ;QUEUE TRANSMIT DATAGRAM BUFFER
.ETRXQ==6 ;READ TRANSMIT QUEUE
.ETEMA==7 ;ENABLE MULTI-CAST ADDRESS
.ETDMA==10 ;DISABLE MULTI-CAST ADDRESS
.ETRCL==11 ;READ CHANNEL LIST
.ETRCI==12 ;READ CHANNEL INFORMATION
.ETRCC==13 ;READ CHANNEL COUNTERS
.ETSCA==14 ;SET CHANNEL ADDRESS
.ETRPL==15 ;READ PORTAL LIST
.ETRPI==16 ;READ PORTAL INFORMATION
.ETRPC==17 ;READ PORTAL COUNTERS
.ETRKL==20 ;READ KONTROLLER LIST
.ETRKI==21 ;READ KONTROLLER INFORMATION
.ETRKC==22 ;READ KONTROLLER COUNTERS
SUBTTL ETHNT. UUO DEFINITIONS -- ERROR CODES
;ETHNT. UUO ERROR CODES
ETPRV%==1 ;INSUFFICIENT PRIVILEGES
ETADC%==2 ;ARGUMENT BLOCK ADDRESS CHECK
ETIAL%==3 ;INVALID ARGUMENT LIST LENGTH
ETILF%==4 ;INVALID FUNCTION CODE
ETUEE%==5 ;UNEXPECTED ETHERNET ERROR
ETRES%==6 ;INSUFFICIENT RESOURCES
ETIPI%==7 ;INVALID PORTAL ID
ETICI%==10 ;INVALID CHANNEL ID
ETIPT%==11 ;INVALID PROTOCOL TYPE
ETPIU%==12 ;PROTOCOL TYPE IN USE
ETPRA%==13 ;PROMISCUOUS RECEIVER ACTIVE
ETBAC%==14 ;BUFFER ADDRESS CHECK
ETIBS%==15 ;INVALID BUFFER SIZE
ETIBP%==16 ;INVALID BYTE POINTER
ETIEA%==17 ;INVALID ETHERNET ADDRESS
ETPQE%==20 ;PORTAL QUOTA EXCEEDED
ETBQE%==21 ;BUFFER QUOTA EXCEEDED
ETPWS%==22 ;PROTOCOL IN WRONG STATE
ETIKI%==23 ;INVALID KONTROLLER ID
SUBTTL ETHNT. UUO DEFINITIONS -- USER ARGUMENT BLOCK
;ETHNT. UUO ARGUMENT BLOCK
.ETFCN==0 ;FUNCTION CODE WORD
ET.FFL==777000,,000000 ;FUNCTION SPECIFIC FLAGS
ET.FZC==200000,,000000 ;ZERO COUNTERS
ET.FFN==000777,,000000 ;FUNCTION CODE
ET.FLN==000000,,777777 ;ARGUMENT BLOCK LENGTH
.ETPSW==1 ;PORTAL STATUS WORD
; (.ETOPN, .ETCLS, .ETQRB, .ETRRQ, .ETQXB,
; .ETRXQ, .ETEMA, .ETDMA, .ETRPI, .ETRPC)
ET.PST==777000,,000000 ;PORTAL STATUS
ET.PON==400000,,000000 ;PORTAL IS ONLINE
ET.PXB==200000,,000000 ;TRANSMIT BUFFERS AVAILABLE
ET.PRB==100000,,000000 ;RECEIVE BUFFERS AVAILABLE
ET.IPS==007000,,000000 ;INTERNAL PORTAL STATE
ET.PID==000777,,777777 ;PORTAL ID
.ETCSW==1 ;CHANNEL STATUS WORD
; (.ETRCI, .ETRCC, .ETSCA, .ETRPL)
ET.CST==777000,,000000 ;CHANNEL STATUS
ET.CON==400000,,000000 ;CHANNEL IS ONLINE
ET.ICS==007000,,000000 ;INTERNAL CHANNEL STATE
ET.CID==000777,,777777 ;CHANNEL ID
.ETKSW==1 ;KONTROLLER STATUS WORD
; (.ETRKI, .ETRKC)
ET.KST==777000,,000000 ;KONTROLLER STATUS
ET.KON==400000,,000000 ;KONTROLLER IS ONLINE
ET.IKS==007000,,000000 ;INTERNAL KONTROLLER STATE
ET.KID==000777,,777777 ;KONTROLLER ID
.ETAR1==2 ;FUNCTION SPECIFIC ARGUMENT 1
.ETAR2==3 ;FUNCTION SPECIFIC ARGUMENT 2
;FOR FUNCTION .ETOPN
.ETCIW==.ETAR1 ;CHANNEL IDENTIFICATION WORD
.ETPIW==.ETAR2 ;PROTOCOL IDENTIFICATION WORD
ET.PAD==400000,,000000 ;PADDING FLAG
ET.PTY==000000,,777777 ;PROTOCOL TYPE CODE
;FOR FUNCTIONS .ETQRB, .ETRRQ, .ETQXB, .ETRXQ
.ETUBL==.ETAR1 ;ADDRESS OF USER BUFFER DESCRIPTOR LIST
;FOR FUNCTIONS .ETEMA, .ETDMA
.ETMCA==.ETAR1 ;MULTI-CAST ADDRESS (2 WORDS)
;FOR FUNCTION .ETSCA
.ETEAD==.ETAR1 ;ETHERNET ADDRESS (2 WORDS)
;FOR FUNCTIONS .ETRCL, .ETRCI, .ETRCC, .ETRPL, .ETRPI, .ETRCC
.ETBFL==.ETAR1 ;BUFFER LENGTH IN WORDS
.ETBFA==.ETAR2 ;BUFFER ADDRESS
SUBTTL ETHNT. UUO DEFINITIONS -- USER BUFFER DESCRIPTOR BLOCK
;ETHNT. UUO BUFFER DESCRIPTOR BLOCK
.UBNXT==0 ;ADDRESS OF NEXT USER BUFFER DESCRIPTOR
.UBBID==1 ;USER BUFFER ID
.UBSTS==2 ;USER BUFFER STATUS
UB.ERR==400000,,000000 ;BUFFER HAS ERROR
UB.ECD==000000,,777777 ;ERROR CODE
.UBBSZ==3 ;LENGTH OF DATAGRAM IN BYTES
.UBBFA==4 ;BYTE POINTER TO DATAGRAM (2 WORDS)
.UBPTY==6 ;PROTOCOL TYPE
.UBDEA==7 ;DESTINATION ETHERNET ADDRESS (2 WORDS)
.UBSEA==11 ;SOURCE ETHERNET ADDRESS (2 WORDS)
.UBLEN==13 ;LENGTH OF USER BUFFER DESCRIPTOR BLOCK
SUBTTL THE END
END