Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   C Programming (http://www.velocityreviews.com/forums/f42-c-programming.html)
-   -   inet_pton problem in C (http://www.velocityreviews.com/forums/t806523-inet_pton-problem-in-c.html)

Neha Jain 12-02-2011 12:47 PM

inet_pton problem in C
 
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?

Ben Bacarisse 12-02-2011 01:50 PM

Re: inet_pton problem in C
 
Neha Jain <jneha7575@gmail.com> writes:

> 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.

--
Ben.

Noob 12-02-2011 02:35 PM

Re: inet_pton problem in C
 
Neha Jain wrote:

> I know using inet_pton function we can do it.


inet_pton (presentation to network format) is defined by POSIX.

http://pubs.opengroup.org/onlinepubs...inet_pton.html

For POSIX-related questions, you'll want comp.unix.programmer


All times are GMT. The time now is 02:07 AM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.