Easiest way to get MAC address from a (non-local) IP address in IPv4

后端 未结 3 1981
一生所求
一生所求 2021-01-25 12:15

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

3条回答
  •  悲哀的现实
    2021-01-25 12:32

    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.

提交回复
热议问题