Re: How can I translate IP to hostname in C

2008-05-22 Thread Oliver Fromme
Bjoern A. Zeeb wrote: > John Timony wrote: > > I am writing a c program in FreeBSD,and I can not > > translate a ip to hostname > > ,i wonder if there is a function to take this job... > > You mean like gethostbyaddr()? gethostbyaddr() is considered obsolete, I think. You should use getaddr

Re: How can I translate IP to hostname in C

2008-05-22 Thread Bernd Walter
On Thu, May 22, 2008 at 07:30:45PM +0100, Bruce Cran wrote: > John Timony wrote: > >Hi,guys > > > >I am writing a c program in FreeBSD,and I can not > >translate a ip to hostname > >,i wonder if there is a function to take this job... > > > > You could use gethostbyaddr(3), but those traditional f

Re: How can I translate IP to hostname in C

2008-05-22 Thread Bernd Walter
On Thu, May 22, 2008 at 04:14:46PM +, Bjoern A. Zeeb wrote: > On Thu, 22 May 2008, John Timony wrote: > > Hi, > > >I am writing a c program in FreeBSD,and I can not > >translate a ip to hostname > >,i wonder if there is a function to take this job... > > You mean like gethostbyaddr()? > > S

Re: How can I translate IP to hostname in C

2008-05-22 Thread Bruce Cran
John Timony wrote: Hi,guys I am writing a c program in FreeBSD,and I can not translate a ip to hostname ,i wonder if there is a function to take this job... You could use gethostbyaddr(3), but those traditional functions have been replaced with more flexible versions such as getnameinfo(3) o

Re: How can I translate IP to hostname in C

2008-05-22 Thread Bjoern A. Zeeb
On Thu, 22 May 2008, John Timony wrote: Hi, I am writing a c program in FreeBSD,and I can not translate a ip to hostname ,i wonder if there is a function to take this job... You mean like gethostbyaddr()? See also http://www.unixguide.net/network/socketfaq/2.24.shtml for further inspiration

How can I translate IP to hostname in C

2008-05-22 Thread John Timony
Hi,guys I am writing a c program in FreeBSD,and I can not translate a ip to hostname ,i wonder if there is a function to take this job... s.o.s -Fabonacc ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/