How to find MAC address of a specified IP address ?
I want to develop a program that generate IP packet by using PF_PACKET raw socket. I have to build the frame myself. The problem is I know the IP addresses to put to IP header, but I don't know the corresponding MAC address of the destination IP address to put to Ethernet header. I know the system uses ARP to find out these things, but I don't know how to utilize these functions in my program.
Thank you very much,