From: rtmd30@email.sps.mot.com (Greg Ferguson)
Subject: Re: MacTCP Programming idea/request
Followup-To: comp.sys.mac.programmer
Organization: Motorola
Date: Wed, 16 Dec 1992 05:22:28 GMT

In article <peter-151292115938@rocky.curtin.edu.au>,
peter@ncrpda.curtin.edu.au (Peter N Lewis) wrote:
> 
> In article <1992Dec11.083919.1344@galaxy.gov.bc.ca>,
> cconstantine@galaxy.gov.bc.ca wrote:
> > 
> > Here is an interesting programming request/idea for use on MacTCP Ethernet
> > networks.  Write a utility that will poll all of the Mac's on the network for
> > their IP address.  This would be a method of IP control as well as determining
> > if there are duplicate addresses on the net.  This utility should possibly 
> > also
> > be able to get the ethernet address (NIC) of the actual ethernet card as well. 
> > This way, it can be compared to an existing database and you could track down
> > exactly who is using what address.  
> 
> Well, if you have a unix box on the net, a solution would be to install the
> CAP package (or a small junk of it, namely the atlook command).
> 
> The atlook command (with a little massaging) gives output like this:
> 
> ./atlook AnyZone | egrep "IPADDRESS|Macintosh" | sort +0.50
>   9 - 123.4.567.89:IPADDRESS@*                 [Net: 33.172 Node: 26 Skt:
> 72]
>  19 - Rocky:Macintosh IIsi@*                   [Net: 33.172 Node: 26
> Skt:253]
>  11 - 123.4.567.98:IPADDRESS@*                 [Net: 33.172 Node: 35 Skt:
> 72]
>  21 - Andrea:Macintosh LC@*                    [Net: 33.172 Node: 35
> Skt:251]
>  23 - Phil:Macintosh LC@*                      [Net: 33.172 Node: 42
> Skt:252]
>  22 - Mariella:Macintosh LC@*                  [Net: 33.172 Node: 50
> Skt:252]
>  10 - 123.4.567.99:IPADDRESS@*                 [Net: 33.172 Node: 67 Skt:
> 72]
>  20 - Wendy:Macintosh IIsi@*                   [Net: 33.172 Node: 67
> Skt:253]
>  26 - chris m:Macintosh Plus@*                 [Net: 33.172 Node:193
> Skt:252]
>  24 - ChrisMc:Macintosh Plus@*                 [Net: 33.173 Node:215
> Skt:252]
>  25 - Misha:Macintosh Plus@*                   [Net: 33.173 Node:242
> Skt:252]
> 
> Which shows pretty simply the IP of the various machines on the net that
> have an IPADDRESS.
> 
> Note that MacTCP doesn't register the IP number until its actually needed,
> so you won't find IPADDRESS registrations for Macs that haven't used an TCP
> services since their last restart.
> 
> There are no doubt lots of Mac NBP utilities that will give this list as
> well.
> 
> BTW, none of this requires any MacTCP programming.  In fact, it would be
> impossible to use any TCP programming to find out this information, this is
> one of the advantages that AppleTalk has over TCP.
> 
> Have fun all,
>    Peter.

An additional wrench in the gears is that EtherTalk Macs will not show IP
numbers in an AppleTalk NBP lookup for IP addresses. LocalTalk Macs respond
fine, but I've not seen any of our Ethernet Macs return their address.

This is a real pain in the butt when a user *thinks* they know what they're
doing and just hacks an IP address... which just happens to conflict with
someone else's IP.

Greg Ferguson
Programmer/Engineer
Desktop Networking System
SPS, World Marketing
Motorola, Inc.
Newsgroups: comp.sys.mac.programmer