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 / Constants and Data Types


XTI-Level Options

Open Transport defines XTI-level options. These options are not association-related. If the protocol you are using supports these options, you can negotiate them while the endpoint is in any state. The protocol level for all of these options is XTI_GENERIC. The constant names used to specify XTI-level options are given by the following enumeration:

enum
   {
      XTI_DEBUG      = (OTXTIName)0x0001,
      XTI_LINGER     = (OTXTIName)0x0080,
      XTI_RCVBUF     = (OTXTIName)0x1002,
      XTI_RCVLOWAT   = (OTXTIName)0x1004,
      XTI_SNDBUF     = (OTXTIName)0x1001,
      XTI_SNDLOWAT   = (OTXTIName)0x1003,
      XTI_PROTOTYPE  = (OTXTIName)0x1005
   };
Constant descriptions

XTI_DEBUG
A 32 bit constant specifying whether debugging is enabled. Debugging is disabled if the option is specified with no value. This option is an absolute requirement.

XTI_LINGER
A value defined by a linger structure that specifies whether the option is turned on (T_YES) or off (T_NO) and specifies a linger period in seconds. This option is an absolute requirement; however, you do not have to specify a value for the l_linger field of the linger structure.

You use this option to extend the execution of the OTCloseProvider function for some specified amount of time. The delay allows data still queued in the endpoint's internal send buffer to be sent before the endpoint provider is closed. If you call the OTCloseProvider function and the send buffer is not empty, the endpoint provider attempts to send the remaining data during the linger period, before closing. Open Transport discards any data remaining in the send buffer after the linger period has elapsed.

Consult the documentation for your protocol to determine the valid range of values for the linger period.

XTI_RCVBUF
A 32-bit integer specifying the size of the endpoint's internal buffer allocated for receiving data. You can increase the size of this buffer for high-volume connections or decrease the buffer to limit the possible backlog of incoming data.

This option is not an absolute requirement. Consult the documentation for your protocol to determine the valid range of values for the buffer size.

XTI_RCVLOWAT
A 32-bit integer specifying the low-water mark for the receive buffer--that is, the number of bytes that must accumulate in the endpoint's internal receive buffer before you are advised that data has arrived via a T_DATA event. Choosing a value that is too low might result in your application's getting an excessive number of T_DATA events and doing unnecessary reads. Choosing a value that is too high might result in Open Transport running out of memory and disabling incoming data packets.

This option is not an absolute requirement. Consult the documentation for your protocol to determine the valid range of values for the low-water mark.

XTI_SNDBUF
A 32-bit integer specifying the size of the endpoint's internal buffer allocated for sending data. Specifying a value that is too low might result in Open Transport doing more sends than necessary and wasting processor time; specifying a value that is too high might cause flow control problems.

This option is not an absolute requirement. Consult the documentation for your protocol to determine the valid range of values for the buffer size.

XTI_SNDLOWAT
A 32-bit integer specifying the low-water mark for the send buffer--that is, the number of bytes that must accumulate in the endpoint's internal send buffer before Open Transport actually sends the data. Choosing a value that is too low might result in Open Transport's doing too many sends and wasting processor time. Choosing a value that is too high might result in flow control problems. A value that is slightly lower than the largest packet size defined good choice.

This option is not an absolute requirement. Consult the documentation for your protocol to determine the valid range of values for the low-water mark.

XTI_PROTOTYPE
The protocol type used by the endpoint. The option is supported by the RawIP endpoint. For additional information, see "TCP/IP Services Reference".

Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 JAN 1998