|
When printing all addresses of LivePacketDevice.AllLocalMachine I've noticed that the IPv6 address is displayed as:
0000:0000:0000:80FE:0000:0000:0000:0000
where is should be:
fe80::6984:f0d6:1aa:483f
I think the problem might be in the following function:
IpV6SocketAddress::IpV6SocketAddress(sockaddr *address)
: SocketAddress(address->sa_family)
{
sockaddr_in6* ipV6Address = (struct sockaddr_in6 *)address;
unsigned long *value = reinterpret_cast<unsigned long *>(ipV6Address->sin6_addr.u.Byte);
_address = IpV6Address(UInt128(*value, *(value+1)));
}
where UInt128's constructor expects 2 parameters of 64-bit length, but in fact receives 2 parameters of 32-bit length which are implicitly casted to c# ulong.
When looking at ipV6Address variable it seems it holds the correct value.
|