code: @Deprecated
    public static String[] getHosts(String strInterface, String nameserver)
      throws UnknownHostException {
      String[] ips = getIPs(strInterface);
      Vector<String> hosts = new Vector<String>();
      for (int ctr = 0; ctr < ips.length; ctr++)
        try {
          hosts.add(reverseDns(InetAddress.getByName(ips[ctr]),
                               nameserver));
        } catch (Exception e) {
        }
  
      if (hosts.size() == 0)
        return new String[] { InetAddress.getLocalHost().getCanonicalHostName() };
      else
        return hosts.toArray(new String[] {});
    }
docs: Returns all the host names associated by the provided nameserver with the
  address bound to the specified network interface
  
  @param strInterface
  The name of the network interface to query (e.g. eth0)
  @param nameserver
  The DNS host name
  @return A string vector of all host names associated with the IPs tied to
  the specified interface
  @throws UnknownHostException