tags:

views:

164

answers:

4

Hi All,

I have a network application that I need to convert so that it works for ipv6 network. Could you please let me know what I need to do (replace socket APIs)?

One more thing, how can I test my application?

Thanks.

+3  A: 

The core socket system calls are protocol neutral. You will need to use AF_INET6 instead of the standard AF_INET address family, as well as PF_INET6, sockaddr_in6 and others when appropriate.

I'd suggest having a read through the "ipv6" man page or the "socket interface extensions for ipv6" RFC: http://www.ietf.org/rfc/rfc3493.txt

Similar and possibly relevant question: http://stackoverflow.com/questions/915914/is-ipv6-backward-compatable-with-ipv4

akent
Don't forget to change all your data structures too: e.g. sockaddr_in6 in place of sockaddr_in.
ephemient
Thanks for your reply.
ebaccount
A: 

For testing, you can create a bunch of virtual machines with Microsoft Virtual PC (or similar) and test the app between them - you can easily put them on a private network where they can only see each other.

Aric TenEyck
Thanks for your reply. Can I make a test bed with Windows Vista enabling the ipv6 support? I think it should work, right?
ebaccount
Yup. You can create Vista machines and configure them however you want - including pure-ipv6 if you're so inclined.
Aric TenEyck
+1  A: 

3rd edition of "Unix Network Programming" has numerous examples and a whole chapter in IPv4/IPv6 interoperability.

Nikolai N Fetissov
A: 

Take a look at http://gsyc.escet.urjc.es/~eva/IPv6-web/ipv6.html - it is a rather comprehensive resource, and has some useful references to RFCs.

For the testing considerations, if your application will be dualstack, consider the following failure scenario: the IPv6 traffic may blackholed for various reasons, an example scenario being the user who uses 6to4 anycast tunneling but their traffic to/from 192.99.88.1 (anycast 6to4 relay address) is dropped. Try to test this case and ensure the application falls back gracefully without destroying the user experience, this will save a few support calls later.

(NB: I am talking specifically about blackholing because in the case of the "normal" errors like a routing problem the error will usually be returned rather fast. So you might consider putting inbetween the hosts some kind of router that you could configure to silently drop the packets)

Andrew Y