inet_pton problem in C

N

Neha Jain

hello every body,

My term project based on IPv6 address incrementation using C
language.I already done that part.But in case IPv6 there is lots of
other format exist.
If i have ipv6 address like ::FFFF then my output becomes
0000:0000:0000:0000:0000:0000:0000:FFFF
or if my address is - 1233:6534:7651:abcd::FFFF
so out put will - 1233:6534:7651:abcd:0000:0000:0000:FFFF
I know using inet_pton function we can do it.But somehow I can't
manage.
can any body help me?
 
B

Ben Bacarisse

Neha Jain said:
My term project based on IPv6 address incrementation using C
language.I already done that part.But in case IPv6 there is lots of
other format exist.
If i have ipv6 address like ::FFFF then my output becomes
0000:0000:0000:0000:0000:0000:0000:FFFF
or if my address is - 1233:6534:7651:abcd::FFFF
so out put will - 1233:6534:7651:abcd:0000:0000:0000:FFFF
I know using inet_pton function we can do it.But somehow I can't
manage.
can any body help me?

There are two problems here. First, I don't see a problem. What is it
that you can't manage? The second problem is that there is no code.
Since English is not you first language, your best bet is to post what
you have been able to write, and say what it should do that it doesn't
(or what it does that it shouldn't).

inet_pton and inet_ntop are not standard C functions, so problems that
are specific to them are not topical here, but I think it is likely that
your main problem is actually a C one, so post the code.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,132
Latest member
TeresaWcq1
Top