summaryrefslogtreecommitdiff
path: root/vm
diff options
context:
space:
mode:
authorGary Benson <gbenson@redhat.com>2006-09-08 08:59:56 +0000
committerGary Benson <gbenson@redhat.com>2006-09-08 08:59:56 +0000
commit0ae878b1c7ebd515bdd68de62adfc848e07b12d9 (patch)
tree0a8b7a6c25dd02b73995b92059f75729224162dc /vm
parentea6df337f9f6bc1fefb78e5d2ebce16593e3b6e9 (diff)
downloadclasspath-0ae878b1c7ebd515bdd68de62adfc848e07b12d9.tar.gz
2006-09-08 Gary Benson <gbenson@redhat.com>
* java/net/InetAddress.java (inaddr_any): Removed. (ANY_IF, LOCALHOST): Create using getByAddress. (<init>): Updated javadoc. (getHostName): Cache hostname even if the lookup failed. (getByAddress): Create Inet4Address objects when passed IPv4-mapped IPv6 addresses. (aton): Removed. (getAllByName): Create address objects using getByAddress. Do not perform security checks unless actually required. Do not strip whitespace from the hostname. (getInaddrAny): Removed. (getLocalHost): Return the loopback address if getByName throws a SecurityException. (readResolve): Updated javadoc. * vm/reference/java/net/VMInetAddress.java (aton): Declared. * include/java_net_VMInetAddress.h (Java_java_net_VMInetAddress_aton): Likewise. * native/jni/java-net/java_net_VMInetAddress.c (Java_java_net_VMInetAddress_aton): New method. * native/jni/native-lib/cpnet.h (cpnet_aton): Declared. * native/jni/native-lib/cpnet.c (cpnet_aton): New method. * configure.ac (AC_CHECK_FUNCS): Checks for cpnet_aton. * java/net/Inet4Address.java (writeReplace): Updated javadoc. * NEWS: Added note about updated VM interface.
Diffstat (limited to 'vm')
-rw-r--r--vm/reference/java/net/VMInetAddress.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/vm/reference/java/net/VMInetAddress.java b/vm/reference/java/net/VMInetAddress.java
index 19f5d7d34..a99c216b9 100644
--- a/vm/reference/java/net/VMInetAddress.java
+++ b/vm/reference/java/net/VMInetAddress.java
@@ -84,4 +84,14 @@ class VMInetAddress implements Serializable
*/
public static native byte[][] getHostByName(String hostname)
throws UnknownHostException;
+
+ /**
+ * Return the IP address represented by a literal address.
+ * Will return null if the literal address is not valid.
+ *
+ * @param address the name of the host
+ *
+ * @return The IP address as a byte array
+ */
+ public static native byte[] aton(String address);
}