I am using Linux and trying to figure out how to query (via an API) the NDP table for a specific entry. The only example I have found so far (in the source for iproute2) uses Netlink and gets the entire table. Is there a way to query Netlink for a specific IPv6 addr on a specific interface? Or is there a different way than using Netlink that I should be going about doing it?
Unfortunately, this isn't possible in the Linux kernel as of version 3.6. There was a patch someone submitted back in 2010 to add such a feature, but it was never merged into the kernel code base. You have to pull the entire neighbor table into user space and then do the searching of it there.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With