Appendix B: IP-version Agnostic Source Code

This appendix illustrates a rewritten version of the Simplec.c and Simples.c sample applications that gracefully handles either IPv4 or IPv6.

This code exemplifies the guidelines set forth in this IPv6 guide, and is included to provide source code that has been successfully modified to add support for IPv6. This sample is intentionally simple, but provides a hands-on sample for perusing and reviewing. An IPv4 only version of this source code is provided in Appendix A: IPv4-only Source Code.

By comparing the source code in Appendix A (IPv4 only) and Appendix B (IP-version agnostic), you get a sense of the changes necessary to modify your Windows Sockets application to add support for IPv6.