Programmatic use of ARP

Posted by sizzzzlerz on Stack Overflow See other posts from Stack Overflow or by sizzzzlerz
Published on 2010-03-16T02:24:03Z Indexed on 2010/03/16 15:21 UTC
Read the original article Hit count: 432

Filed under:
|
|
|
|

I have a need for some C or C++ code, compilable under Linux, to be able to take a list of IP addresses of some arbitrary number of remote hosts machines and obtain a ethernet MAC address for each one. These host machines may be on the same subnet or they could be on a different subnet behind a router. Its OK if the MAC address of some or all of the remote hosts is the address of the interface on the router. Ultimately, I want to hand off the IP address and MAC address to an FPGA who will use these pieces of information to format and send UDP/IP packets over ethernet to the hosts. Obviously, the FPGA will also be given its own MAC address and IP address to fill in the source MAC and source IP addresses in the packets.

Is there some code I can be pointed to that can create and broadcast ARP packets to these remote machines and receive back the ARP response packets such that the destination MAC addresses can be extracted?

© Stack Overflow or respective owner

Related posts about ethernet

Related posts about arp