add some ipv6 stuff
This commit is contained in:
parent
041ab0034f
commit
bfad6a3193
|
@ -14,10 +14,14 @@ public class NetFlags {
|
||||||
|
|
||||||
public static final String ANY_ADDR = "0.0.0.0";
|
public static final String ANY_ADDR = "0.0.0.0";
|
||||||
|
|
||||||
|
public static final String ANY_ADDR_V6 = "::";
|
||||||
|
|
||||||
public static final String LOOPBACK_HOSTNAME = "localhost";
|
public static final String LOOPBACK_HOSTNAME = "localhost";
|
||||||
|
|
||||||
public static final String LOOPBACK_ADDRESS = "127.0.0.1";
|
public static final String LOOPBACK_ADDRESS = "127.0.0.1";
|
||||||
|
|
||||||
|
public static final String LOOPBACK_ADDRESS_V6 = "::1";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* interface is up
|
* interface is up
|
||||||
*/
|
*/
|
||||||
|
@ -165,4 +169,11 @@ public class NetFlags {
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean isAnyAddress(String address) {
|
||||||
|
return
|
||||||
|
(address == null) ||
|
||||||
|
address.equals(ANY_ADDR) ||
|
||||||
|
address.equals(ANY_ADDR_V6);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue