Convert between IPv4 and IPv6!

Posted on 2005-04-05
Last Modified: 2008-03-17

I need to convert a IPv4 address into an equalent IPv6 address...
Maybe something like "" -> "abcd:ef12::3456:7890"...

You can use the NET-Framework, but Windows API would be better...
Or if you have another solution... please tell it...

Thanks for advance!!!
Question by:ChristopH1987
    LVL 8

    Expert Comment

    Using the correct Winsock2 functions you are able to use IPv4 and IPv6 addresses together, would you like a solution along those lines?

    LVL 8

    Expert Comment

    Well, anyway, what you need to do is get the new PlatformSDK (or if you have VS.NET) and use the Winsock2 API. ["getaddrinfo"]

    Has the proper interface to get an address info in IPv6 structures using the family PF_INET6.

    LVL 2

    Author Comment


    can you please tell me how I can use this routine for AF_INET6... I called it like in the SDK but no address is saved and error 10047 is retuned if I call bind()...

    Thanks for advance
    LVL 1

    Accepted Solution

    PAQed with points (500) refunded

    Community Support Moderator

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
    Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
    The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
    The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now