public static String[] getIPsForDevice(String dn) {
		try {
			Vector<String> list = new Vector<String>();
			NetworkInterface nif = NetworkInterface.getByName(dn);
			Enumeration<InetAddress> ips = nif.getInetAddresses();

			while (ips.hasMoreElements()) {
				InetAddress current_ip = ips.nextElement();

				if ((current_ip instanceof Inet4Address)
						|| (current_ip instanceof Inet4Address)) {
					//System.out.println(nif.getDisplayName() + "->"
					//		+ current_ip.getHostAddress());
					list.add(current_ip.getHostAddress());
				}
			}

			if (list.size() > 0) {
				String ret[] = new String[list.size()];
				for (int i = 0; i < list.size(); i++) {
					ret[i] = list.get(i);
					//System.out.println("ret: " + ret[i]);
				}

				return ret;
			}

		} catch (Exception e) {

		}

		return new String[0];
	}