Important: The information in this document is obsolete and should not be used for new development.
The Gestalt Selector and Response Bits
You can test whether Open Transport and its various parts are available by using theGestalt
function with the'ota kn'
and'otvr'
selectors.The
'otvr'
selector determines the Open Transport version inNumVersion
format. For more information on Apple's version numbering scheme and theNumVersion
format, see Technote OV12:Version Territory. The'otvr'
selector was not implemented until version 1.1 of Open Transport. The absence of this selector does not mean that Open Transport is not present. You can also check for the availability of Open Transport by calling the functionInitOpenTransport
.The
'otan'
selector returns information by setting or clearing bits in theresponse
parameter. The bits currently used are defined by constants, shown along with the Open Transport selector in the following enumeration:
enum { gestaltOpenTptVersions = 'otvr', gestaltOpenTpt = 'otan', gestaltOpenTptPresentMask = 0x00000001, gestaltOpenTptLoadedMask = 0x00000002, gestaltOpenTptAppleTalkPresentMask = 0x00000004, gestaltOpenTptAppleTalkLoadedMask = 0x00000008, gestaltOpenTptTCPPresentMask = 0x00000010, gestaltOpenTptTCPLoadedMask = 0x00000020, gestaltOpenTptIPXSPXPresentMask = 0x00000040, gestaltOpenTptIPXSPXLoadedMask = 0x00000080, gestaltOpenTptPresentBit = 0, gestaltOpenTptLoadedBit = 1, gestaltOpenTptAppleTalkPresentBit = 2, gestaltOpenTptAppleTalkLoadedBit = 3, gestaltOpenTptTCPPresentBit = 4, gestaltOpenTptTCPLoadedBit = 5, gestaltOpenTptIPXSPXPresentBit = 6, gestaltOpenTptIPXSPXLoadedBit = 7 };For more information about theGestalt
function, see Inside Macintosh: Operating System Utilities.