Fing-like network scanning c++
<p>We're working on a network scanning feature similar to Fing. We need to discover network devices available on LAN and get their IP and MAC addresses.
Our current implementation is based on the ARP-table monitoring. So we just get the ARP table every fixed amount of time and then compare current ARP table with the previous one to find added and removed devices. This method works, but it's not perfect since there can be a big delay between the moment when the device is connected to LAN and the moment of ARP table update.  </p>

<p>So we would like to improve current implementation. Our idea is to get a range of the IP addresses of LAN (we know the subnet mask) and then we can use SendARP() for each IP-address of the range. This will update the ARP table so we can keep using the original method. And this should work fine for IPv4 networks. But what should we do with the IPv6 networks? </p>

<p>Actually we have several ideas for IPv6 scanning but we are not sure, so your help, guys, will be really appreciated:</p>

<ol>
<li>We can ping the address ff02::1. In theory IPv6 devices should respond when we ping this broadcast address, but it looks like it will depend on the device settings. And I'm not sure that this will force the update of the Windows ARP table.</li>
<li>Try to use Network Discovery Protocol which seems as alternative to ARP for IPv4. But I could not find any API for Windows that allows to use NDP easily.</li>
</ol>

<p>So my questions are:</p>

<ol>
<li>Will the SendArp() work fine if we'll use it as described above?</li>
<li>Is there a way to force the ARP table update in IPv6 networks? </li>
</ol>

<p>Thanks in advance,</p>

<p>Vitaly</p>