IP addr from MAC addr

IP addr from MAC addr

Post by Tejas Arun » Sun, 01 Aug 2004 06:45:30


Hello,

How to get IP address from MAC address using Unix network programming

Thanks
Tejas Kokje
 
 
 

IP addr from MAC addr

Post by sean larss » Sun, 01 Aug 2004 08:48:44

i know u can use a raw/packet socket and construct your own reverse arp
request to do this, but i don't think there are any functions provided
for this. u prolly have to do it yourself.

On Fri, 30 Jul 2004 14:45:30 -0700




--
-sean

 
 
 

IP addr from MAC addr

Post by Barry Marg » Sun, 01 Aug 2004 08:56:11

In article < XXXX@XXXXX.COM >,



You can do this by scanning the ARP cache, but only if the IP address is
on the local subnet and the local machine has recently communicated with
the IP address. The "Unix Network Programming" book should have a
section that explains how to read the ARP cache (you probably need to be
root to do it, though).

BTW, what do you plan on doing when multiple IP addresses map to the
same MAC address? This is not uncommon, due to IP aliases and proxy ARP.

--
Barry Margolin, XXXX@XXXXX.COM
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***