IPv6 parsing in C
Posted
by The Stig
on Stack Overflow
See other posts from Stack Overflow
or by The Stig
Published on 2010-06-03T00:48:55Z
Indexed on
2010/06/03
0:54 UTC
Read the original article
Hit count: 347
I wanted to know how i can parse an IPv6 address in 'C' and convert it to a 128 bit value? So a hex address like 1:22:333:aaaa:b:c:d:e:f needs to be converted to its 128 bit equivalent binary. The problem is the IP address could be of the type ::2 and its variant since they are valid IPv6 address.
The input is from the keyboard and hence is in ASCII format.
Any suggestions or pointers will be appreciated. Thanks!!!
© Stack Overflow or respective owner