Unix Programming - Getting client DNS Name

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > May 2005 > Getting client DNS Name





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Getting client DNS Name
Xarky

2005-05-04, 7:50 am

Hi,

I am writing a small client/server program with the aid of sockets. I
require to get the DNS name of the client from the server.

What method should I use?
Thanks in Advance
Alex Fraser

2005-05-04, 7:50 am

"Xarky" <bernardpace@yahoo.com> wrote in message
news:bc42e1a.0505040022.259d11d0@posting.google.com...
> I am writing a small client/server program with the aid of sockets. I
> require to get the DNS name of the client from the server.
>
> What method should I use?


Get the client address from accept() or getpeername(), then use
gethostbyaddr() (or getaddrinfo() I guess, but I'm not too familiar with
it).

Alex


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com