Winsock - Bind IPv6 client socket to non-private\temporary IP address?
Bit of a stretch, does Microsoft support https://datatracker.ietf.org/doc/html/rfc5014
RFC 5014
With windows socket programming?
So, SLAAC configured devices will end up with a "public" IP and several temporary "privacy" ip addresses. By default, outbound connections are made bound to the temporary IPs - ie for web browsing - those IPs expire frequently.
What if you want to bind to the public IP, as is would be useful in a p2p application?
Do I have to resort to WMI\CIM to query something like MSFT_NetRoutefor the default route, and their IP addresses and expiration times, or an API call like GetBestRoute, GetAdaptersAddresses?
RFC 5014 solves for it cleanest with setsockopt() on other OSes that support it, you just set an option that the app prefers to use the public address.
I don't see IPV6_PREFER_SRC_PUBLIC listed here
https://learn.microsoft.com/en-us/windows/win32/winsock/ipproto-ipv6-socket-options