You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by te...@apache.org on 2008/11/22 20:39:18 UTC

svn commit: r719900 - in /harmony/enhanced/classlib/trunk/modules/luni/src/main: java/org/apache/harmony/luni/platform/OSNetworkSystem.java native/luni/shared/OSNetworkSystem.c native/luni/shared/OSNetworkSystem.h native/luni/unix/exports.txt

Author: tellison
Date: Sat Nov 22 11:39:18 2008
New Revision: 719900

URL: http://svn.apache.org/viewvc?rev=719900&view=rev
Log:
More tidy-up in OSNetworkSystem.  Method renaming and consolidation.

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/platform/OSNetworkSystem.java
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/OSNetworkSystem.c
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/OSNetworkSystem.h
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/exports.txt

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/platform/OSNetworkSystem.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/platform/OSNetworkSystem.java?rev=719900&r1=719899&r2=719900&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/platform/OSNetworkSystem.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/platform/OSNetworkSystem.java Sat Nov 22 11:39:18 2008
@@ -84,20 +84,30 @@
             int trafficClass, InetAddress inetAddress, int port, int step,
             Long context) throws IOException;
 
-    public void connectStreamWithTimeoutSocket(FileDescriptor aFD, int aport,
+    public native void connectStreamWithTimeoutSocket(FileDescriptor aFD, int aport,
             int timeout, int trafficClass, InetAddress inetAddress)
-            throws IOException {
-        connectStreamWithTimeoutSocketImpl(aFD, aport, timeout, trafficClass,
-                inetAddress);
-    }
+            throws IOException;
 
     public native void bind(FileDescriptor aFD, int port,
             InetAddress inetAddress) throws SocketException;
 
-    public boolean bind2(FileDescriptor aFD, int port, boolean bindToDevice,
-            InetAddress inetAddress) throws SocketException {
-        return socketBindImpl2(aFD, port, bindToDevice, inetAddress);
-    }
+    /**
+     * Bind the socket to the port/localhost in the IP stack.
+     * 
+     * @param fd
+     *            the socket descriptor
+     * @param port
+     *            the option selector
+     * @param bindToDevice
+     *            bind the socket to the specified interface
+     * @param inetAddress
+     *            address to connect to.
+     * @return if bind successful
+     * @exception SocketException
+     *                thrown if bind operation fails
+     */
+    public native boolean bind2(FileDescriptor fd, int port, boolean bindToDevice,
+            InetAddress inetAddress) throws SocketException;
 
     public native void accept(FileDescriptor fdServer, SocketImpl newSocket,
             FileDescriptor fdnewSocket, int timeout) throws IOException;
@@ -224,20 +234,54 @@
      */
     public native void disconnectDatagram(FileDescriptor fd) throws SocketException;
 
-    public void createMulticastSocket(FileDescriptor aFD,
-            boolean preferIPv4Stack) throws SocketException {
-        createMulticastSocketImpl(aFD, preferIPv4Stack);
-    }
+    /**
+     * Answer the result of attempting to create a multicast socket in the IP
+     * stack. Any special options required for server sockets will be set by
+     * this method.
+     * 
+     * @param aFD
+     *            the socket FileDescriptor
+     *            @param preferIPv4Stack if use IPV4
+     * @exception SocketException
+     *                if an error occurs while creating the socket
+     */
+    public native void createMulticastSocket(FileDescriptor aFD,
+            boolean preferIPv4Stack) throws SocketException;
 
-    public void createServerStreamSocket(FileDescriptor aFD,
-            boolean preferIPv4Stack) throws SocketException {
-        createServerStreamSocketImpl(aFD, preferIPv4Stack);
-    }
+    /**
+     * Answer the result of attempting to create a server stream socket in the
+     * IP stack. Any special options required for server sockets will be set by
+     * this method.
+     * 
+     * @param aFD
+     *            the socket FileDescriptor @param preferIPv4Stack if use IPV4
+     * @exception SocketException
+     *                if an error occurs while creating the socket
+     */
+    public native void createServerStreamSocket(FileDescriptor aFD,
+            boolean preferIPv4Stack) throws SocketException;
 
-    public int receiveStream(FileDescriptor aFD, byte[] data, int offset,
-            int count, int timeout) throws IOException {
-        return receiveStreamImpl(aFD, data, offset, count, timeout);
-    }
+    /**
+     * Receive at most <code>count</code> bytes into the buffer
+     * <code>data</code> at the <code>offset</code> on the socket.
+     * 
+     * @param aFD
+     *            the socket FileDescriptor
+     * @param data
+     *            the receive buffer
+     * @param offset
+     *            the offset into the buffer
+     * @param count
+     *            the max number of bytes to receive
+     * @param timeout
+     *            the max time the read operation should block waiting for data
+     * @return int the actual number of bytes read
+     * @throws IOException
+     * @throws SocketException
+     *             if an error occurs while reading
+     */
+    public native int receiveStream(FileDescriptor aFD, byte[] data, int offset,
+            int count, int timeout) throws IOException;
 
     public int sendStream(FileDescriptor fd, byte[] data, int offset, int count)
             throws IOException {
@@ -266,15 +310,11 @@
         acceptStreamSocketImpl(fdServer, newSocket, fdnewSocket, timeout);
     }
 
-    public void createStreamSocket(FileDescriptor aFD, boolean preferIPv4Stack)
-            throws SocketException {
-        createStreamSocketImpl(aFD, preferIPv4Stack);
-    }
+    public native void createStreamSocket(FileDescriptor fd, boolean preferIPv4Stack)
+            throws SocketException;
 
-    public void listenStreamSocket(FileDescriptor aFD, int backlog)
-            throws SocketException {
-        listenStreamSocketImpl(aFD, backlog);
-    }
+    public native void listenStreamSocket(FileDescriptor aFD, int backlog)
+            throws SocketException;
 
     public boolean isReachableByICMP(final InetAddress dest,
             InetAddress source, final int ttl, final int timeout) {
@@ -315,7 +355,7 @@
         }
         int[] flags = new int[countRead + countWrite];
 
-        assert validateFDs(readFDs, writeFDs) : "Invalid file descriptor arrays";
+        assert validateFDs(readFDs, writeFDs) : "Invalid file descriptor arrays"; //$NON-NLS-1$
 
         // handle timeout in native
         result = selectImpl(readFDs, writeFDs, countRead, countWrite, flags,
@@ -350,38 +390,34 @@
         return true;
     }
 
-    public InetAddress getSocketLocalAddress(FileDescriptor aFD,
-            boolean preferIPv6Addresses) {
-        return getSocketLocalAddressImpl(aFD, preferIPv6Addresses);
-    }
+    public native InetAddress getSocketLocalAddress(FileDescriptor fd,
+            boolean preferIPv6Addresses);
 
     /**
      * Query the IP stack for the local port to which this socket is bound.
      * 
      * @param aFD
-     *            the socket descriptor @param preferIPv6Addresses address
-     *            preference for nodes that support both IPv4 and IPv6 @return
-     *            int the local port to which the socket is bound
-     */
-    public int getSocketLocalPort(FileDescriptor aFD,
-            boolean preferIPv6Addresses) {
-        return getSocketLocalPortImpl(aFD, preferIPv6Addresses);
-    }
+     *            the socket descriptor
+     * @param preferIPv6Addresses
+     *            address preference for nodes that support both IPv4 and IPv6
+     * @return the local port to which the socket is bound
+     */
+    public native int getSocketLocalPort(FileDescriptor aFD,
+            boolean preferIPv6Addresses);
 
     /**
      * Query the IP stack for the nominated socket option.
      * 
-     * @param aFD
-     *            the socket descriptor @param opt the socket option type
+     * @param fd
+     *            the socket descriptor
+     * @param opt
+     *            the socket option type
      * @return the nominated socket option value
-     * 
      * @throws SocketException
      *             if the option is invalid
      */
-    public Object getSocketOption(FileDescriptor aFD, int opt)
-            throws SocketException {
-        return getSocketOptionImpl(aFD, opt);
-    }
+    public native Object getSocketOption(FileDescriptor fd, int opt)
+            throws SocketException;
 
     /**
      * Set the nominated socket option in the IP stack.
@@ -393,10 +429,8 @@
      * @throws SocketException
      *             if the option is invalid or cannot be set
      */
-    public void setSocketOption(FileDescriptor aFD, int opt, Object optVal)
-            throws SocketException {
-        setSocketOptionImpl(aFD, opt, optVal);
-    }
+    public native void setSocketOption(FileDescriptor aFD, int opt, Object optVal)
+            throws SocketException;
 
     public native int getSocketFlags();
 
@@ -415,13 +449,6 @@
 
     public native void setInetAddress(InetAddress sender, byte[] address);
 
-    static native void connectStreamWithTimeoutSocketImpl(FileDescriptor aFD,
-            int aport, int timeout, int trafficClass, InetAddress inetAddress)
-            throws IOException;
-
-    static native void listenStreamSocketImpl(FileDescriptor aFD, int backlog)
-            throws SocketException;
-
     static native void sendUrgentDataImpl(FileDescriptor fd, byte value);
 
     /**
@@ -454,19 +481,6 @@
      */
 
     /**
-     * Bind the socket to the port/localhost in the IP stack.
-     * 
-     * @param aFD
-     *            the socket descriptor @param port the option selector @param
-     *            bindToDevice bind the socket to the specified interface @param
-     *            inetAddress address to connect to. @return if bind successful @exception
-     *            SocketException thrown if bind operation fails
-     */
-    static native boolean socketBindImpl2(FileDescriptor aFD, int port,
-            boolean bindToDevice, InetAddress inetAddress)
-            throws SocketException;
-
-    /**
      * Recieve data on the connected socket into the specified buffer. The
      * packet fields <code>data</code> & <code>length</code> are passed in
      * addition to <code>packet</code> to eliminate the JNI field access calls.
@@ -508,50 +522,6 @@
             throws IOException;
 
     /**
-     * Answer the result of attempting to create a server stream socket in the
-     * IP stack. Any special options required for server sockets will be set by
-     * this method.
-     * 
-     * @param aFD
-     *            the socket FileDescriptor @param preferIPv4Stack if use IPV4
-     * @exception SocketException
-     *                if an error occurs while creating the socket
-     */
-    static native void createServerStreamSocketImpl(FileDescriptor aFD,
-            boolean preferIPv4Stack) throws SocketException;
-
-    /**
-     * Answer the result of attempting to create a multicast socket in the IP
-     * stack. Any special options required for server sockets will be set by
-     * this method.
-     * 
-     * @param aFD
-     *            the socket FileDescriptor @param preferIPv4Stack if use IPV4
-     * @exception SocketException
-     *                if an error occurs while creating the socket
-     */
-    static native void createMulticastSocketImpl(FileDescriptor aFD,
-            boolean preferIPv4Stack) throws SocketException;
-
-    /**
-     * Recieve at most <code>count</code> bytes into the buffer
-     * <code>data</code> at the <code>offset</code> on the socket.
-     * 
-     * @param aFD
-     *            the socket FileDescriptor @param data the receive buffer
-     * @param offset
-     *            the offset into the buffer @param count the max number of
-     *            bytes to receive @param timeout the max time the read
-     *            operation should block waiting for data @return int the actual
-     *            number of bytes read
-     * @throws IOException
-     * @exception SocketException
-     *                if an error occurs while reading
-     */
-    static native int receiveStreamImpl(FileDescriptor aFD, byte[] data,
-            int offset, int count, int timeout) throws IOException;
-
-    /**
      * Send <code>count</code> bytes from the buffer <code>data</code> at the
      * <code>offset</code>, on the socket.
      * 
@@ -577,53 +547,10 @@
             SocketImpl newSocket, FileDescriptor fdnewSocket, int timeout)
             throws IOException;
 
-    static native void createStreamSocketImpl(FileDescriptor aFD,
-            boolean preferIPv4Stack) throws SocketException;
-
     static native int selectImpl(FileDescriptor[] readfd,
             FileDescriptor[] writefd, int cread, int cwirte, int[] flags,
             long timeout);
 
-    static native InetAddress getSocketLocalAddressImpl(FileDescriptor aFD,
-            boolean preferIPv6Addresses);
-
-    /**
-     * Query the IP stack for the local port to which this socket is bound.
-     * 
-     * @param aFD
-     *            the socket descriptor @param preferIPv6Addresses address
-     *            preference for nodes that support both IPv4 and IPv6 @return
-     *            int the local port to which the socket is bound
-     */
-    static native int getSocketLocalPortImpl(FileDescriptor aFD,
-            boolean preferIPv6Addresses);
-
-    /**
-     * Query the IP stack for the nominated socket option.
-     * 
-     * @param aFD
-     *            the socket descriptor @param opt the socket option type
-     * @return the nominated socket option value
-     * 
-     * @throws SocketException
-     *             if the option is invalid
-     */
-    static native Object getSocketOptionImpl(FileDescriptor aFD, int opt)
-            throws SocketException;
-
-    /**
-     * Set the nominated socket option in the IP stack.
-     * 
-     * @param aFD
-     *            the socket descriptor @param opt the option selector @param
-     *            optVal the nominated option value
-     * 
-     * @throws SocketException
-     *             if the option is invalid or cannot be set
-     */
-    static native void setSocketOptionImpl(FileDescriptor aFD, int opt,
-            Object optVal) throws SocketException;
-
     native int isReachableByICMPImpl(InetAddress addr, InetAddress local,
             int ttl, int timeout);
 

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/OSNetworkSystem.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/OSNetworkSystem.c?rev=719900&r1=719899&r2=719900&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/OSNetworkSystem.c (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/OSNetworkSystem.c Sat Nov 22 11:39:18 2008
@@ -712,12 +712,12 @@
 
 /*
  * Class:     org_apache_harmony_luni_platform_OSNetworkSystem
- * Method:    listenStreamSocketImpl
+ * Method:    listenStreamSocket
  * Signature: (Ljava/io/FileDescriptor;I)V
  */
 JNIEXPORT void JNICALL
-Java_org_apache_harmony_luni_platform_OSNetworkSystem_listenStreamSocketImpl
-  (JNIEnv * env, jclass thisClz, jobject fileDescriptor, jint backlog)
+Java_org_apache_harmony_luni_platform_OSNetworkSystem_listenStreamSocket
+  (JNIEnv * env, jobject thiz, jobject fileDescriptor, jint backlog)
 {
   PORT_ACCESS_FROM_ENV(env);
   hysocket_t socketP;
@@ -727,14 +727,16 @@
   if (!hysock_socketIsValid(socketP)) {
     throwJavaNetSocketException(env, HYPORT_ERROR_SOCKET_BADSOCKET);
     return;
-  } else {
-    result = hysock_listen(socketP, (I_32) backlog);
-    if (result < 0) {
-      throwJavaNetSocketException(env, result);
-    }
+  }
+
+  result = hysock_listen(socketP, (I_32) backlog);
+  if (result < 0) {
+    throwJavaNetSocketException(env, result);
+    return;
   }
 }
 
+
 /*
  * Class:     org_apache_harmony_luni_platform_OSNetworkSystem
  * Method:    accept
@@ -921,12 +923,12 @@
 
 /*
  * Class:     org_apache_harmony_luni_platform_OSNetworkSystem
- * Method:    socketBindImpl2
+ * Method:    bind2
  * Signature: (Ljava/io/FileDescriptor;IZLjava/net/InetAddress;)Z
  */
 JNIEXPORT jboolean JNICALL
 Java_org_apache_harmony_luni_platform_OSNetworkSystem_socketBindImpl2
-  (JNIEnv * env, jclass thisClz, jobject fileDescriptor, jint localPort,
+  (JNIEnv * env, jobject thiz, jobject fileDescriptor, jint localPort,
    jboolean doDevice, jobject inetAddress)
 {
   PORT_ACCESS_FROM_ENV(env);
@@ -1420,32 +1422,35 @@
 
 /*
  * Class:     org_apache_harmony_luni_platform_OSNetworkSystem
- * Method:    createServerStreamSocketImpl
+ * Method:    createServerStreamSocket
  * Signature: (Ljava/io/FileDescriptor;Z)V
  */
 JNIEXPORT void JNICALL
-Java_org_apache_harmony_luni_platform_OSNetworkSystem_createServerStreamSocketImpl
-  (JNIEnv * env, jclass thisClz, jobject thisObjFD, jboolean preferIPv4Stack)
+Java_org_apache_harmony_luni_platform_OSNetworkSystem_createServerStreamSocket
+  (JNIEnv * env, jobject thiz, jobject thisObjFD, jboolean preferIPv4Stack)
 {
   hysocket_t socketP;
+
   createSocket(env, thisObjFD, HYSOCK_STREAM, preferIPv4Stack);
   socketP =
     (hysocket_t) getJavaIoFileDescriptorContentsAsAPointer(env, thisObjFD);
+
   setDefaultServerSocketOptions(env, socketP);
 }
 
 /*
  * Class:     org_apache_harmony_luni_platform_OSNetworkSystem
- * Method:    createMulticastSocketImpl
+ * Method:    createMulticastSocket
  * Signature: (Ljava/io/FileDescriptor;Z)V
  */
 JNIEXPORT void JNICALL
-Java_org_apache_harmony_luni_platform_OSNetworkSystem_createMulticastSocketImpl
-  (JNIEnv * env, jclass thisClz, jobject thisObjFD, jboolean preferIPv4Stack)
+Java_org_apache_harmony_luni_platform_OSNetworkSystem_createMulticastSocket
+  (JNIEnv * env, jobject thiz, jobject thisObjFD, jboolean preferIPv4Stack)
 {
   PORT_ACCESS_FROM_ENV(env);
   BOOLEAN value = TRUE;
   hysocket_t socketP;
+
   createSocket(env, thisObjFD, HYSOCK_DGRAM, preferIPv4Stack);
   socketP =
     (hysocket_t) getJavaIoFileDescriptorContentsAsAPointer(env, thisObjFD);
@@ -1454,9 +1459,14 @@
   hysock_setopt_bool(socketP, HY_SOL_SOCKET, HY_SO_REUSEADDR, &value);
 }
 
+/*
+ * Class:     org_apache_harmony_luni_platform_OSNetworkSystem
+ * Method:    connectStreamWithTimeoutSocket
+ * Signature: (Ljava/io/FileDescriptor;IIILjava/net/InetAddress;)V
+ */
 JNIEXPORT void JNICALL
-Java_org_apache_harmony_luni_platform_OSNetworkSystem_connectStreamWithTimeoutSocketImpl
-  (JNIEnv * env, jclass thisClz, jobject fileDescriptor, jint remotePort,
+Java_org_apache_harmony_luni_platform_OSNetworkSystem_connectStreamWithTimeoutSocket
+  (JNIEnv * env, jobject thisClz, jobject fileDescriptor, jint remotePort,
    jint timeout, jint trafficClass, jobject inetAddress)
 {
   PORT_ACCESS_FROM_ENV(env);
@@ -1665,8 +1675,8 @@
 }
 
 JNIEXPORT jint JNICALL
-Java_org_apache_harmony_luni_platform_OSNetworkSystem_receiveStreamImpl
-  (JNIEnv * env, jclass thisClz, jobject fileDescriptor, jbyteArray data,
+Java_org_apache_harmony_luni_platform_OSNetworkSystem_receiveStream
+  (JNIEnv * env, jobject thiz, jobject fileDescriptor, jbyteArray data,
    jint offset, jint count, jint timeout)
 {
   PORT_ACCESS_FROM_ENV(env);
@@ -1715,7 +1725,7 @@
   if (0 < result) {
     return (jint) result;
   } else if (0 == result) {
-    return (jint) - 1;
+    return (jint) -1;
   } else {
     throwJavaNetSocketException(env, result);
     return (jint) 0;
@@ -1883,29 +1893,31 @@
 
 /*
  * Class:     org_apache_harmony_luni_platform_OSNetworkSystem
- * Method:    createStreamSocketImpl
+ * Method:    createStreamSocket
  * Signature: (Ljava/io/FileDescriptor;Z)V
  */
 JNIEXPORT void JNICALL
-Java_org_apache_harmony_luni_platform_OSNetworkSystem_createStreamSocketImpl
-  (JNIEnv * env, jclass thisClz, jobject thisObjFD, jboolean preferIPv4Stack)
+Java_org_apache_harmony_luni_platform_OSNetworkSystem_createStreamSocket
+  (JNIEnv * env, jobject thiz, jobject thisObjFD, jboolean preferIPv4Stack)
 {
   hysocket_t socketP;
+
   createSocket(env, thisObjFD, HYSOCK_STREAM, preferIPv4Stack);
   socketP =
     (hysocket_t) getJavaIoFileDescriptorContentsAsAPointer(env, thisObjFD);
+ 
   setPlatformBindOptions(env, socketP);
 }
 
 
 /*
  * Class:     org_apache_harmony_luni_platform_OSNetworkSystem
- * Method:    getSocketLocalAddressImpl
+ * Method:    getSocketLocalAddress
  * Signature: (Ljava/io/FileDescriptor;Z)Ljava/net/InetAddress;
  */
 JNIEXPORT jobject JNICALL
-Java_org_apache_harmony_luni_platform_OSNetworkSystem_getSocketLocalAddressImpl
-  (JNIEnv * env, jclass thisClz, jobject fileDescriptor,
+Java_org_apache_harmony_luni_platform_OSNetworkSystem_getSocketLocalAddress
+  (JNIEnv * env, jobject thiz, jobject fileDescriptor,
    jboolean preferIPv6Addresses)
 {
   PORT_ACCESS_FROM_ENV(env);
@@ -1932,12 +1944,12 @@
 
 /*
  * Class:     org_apache_harmony_luni_platform_OSNetworkSystem
- * Method:    getSocketLocalPortImpl
+ * Method:    getSocketLocalPort
  * Signature: (Ljava/io/FileDescriptor;Z)I
  */
 JNIEXPORT jint JNICALL
-Java_org_apache_harmony_luni_platform_OSNetworkSystem_getSocketLocalPortImpl
-  (JNIEnv * env, jclass thisClz, jobject fileDescriptor,
+Java_org_apache_harmony_luni_platform_OSNetworkSystem_getSocketLocalPort
+  (JNIEnv * env, jobject thiz, jobject fileDescriptor,
    jboolean preferIPv6Addresses)
 {
   PORT_ACCESS_FROM_ENV(env);
@@ -1948,22 +1960,23 @@
   result =
     netGetSockAddr(env, fileDescriptor, &sockaddrP, preferIPv6Addresses);
   if (0 != result) {
-    return (jint) 0;            /* The java spec does not indicate any exceptions on this call */
-  } else {
-    nPort = hysock_sockaddr_port(&sockaddrP);
-    hPort = hysock_ntohs(nPort);
-    return (jint) hPort;
+    /* The java spec does not indicate any exceptions on this call */
+    return (jint) 0;
   }
+
+  nPort = hysock_sockaddr_port(&sockaddrP);
+  hPort = hysock_ntohs(nPort);
+  return (jint) hPort;
 }
 
 /*
  * Class:     org_apache_harmony_luni_platform_OSNetworkSystem
- * Method:    getSocketOptionImpl
+ * Method:    getSocketOption
  * Signature: (Ljava/io/FileDescriptor;I)Ljava/lang/Object;
  */
 JNIEXPORT jobject JNICALL
-Java_org_apache_harmony_luni_platform_OSNetworkSystem_getSocketOptionImpl
-  (JNIEnv * env, jclass thisClz, jobject aFileDescriptor, jint anOption)
+Java_org_apache_harmony_luni_platform_OSNetworkSystem_getSocketOption
+  (JNIEnv * env, jobject thiz, jobject aFileDescriptor, jint anOption)
 {
   PORT_ACCESS_FROM_ENV(env);
   hysocket_t hysocketP;

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/OSNetworkSystem.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/OSNetworkSystem.h?rev=719900&r1=719899&r2=719900&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/OSNetworkSystem.h (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/OSNetworkSystem.h Sat Nov 22 11:39:18 2008
@@ -151,11 +151,11 @@
 
 /*
  * Class:     org_apache_harmony_luni_platform_OSNetworkSystem
- * Method:    connectStreamWithTimeoutSocketImpl
+ * Method:    connectStreamWithTimeoutSocket
  * Signature: (Ljava/io/FileDescriptor;IIILjava/net/InetAddress;)V
  */
-JNIEXPORT void JNICALL Java_org_apache_harmony_luni_platform_OSNetworkSystem_connectStreamWithTimeoutSocketImpl
-  (JNIEnv *, jclass, jobject, jint, jint, jint, jobject);
+JNIEXPORT void JNICALL Java_org_apache_harmony_luni_platform_OSNetworkSystem_connectStreamWithTimeoutSocket
+  (JNIEnv *, jobject, jobject, jint, jint, jint, jobject);
 
 /*
  * Class:     org_apache_harmony_luni_platform_OSNetworkSystem
@@ -167,11 +167,11 @@
 
 /*
  * Class:     org_apache_harmony_luni_platform_OSNetworkSystem
- * Method:    listenStreamSocketImpl
+ * Method:    listenStreamSocket
  * Signature: (Ljava/io/FileDescriptor;I)V
  */
-JNIEXPORT void JNICALL Java_org_apache_harmony_luni_platform_OSNetworkSystem_listenStreamSocketImpl
-  (JNIEnv *, jclass, jobject, jint);
+JNIEXPORT void JNICALL Java_org_apache_harmony_luni_platform_OSNetworkSystem_listenStreamSocket
+  (JNIEnv *, jobject, jobject, jint);
 
 /*
  * Class:     org_apache_harmony_luni_platform_OSNetworkSystem
@@ -223,11 +223,11 @@
 
 /*
  * Class:     org_apache_harmony_luni_platform_OSNetworkSystem
- * Method:    socketBindImpl2
+ * Method:    bind2
  * Signature: (Ljava/io/FileDescriptor;IZLjava/net/InetAddress;)Z
  */
-JNIEXPORT jboolean JNICALL Java_org_apache_harmony_luni_platform_OSNetworkSystem_socketBindImpl2
-  (JNIEnv *, jclass, jobject, jint, jboolean, jobject);
+JNIEXPORT jboolean JNICALL Java_org_apache_harmony_luni_platform_OSNetworkSystem_bind2
+  (JNIEnv *, jobject, jobject, jint, jboolean, jobject);
 
 /*
  * Class:     org_apache_harmony_luni_platform_OSNetworkSystem
@@ -304,27 +304,27 @@
 
 /*
  * Class:     org_apache_harmony_luni_platform_OSNetworkSystem
- * Method:    createServerStreamSocketImpl
+ * Method:    createServerStreamSocket
  * Signature: (Ljava/io/FileDescriptor;Z)V
  */
-JNIEXPORT void JNICALL Java_org_apache_harmony_luni_platform_OSNetworkSystem_createServerStreamSocketImpl
-  (JNIEnv *, jclass, jobject, jboolean);
+JNIEXPORT void JNICALL Java_org_apache_harmony_luni_platform_OSNetworkSystem_createServerStreamSocket
+  (JNIEnv *, jobject, jobject, jboolean);
 
 /*
  * Class:     org_apache_harmony_luni_platform_OSNetworkSystem
- * Method:    createMulticastSocketImpl
+ * Method:    createMulticastSocket
  * Signature: (Ljava/io/FileDescriptor;Z)V
  */
-JNIEXPORT void JNICALL Java_org_apache_harmony_luni_platform_OSNetworkSystem_createMulticastSocketImpl
-  (JNIEnv *, jclass, jobject, jboolean);
+JNIEXPORT void JNICALL Java_org_apache_harmony_luni_platform_OSNetworkSystem_createMulticastSocket
+  (JNIEnv *, jobject, jobject, jboolean);
 
 /*
  * Class:     org_apache_harmony_luni_platform_OSNetworkSystem
- * Method:    receiveStreamImpl
+ * Method:    receiveStream
  * Signature: (Ljava/io/FileDescriptor;[BIII)I
  */
-JNIEXPORT jint JNICALL Java_org_apache_harmony_luni_platform_OSNetworkSystem_receiveStreamImpl
-  (JNIEnv *, jclass, jobject, jbyteArray, jint, jint, jint);
+JNIEXPORT jint JNICALL Java_org_apache_harmony_luni_platform_OSNetworkSystem_receiveStream
+  (JNIEnv *, jobject, jobject, jbyteArray, jint, jint, jint);
 
 /*
  * Class:     org_apache_harmony_luni_platform_OSNetworkSystem
@@ -360,11 +360,11 @@
 
 /*
  * Class:     org_apache_harmony_luni_platform_OSNetworkSystem
- * Method:    createStreamSocketImpl
+ * Method:    createStreamSocket
  * Signature: (Ljava/io/FileDescriptor;Z)V
  */
-JNIEXPORT void JNICALL Java_org_apache_harmony_luni_platform_OSNetworkSystem_createStreamSocketImpl
-  (JNIEnv *, jclass, jobject, jboolean);
+JNIEXPORT void JNICALL Java_org_apache_harmony_luni_platform_OSNetworkSystem_createStreamSocket
+  (JNIEnv *, jobject, jobject, jboolean);
 
 /*
  * Class:     org_apache_harmony_luni_platform_OSNetworkSystem
@@ -384,35 +384,35 @@
 
   /*
  * Class:     org_apache_harmony_luni_platform_OSNetworkSystem
- * Method:    getSocketLocalAddressImpl
+ * Method:    getSocketLocalAddress
  * Signature: (Ljava/io/FileDescriptor;Z)Ljava/net/InetAddress;
  */
-JNIEXPORT jobject JNICALL Java_org_apache_harmony_luni_platform_OSNetworkSystem_getSocketLocalAddressImpl
-  (JNIEnv *, jclass, jobject, jboolean);
+JNIEXPORT jobject JNICALL Java_org_apache_harmony_luni_platform_OSNetworkSystem_getSocketLocalAddress
+  (JNIEnv *, jobject, jobject, jboolean);
 
 /*
  * Class:     org_apache_harmony_luni_platform_OSNetworkSystem
- * Method:    getSocketLocalPortImpl
+ * Method:    getSocketLocalPort
  * Signature: (Ljava/io/FileDescriptor;Z)I
  */
-JNIEXPORT jint JNICALL Java_org_apache_harmony_luni_platform_OSNetworkSystem_getSocketLocalPortImpl
-  (JNIEnv *, jclass, jobject, jboolean);
+JNIEXPORT jint JNICALL Java_org_apache_harmony_luni_platform_OSNetworkSystem_getSocketLocalPort
+  (JNIEnv *, jobject, jobject, jboolean);
 
 /*
  * Class:     org_apache_harmony_luni_platform_OSNetworkSystem
- * Method:    getSocketOptionImpl
+ * Method:    getSocketOption
  * Signature: (Ljava/io/FileDescriptor;I)Ljava/lang/Object;
  */
-JNIEXPORT jobject JNICALL Java_org_apache_harmony_luni_platform_OSNetworkSystem_getSocketOptionImpl
-  (JNIEnv *, jclass, jobject, jint);
+JNIEXPORT jobject JNICALL Java_org_apache_harmony_luni_platform_OSNetworkSystem_getSocketOption
+  (JNIEnv *, jobject, jobject, jint);
 
 /*
  * Class:     org_apache_harmony_luni_platform_OSNetworkSystem
- * Method:    setSocketOptionImpl
+ * Method:    setSocketOption
  * Signature: (Ljava/io/FileDescriptor;ILjava/lang/Object;)V
  */
-JNIEXPORT void JNICALL Java_org_apache_harmony_luni_platform_OSNetworkSystem_setSocketOptionImpl
-  (JNIEnv *, jclass, jobject, jint, jobject);
+JNIEXPORT void JNICALL Java_org_apache_harmony_luni_platform_OSNetworkSystem_setSocketOption
+  (JNIEnv *, jobject, jobject, jint, jobject);
 
 /*
  * Class:     org_apache_harmony_luni_platform_OSNetworkSystem

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/exports.txt
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/exports.txt?rev=719900&r1=719899&r2=719900&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/exports.txt (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/exports.txt Sat Nov 22 11:39:18 2008
@@ -194,16 +194,16 @@
 Java_org_apache_harmony_luni_platform_OSNetworkSystem_setNonBlocking
 Java_org_apache_harmony_luni_platform_OSNetworkSystem_connect
 Java_org_apache_harmony_luni_platform_OSNetworkSystem_connectWithTimeout
-Java_org_apache_harmony_luni_platform_OSNetworkSystem_connectStreamWithTimeoutSocketImpl
+Java_org_apache_harmony_luni_platform_OSNetworkSystem_connectStreamWithTimeoutSocket
 Java_org_apache_harmony_luni_platform_OSNetworkSystem_bind
-Java_org_apache_harmony_luni_platform_OSNetworkSystem_listenStreamSocketImpl
+Java_org_apache_harmony_luni_platform_OSNetworkSystem_listenStreamSocket
 Java_org_apache_harmony_luni_platform_OSNetworkSystem_availableStream
 Java_org_apache_harmony_luni_platform_OSNetworkSystem_accept
 Java_org_apache_harmony_luni_platform_OSNetworkSystem_supportsUrgentData
 Java_org_apache_harmony_luni_platform_OSNetworkSystem_sendUrgentDataImpl
 Java_org_apache_harmony_luni_platform_OSNetworkSystem_connectDatagram
 Java_org_apache_harmony_luni_platform_OSNetworkSystem_disconnectDatagram
-Java_org_apache_harmony_luni_platform_OSNetworkSystem_socketBindImpl2
+Java_org_apache_harmony_luni_platform_OSNetworkSystem_bind2
 Java_org_apache_harmony_luni_platform_OSNetworkSystem_peekDatagram
 Java_org_apache_harmony_luni_platform_OSNetworkSystem_receiveDatagramImpl
 Java_org_apache_harmony_luni_platform_OSNetworkSystem_receiveDatagramDirectImpl
@@ -213,20 +213,20 @@
 Java_org_apache_harmony_luni_platform_OSNetworkSystem_sendDatagramDirectImpl
 Java_org_apache_harmony_luni_platform_OSNetworkSystem_sendConnectedDatagramImpl
 Java_org_apache_harmony_luni_platform_OSNetworkSystem_sendConnectedDatagramDirectImpl
-Java_org_apache_harmony_luni_platform_OSNetworkSystem_createServerStreamSocketImpl
-Java_org_apache_harmony_luni_platform_OSNetworkSystem_createMulticastSocketImpl
-Java_org_apache_harmony_luni_platform_OSNetworkSystem_receiveStreamImpl
+Java_org_apache_harmony_luni_platform_OSNetworkSystem_createServerStreamSocket
+Java_org_apache_harmony_luni_platform_OSNetworkSystem_createMulticastSocket
+Java_org_apache_harmony_luni_platform_OSNetworkSystem_receiveStream
 Java_org_apache_harmony_luni_platform_OSNetworkSystem_sendStreamImpl
 Java_org_apache_harmony_luni_platform_OSNetworkSystem_shutdownInputImpl
 Java_org_apache_harmony_luni_platform_OSNetworkSystem_shutdownOutputImpl
 Java_org_apache_harmony_luni_platform_OSNetworkSystem_acceptStreamSocketImpl
-Java_org_apache_harmony_luni_platform_OSNetworkSystem_createStreamSocketImpl
+Java_org_apache_harmony_luni_platform_OSNetworkSystem_createStreamSocket
 Java_org_apache_harmony_luni_platform_OSNetworkSystem_sendDatagramImpl2
 Java_org_apache_harmony_luni_platform_OSNetworkSystem_selectImpl
-Java_org_apache_harmony_luni_platform_OSNetworkSystem_getSocketLocalAddressImpl
-Java_org_apache_harmony_luni_platform_OSNetworkSystem_getSocketLocalPortImpl
-Java_org_apache_harmony_luni_platform_OSNetworkSystem_getSocketOptionImpl
-Java_org_apache_harmony_luni_platform_OSNetworkSystem_setSocketOptionImpl
+Java_org_apache_harmony_luni_platform_OSNetworkSystem_getSocketLocalAddress
+Java_org_apache_harmony_luni_platform_OSNetworkSystem_getSocketLocalPort
+Java_org_apache_harmony_luni_platform_OSNetworkSystem_getSocketOption
+Java_org_apache_harmony_luni_platform_OSNetworkSystem_setSocketOption
 Java_org_apache_harmony_luni_platform_OSNetworkSystem_getSocketFlags
 Java_org_apache_harmony_luni_platform_OSNetworkSystem_socketClose
 Java_org_apache_harmony_luni_platform_OSNetworkSystem_getHostByAddr