Re: regarding getaddrinfo and getnameinfo -- Urgent !

On Aug 5, 9:16 am, Agricolae Maximus <a...@xxxxxxxxxx> wrote:
On Fri, 03 Aug 2007 22:54:21 -0700, amitkeerti wrote:

I was trying to get the corresponding hostname/canonical name for an
IP address.
I tried using both getaddrinfo and getnameinfo, but i am not getting
proper results.

Try "whois"

Experience is that marvelous thing that enables you to
recognize a mistake when you make it again.
-- Anonymous
Registered Linux User No. 306834

I am not looking at a command to do this.
I am looking for code to do this. So API or sequence of APIs which
will do this.
I tried getnameinfo and getaddrinfo. Probably the way I am calling
these 2 functions might be wrong...
can anybody provide me the code?