Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Networking /
Chapter 8 - AppleTalk Session Protocol (ASP) / ASP Reference
Routines / Obtaining Information About ASP's Maximum Capacities and the Status of the Server


ASPGetStatus

The ASPGetStatus function returns status information about the server whose internet socket address you provide.

FUNCTION ASPGetStatus (thePBptr: XPPParmBlkPtr; 
                       async: Boolean): OSErr;
thePBptr
A pointer to an XPP parameter block.
async
A Boolean that specifies whether the function should be executed asynchronously or synchronously. Specify TRUE for asynchronous execution.
-->ioCompletionProcPtrA pointer to a completion routine.
<--ioResultOSErrThe function result.
-->ioRefNumIntegerThe .XPP driver reference number.
-->csCodeIntegerAlways getStatus for this function.
-->aspTimeoutByteThe retry interval in seconds.
-->aspRetryByteThe number of retries.
-->serverAddrAddrBlockThe server socket address.
<->rbSizeIntegerThe reply buffer and reply size.
-->rbPtrPtrA pointer to the reply buffer.
<--ccbStartArrayThe beginning of memory for the CCB.

Field Description
aspTimeout
The time in seconds after which ASP is to retry to obtain information about the status of the server whose address
you provide.
aspRetry
The number of times ASP is to retry to obtain the server status information.
serverAddr
The internet socket address of the server about which you want status information.
rbSize
On input, the size in bytes of the buffer that you allocated to contain the reply that you expect to receive from the server. On return, the size in bytes of the reply (status) data that was actually returned.
rbPtr
A pointer to the buffer for the reply data.
ccbStart
The beginning of the memory for the command control block (CCB) that the .XPP driver is to use. The memory allocated for the CCB must not exceed the maximum of 150 bytes.
DESCRIPTION
You can use the ASPGetStatus function to obtain service status information about a server without opening a session between your application and that server. ASP does not impose any structure on the status block. The protocol above ASP defines the structure. The .XPP driver uses the memory at the end of the XPP parameter block defined as
a CCBStart array as an internal command control block (CCB). To ensure that the function executes successfully, you can specify the maximum size for this array as indicated in particular for the function that uses it. If you want to limit the amount of memory used for the CCB, you can specify the minimum amount of memory required for this array.

SPECIAL CONSIDERATIONS
Note that you must provide the .XPP driver reference number as an input parameter
to this function. You can obtain the driver reference number by calling the Device Manager's OpenDriver function.

ASSEMBLY-LANGUAGE INFORMATION
To execute the ASPGetStatus function from assembly language, call the _Control trap macro with a value of getStatus in the csCode field of the parameter block.
You must also specify the .XPP driver reference number. To execute the _Control
trap asynchronously, include the value ,ASYNC in the operand field.

RESULT CODES
aspBufTooSmall-1067The reply data exceeds the size of the reply buffer; the .XPP driver will fill the buffer and truncate the data
aspNoServer-1069There was no response from the server whose address you specified as the value of serverAddr
SEE ALSO
To determine the minimum amount of memory required for the CCB, refer to the description of the ASPUserCommand function on page 8-15.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996