I'm trying to get the hostname associated with an IP address on my LAN. I've looked at the solutuon for Need to perform a reverse DNS lookup of a particular IP address in java, which is basically:
InetAddress ia = InetAddress.getByName("192.168.1.3");
System.out.println(ia.getHostName());
The output is:
192.168.1.3
so all it tells me is the address that I provided!
The thing is, if I download an application like Fing onto my phone and run a scan of my network then I can see the hostnames of the devices. Fing must have got that information from somewhere. I'd like to do something similar.
What has Fing been able to do to get this information and how can I do the same?