mac-rom/Interfaces/AIncludes/adsp.a

198 lines
6.7 KiB
Plaintext
Raw Permalink Normal View History

;
; File: ADSPEqu.a
;
; Contains: xxx put contents here xxx
;
; Written by: xxx put writers here xxx
;
; Copyright: <09> 1991 by Apple Computer, Inc., all rights reserved.
;
; Change History (most recent first):
;
; <7> 1/30/91 gbm sab, #42: Change the <20>already including this file<6C> variable to
; all uppercase
;
; To Do:
;
; Version: 1.10
; Created: Friday, January 19, 1990 at 9:11:52 AM
; File: ADSPEqu.a
;
; Assembler Interface to the Macintosh Libraries
; Copyright Apple Computer, Inc. 1989-90
; All Rights Reserved
;
;--------------------------------------------------------------------
IF &TYPE('__INCLUDINGADSPEQU__') = 'UNDEFINED' THEN
__INCLUDINGADSPEQU__ SET 1
; error codes
errRefNum EQU -1280 ; bad connection refNum
errAborted EQU -1279 ; control call was aborted
errState EQU -1278 ; bad connection state for this operation
errOpening EQU -1277 ; open connection request failed
errAttention EQU -1276 ; attention message too long
errFwdReset EQU -1275 ; read terminated by forward reset
errDSPQueueSize EQU -1274 ; send or receive queue is too small
errOpenDenied EQU -1273 ; open connection request was denied
; client control codes
dspInit EQU 255 ; create a new connection end
dspRemove EQU 254 ; remove a connection end
dspOpen EQU 253 ; open a connection
dspClose EQU 252 ; close a connection
dspCLInit EQU 251 ; create a connection listener
dspCLRemove EQU 250 ; remove a connection listener
dspCLListen EQU 249 ; post a listener request
dspCLDeny EQU 248 ; deny an open connection request
dspStatus EQU 247 ; get status of connection end
dspRead EQU 246 ; read data from the connection
dspWrite EQU 245 ; write data on the connection
dspAttention EQU 244 ; send an attention message
dspOptions EQU 243 ; set connection end options
dspReset EQU 242 ; forward reset the connection
dspNewCID EQU 241 ; generate a cid for a connection end
; open connection modes
ocRequest EQU 1 ; request a connection with remote
ocPassive EQU 2 ; wait for a connection request from remote
ocAccept EQU 3 ; accept request as delivered by listener
ocEstablish EQU 4 ; consider connection to be open
; connection states
sListening EQU 1 ; for connection listeners
sPassive EQU 2 ; waiting for a connection request from remote
sOpening EQU 3 ; requesting a connection with remote
sOpen EQU 4 ; connection is open
sClosing EQU 5 ; connection is being torn down
sClosed EQU 6 ; connection end state is closed
; client event flags (bit-mask)
eClosed EQU $80 ; received connection closed advice
eTearDown EQU $40 ; closed due to broken connection
eAttention EQU $20 ; received attention message
eFwdReset EQU $10 ; received forward reset advice
; miscellaneous equates
attnBufSize EQU 570 ; size of client attention message
minDSPQueueSize EQU 100 ; minimum size for both receive and send queues
; connection control block equates & size
ccbLink EQU 0 ; link to next ccb
refNum EQU ccbLink+4 ; user reference number
state EQU refNum+2 ; state of the connection end
userFlags EQU state+2 ; flags for unsolicited connection events
localSocket EQU userFlags+1 ; socket number of this connection end
remoteAddress EQU localSocket+1 ; internet address of remote end
attnCode EQU remoteAddress+4 ; attention code received
attnSize EQU attnCode+2 ; size of received attention data
attnPtr EQU attnSize+2 ; ptr to received attention data
ccbSize EQU attnPtr+224 ; total byte size of ccb
; adsp queue element equates & size
csQStatus EQU $1C ; csQStatus EQU CSParam (adsp internal use)
csCCBRef EQU csQStatus+4 ; refnum of ccb
; dspInit, dspCLInit
csCCBPtr EQU csCCBRef+2 ; pointer to connection control block
csUserRtn EQU csCCBPtr+4 ; client routine to call on event
csSendQSize EQU csUserRtn+4 ; size of send queue (0..64K bytes)
csSendQueue EQU csSendQSize+2 ; client passed send queue buffer
csRecvQSize EQU csSendQueue+4 ; size of receive queue (0..64K bytes)
csRecvQueue EQU csRecvQSize+2 ; client passed receive queue buffer
csAttnPtr EQU csRecvQueue+4 ; client passed receive attention buffer
csLocSkt EQU csAttnPtr+4 ; local socket number
; dspOpen, dspCLListen, dspCLDeny
csLocCID EQU csCCBRef+2 ; local connection id
csRemCID EQU csLocCID+2 ; remote connection id
csRemAddr EQU csRemCID+2 ; address of remote end
csFltrAddr EQU csRemAddr+4 ; address filter
csSendSeq EQU csFltrAddr+4 ; local send sequence number
csSendWdw EQU csSendSeq+4 ; send window size
csRecvSeq EQU csSendWdw+2 ; receive sequence number
csAttnSendSeq EQU csRecvSeq+4 ; attention send sequence number
csAttnRecvSeq EQU csAttnSendSeq+4 ; attention receive sequence number
csOCMode EQU csAttnRecvSeq+4 ; open connection mode
csOCInterval EQU csOCMode+1 ; open connection request retry interval
csOCMaximum EQU csOCInterval+1 ; open connection request retry maximum
; dspClose, dspRemove
csAbort EQU csCCBRef+2 ; abort connection immediately if non-zero
; dspStatus
csSQPending EQU csCCBPtr+4 ; pending bytes in send queue
csSQFree EQU csSQPending+2 ; available buffer space in send queue
csRQPending EQU csSQFree+2 ; pending bytes in receive queue
csRQFree EQU csRQPending+2 ; available buffer space in receive queue
; dspRead, dspWrite
csReqCount EQU csCCBRef+2 ; requested number of bytes
csActCount EQU csReqCount+2 ; actual number of bytes
csDataPtr EQU csActCount+2 ; pointer to data buffer
csEOM EQU csDataPtr+4 ; indicates logical end of message
csFlush EQU csEOM+1 ; send data now
; dspAttention
csAttnCode EQU csCCBRef+2 ; client attention code
csAttnSize EQU csAttnCode+2 ; size of attention data
csAttnData EQU csAttnSize+2 ; pointer to attention data
csAttnInterval EQU csAttnData+4 ; retransmit timer in 10-tick intervals
; dspOptions
csSendBlocking EQU csCCBRef+2 ; quantum for data packets
csSendTimer EQU csSendBlocking+2 ; send timer in 10-tick intervals
csRtmtTimer EQU csSendTimer+1 ; retransmit timer in 10-tick intervals
csBadSeqMax EQU csRtmtTimer+1 ; threshold for sending retransmit advice
csUseCheckSum EQU csBadSeqMax+1 ; use ddp packet checksum
; dspNewCID
csNewCID EQU csCCBRef+2 ; new connection id returned
dspPBSize EQU 68 ; byte size of largest dsp param block
ENDIF ; ...already included