Is there an easy way to get a MAC address of a machine connected to my app via a TCP/IPv4 socket?
Or in more general terms:
If I have the IP address, what is the best way to get the corresponding MAC address in IPv4?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It is the ARP table’s job to keep that information. The best thing to do would be to read it out of there.
You might consider reading the answers to Query ARP cache to get MAC ID. The questioner was using Java, but otherwise its your identical question.