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


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 TNetbuf structure that you use to get a list of all the zones on your current AppleTalk internet.
function result
A result code. See Appendix B for information.
DISCUSSION
The OTATalkGetZoneList function 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_GETZONELISTCOMPLETE 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, each of which is a Pascal string.

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 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 the kOTBufferOverflowErr error, and then increase the size of the buffer and reissue the call if this error is returned.

SEE ALSO
The OTATalkGetMyZone function.

The OTATalkGetLocalZones function.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 JAN 1998