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