This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
// Changed the IP to a.b.c.d InetAddress ad = InetAddress.getByName("a.b.c.d"); ip = ad.getHostAddress(); hn = ad.getHostName();
// ip shows a.b.c.d // hn also shows a.b.c.d instead of the actual host name.
When I am trying to do the nslookup for this a.b.c.d, I can get the DNS entry and displays the host/canonical name
Can you please tell my why it shows IP and how to get the Hostname itself. Also is there a api that I can use to see if the DNS entry for this IP is missing.