OTATalkGetZoneList
Obtains a list of all the zones available on the AppleTalk internet.C INTERFACE
OSStatus OTATalkGetZoneList(ATSvcRef ref, TNetbuf* zones);C++ INTERFACE
TAppleTalkServices::GetZoneList(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 all the zones on your current AppleTalk internet.DESCRIPTION
TheOTATalkGetZoneListfunction returns a list of all the zones on the AppleTalk internet to which your network belongs.If you execute this function asynchronously, Open Transport calls your notifier function with a
T_GETZONELISTCOMPLETEcompletion 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 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 AppleTalk internets can have a number of extended networks, you need to allocate a buffer (using the
TNetbuf->maxlenfield) that holds as much as 64 KB of memory. To keep the buffer size as small and efficient as possible, you can set up a large buffer, test for thekOTBufferOverflowErrerror, and then increase the size of the buffer and reissue the call if this error is returned.COMPLETION EVENT CODES
T_GETZONELISTCOMPLETE0x23010003 The OTATalkGetZoneListfunction 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 local zones, use the
OTATalkGetLocalZonesfunction (page 11-17).