ARP

This regarding the implementation of ARP in C++.
Here we are working on a networking application, where we know the IP address of the host, we would like to know how to get the Mac address of the system. The platform if Linux. In windows we have SendARP() API, which gives us the mac address, where as in Linux we do not have any corresponding System call.I tried crating the ARP packet and using RAW socket sending the Packet using sendto() socket call. But i do not know how to get the Mac address back. Will i get in the sendTo() call itself or i do have to do some other call to collect the ARP response? Please help me to solve this issue. It would be good if you can give the some code snippet.

Thanks in advance.
Adarsh
All of the low-level Unix commands on Linux are open source, including, unsurprisingly, the "arp" command.

Use the source, Luke!
closed account (S6k9GNh0)
http://linux.die.net/man/7/arp

Linux is indeed bad with documentation. It automatically apologizes but none the less, doesn't care.
Last edited on
Topic archived. No new replies allowed.