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 With Open Transport / Part 2 - Open Transport Reference
Chapter 25 - Option Management Reference / Functions
Determining and Changing Function Values /


OTOptionManagement

Determines an endpoint's current or default option values or changes
these values.

C INTERFACE
OSStatus OTOptionManagement(EndpointRef ref, TOptMgmt* req, 
                                         TOptMgmt* ret);
C++ INTERFACE
OSStatus TEndpoint::OptionManagement(TOptMgmt* req, TOptMgmt* ret);
PARAMETERS
ref
The endpoint reference of the endpoint for which you are checking or setting option values.
req
A pointer to an option management structure, which describes the action to be taken by the function and the options affected.
ret
A pointer to an e option management structur, which describes the options that were changed or returned by the function and how successful the negotiation process was.
function result
See Discussion.
DISCUSSION
To use the OTOptionManagement function, you must have opened an endpoint using the OTOpenEndpoint or OTAsyncOpenEndpoint functions.

You use the OTOptionManagement function to negotiate, retrieve, or verify an endpoint's protocol options. If the endpoint is in synchronous mode, the endpoint will returns results of the option managment in the structure referenced by the req parameter. If the endpoint is in asynchronous mode, the function returns immediately with the kOTNoError result. When the operation completes, the endpoint calls your notifier with the T_OPTNMGMTCOMPLETE event code. The cookie parameter to the notifier will contain the value of the ret parameter. If you have not installed a notifier function, it is not possible to determine when the function completes. For more information on notifier functions and event codes see "Using Notifier Functions" and "Event Codes".

The action taken by the OTOptionManagement function is determined by the setting of the req->flags field. The following bulleted items describe the different operations that you can perform and the flag settings that you use to specify these operations.

The overall result of the request for option negotiation is returned in the ret->flags field. The meaning of this result is described by the status codes enumeration.

SPECIAL CONSIDERATIONS
While an option management call is outstanding, any other functions that are called for the same endpoint return with a kOTStateChangeErr result.

If the endpoint is in asynchronous mode, the provider might issue the T_OPTMGMTCOMPLETE event before the function returns the first time.

SEE ALSO
The format of option buffers in "Specifying Option Values".

The OTCreateOptions function.

The OTCreateOptionString function.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 JAN 1998