IPv6 Transition Implementation Draft
Implementation Stages
Stage 1:
- Discuss and agree to the native changes required to our code. As a basis
for this discussion, I would suggest the list of changes pulled
together from Microsoft's IPv6 scan tool, the division of tasks
lists (below), as well as the Linux and Windows sample code.
- Investigate the build changes that will be required for
this. My Visual C++ 6 (the latest service release) does not seem to
include support for IPv6, and it's unclear to whether this is true in
general. This suggests that Intel might need to move our native build
environment to VS2k3 in order to support IPv6.
Stage 2:
- Deploy build environment changes (if needed) to support
IPv6 that were identified in stage 1.
- Smoke test AC w/ updated build environment (if needed).
- Rewrite native/Java socket code to move it from using IPv4-only
API, to using IPv4/IPv6 agnostic API code (e.g. using sockaddr_storage
rather than sockaddr_in, using getnameinfo/getaddrinfo rather than
gethostbyname/gethostbyaddr, etc). However, only the function calls
should change: at this stage, we should not implement any changes to
the code that are not merely API translations + simple changes to
support those translations.
- Investigate which IPv4/IPv6 equipment combinations we need
to support.
- Investigate network equipment for testing.
- Developers begin investigating their code and note any IPv6
changes that require more than just API translation + simple changes
(e.g. changes to code logic, rather than merely changes to
code form. For instance, adding additional XML commands to
support changed IP address formats, updating existing XML
commands, adding additional Hyades commands to the Hyades protocol to
support IP addresses of more than 4 byte, etc.). However as noted, they
should not begin making these changes until stage 4.
- At the end of this stage we should have an updated and
working AC that uses the IPv4/IPv6 agnostic socket API code only.
Stage 3:
- Test updated AC w/ our standard test environment to ensure
it continues to work w/ the updated socket code (that is, with the
IPv4->IPv6 API translation changes.)
- Test IPv4 functionality with updated AC on two dual
stack windows machines.
- Deploy network equipment for IPv6.
- At the end of this stage we should have tested the AC, and have fixed any identified bugs.
Stage 4:
- Developers implement remaining changes in the code, that is, the the tasks identified in stage 1 that were larger than merely API translation.
- At the end of this stage IPv6 code changes should be complete.
Stage 5:
- Test final AC w/ dual IPv4/IPV6 (confirmed to work during
stage 3).
- Test final AC w/ the expected support IPv4/IPv6
combinations that were identified in stage 1.
IPv6 Native Code Changes
I've amalgamated and summarized the results of running Microsoft's IPv6
scan on our source. For details, see the scan results that I've
included in the ZIP file, and the sample Windows/Linux code.
Microsoft's recommendations are:
- Replace sockaddr_in with sockaddr_storage
- Replace inet_addr with getaddrinfo(...). (using the
AI_NUMERICHOST constant. See sample code)
- Replace gethostbyname with getaddrinfo
- Replace hostent with addrinfo
- Replace AF_INET with code that checks both AF_INET and
AF_INET6. See MS/Linux code for details.
- Replace in_addr with code that checks both in_addr and
in6_addr.
- Replace inet_ntoa(..) with getnameinfo (with NI_NUMERICHOST
flag, which is cross-platform)
- Replace gethostbyaddr with getnameinfo (with NI_NUMERICHOST
flag)
- Replace INADDR_ANY, "use getaddrinfo with nodename=NULL and
AI_PASSIVE instead"
All of the recommendations above use ANSI C API, and thus should work
on both Linux and Windows without platform-specific #ifdefs. The sample
code I've included follows these guidelines for both Linux and Windows,
however, the code uses platform-specific references in a few places
that would need to be #ifdef-ed/replaced.
Division of Tasks (Java)
Generally, Intel will transition the Java Execution Framework code (org.eclipse.tptp.platform.execution), and IBM will transition the Java Hyades code (org.eclipse.hyades.execution) as well as the TPTP GUI code.
Division of Tasks (C/C++)
Generally, for other projects not listed below, Intel will transition the native TPTP AC code, and IBM will transition the native Hyades AC code (including Client Compatibility Layer).
Of the files listed by the IPv6 scan, Intel would make changes to the following projects (and all supporting projects):
transportSupport:
- TransportSupportSocket.c, TransportSupport.c, TransportOSCalls_win.c, TransportOSCalls_linux.c
socketTL:
TPTPLogUtils:
client:
- TPTP_INetAddress.cpp
- TCPDataServer.cpp
- ConnectionImpl.cpp
(And the various include files for the above that are in \include\tptp)
Of the files listed by the IPv6 scan, IBM would make changes to the following projects (and all supporting projects):
TPTPClientCompTL:
- ClientCTL.c
- nativeFileServer.c
RASocket
Across Multiple Projects:
-
Additional changes required to support IPv6 with the addition of new Hyades binary commands.
(And the various include files for the above that are in \include\tptp)
Reference URLs
Here are some excellent IPv6 resources for Java, C, Linux and Windows.
IPv6 Guide for Windows Socket Applications
(http://msdn2.microsoft.com/en-us/library/ms738649.aspx)
IPv6 for Microsoft Windows: Frequently Asked Questions
(http://www.microsoft.com/technet/network/ipv6/ipv6faq.mspx)
Sample Windows C code for an IPv4/IPv6 agnostic client/server
(http://msdn2.microsoft.com/en-us/library/ms737535(VS.85).aspx)
Linux IPv6 HOWTO
(http://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/html_single/Linux+IPv6-HOWTO.html#AEN384)
Porting applications to IPv6 HowTo
(http://jungla.dit.upm.es/~ecastro/IPv6-web/ipv6.html)
Java Networking IPv6 Guide
(http://java.sun.com/j2se/1.5.0/docs/guide/net/ipv6_guide/index.html)