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 20 - Initializing and Closing Open Transport Reference /


The Gestalt Selector and Response Bits

You can test whether Open Transport and its various parts are available by using the Gestalt function with the 'ota kn' and 'otvr' selectors.

The 'otvr' selector determines the Open Transport version in NumVersion format. For more information on Apple's version numbering scheme and the NumVersion 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 function InitOpenTransport.

The 'otan' selector returns information by setting or clearing bits in the response 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 the Gestalt function, see Inside Macintosh: Operating System Utilities.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 JAN 1998