OTATalkGetLocalZones
Obtains a list of the zones available on your network.C INTERFACE
OSStatus OTATalkGetLocalZones(ATSvcRef ref, TNetbuf* zones);C++ INTERFACE
TAppleTalkServices::GetLocalZones(TNetbuf* zones);PARAMETERS
ref- The reference value of your AppleTalk service provider.
zones- A pointer to a
TNetbufstructure that you use to get a list of the local zone names.DESCRIPTION
TheOTATalkGetLocalZonesfunction returns a list of the zone names in your application's network if it is an extended network. These are all the zones to which your node can belong. If your application is in a nonextended network, this function returns only one zone name, the same one returned by theOTATalkGetMyZonefunction.If you execute this function asynchronously, Open Transport calls your notifier function with a
T_GETLOCALZONESCOMPLETEcompletion event to signal the function's completion and uses your notifier'scookieparameter for the list of zones. Thecookieparameter actually holds a pointer to aTNetbufstructure, which points to a buffer containing a list of zone names, each of which is stored as a Pascal-style string. Using a Pascal-style string for the zone name is redundant since you can determine the length of the string from themaxlenfield of theTNetbufstructure, but the other zone-related calls use Pascal-style strings, so this call also uses them for consistency.Each string can be up to 32 characters in length, and if you add a length byte, each can have a maximum size of 33 bytes. As there can be a maximum of 254 zones on an extended network, the maximum size of the buffer is 8382 bytes. Because zone names are often less than 32 characters long and AppleTalk service providers don't pad short names, 6 KB bytes is likely to be a safe value for the buffer's size, defined by the
TNetbuf->maxlenfield.COMPLETION EVENT CODES
T_GETLOCALZONESCOMPLETE0x23010002 The OTATalkGetLocalZonesfunction has completed.SEE ALSO
To obtain the zone name for the node your process is running on, use theOTATalkGetMyZonefunction (page 11-16).To obtain a list of all zones on the AppleTalk internet, use the
OTATalkGetZoneListfunction (page 11-18).
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help