I want to list all the devices connected to my network, I done like this
InetAddress i = InetAddress.getLocalHost();
byte[] ip1 = i.getAddress();
for (int b = 0; b <255;b++) {
ip1[3] = (byte)b;
InetAddress address = InetAddress.getByAddress(ip1);
if (address.isReachable(3000)) {
System.out.println("\tIP :"+address.getHostAddress());
} else if (!address.getHostAddress().equals(address.getHostName())) {
System.out.println("\tIP :"+address.getHostAddress());
} else {
}
}
It prints all the connected devices but how to I identify which are wired connection and which are wireless, among them