Probably your best bet is to retrieve all the MAC addresses on the LAN segment, and compare them manually.
That's not too difficult to do:
Retrieving IP and MAC addresses for a LAN[
^] shows how - it's in C# rather than C++, but it's all via calls to unmanaged methods, and as such should be simple to convert to C++.