astruct.inc
Warning: This file has been marked up for HTML
;*****************************************************************************
;*
;* NOTE: Common.inc contains structures and equates used by more
;* than one of the source file
;*
; 5 May 1995 10:32 DGM
; Removed code pertaining to conditionals AdapterProcessesRx,
; AdapterProcessesTx, CatchIncomplete, Channel0, AddPolling,
; TxQueue and BusMaster, and left code with the setting according
; to those conditionals at this point in time, ie. clean-up.
;
; Also changed <EndOfStats 0 dup (0)> to equivalent Equate.
;
;
;*****************************************************************************
RBuffSize equ 1514
StatisticStructure struc
;;;;; TotalTxPacketCount dd 0 ; Let the Host update
;;;;; TotalRxPacketCount dd 0 ; these counters.
;;;;; NoECBAvailableCount dd 0
PacketTxTooBigCount dd 0
PacketTxTooSmallCount dd 0 ; Not used.
PacketRxOverflowCount dd 0
PacketRxTooBigCount dd 0
PacketRxTooSmallCount dd 0
PacketTxMiscErrorCount dd 0 ; Not used.
PacketRxMiscErrorCount dd 0 ; Not used.
RetryTxCount dd 0
ChecksumErrorCount dd 0 ; Not used.
HardwareRxMismatchCount dd 0 ; Not used.
TotalTxOKByteCountLow dd 0 ; 0 - Used by MSM
TotalTxOKByteCountHigh dd 0 ; 0 - Used by MSM
TotalRxOKByteCountLow dd 0 ; 0 - Used by MSM
TotalRxOKByteCountHigh dd 0 ; 0 - Used by MSM
TotalGroupAddrTxCount dd 0 ; 0 - Used by MSM
TotalGroupAddrRxCount dd 0 ; 0 - Used by MSM
AdapterResetCount dd 0 ; 0 - Used by driver
AdapterOprTimeStamp dd 0 ; 0 - Used by MSM
MQDepth dd 0 ; 0 - Used by MSM
TxOKSingleCollision dd 0 ; 0 - Used by driver
TxOKMultipleCollisions dd 0 ; 0 - Used by driver
TxOKButDeferred dd 0 ; 0 - not used
TxAbortLateCollision dd 0 ; 0 - Used by driver
TxAbortExcessCollisions dd 0 ; 0 - Used by driver
TxAbortCarrierSense dd 0 ; 0 - Used by driver
TxAbortExDeferral dd 0 ; 0 - not used
RxAbortFrameAlignment dd 0 ; 0 - Used by driver
CustomCounterCount dw 0
TxRetryFailure dd 0 ; Number of retrys failures
TxClearToSend dd 0 ; Tx error
TxUnderRun dd 0 ; Tx error
RxDMAOverrun dd 0
;;;;; EnqueuedSends dd 0
PacketSlideCount dd 0 ; Frames rcv'd not matching our
; MC table or IA node address.
DummyRCBCount dd 0
AdapterReset1 dd 0
BadFragLengthCount dd 0
PollingTimeout dd 0 ;#
;;dgm EndOfStats dd 0 dup (0)
StatisticStructure ends
EndOfStats equ dword ptr PollingTimeout + 4
IFDEF NE3200P ; Ne3200Promisc code
;---------------------------------------------------------------\
; *
; RBDWrappedCount is really a count of how many receive frames *
; had their data buffers wrap around from the last to the first.*
; The reason why this is significant is that the procedure *
; CopyPacketToHost (in adapter.386) has to initiate an extra *
; BMIC transfer to the host in order to get the entire receive *
; frame copied to the host. Generally only 2 transfers are *
; needed, but data buffer wrapping requires 3 BMIC transfers. *
; *
;---------------------------------------------------------------/
;
RBDWrappedCount equ offset PacketSlideCount
ENDIF
BDStruct struc
BDStatus dw 1 dup (?)
BDLink dw 1 dup (?)
BufPtr dw 2 dup (?)
BufSize dw 1 dup (?)
BDStruct ends
;***************************************************************\
; *
; 82586 Transmit Command Block *
; *
;***************************************************************/
TxCStruct struc
TxStatus dw 1 dup (?)
TxCmd dw 1 dup (?)
TxCLink dw 1 dup (?)
TBDOffset dw 1 dup (?)
TxDestination db 6 dup (?)
TxLength dw 1 dup (?)
TxTries dw 1 dup (?) ; Not part of 586 TCB.
TxCStruct ends
SCBStructure struc
SCBStatus dw 1 dup (?)
SCBCommand dw 1 dup (?)
CBLOffset dw 1 dup (?)
RFAOffset dw 1 dup (?)
SCBCRCErrors dw 1 dup (?)
SCBAlignErrors dw 1 dup (?)
SCBResources dw 1 dup (?)
SCBOverruns dw 1 dup (?)
SCBStructure ends
;;FDStruct struc ; Unused structure
;;
;; FDStatus dw 1 dup (?)
;; FDCommand dw 1 dup (?)
;; FDLink dw 1 dup (?)
;; RBDOffset dw 1 dup (?)
;; FDDestination db 6 dup (?)
;; FDSource db 6 dup (?) ;*
;; FDLength dw 1 dup (?) ;*
;;
;;FDStruct ends
MulticastCmdStruc struc
MulticastCmdStatus dw ?
MulticastCmdCommand dw ?
MulticastCmdLink dw ?
MulticastCmdCount dw ?
MulticastCmdAddresses dw ?
MulticastCmdStruc ends
;***************************************************************\
; *
; TCB (Transmit Control Block) Structure. *
; *
;***************************************************************/
;
TCBStructure struc
TCBDriverWS dw 6 dup (0) ; Used by MSM or Driver to link TCBs.
TCBDataLen dw ? ; Total Frag lengths + media length.
dw ?
TCBFragStrucPtr dd ? ; Location of ECB fragment struc.
TCBMediaHeaderLen dw ? ; Length of Media Length.
dw ?
;; TCBMediaHeader db ? ; Media Header.
TCBStructure ends
TCBMediaHeader equ TCBMediaHeaderLen + 4 ; Media Header Buffer.
;***************************************************************\
; *
; Bus Master TCB (Transmit Control Block) Structure. *
; *
;***************************************************************/
;
BMTCBStructure struc
BMTCBDriverWS dw 6 dup (0) ; Used by MSM or Driver.
BMTCBDataLen dw ? ; Total Frag len + header len.
dw ?
BMTCBDescCount dw 0 ; Total Descriptors.
dw ?
BMTCBDesc1 dd 2 dup (?) ; Offset/Length #1.
BMTCBDesc2 dd 2 dup (?) ; Offset/Length #2.
BMTCBDesc3 dd 2 dup (?) ; Offset/Length #3.
BMTCBDesc4 dd 2 dup (?) ; Offset/Length #4.
BMTCBDesc5 dd 2 dup (?) ; Offset/Length #5.
BMTCBDesc6 dd 2 dup (?) ; Offset/Length #6.
BMTCBDesc7 dd 2 dup (?) ; Offset/Length #7.
BMTCBDesc8 dd 2 dup (?) ; Offset/Length #8.
BMTCBsECB dd 0 ; ECB Storage.
;; BMTCBMediaHeader db ? ; Media Header.
BMTCBStructure ends
BMTCBMediaHeader equ BMTCBsECB + 4 ; Media Header offset.
BMTCBMediaHeaderSize equ 128 ; Media Header Size.
;***************************************************************\
; *
; Fragment Descriptor Structure. *
; *
;***************************************************************/
;
FragmentStructure struc
FragmentOffset dd ? ; Location of fragment.
FragmentLength dd ? ; Length of fragment.
FragmentStructure ends
;***************************************************************\
; *
; RCB (Receive Control Block) Structure. *
; *
;***************************************************************/
;
RCBStructure struc
RCBDriverWS dd 2 dup (0) ; Can be freely used by driver.
RCBReserved db 52 dup (0) ; Reserved.
;; RCBDataBuffer db ? ; Packet data.
RCBStructure ends
RCBDataBuffer equ RCBReserved + 52
;****************************************************************\
; *
; Adapter Receive ECB structure Template. *
; *
; When this template is copied to the host (HSM) to fill in the *
; host's ECB (RCB) fields, we begin 16 bytes down from the start *
; of the ECB therefore ARLink thru ARLogicalID are commented out.*
; *
;****************************************************************/
;
AReceiveBufferStructure struc
;; ARLink dd ? ; These 16 bytes are
;; ARBLink dd ? ; are not used by the
;; ARStatus dw ? ; firmware. The host (HSM)
;; ARESRAddress dd ? ; will fill in these fields
;; ARLogicalID dw ? ; in its ECB (RCB).
ARProtocolID db 6 dup (?)
ARBoardNumber dd ?
ARImmediateAddress db 6 dup (?)
ARDriverWorkSpace dd ?
ARESREBXValue dd ? ; These 8 bytes are
ARSocket dw ? ; the RProtocolWorkspace
ARProtocolWorkspaceRest dw ? ; fields.
ARPacketLength dd ? ; Total frm size less any media.
ARFragmentCount dd ? ; Always set to 1.
ARPacketOffset dd ?
ARPacketSize dd ? ; Size of this fragment.
;ARPacketEnvelope db 0 dup (?)
AReceiveBufferStructure ends
ARPacketEnvelope equ byte ptr ARPacketSize + 4
;***************************************************************\
; *
; Adapter Transmit ECB structure. *
; *
;***************************************************************/
;
ATransmitBufferStructure struc
ATLink dd ?
ATBLink dd ?
ATStatus dw ?
ATESRAddress dd ?
ATLogicalID dw ?
ATProtocolID db 6 dup (?)
ATBoardNumber dd ?
ATImmediateAddress db 6 dup (?)
ATDriverWorkSpace dd ?
ATESREBXValue dd ? ; These 8 bytes are
ATSocket dw ? ; the RProtocolWorkspace
ATProtocolWorkspaceRest dw ? ; fields.
ATPacketLength dd ?
ATFragmentCount dd ?
ATPacketOffset dd ? ; These 2 fields repeat for
ATPacketSize dd ? ; ATFragmentCount times.
ATransmitBufferStructure ends
IFNDEF NE3200P ; Non-P Ne3200
;***************************************************************\
; *
; Uni (UniReceiveBuf) means ONE contiguous buffer combining the *
; FD, the RCB template, the receive frame header and data, *
; and the RBD together. *
; *
;***************************************************************/
;
UniReceiveBuf struc
; FD - Frame Desc.
UFDStatus dw 1 dup (?)
UFDCommand dw 1 dup (?)
UFDLink dw 1 dup (?)
URBDOffset dw 1 dup (?)
UFDDestination db 6 dup (?)
UFDSource db 6 dup (?) ;*
UFDLength dw 1 dup (?) ;*
; RCB template (copied to the host to fill in the host ECB).
URCB db SIZE AReceiveBufferStructure dup (?)
; Frame hdr and data.
UHeader db 14 dup (?)
DataBuffer db (RBuffSize-14) dup (?)
; RBD - Receive Buffer Desc.
RBDStatus dw 1 dup (?)
RBDLink dw 1 dup (?)
RBDBufPtr dw 2 dup (?)
RBDBufSize dw 1 dup (?)
UniReceiveBuf ends
ELSE ; Ne3200Promisc code
UFDStruct struc
UFDStatus dw 1 dup (?)
UFDCommand dw 1 dup (?)
UFDLink dw 1 dup (?)
UFDRBDOffset dw 1 dup (?)
UFDDestination db 6 dup (?)
UFDSource db 6 dup (?) ;*
UFDLength dw 1 dup (?) ;*
UFDStruct ends
RBDStruct struc
RBDStatus dw ?
RBDLink dw ?
RBDBufPtr dw 2 dup (?)
RBDBufSize dw ?
RBDStruct ends
ENDIF