0

where can i find NDP table in linux?

  1. I'm trying to list the neigbours for the ipv6 address for my appliaction.
  2. ip neigh is the command which we use to show the neigh ip address (both ipv4 and ipv6)but i dont want use the system command.
  3. where ARP table for ipv6 also known as NDP

1 Answers1

0

On Linux, the neighbour cache is available via netlink (specifically NETLINK_ROUTE), as is nearly all network configuration.

To get all neighbour records, send a Netlink message nlmsg_type=RTM_GETNEIGH to the kernel; see the iproute2 (ip neigh) source code for more information. You'll probably want to use a library for netlink communications, as the raw structures are a bit cumbersome.

If you're writing Python, pyroute2 can help.

There is no corresponding /proc file for this. (The ones that do exist in /proc are basically leftovers from previous era – new ones aren't being added.)

u1686_grawity
  • 426,297
  • 64
  • 894
  • 966