As we finish up our series on IPv6 we look at how .Net applications are effected by IPv6. This specifically deals with applications which are using Microsoft’s Winsock. These will have to be modified to handle both IPv4 and IPv6.

Applications which run under Windows XP with Service Pack 1 will need to implement two sockets, one for each protocol, which are handled separately by the application. But those that run under Windows Vista and later will only need to create one single IPv6 socket which will be able to handle both IPv4 and IPv6.

For existing IPv4 applications, the following modifications should be completed to work with IPv6:

  • Modify data structures and declarations for compatibility with both IPv6 and IPv4.
  • Incorporate IPv6-enabled functions including getaddrinfo() and getnameinfo().
  • Remove hard-coded IPv4 addresses such as the loopback addresses (127.x.x.x), and /or other literal strings.
  • Review and modify the user interface to enable display and input of IPv6 information.
  • Check if the application makes use of any underlying protocols, such as RPC that use functions dependent a specific IP-version.
  • The compilation of IPv6 Winsock applications should be done using the flag IPV6STRICT.

Checkv4.exe is a Microsoft utility available to assist developers in preparing their applications to handle IPv6 traffic.

For more information, see IPv6 Guide for Windows Sockets Applications.