1、 In org.cybergarage.net.HostInterface getNHostAddresses and getHostAddress(int n) ,the two methods, should the following code be added to block invalid ips?
NetworkInterface ni = (NetworkInterface) nis.nextElement();
if(!ni.isUp() || ni.isLoopback() || ni.isVirtual())
{
continue;
}
2、 getNHostAddresses should the obtained ip address be cached ? for use in the methods ( getHostAddress(int n) )