Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to query IPv6 NDP (neighbor discovery protocol) table for a specific neighbor

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?

like image 613
Tommy Avatar asked Oct 30 '12 19:10

Tommy


1 Answers

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.

like image 93
PherricOxide Avatar answered Oct 05 '22 23:10

PherricOxide