Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

Because IPv6 and IPv4 will coexist on the Internet, network applications and devices must run without modification and be able to communicate with both IPv4 and IPv6 nodes.

You can add IPv6 capability and still retain IPv4 functionality. Because IPv6 addresses are much larger than IPv4 addresses, you must, when adding IPv6 functionality, ensure that your application defines properly sized data structures. Structures that are hard-coded to store an IPv4 address will cause problems in your application.

The best approach to ensure that your structures are properly sized is to use the SOCKADDR_STORAGEstructure. This structure does not rely on a specific IP address version.

For information about creating an application that works with both IPv4 and IPv6, see the document titled IPv6 Guide for Windows Sockets Applications at this Microsoft Web site . This document contains complete, working examples of a simple Windows Sockets application that has been modified to support both IPv6 and IPv4.

For general IPv6 information, go to this Microsoft Web site , and then search for "Microsoft Windows IPv6."

See Also