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

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -