c - Get Ip address of a local device from its Mac address -
i have local device connected router , can access mac address through existing code. how can find ip address of device using mac address in c?
"arp" might providing details, need ip address independent protocol.
if requirements allow make use of arp indirectly (that is, relying on standard networking behavior rather coding arp queries yourself)...
your best answer find mac address in local arp cache, exposed in /proc/net/arp
. of course, there's going data there device if host has seen traffic on network.
this answer has suggestions dealing situation: basically, run sort of network scan generate traffic every ip address on network, , mine local arp table answer.
Comments
Post a Comment