Hello everyone, I looking into a good way (stable and compatible with large number of distros) to get the arp/nd cache from kernel to user space, for both IP4 and IP6.
It seem IOCTL (SIOCGARP) can't do that, you can only get MAC address from provided IP address. But IOCTL can't give the the full arp/nd table. The other option is the Netlink interface. I tried it and I got the ARP/ND table :). The third option is using /proc/net/arp, which only restricted to IP4. There is command line utilities that I excluding in my case. Is there another way to do it? what is the best way in my case? Thank you all.