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 theGestaltfunction with the'ota kn'and'otvr'selectors.The
'otvr'selector determines the Open Transport version inNumVersionformat. For more information on Apple's version numbering scheme and theNumVersionformat, 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 theresponseparameter. 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 theGestaltfunction, see Inside Macintosh: Operating System Utilities.