Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!apple!lsr From: lsr@Apple.COM (Larry Rosenstein) Newsgroups: comp.sys.mac.programmer Subject: Re: AppleTalk ZIP Protocol Message-ID: <26517@apple.Apple.COM> Date: 28 Feb 89 17:25:27 GMT References: <4516@hubcap.UUCP> Organization: Advanced Technology Group, Apple Computer Lines: 38 [Note to Michael O'Rourke: I've tried mailing directly to you several times, but each time the mail is returned because the host 'hubcap' is unknown.] In article <4516@hubcap.UUCP> mikeoro@hubcap.UUCP (Michael K O'Rourke) writes: > >Is there anyone out there that has used the ZIP protocol in AppleTalk to >transfer packets between networks? I use NBP but it doesn't give me the names >of other networks/zones. So, from my understanding I have to use ZIP to get >other zone names and then use NBP to look for users in those zones. Your assumption is correct. You use the call GetBridgeAddr to find the address of a bridge. Then you send an ATP request to the bridge to find out the list of zones. The ZIP socket is 6. There are 2 relevant ZIP requests: GetZoneList and GetMyZone. Requests are specified entirely within the ATP user bytes. For GetZoneList, the high-order byte is 8, the next byte is 0, and the low order 2 bytes is the index into the list you want. For GetMyZone the user bytes should be $07000000. The response packet will contain a list of zone names packed together as Pascak strings. The ATP user bytes will tell you how many zones are in the packet (low order 2 bytes). For a GetZoneList request, the high order byte will be non-zero if this packet contains the last zone in the list. So you simply make a request to retrieve zone number 1, and get back a bunch of zones. If the last flag is 0 then add the old index (1) to the number of returned zones and make a new request to start at this zone number. If the last flag is non-zero then you got the last zone. Larry Rosenstein, Object Specialist Apple Computer, Inc. 20525 Mariani Ave, MS 46-B Cupertino, CA 95014 AppleLink:Rosenstein1 domain:lsr@Apple.COM UUCP:{sun,voder,nsc,decwrl}!apple!lsr