I am looking for Linux code to search for an IP address from an Ethernet address. I suppose I need to do some inverse ARP snag, but I haven't found any example ...
http://compnetworking.about.com/od/networkprotocolsip/f/convertipmacadd.htm
Try sending an IP broadcast (for example, ping 192.168.1.255if your subnet is 192.168.1.0/24 ) to transfer your ARP cache, then arp -ato spit it out completely.
ping 192.168.1.255
arp -a
, , arp. /proc/net/arp, . IP- MAC, , , . , , RARP, - , .
/proc/net/arp
, , arp. . fping . , , ARP, ..
fping
Take a look at Thomas Habet Arping . I have not tried, but the basic idea is to send the ICMP Ping network packet to the appropriate MAC address using the broadcast IP address in the IP header. Only the host with the specified MAC address will respond, and the response will (usually) contain its IP address. This will not always work, but it may be enough for you. See the readme file for restrictions.