home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / mac / programm / 19828 < prev    next >
Encoding:
Text File  |  1992-12-14  |  2.9 KB  |  74 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!munnari.oz.au!uniwa!cujo!ncrpda.curtin.edu.au!rocky.curtin.edu.au!user
  3. From: peter@ncrpda.curtin.edu.au (Peter N Lewis)
  4. Subject: Re: MacTCP Programming idea/request
  5. Message-ID: <peter-151292115938@rocky.curtin.edu.au>
  6. Followup-To: comp.sys.mac.programmer
  7. Lines: 60
  8. Sender: news@ncrpda.curtin.edu.au
  9. Nntp-Posting-Host: rocky.curtin.edu.au
  10. Organization: NCRPDA, Curtin University
  11. References: <1992Dec11.083919.1344@galaxy.gov.bc.ca>
  12. Date: Tue, 15 Dec 1992 04:10:04 GMT
  13.  
  14. In article <1992Dec11.083919.1344@galaxy.gov.bc.ca>,
  15. cconstantine@galaxy.gov.bc.ca wrote:
  16. > Here is an interesting programming request/idea for use on MacTCP Ethernet
  17. > networks.  Write a utility that will poll all of the Mac's on the network for
  18. > their IP address.  This would be a method of IP control as well as determining
  19. > if there are duplicate addresses on the net.  This utility should possibly 
  20. > also
  21. > be able to get the ethernet address (NIC) of the actual ethernet card as well. 
  22. > This way, it can be compared to an existing database and you could track down
  23. > exactly who is using what address.  
  24.  
  25. Well, if you have a unix box on the net, a solution would be to install the
  26. CAP package (or a small junk of it, namely the atlook command).
  27.  
  28. The atlook command (with a little massaging) gives output like this:
  29.  
  30. ./atlook AnyZone | egrep "IPADDRESS|Macintosh" | sort +0.50
  31.   9 - 123.4.567.89:IPADDRESS@*                 [Net: 33.172 Node: 26 Skt:
  32. 72]
  33.  19 - Rocky:Macintosh IIsi@*                   [Net: 33.172 Node: 26
  34. Skt:253]
  35.  11 - 123.4.567.98:IPADDRESS@*                 [Net: 33.172 Node: 35 Skt:
  36. 72]
  37.  21 - Andrea:Macintosh LC@*                    [Net: 33.172 Node: 35
  38. Skt:251]
  39.  23 - Phil:Macintosh LC@*                      [Net: 33.172 Node: 42
  40. Skt:252]
  41.  22 - Mariella:Macintosh LC@*                  [Net: 33.172 Node: 50
  42. Skt:252]
  43.  10 - 123.4.567.99:IPADDRESS@*                 [Net: 33.172 Node: 67 Skt:
  44. 72]
  45.  20 - Wendy:Macintosh IIsi@*                   [Net: 33.172 Node: 67
  46. Skt:253]
  47.  26 - chris m:Macintosh Plus@*                 [Net: 33.172 Node:193
  48. Skt:252]
  49.  24 - ChrisMc:Macintosh Plus@*                 [Net: 33.173 Node:215
  50. Skt:252]
  51.  25 - Misha:Macintosh Plus@*                   [Net: 33.173 Node:242
  52. Skt:252]
  53.  
  54. Which shows pretty simply the IP of the various machines on the net that
  55. have an IPADDRESS.
  56.  
  57. Note that MacTCP doesn't register the IP number until its actually needed,
  58. so you won't find IPADDRESS registrations for Macs that haven't used an TCP
  59. services since their last restart.
  60.  
  61. There are no doubt lots of Mac NBP utilities that will give this list as
  62. well.
  63.  
  64. BTW, none of this requires any MacTCP programming.  In fact, it would be
  65. impossible to use any TCP programming to find out this information, this is
  66. one of the advantages that AppleTalk has over TCP.
  67.  
  68. Have fun all,
  69.    Peter.
  70.  
  71. _______________________________________________________________________
  72. Peter N Lewis <peter@ncrpda.curtin.edu.au>           Ph: +61 9 368 2055
  73.