I'm trying to monitor my ARP table in linux using c++ and so far the only solution I have is polling the /proc/net/arp every interval and compare to the previous state.
Can I use netlink sockets in order to receive events from the kernel on these changes?
I have look around and cannot find a straight answer, I found tolls like ip-monitor but didn't found out how they get this data.
If netlink socket cannot provide this information, is there any other way to extract this with events and not polling?