Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

GeniX

IPv6

This topic is 6916 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey all, I been doing some network coding for my game. All the address structures that im using (sockaddr and such) leave 4 bytes for the IP address. This is clearly IPv4. What can I do to make my code IPv6 complient? Will I have to rewrite the lot to make it support IPv6? regards, GeniX

Share this post


Link to post
Share on other sites
Advertisement
I''m not sure if using IPv6 is worth the trouble, because there are very little systems that actually come with a IPv6 stack. Stacks are availble, but I guess there are not many people (esp. on Win9x) that have it installed.

First of all, you''ll need a socket interface that supports IPv6. Then, instead of using the standard address and protocol family names, you''ll need to use AF_INET6 and PF_INET6. The socket address structure to use is sockaddr_in6. The IPv6 address structure (in6_addr) supports 128 bits addresses.
You can use IPv4 addresses when using the IPv6 socket interface by putting the IPv4 address in the lower 32 bits of the IPv6 address. The high-order 96 bits should contain 0:0:0:0:0:FFFF, so the address looks like :FFFF:<IPv4-address>.

Anyway, for more info on the basic socket interface extensions for IPv6, check RFC2553 (see ftp://ftp.isi.edu/in-notes/rfc2553.txt).

Hope this helps,

Erik

Share this post


Link to post
Share on other sites
Thanks :-)

Sounds easy enough, but unfortunately (as I had expected) it means that it will require quite a few modifications to my current code.


I just wanted to know because within the next 5 years or so it would appear that companies (M$ and others) want to phase in IPv6... so I figured if it wasnt much trouble, I could jump on the bandwagon early...



regards,

GeniX

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!