Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. How to convert IPv6 IP Address to Ipv4 address

How to convert IPv6 IP Address to Ipv4 address

Scheduled Pinned Locked Moved C / C++ / MFC
linuxjsontutorial
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    singh_nav
    wrote on last edited by
    #1

    Hi all, If i check the IP address of any machine then it shows the following notation of IP in case of IPv4 "127.0.0.1" And in case of Ipv6 "fe80::198:8ad2:22fe:2bff8%4" Is there any API or C function or any logic to convert IPv6 address to IPv4 Address for window and linux. Thanks

    D 1 Reply Last reply
    0
    • S singh_nav

      Hi all, If i check the IP address of any machine then it shows the following notation of IP in case of IPv4 "127.0.0.1" And in case of Ipv6 "fe80::198:8ad2:22fe:2bff8%4" Is there any API or C function or any logic to convert IPv6 address to IPv4 Address for window and linux. Thanks

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      singh_nav wrote:

      Is there any API or C function or any logic to convert IPv6 address to IPv4 Address for window and linux.

      Only to a limited degree. See here for more. The operative sentence is, "Obviously, that's impossible, since IPv6 has a larger address space... Your technique will only work on IPv4-mapped IPv6 addresses".

      "Love people and use things, not love things and use people." - Unknown

      "The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups