Could you please tell me how to retrieve the machine name using its IP address. I know if I have machine name I can retrieve IP address using gethostbyname but is there any way to retrieve machine name if I have IP address? The problem here is when client connect to server, server will have client IP address but I want to display client's machine name along with IP address. For that I need to get the machine name from IP address. I think there must be some way to get this using DNS lookup but I am not sure,.