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 30 - AppleTalk Reference / AppleTalk Service Provider Reference
AppleTalk Service Functions / Obtaining Information About Zones


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 TNetbuf structure that, on return, contains a list of the local zone names.
function result
See Discussion.
DISCUSSION
The OTATalkGetLocalZones function 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 the OTATalkGetMyZone function.

If you execute this function asynchronously, Open Transport calls your notifier function with a T_GETLOCALZONESCOMPLETE completion event to signal the function's completion and uses your notifier's cookie parameter for the list of zones. The cookie parameter actually holds a pointer to a TNetbuf structure, 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
The OTATalkGetMyZone function.

The OTATalkGetZoneList function.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 JAN 1998