mirror of
http://thekelleys.org.uk/git/dnsmasq.git
synced 2026-10-14 10:29:33 +00:00
0637bcf010e402e8b70bf9d48dfe53bce17531d8
The arp_enumerate() function is extended into a per-family helper arp_enumerate_family(), called sequentially for AF_INET and AF_INET6, allowing the NDP neighbour cache to be enumerated alongside the ARP table. An empty table for either family is treated as vacuous success rather than an error. Both tables are acquired in *BSD via PF_ROUTE sysctl calls that return raw kernel structures; consequently, for IPv6, the sockaddr_in6 peer address extracted from them has an embedded link-local scope ID. This ID is extracted into sin6_scope_id, and bytes 2-3 of the address are then cleared, per the KAME API contract. Signed-off-by: Sagie D.
Languages
C
94.3%
Perl
2.2%
HTML
1.2%
Shell
1%
Makefile
0.6%
Other
0.6%