Important: The information in this document is obsolete and should not be used for new development.
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
TNetbufstructure that, on return, contains a list of the local zone names.- function result
- See Discussion.
DISCUSSION
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, stored as packed Pascal strings.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 are packed. 6 KB bytes is likely to be a safe value for the buffer's size.
SEE ALSO
TheOTATalkGetMyZonefunction.The
OTATalkGetZoneListfunction.