Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
function needed to convert hostname to ipaddress
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Duplicate Threads
View previous topic :: View next topic  
Author Message
sankris
n00b
n00b


Joined: 29 Jul 2005
Posts: 2

PostPosted: Fri Aug 05, 2005 6:29 am    Post subject: function needed to convert hostname to ipaddress Reply with quote

Hi ,
I am writing a program for ping that should support both IPv4 and IPv6 .. i wrote the prog as such the dot ( . ) and colon ( :) is searched and variation is found out ...

My question is " if a host name is given , how to convert it in to a ip address " .. Is there any function to convert it .. i am working on windows APIs and VC++ ...

Thanks ,
Chaitanya
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9236
Location: beyond the rim

PostPosted: Fri Aug 05, 2005 6:52 am    Post subject: Reply with quote

Kinda weird to ask about windows APIs on a Linux support forum ...
On Linux it's just a call to gethostbyname.
Back to top
View user's profile Send private message
kallamej
Administrator
Administrator


Joined: 27 Jun 2003
Posts: 4920
Location: Gothenburg, Sweden

PostPosted: Fri Aug 05, 2005 7:14 am    Post subject: Reply with quote

Please do not start a new thread on the same topic, bump the old one instead.

Moved from Portage & Programming to Duplicate Threads.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Duplicate Threads All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum