Summary of ADSP
Pascal Summary
Constants
CONST
{ADSP routine selectors}
dspInit = 255; {create a new connection end}
dspRemove = 254; {remove a connection end}
dspOpen = 253; {open a connection}
dspClose = 252; {close a connection}
dspCLInit = 251; {create a connection listener}
dspCLRemove = 250; {remove a connection listener}
dspCLListen = 249; {post a listener request}
dspCLDeny = 248; {deny an open-connection request}
dspStatus = 247; {get status of connection end}
dspRead = 246; {read data from the connection}
dspWrite = 245; {write data on the connection}
dspAttention = 244; {send an attention message}
dspOptions = 243; {set connection end options}
dspReset = 242; {forward reset the connection}
dspNewCID = 241; {generate a CID for a }
{ connection end}
sdspOpen = 229; {open a secure connection}
{ADSP connection-opening modes}
ocRequest = 1; {request a connection with a }
{ remote connection end}
ocPassive = 2; {wait for a connection request }
{ from remote connection end}
ocAccept = 3; {accept request as delivered by }
{ listener}
ocEstablish = 4; {consider connection to be open}
{ADSP connection end states}
sListening = 1; {for connection listeners}
sPassive = 2; {waiting for a connection }
{ request from remote }
{ connection end}
sOpening = 3; {requesting a connection }
{ with remote connection end}
sOpen = 4; {connection is open}
sClosing = 5; {connection is being torn down}
sClosed = 6; {connection end state is closed}
{ASDSP end-of-message and encrypt flags and masks}
dspEncryptBit = 1; {set to encrypt message}
dspEOMBit = 0; {set if EOM at end of write}
dspEOMMask = $1; {mask for setting the EOM bit}
dspEncryptMask = $2; {mask for setting the encrypt bit}
{ADSP client event flags}
eClosed = $80; {received connection-closed event}
eTearDown = $40; {closed due to broken connection}
eAttention = $20; {received attention message}
eFwdReset = $10; {received forward reset event}
{miscellaneous ADSP constants}
attnBufSize = 570; {size of client attention buffer}
minDSPQueueSize = 100; {minimum size of receive or }
{ send queue}
{driver control ioResults}
errRefNum = -1280; {bad connection refNum}
errAborted = -1279; {control call was aborted}
errState = -1278; {bad connection state for this }
{ operation}
errOpening = -1277; {open connection request failed}
errAttention = -1276; {attention message too long}
errFwdReset = -1275; {read terminated by forward reset}
errDSPQueueSize = -1274; {DSP read/write queue too small}
errOpenDenied = -1273; {open connection request denied}
Data Types
The ADSP Connection Control Block Record
TYPE TRCCB =
PACKED RECORD
ccbLink: TPCCB; {link to next CCB}
refNum: Integer; {reference number}
state: Integer; {state of the connection end}
userFlags: Byte; {user flags for connection}
localSocket: Byte; {local socket number}
remoteAddress: AddrBlock; {remote end internet address}
attnCode: Integer; {attention code received}
attnSize: Integer; {size of attention data}
attnPtr: Ptr; {pointer to attention data}
reserved: PACKED ARRAY[1..220] OF Byte;
{reserved for use by ADSP}
END;
The Address Block Record
TYPE AddrBlock =
PACKED RECORD
aNet: Integer; {network number}
aNode: Byte; {node ID}
aSocket: Byte; {socket number}
END;
The DSP Parameter Block
TYPE DSPParamBlock =
PACKED RECORD
qLink: QElemPtr; {reserved}
qType: Integer; {reserved}
ioTrap: Integer; {reserved}
ioCmdAddr: Ptr; {reserved}
ioCompletion: ProcPtr; {completion routine}
ioResult: OSErr; {result code}
ioNamePtr: StringPtr; {reserved}
ioVRefNum: Integer; {reserved}
ioCRefNum: Integer; {driver reference number}
csCode: Integer; {primary command code}
qStatus: LongInt; {reserved}
ccbRefNum: Integer; {CCB reference number}
CASE Integer OF
dspInit, dspCLInit:
(ccbPtr: TPCCB; {pointer to CCB}
userRoutine: ProcPtr; {pointer to user routine}
sendQSize: Integer; {size of send queue}
sendQueue: Ptr; {pointer to send queue}
recvQSize: Integer; {size of receive queue}
recvQueue: Ptr; {pointer to receive queue}
attnPtr: Ptr; {pointer to attention-message buffer}
localSocket: Byte; {local socket number}
filler1: Byte); {filler for proper alignment}
dspOpen, dspCLListen, dspCLDeny:
(localCID: Integer; {local connection ID}
remoteCID: Integer; {remote connection ID}
remoteAddress: AddrBlock; {remote internet address}
filterAddress: AddrBlock; {address filter}
sendSeq: LongInt; {send sequence number}
sendWindow: Integer; {size of remote buffer}
recvSeq: LongInt; {receive sequence number}
attnSendSeq: LongInt; {attention send seq number}
attnRecvSeq: LongInt; {attention receive seq num}
ocMode: Byte; {connection-opening mode}
ocInterval: Byte; {interval bet. open requests}
ocMaximum: Byte; {retries of open-conn req}
filler2: Byte); {filler for proper alignment}
dspClose, dspRemove:
(abort: Byte; {abort send requests}
filler3: Byte); {filler for proper alignment}
dspStatus:
(statusCCB: TPCCB; {pointer to CCB}
sendQPending: Integer; {bytes waiting in send queue}
sendQFree: Integer; {available send-queue buffer}
recvQPending: Integer; {bytes in receive queue}
recvQFree: Integer); {avail receive-queue buffer}
dspRead, dspWrite:
(reqCount: Integer; {requested number of bytes}
actCount: Integer; {actual number of bytes}
dataPtr: Ptr; {pointer to data buffer}
eom: Byte; {1 if end of message}
flush: Byte); {1 to send data now}
dspAttention:
(attnCode: Integer; {client attention code}
attnSize: Integer; {size of attention data}
attnData: Ptr; {pointer to attention data}
attnInterval: Byte; {reserved}
filler4: Byte); {filler for proper alignment}
dspOptions:
(sendBlocking: Integer; {send-blocking threshold}
sendTimer: Byte; {reserved}
rtmtTimer: Byte; {reserved}
badSeqMax: Byte; {retransmit advice threshold}
useCheckSum: Byte); {DDP checksum for packets}
dspNewCID:
(newCID: Integer); {new connection ID}
END;
DSPPBPtr = ^DSPParamBlock;
The ASDSP Parameter Block
TYPE SDSPParamBlock =
PACKED RECORD
CASE INTEGER OF
1: (dspParamBlock: DSPParamBlock);
2: (qLink: QElemPtr; {reserved}
qType: Integer; {reserved}
ioTrap: Integer; {reserved}
ioCmdAddr: Ptr; {reserved}
ioCompletion: ProcPtr; {completion routine}
ioResult: OSErr; {result code}
ioNamePtr: StringPtr; {reserved}
ioVRefNum: Integer; {reserved}
ioCRefNum: Integer; {adsp driver refNum}
csCode: Integer; {asdsp driver control code}
qStatus: Longint; {reserved}
ccbRefNum: Integer; {connection end refNum}
secureParams: TRSecureParams);
{parameters for dspOpenSecure}
END;
SDSPPBPtr = ^SDSPParamBlock;
The TRSecureParams
Record
TYPE TRSecureParams =
PACKED RECORD
localCID: Integer; {local connection ID}
remoteCID: Integer; {remote connection ID}
remoteAddress: AddrBlock; {address of remote end}
filterAddress: AddrBlock; {address filter}
sendSeq: Longint; {local send sequence number}
sendWindow: Integer; {send window size}
recvSeq: Longint; {receive sequence number}
attnSendSeq: Longint; {attention send sequence number}
attnRecvSeq: Longint; {attention receive sequence number}
ocMode: Byte; {open connection mode}
ocInterval: Byte; {open connection request }
{ retry interval}
ocMaximum: Byte; {open connection request }
{ retry maximum}
secure: Boolean; {for initiator, TRUE if session is }
{ authenticated}
{for recipient, TRUE if session was }
{ authenticated}
sessionKey: AuthKeyPtr; {encryption key for session}
credentialsSize: Longint; {length of credentials}
credentials: Ptr; {pointer to credentials}
workspace: Ptr; {pointer to workspace for }
{ connection. Align on }
{ even boundary and }
{ length = sdspWorkSize}
recipient: AuthIdentity; {identity of recipient }
{ or initiator if active mode}
issueTime: UTCTime; {time when credentials were issued}
expiry: UTCTime; {time when credentials expire}
initiator: RecordIDPtr; {RecordID of initiator returned in }
{ the buffer pointed to by this field}
hasIntermediary: Boolean; {set if credentials has an }
{ intermediary}
intermediary: RecordIDPtr; {Record ID of intermediary returned}
END;
C Summary
Constants
/*workspace used internally by ASDSP for the sdspOpen call*/
#define sdspWorkSize 2048 /*size of ASDSP workspace*/
enum{ /*ADSP routine selectors*/
dspInit = 255, /*create a new connection end*/
dspRemove = 254, /*remove a connection end*/
dspOpen = 253, /*open a connection*/
dspClose = 252, /*close a connection*/
dspCLInit = 251, /*create a connection listener*/
dspCLRemove = 250, /*remove a connection listener*/
dspCLListen = 249, /*post a listener request*/
dspCLDeny = 248, /*an open-connection request*/
dspStatus = 247, /*get status of connection end*/
dspRead = 246, /*read data from the connection*/
dspWrite = 245, /*write data on the connection*/
dspAttention = 244, /*send an attention message*/
dspOptions = 243, /*set connection end options*/
dspReset = 242, /*forward reset the connection*/
dspNewCID = 241, /*generate a CID for a */
/* connection end*/
sdspOpen = 229; /*open a secure connection*/
enum { /*ADSP connection-opening modes*/
ocRequest = 1, /*request a connection with a */
/* remote connection end*/
ocPassive = 2, /*wait for a connection request */
/* from remote connection end*/
ocAccept = 3, /*accept request as delivered by */
/* listener*/
ocEstablish = 4}; /*consider connection to be */
/* open*/
enum { /*ADSP connection end states*/
sListening = 1, /*for connection listeners*/
sPassive = 2, /*waiting for a connection */
/* request from remote */
/* connection end*/
sOpening = 3, /*requesting a connection */
/* with remote connection end*/
sOpen = 4, /*connection is open*/
sClosing = 5, /*connection is being torn down*/
sClosed = 6}; /*connection end state */
/* is closed*/
/*ASDSP end-of-message and encrypt flags and masks*/
enum {
dspEOMBit = 0, /*set if EOM at end of write*/
dspEncryptBit = 1}; /*set to encrypt message*/
enum {
dspEOMMask = 1<<dspEOMBit,
dspEncryptMask = 1<<dspEncryptBit
};
enum { /*ADSP client event flags*/
eClosed = $80, /*received connection-closed */
/* event*/
eTearDown = $40, /*closed due to broken */
/* connection*/
eAttention = $20, /*received attention message*/
eFwdReset = $10}; /*received forward reset event*/
enum { /*miscellaneous ADSP constants*/
attnBufSize = 570, /*size of client attention */
/* buffer*/
minDSPQueueSize = 100}; /*minimum size of receive or */
/* send queue*/
enum { /*driver control ioResults*/
errRefNum = -1280, /*bad connection refNum*/
errAborted = -1279, /*control call was aborted*/
errState = -1278, /*bad connection state for this */
/* operation*/
errOpening = -1277, /*open connection request */
/* failed*/
errAttention = -1276, /*attention message too long*/
errFwdReset = -1275, /*read terminated */
/* by forward reset*/
errDSPQueueSize = -1274, /*DSP read/write queue */
/* too small*/
errOpenDenied = -1273}; /*open connection request */
/* denied*/
Data Types
The ADSP Connection Control Block Record
struct TRCCB {
unsigned char *ccbLink; /*link to next CCB*/
unsigned short refNum; /*reference number*/
unsigned short state; /*state of the connection end*/
unsigned char userFlags; /*user flags for connection*/
unsigned char localSocket; /*local socket number*/
AddrBlock remoteAddress; /*remote end internet address*/
unsigned short attnCode; /*attention code received*/
unsigned short attnSize; /*size of attention data*/
unsigned char *attnPtr; /*pointer to attention data*/
unsigned char reserved[220]; /*reserved*/
};
typedef struct TRCCB TRCCB;
typedef TRCCB *TPCCB;
The Address Block Record
struct AddrBlock {
short aNet; /*network number*/
unsigned char aNode; /*node ID*/
unsigned char aSocket; /*socket number*/
};
typedef struct AddrBlock AddrBlock;
Parameter Block for dspInit and dspCLInit
struct TRinitParams {
TPCCB ccbPtr; /*pointer to connection control block*/
ProcPtr userRoutine; /*client routine to call on event*/
unsigned short sendQSize; /*size of send queue (0..64K bytes)*/
unsigned char *sendQueue; /*client passed send queue buffer*/
unsigned short recvQSize; /*size of receive queue */
/* (0..64K bytes)*/
unsigned char *recvQueue; /*client passed receive queue buffer*/
unsigned char *attnPtr; /*client passed receive attention */
/* buffer*/
unsigned char localSocket; /*local socket number*/
};
typedef struct TRinitParams TRinitParams;
Parameter Block for dspOpen, dspCLListen, and dspCLDeny
struct TRopenParams {
unsigned short localCID; /*local connection ID*/
unsigned short remoteCID; /*remote connection ID*/
AddrBlock remoteAddress; /*address of remote end*/
AddrBlock filterAddress; /*address filter*/
unsigned long sendSeq; /*local send sequence number*/
unsigned short sendWindow; /*send window size*/
unsigned long recvSeq; /*receive sequence number*/
unsigned long attnSendSeq; /*attention send sequence number*/
unsigned long attnRecvSeq; /*attention receive sequence */
/* number*/
unsigned char ocMode; /*open connection mode*/
unsigned char ocInterval; /*open connection request retry */
/* interval*/
unsigned char ocMaximum; /*open connection request retry */
}; /* maximum*/
typedef struct TRopenParams TRopenParams;
Parameter Block for dspClose and dspRemove
struct TRcloseParams {
unsigned char abort; /*abort connection immediately if nonzero*/
};
typedef struct TRcloseParams TRcloseParams;
Parameter Block for dspStatus
struct TRstatusParams {
TPCCB ccbPtr; /*pointer to ccb*/
unsigned short sendQPending; /*pending bytes in send queue*/
unsigned short sendQFree; /*available buffer space in send */
/* queue*/
unsigned short recvQPending; /*pending bytes in receive queue*/
unsigned short recvQFree; /*available buffer space in */
}; /* receive queue*/
typedef struct TRstatusParams TRstatusParams;
Parameter Block for dspRead and dspWrite
struct TRioParams {
unsigned short reqCount; /*requested number of bytes*/
unsigned short actCount; /*actual number of bytes*/
unsigned char *dataPtr; /*pointer to data buffer*/
unsigned char eom; /*indicates logical end of message*/
unsigned char flush; /*send data now*/
};
typedef struct TRioParams TRioParams;
Parameter Block for dspAttention
struct TRattnParams {
unsigned short attnCode; /*client attention code*/
unsigned short attnSize; /*size of attention data*/
unsigned char *attnData; /*pointer to attention data*/
unsigned char attnInterval; /*retransmit timer in 10-tick */
/* intervals*/
};
typedef struct TRattnParams TRattnParams;
Parameter Block for dspOptions
struct TRoptionParams {
unsigned short sendBlocking; /*quantum for data packets*/
unsigned char sendTimer; /*send timer in 10-tick intervals*/
unsigned char rtmtTimer; /*retransmit timer in 10-tick */
/* intervals*/
unsigned char badSeqMax; /*threshold for sending retransmit */
/* advice*/
unsigned char useCheckSum; /*use ddp packet checksum*/
};
typedef struct TRoptionParams TRoptionParams;
Parameter Block for dspNewCID
struct TRnewcidParams {
unsigned short newcid; /*new connection ID returned*/
};
typedef struct TRnewcidParams TRnewcidParams;
The DSP Parameter Block
struct DSPParamBlock {
struct QElem *qLink; /*reserved*/
short qType; /*reserved*/
short ioTrap; /*reserved*/
Ptr ioCmdAddr; /*reserved*/
ProcPtr ioCompletion; /*pointer to completion routine*/
OSErr ioResult; /*routine result*/
char *ioNamePtr; /*reserved*/
short ioVRefNum; /*reserved*/
short ioCRefNum; /*ADSP driver refNum*/
short csCode; /*ADSP driver control code*/
long qStatus; /*reserved*/
short ccbRefNum;
union{
TRinitParams initParams; /*dspInit, dspCLInit*/
TRopenParams openParams; /*dspOpen, dspCLListen, dspCLDeny*/
TRcloseParams closeParams; /*dspClose, dspRemove*/
TRioParams ioParams; /*dspRead, dspWrite*/
TRattnParams attnParams; /*dspAttention*/
TRstatusParams statusParams; /*dspStatus*/
TRoptionParams optionParams; /*dspOptions*/
TRnewcidParams newCIDParams; /*dspNewCID*/
} u;
};
typedef struct DSPParamBlock DSPParamBlock;
typedef DSPParamBlock *DSPPBPtr;
The ASDSP Parameter Block
struct TRSecureParams {
unsigned short localCID; /*local connection ID*/
unsigned short remoteCID; /*remote connection ID*/
AddrBlock remoteAddress; /*address of remote end*/
AddrBlock filterAddress; /*address filter*/
unsigned long sendSeq; /*local send sequence number*/
unsigned short sendWindow; /*send window size*/
unsigned long recvSeq; /*receive sequence number*/
unsigned long attnSendSeq; /*attention send sequence number*/
unsigned long attnRecvSeq; /*attention receive sequence */
/* number*/
unsigned char ocMode; /*open connection mode*/
unsigned char ocInterval; /*open connection request retry */
/* interval*/
unsigned char ocMaximum; /*open connection request retry */
/* maximum*/
Boolean secure; /*TRUE if session was */
/* authenticated*/
AuthKeyPtr sessionKey; /*encryption key for session*/
unsigned longcredentialsSize;
/*length of credentials*/
Ptr credentials; /*pointer to credentials*/
Ptr workspace; /*pointer to workspace for */
/* connection. align on even */
/* boundary and length equals */
/* sdspWorkSize*/
AuthIdentity recipient; /*identity of recipient */
/* (or initiator if active mode)*/
UTCTime issueTime; /*when credentials were issued*/
UTCTime expiry; /*when credentials expire*/
RecordIDPtr initiator; /*pointer to RecordID of */
/* initiator returned*/
Boolean hasIntermediary; /*is set if credentials */
/* have an intermediary*/
RecordIDPtr intermediary; /*pointer to RecordID of */
/* intermediary returned*/
};
The TRSecureParams Record
typedef struct TRSecureParams TRSecureParams;
struct SDSPParamBlock {
struct QElem *qLink; /*reserved*/
short qType; /*reserved*/
short ioTrap; /*reserved*/
Ptr ioCmdAddr; /*reserved*/
ProcPtr ioCompletion;
/*pointer to completion routine*/
OSErr ioResult; /*routine result*/
char *ioNamePtr; /*reserved*/
short ioVRefNum; /*reserved*/
short ioCRefNum; /*ADSP driver refNum*/
short csCode; /*ADSP driver control code*/
long qStatus; /*ADSP internal use*/
short ccbRefNum; /*connection end refNum*/
union {
TRinitParams initParams; /*dspInit, dspCLInit*/
TRopenParams openParams; /*dspOpen, dspCLListen, dspCLDeny*/
TRcloseParams closeParams; /*dspClose, dspRemove*/
TRioParams ioParams; /*dspRead, dspWrite*/
TRattnParams attnParams; /*dspAttention*/
TRstatusParams statusParams; /*dspStatus*/
TRoptionParams optionParams; /*dspOptions*/
TRnewcidParams newCIDParams; /*dspNewCID*/
TRSecureParams secureParams; /*dspOpenSecure*/
} u;
};
typedef struct SDSPParamBlock SDSPParamBlock;
typedef SDSPParamBlock *SDSPPBPtr;
Assembly-Language Summary
Constants
ADSP Queue Element Equates and Sizes
csQStatus EQU CSParam ;ADSP internal use
csCCBRef EQU csQStatus+4 ;refnum of ccb
Command 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
sdspOpen EQU 229 ;open a secure connection
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
sdspWorkSize EQU 2048 ;size of ASDSP workspace
ASDSP Encrypt and End-of-Message Flags and Masks
dspEOMBit EQU 0 ;set if EOM at end of write
dspEncryptBit EQU 1 ;set to encrypt message
dspEncryptMask EQU $1 ;mask for setting the encrypt bit
dspEOMMask EQU $2 ;mask for setting the EOM bit
Data Structures
ADSP Connection Control Block Data Structure
0 | ccbLink | long | link to next CCB |
4 | refNum | word | reference number |
6 | state | word | state of the connection end |
8 | userFlags | byte | user flags for connection |
9 | localSocket | byte | local socket number |
10 | remoteAddress | long | internet address of remote end |
14 | attnCode | word | attention code received |
16 | attnSize | word | size of received attention data |
18 | attnPtr | long | pointer to received attention data |
22 | reserved | 220 bytes | reserved |
DPS Parameter Block Common Fields for ADSP and ASDSP
0 | qLink | long | reserved |
4 | qType | word | reserved |
6 | ioTrap | word | reserved |
8 | ioCmdAddr | long | reserved |
12 | ioCompletion | long | address of completion routine |
16 | ioResult | word | result code |
18 | ioNamePtr | long | reserved |
22 | ioVRefNum | word | reserved |
24 | ioCRefNum | word | driver reference number |
28 | qStatus | long | reserved |
32 | ccbRefNum | word | reference number of CCB |
dspInit and dspCLInit
26 | csCode | word | dspInit or dspCLInit |
34 | ccbPtr | long | pointer to CCB |
38 | userRoutine | long | pointer to routine to call on connection events |
42 | sendQSize | word | size in bytes of the send queue |
44 | sendQueue | long | pointer to send queue |
48 | recvQSize | word | size in bytes of the receive queue |
50 | recvQueue | long | pointer to receive queue |
54 | attnPtr | long | pointer to buffer for incoming attention messages |
58 | localSocket | byte | DDP socket number for this connection end |
Parameter Variant
dspOptions
16 | ioResult | word | result code |
24 | ioCRefNum | word | driver reference number |
26 | csCode | word | always dspOptions |
34 | sendBlocking | word | send-blocking threshold |
38 | badSeqMax | byte | threshold to send retransmit advice |
39 | useCheckSum | byte | DDP checksum flag |
Parameter Variant
dspOpen, dspCLListen, and dspCLDeny
26 | csCode | word | dspOpen , dspCLListen , or dspCLDeny |
34 | localCID | word | ID of this connection end |
36 | remoteCID | word | ID of remote connection end |
38 | remoteAddress | long | remote internet address |
42 | filterAddress | long | filter for open-connection requests |
46 | sendSeq | long | initial send sequence number |
50 | sendWindow | word | initial size of remote receive queue |
52 | recvSeq | long | initial receive sequence number |
56 | attnSendSeq | long | attention send sequence number |
60 | attnRecvSeq | long | attention receive sequence number |
64 | ocMode | byte | connection-opening mode |
65 | ocInterval | byte | interval between open requests |
66 | ocMaximum | byte | retries of open-connection request |
Parameter Variant
sdspOpen Parameter Variant
26 | csCode | word | sdspOpen |
34 | localCID | word | ID of this connection end |
36 | remoteCID | word | ID of remote connection end |
38 | remoteAddress | long | remote internet address |
42 | filterAddress | long | filter for open-connection requests |
46 | sendSeq | long | initial send sequence number |
50 | sendWindow | word | initial size of remote receive queue |
52 | recvSeq | long | not used for ASDSP |
56 | attnSendSeq | long | attention send sequence number |
60 | attnRecvSeq | long | not used for ASDSP |
64 | ocMode | byte | connection-opening mode |
65 | ocInterval | byte | interval between open requests |
66 | ocMaximum | byte | retries of open-connection request |
68 | secure | word | flag that determines if ASDSP authenticates the connection |
70 | sessionKey | long | pointer to the encryption key for the session |
74 | credentialsSize | long | length of credentials |
78 | credentials | long | pointer to credentials |
82 | workspace | long | pointer to workspace for connection |
86 | recipient | long | identity of recipient |
90 | issueTime | long | time when credentials were issued |
94 | expiry | long | time when credentials expire |
98 | initiator | long | pointer to record ID of initiator |
102 | hasIntermediary | word | TRUE if credentials have an intermediary |
104 | intermediary | long | pointer to record ID of intermediary |
dspNewCID Parameter Variant
26 | csCode | word | always dspNewCID |
34 | newCID | word | ID of new connection |
dspClose, dspRemove, and dspCLRemove Parameter Variant
26 | csCode | word | dspClose , dspRemove , or dspCLRemove |
34 | abort | byte | abort send requests or connection listener if not 0 |
dspStatus Parameter Variant
26 | csCode | word | always dspStatus |
34 | statusCCB | pointer | pointer to CCB |
38 | sendQPending | word | bytes waiting to be sent or acknowledged |
40 | sendQFree | word | available send queue in bytes |
42 | recvQPending | word | bytes waiting to be read from queue |
44 | recvQFree | word | available receive queue in bytes |
dspRead and dspWrite Parameter Variant
26 | csCode | word | dspRead or dspWrite |
34 | reqCount | word | requested number of bytes |
36 | actCount | word | actual number of bytes read or written |
38 | dataPtr | pointer | pointer to data buffer |
42 | eom | byte | for ADSP: 1 if end of message; 0 otherwise for ASDSP: bit 0 = end of message; bit 1 turns on encryption, if set |
43 | flush | byte | 1 to send data now; 0 otherwise |
dspAttention and dspReset Parameter Variant
26 | csCode | word | dspAttentio n or dspReset |
34 | attnCode | word | client attention code |
36 | attnSize | word | size of attention data in bytes |
38 | attnData | pointer | pointer to attention data |
Result Codes
noErr | 0 | No error or unrecognized event code |
ddpSktErr | -91 | Error opening socket |
errOpenDenied | -1273 | Open request denied by recipient |
errDSPQueueSize | -1274 | Send or receive queue is too small |
errFwdReset | -1275 | Read terminated by forward reset |
errAttention | -1276 | Attention message too long |
errOpening | -1277 | Attempt to open connection failed |
errState | -1278 | Bad connection state for this operation |
errAborted | -1279 | Request aborted by dspRemove or dspClose routine |
errRefNum | -1280 | Bad connection reference number |
kOCEUnsupportedCredentialsVersion | -1543 | Credentials version not supported |
kOCEBadEncryptionMethod | -1559 | During the authentication process, the ASDSP implementations could not agree on an encryption method to be used (ASDSP can support multiple stream encryption methods. In Release 1, only RC4 and "no encryption" are supported.) |
kOCENoASDSPWorkSpace | -1570 | You passed NIL for the workspace parameter |
kOCEAuthenticationTrouble | -1571 | Authentication process failed |