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
Appendix D - XTI Option Summary


Retrieving Option Values

The following sections describe how you retrieve option values for different kinds of endpoints.

Retrieving Values for Connection-Oriented Endpoints

When you are establishing a connection, it is possible to negotiate association-related option values at every point in the connection process, as illustrated in Figure D-1 . Both the active and passive peers might want to retrieve option values during this process.

The passive peer might want to know the proposed option values under negotiation. It can retrieve these by calling the OTListen function. After examining the option values returned by the OTListen function, the passive peer can negotiate option values by specifying the desired option values with the OTAccept call used to accept the connection. Using this method, the passive peer can examine the requested option values before proposing alternate values.

The passive peer can also negotiate alternate values by using the OTOptionManagement function to preset option values for the endpoint accepting the connection. This sets the current option values for the endpoint so that when the passive peer calls the OTAccept function, these are the option values that are negotiated with the requested values.

The passive peer can try to negotiate option values that are higher than the proposed values. The outcome depends on the protocol. If the protocol rejects the new option values, the connection fails, and the endpoint provider issues a T_DISCONNECT event. Depending on timing and the implementation, the OTAccept function either succeeds or fails with the kOTLookErr result.

The association-related options retrieved by the passive peer are related to the incoming connection, identified by a sequence number, and are not related to the listening endpoint. Option values currently effective for the listening endpoint might affect the values retrieved by the OTListen function because the endpoint is involved in the negotiation process, but these values are not the same as the option values related to the connection request. That is to say, calling the OTOptionManagement function to retrieve the option values that were currently effective for the listening endpoint is likely to yield a different set of values than you would find by examining the values of options passed in the call parameter to the OTListen function.

When you establish the connection--that is, when a synchronous call to the OTConnect function returns or when the active peer calls the OTRcvConnect function-- all final negotiated values effective for the connection are returned in the buffer passed in the rcvCall or call parameter, respectively. These option values include all association-related options that were received with the connection response and the negotiated values of those non-association-related options that had been specified on input. Options specified on input to the OTConnect call that are not supported or that refer to an unknown protocol are ignored and not returned by the OTConnect or OTRcvConnect function when it returns.

Retrieving Values for Connectionless Transactionless Endpoints

You can retrieve association-related options set for connectionless transactionless endpoints by examining the buffer passed in the udata parameter to the OTRcvUData function. These options relate to the incoming datagram, not to the endpoint receiving it.

Because the options you retrieve are related to the datagram and not to the listening endpoint, their number and values can change with every transmission.

Retrieving Values for Connectionless Transaction-Based Endpoints

You can retrieve association-related options set for connectionless transaction-based endpoints by examining the buffer passed in the req parameter to the OTRcvURequest function. These options relate to the current transaction, not to the endpoint receiving the request. Consequently, options and their values can change with each transaction.


Subtopics
Retrieving Values for Connection-Oriented Endpoints
Retrieving Values for Connectionless Transactionless Endpoints
Retrieving Values for Connectionless Transaction-Based Endpoints

Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 JAN 1998