home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / unix / programm / 4669 < prev    next >
Encoding:
Internet Message Format  |  1992-09-15  |  1016 b 

  1. Path: sparky!uunet!mcsun!uknet!cf-cm!cybaswan!ccpaulm
  2. From: ccpaulm@cybaswan.UUCP (Paul Matthews)
  3. Newsgroups: comp.unix.programmer
  4. Subject: Determining Ethernet Addresses of Network Machines
  5. Keywords: help...
  6. Message-ID: <1004@cybaswan.UUCP>
  7. Date: 15 Sep 92 14:49:03 GMT
  8. Lines: 20
  9.  
  10. Hi,
  11.  
  12.     We've been trying to build up a database of all the
  13.     machines on our network, such as ip number, hostname
  14.     and the ethernet address. So far, the program I've
  15.     come up with is very crude/slow...it takes the /etc/hosts
  16.     file as it's list of known machines and then performs a 
  17.     ping on each machine and then uses arp -a (via grep) to
  18.     find the ethernet address. The program has been running on
  19.     a Sun ELC, and I've tried the standard sun routines, but
  20.     they seem to look at /etc/ethers, which in our case isn't
  21.     used. Is there a slightly neater/quicker way to achieve this ?
  22.     Is there some sort of internal cache that can be interrogated
  23.     or whatever ??
  24.  
  25. Thanks in advance for any help...
  26.  
  27. Paul Matthews
  28.  
  29. p.matthews@swansea.ac.uk
  30.