If you ping the broadcast addr you will (should) get a reply from all hosts. This will give you a full arp table that can be grep'd programatically. The only hitch is that it's possible for someone to put a firewall or other custom setup on a machine to prevent it from replying to ping.
Another way would be to decode packets to read the IP from address. Not sure if tcpdump has that ability or it it would take some coding. I've always done it with arp myself. -Mitch On Wed, 13 Aug 2003, Nick Barnes wrote: > [-net seems to be the right forum for this.] > > I have some MAC addresses from a local Ethernet segment. I want to > convert them into IP addresses. How can I do that programmatically? > (i.e. not "ping likely candidates and then eyeball the arp -a > output"). I'm prepared to burn hundreds of packets, and possibly wait > a few seconds, to get the result. _______________________________________________ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "[EMAIL PROTECTED]"