Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > inet_pton problem in C

Reply
Thread Tools

inet_pton problem in C

 
 
Neha Jain
Guest
Posts: n/a
 
      12-02-2011
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?
 
Reply With Quote
 
 
 
 
Ben Bacarisse
Guest
Posts: n/a
 
      12-02-2011
Neha Jain <> 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.
 
Reply With Quote
 
 
 
 
Noob
Guest
Posts: n/a
 
      12-02-2011
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Question : inet_pton joao C Programming 3 12-07-2011 10:48 PM
Expanding IPv6 address using inet_pton Roxy Natal C Programming 1 12-06-2011 04:36 PM
Problem problem problem :( Need Help Mike ASP General 2 05-11-2004 08:36 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57