harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r383845 [3/3] - in /incubator/harmony/enhanced/classlib/trunk: modules/luni/src/main/java/com/ibm/platform/ modules/luni/src/main/java/com/ibm/platform/struct/ modules/nio/src/main/java/com/ibm/platform/ modules/nio/src/main/java/com/ibm/pl...
Date Tue, 07 Mar 2006 11:29:21 GMT
Modified: incubator/harmony/enhanced/classlib/trunk/native-src/linux.IA32/luni/libhyluni.exp
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/native-src/linux.IA32/luni/libhyluni.exp?rev=383845&r1=383844&r2=383845&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/native-src/linux.IA32/luni/libhyluni.exp (original)
+++ incubator/harmony/enhanced/classlib/trunk/native-src/linux.IA32/luni/libhyluni.exp Tue Mar  7 03:29:14 2006
@@ -179,5 +179,88 @@
 		Java_java_util_TimeZone_getCustomTimeZone;
 		JNI_OnLoad;
 		JNI_OnUnload;
+		Java_com_ibm_platform_OSFileSystem_truncateImpl;
+		Java_com_ibm_platform_OSFileSystem_getPageSize;
+		Java_com_ibm_platform_OSFileSystem_writevImpl;
+		Java_com_ibm_platform_OSFileSystem_readvImpl;
+		Java_com_ibm_platform_OSFileSystem_writeImpl;
+		Java_com_ibm_platform_OSFileSystem_openImpl;	
+		Java_com_ibm_platform_OSFileSystem_readDirectImpl;
+		Java_com_ibm_platform_OSFileSystem_writeDirectImpl;
+		Java_com_ibm_platform_OSFileSystem_readImpl;
+		Java_com_ibm_platform_OSFileSystem_seekImpl;
+		Java_com_ibm_platform_OSFileSystem_fflushImpl;
+		Java_com_ibm_platform_OSFileSystem_closeImpl;
+		Java_com_ibm_platform_OSFileSystem_lockImpl;
+		Java_com_ibm_platform_OSFileSystem_unlockImpl;
+		Java_com_ibm_platform_OSFileSystem_transferImpl;
+		Java_com_ibm_platform_OSMemory_isLoadedImpl;
+		Java_com_ibm_platform_OSMemory_loadImpl;
+		Java_com_ibm_platform_OSMemory_mmapImpl;
+		Java_com_ibm_platform_OSMemory_unmapImpl;
+		Java_com_ibm_platform_OSMemory_flushImpl;
+		Java_com_ibm_platform_OSMemory_isLittleEndianImpl;
+		Java_com_ibm_platform_OSMemory_getPointerSizeImpl;
+		Java_com_ibm_platform_OSMemory_getAddress;
+		Java_com_ibm_platform_OSMemory_setAddress;
+		Java_com_ibm_platform_OSMemory_malloc;
+		Java_com_ibm_platform_OSMemory_free;
+		Java_com_ibm_platform_OSMemory_memmove;
+		Java_com_ibm_platform_OSMemory_memset;
+		Java_com_ibm_platform_OSMemory_getByteArray;
+		Java_com_ibm_platform_OSMemory_setByteArray;
+		Java_com_ibm_platform_OSMemory_getByte;
+		Java_com_ibm_platform_OSMemory_setByte;
+		Java_com_ibm_platform_OSMemory_getShort;
+		Java_com_ibm_platform_OSMemory_setShort;
+		Java_com_ibm_platform_OSMemory_getInt;
+		Java_com_ibm_platform_OSMemory_setInt;
+		Java_com_ibm_platform_OSMemory_getLong;
+		Java_com_ibm_platform_OSMemory_setLong;
+		Java_com_ibm_platform_OSMemory_getFloat;
+		Java_com_ibm_platform_OSMemory_setFloat;
+		Java_com_ibm_platform_OSMemory_getDouble;
+		Java_com_ibm_platform_OSMemory_setDouble;
+		Java_com_ibm_platform_OSNetworkSystem_createSocketImpl;
+		Java_com_ibm_platform_OSNetworkSystem_createDatagramSocketImpl;
+		Java_com_ibm_platform_OSNetworkSystem_readSocketImpl;
+		Java_com_ibm_platform_OSNetworkSystem_writeSocketImpl;
+		Java_com_ibm_platform_OSNetworkSystem_setNonBlockingImpl;
+		Java_com_ibm_platform_OSNetworkSystem_connectSocketImpl;
+		Java_com_ibm_platform_OSNetworkSystem_connectWithTimeoutSocketImpl;
+		Java_com_ibm_platform_OSNetworkSystem_connectStreamWithTimeoutSocketImpl;
+		Java_com_ibm_platform_OSNetworkSystem_socketBindImpl;
+		Java_com_ibm_platform_OSNetworkSystem_listenStreamSocketImpl;
+		Java_com_ibm_platform_OSNetworkSystem_availableStreamImpl;
+		Java_com_ibm_platform_OSNetworkSystem_acceptSocketImpl;
+		Java_com_ibm_platform_OSNetworkSystem_supportsUrgentDataImpl;
+		Java_com_ibm_platform_OSNetworkSystem_sendUrgentDataImpl;
+		Java_com_ibm_platform_OSNetworkSystem_connectDatagramImpl2;
+		Java_com_ibm_platform_OSNetworkSystem_disconnectDatagramImpl;
+		Java_com_ibm_platform_OSNetworkSystem_socketBindImpl2;
+		Java_com_ibm_platform_OSNetworkSystem_peekDatagramImpl;
+		Java_com_ibm_platform_OSNetworkSystem_receiveDatagramImpl;
+		Java_com_ibm_platform_OSNetworkSystem_recvConnectedDatagramImpl;
+		Java_com_ibm_platform_OSNetworkSystem_sendDatagramImpl;
+		Java_com_ibm_platform_OSNetworkSystem_sendConnectedDatagramImpl;
+		Java_com_ibm_platform_OSNetworkSystem_createServerStreamSocketImpl;
+		Java_com_ibm_platform_OSNetworkSystem_createMulticastSocketImpl;
+		Java_com_ibm_platform_OSNetworkSystem_receiveStreamImpl;
+		Java_com_ibm_platform_OSNetworkSystem_sendStreamImpl;
+		Java_com_ibm_platform_OSNetworkSystem_shutdownInputImpl;
+		Java_com_ibm_platform_OSNetworkSystem_shutdownOutputImpl;
+		Java_com_ibm_platform_OSNetworkSystem_acceptStreamSocketImpl;
+		Java_com_ibm_platform_OSNetworkSystem_createStreamSocketImpl;
+		Java_com_ibm_platform_OSNetworkSystem_sendDatagramImpl2;
+		Java_com_ibm_platform_OSNetworkSystem_selectImpl;
+		Java_com_ibm_platform_OSNetworkSystem_getSocketLocalAddressImpl;
+		Java_com_ibm_platform_OSNetworkSystem_getSocketLocalPortImpl;
+		Java_com_ibm_platform_OSNetworkSystem_getSocketOptionImpl;
+		Java_com_ibm_platform_OSNetworkSystem_setSocketOptionImpl;
+		Java_com_ibm_platform_OSNetworkSystem_getSocketFlagsImpl;
+		Java_com_ibm_platform_OSNetworkSystem_socketCloseImpl;
+		Java_com_ibm_platform_OSNetworkSystem_getHostByAddrImpl;
+		Java_com_ibm_platform_OSNetworkSystem_getHostByNameImpl;
+		Java_com_ibm_platform_OSNetworkSystem_setInetAddressImpl;
 	local : *;
 };

Modified: incubator/harmony/enhanced/classlib/trunk/native-src/linux.IA32/luni/makefile
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/native-src/linux.IA32/luni/makefile?rev=383845&r1=383844&r2=383845&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/native-src/linux.IA32/luni/makefile (original)
+++ incubator/harmony/enhanced/classlib/trunk/native-src/linux.IA32/luni/makefile Tue Mar  7 03:29:14 2006
@@ -28,7 +28,9 @@
 	$(SHAREDSUB)proxy.o $(SHAREDSUB)netif.o process.o bigint.o \
 	$(SHAREDSUB)osc.o socket.o inetadds.o $(SHAREDSUB)pssimpl.o \
 	$(SHAREDSUB)filedesc.o $(SHAREDSUB)timezone.o $(SHAREDSUB)pmsimpl.o \
-	pdsimpl.o $(SHAREDSUB)fileos.o
+	pdsimpl.o $(SHAREDSUB)fileos.o \
+	$(SHAREDSUB)OSFileSystem.o OSFileSystemLinux32.o \
+	OSMemory.o OSMemoryLinux32.o OSNetworkSystem.o
 
 MDLLIBFILES = \
 	../lib/libhycommon.a ../libhysig.so ../lib/libhyzip.a ../libhyzlib.so \

Modified: incubator/harmony/enhanced/classlib/trunk/native-src/linux.IA32/luni/nethelp.c
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/native-src/linux.IA32/luni/nethelp.c?rev=383845&r1=383844&r2=383845&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/native-src/linux.IA32/luni/nethelp.c (original)
+++ incubator/harmony/enhanced/classlib/trunk/native-src/linux.IA32/luni/nethelp.c Tue Mar  7 03:29:14 2006
@@ -56,6 +56,9 @@
 void throwJavaNetSocketException (JNIEnv * env, I_32 errorNumber);
 I_32 netGetSockAddr (JNIEnv * env, jobject fileDescriptor,
                      hysockaddr_t sockaddrP, jboolean preferIPv6Addresses);
+jfieldID getJavaNetInetAddressIpaddress(JNIEnv * env);
+void setJavaIoFileDescriptorContents (JNIEnv * env, jobject fd, void *value);
+
 
 /**
  * Set the exception state of the VM with a new java.lang.IllegalArgumentException.
@@ -1292,4 +1295,51 @@
   /* clear any exception that might have occured */
   (*env)->ExceptionClear (env);
 
+}
+
+jfieldID
+getJavaNetInetAddressIpaddress(JNIEnv * env){
+  jfieldID fid;
+  jclass lookupClass = (*env)->FindClass (env, "java/net/InetAddress");
+  if (!lookupClass)
+    return NULL;
+  fid = (*env)->GetFieldID (env, lookupClass, "ipaddress", "[B");
+  if (!fid)
+    return NULL;
+  return fid;
+}
+
+void
+setJavaIoFileDescriptorContents (JNIEnv * env, jobject fd,
+                                          void *value)
+{
+  jfieldID fid = getJavaIoFileDescriptorDescriptorFID (env);
+  if (NULL != fid)
+    {
+      (*env)->SetLongField (env, fd, fid, (jlong) value);
+    }
+}
+
+//Alternative Select function
+int 
+selectRead (JNIEnv * env,hysocket_t hysocketP, I_32 uSecTime, BOOLEAN accept){
+  PORT_ACCESS_FROM_ENV (env);
+  hytimeval_struct timeP;
+  hyfdset_t fdset_read;
+  I_32 result = 0;
+  I_32 size = 0;
+  if (0 <= uSecTime)
+    hysock_timeval_init (0, uSecTime, &timeP);
+
+  fdset_read = hymem_allocate_memory(sizeof (struct hyfdset_struct));
+  FD_ZERO (&fdset_read->handle);
+  FD_SET (hysocketP->sock, &fdset_read->handle);
+  size =hysocketP->sock + 1;
+
+  if (0 <= uSecTime)
+    result = hysock_select (size, fdset_read, NULL, NULL,&timeP);  
+  else
+    result = hysock_select (size, fdset_read, NULL, NULL,NULL);  
+  hymem_free_memory(fdset_read);
+  return result;
 }

Modified: incubator/harmony/enhanced/classlib/trunk/native-src/linux.IA32/nio/libhynio.exp
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/native-src/linux.IA32/nio/libhynio.exp?rev=383845&r1=383844&r2=383845&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/native-src/linux.IA32/nio/libhynio.exp (original)
+++ incubator/harmony/enhanced/classlib/trunk/native-src/linux.IA32/nio/libhynio.exp Tue Mar  7 03:29:14 2006
@@ -1,87 +1,3 @@
 HYNIO_0.1 {
-	global :
-		Java_com_ibm_platform_OSFileSystem_truncateImpl;
-		Java_com_ibm_platform_OSFileSystem_getPageSize;
-		Java_com_ibm_platform_OSFileSystem_writevImpl;
-		Java_com_ibm_platform_OSFileSystem_readvImpl;
-		Java_com_ibm_platform_OSFileSystem_writeImpl;
-		Java_com_ibm_platform_OSFileSystem_openImpl;	
-		Java_com_ibm_platform_OSFileSystem_readDirectImpl;
-		Java_com_ibm_platform_OSFileSystem_writeDirectImpl;
-		Java_com_ibm_platform_OSFileSystem_readImpl;
-		Java_com_ibm_platform_OSFileSystem_seekImpl;
-		Java_com_ibm_platform_OSFileSystem_fflushImpl;
-		Java_com_ibm_platform_OSFileSystem_closeImpl;
-		Java_com_ibm_platform_OSFileSystem_lockImpl;
-		Java_com_ibm_platform_OSFileSystem_unlockImpl;
-		Java_com_ibm_platform_OSFileSystem_transferImpl;
-		Java_com_ibm_platform_OSMemory_isLoadedImpl;
-		Java_com_ibm_platform_OSMemory_loadImpl;
-		Java_com_ibm_platform_OSMemory_mmapImpl;
-		Java_com_ibm_platform_OSMemory_unmapImpl;
-		Java_com_ibm_platform_OSMemory_flushImpl;
-		Java_com_ibm_platform_OSMemory_isLittleEndianImpl;
-		Java_com_ibm_platform_OSMemory_getPointerSizeImpl;
-		Java_com_ibm_platform_OSMemory_getAddress;
-		Java_com_ibm_platform_OSMemory_setAddress;
-		Java_com_ibm_platform_OSMemory_malloc;
-		Java_com_ibm_platform_OSMemory_free;
-		Java_com_ibm_platform_OSMemory_memmove;
-		Java_com_ibm_platform_OSMemory_memset;
-		Java_com_ibm_platform_OSMemory_getByteArray;
-		Java_com_ibm_platform_OSMemory_setByteArray;
-		Java_com_ibm_platform_OSMemory_getByte;
-		Java_com_ibm_platform_OSMemory_setByte;
-		Java_com_ibm_platform_OSMemory_getShort;
-		Java_com_ibm_platform_OSMemory_setShort;
-		Java_com_ibm_platform_OSMemory_getInt;
-		Java_com_ibm_platform_OSMemory_setInt;
-		Java_com_ibm_platform_OSMemory_getLong;
-		Java_com_ibm_platform_OSMemory_setLong;
-		Java_com_ibm_platform_OSMemory_getFloat;
-		Java_com_ibm_platform_OSMemory_setFloat;
-		Java_com_ibm_platform_OSMemory_getDouble;
-		Java_com_ibm_platform_OSMemory_setDouble;
-		Java_com_ibm_platform_OSNetworkSystem_createSocketImpl;
-		Java_com_ibm_platform_OSNetworkSystem_createDatagramSocketImpl;
-		Java_com_ibm_platform_OSNetworkSystem_readSocketImpl;
-		Java_com_ibm_platform_OSNetworkSystem_writeSocketImpl;
-		Java_com_ibm_platform_OSNetworkSystem_setNonBlockingImpl;
-		Java_com_ibm_platform_OSNetworkSystem_connectSocketImpl;
-		Java_com_ibm_platform_OSNetworkSystem_connectWithTimeoutSocketImpl;
-		Java_com_ibm_platform_OSNetworkSystem_connectStreamWithTimeoutSocketImpl;
-		Java_com_ibm_platform_OSNetworkSystem_socketBindImpl;
-		Java_com_ibm_platform_OSNetworkSystem_listenStreamSocketImpl;
-		Java_com_ibm_platform_OSNetworkSystem_availableStreamImpl;
-		Java_com_ibm_platform_OSNetworkSystem_acceptSocketImpl;
-		Java_com_ibm_platform_OSNetworkSystem_supportsUrgentDataImpl;
-		Java_com_ibm_platform_OSNetworkSystem_sendUrgentDataImpl;
-		Java_com_ibm_platform_OSNetworkSystem_connectDatagramImpl2;
-		Java_com_ibm_platform_OSNetworkSystem_disconnectDatagramImpl;
-		Java_com_ibm_platform_OSNetworkSystem_socketBindImpl2;
-		Java_com_ibm_platform_OSNetworkSystem_peekDatagramImpl;
-		Java_com_ibm_platform_OSNetworkSystem_receiveDatagramImpl;
-		Java_com_ibm_platform_OSNetworkSystem_recvConnectedDatagramImpl;
-		Java_com_ibm_platform_OSNetworkSystem_sendDatagramImpl;
-		Java_com_ibm_platform_OSNetworkSystem_sendConnectedDatagramImpl;
-		Java_com_ibm_platform_OSNetworkSystem_createServerStreamSocketImpl;
-		Java_com_ibm_platform_OSNetworkSystem_createMulticastSocketImpl;
-		Java_com_ibm_platform_OSNetworkSystem_receiveStreamImpl;
-		Java_com_ibm_platform_OSNetworkSystem_sendStreamImpl;
-		Java_com_ibm_platform_OSNetworkSystem_shutdownInputImpl;
-		Java_com_ibm_platform_OSNetworkSystem_shutdownOutputImpl;
-		Java_com_ibm_platform_OSNetworkSystem_acceptStreamSocketImpl;
-		Java_com_ibm_platform_OSNetworkSystem_createStreamSocketImpl;
-		Java_com_ibm_platform_OSNetworkSystem_sendDatagramImpl2;
-		Java_com_ibm_platform_OSNetworkSystem_selectImpl;
-		Java_com_ibm_platform_OSNetworkSystem_getSocketLocalAddressImpl;
-		Java_com_ibm_platform_OSNetworkSystem_getSocketLocalPortImpl;
-		Java_com_ibm_platform_OSNetworkSystem_getSocketOptionImpl;
-		Java_com_ibm_platform_OSNetworkSystem_setSocketOptionImpl;
-		Java_com_ibm_platform_OSNetworkSystem_getSocketFlagsImpl;
-		Java_com_ibm_platform_OSNetworkSystem_socketCloseImpl;
-		Java_com_ibm_platform_OSNetworkSystem_getHostByAddrImpl;
-		Java_com_ibm_platform_OSNetworkSystem_getHostByNameImpl;
-		Java_com_ibm_platform_OSNetworkSystem_setInetAddressImpl;
 	local : *;
 };

Modified: incubator/harmony/enhanced/classlib/trunk/native-src/linux.IA32/nio/makefile
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/native-src/linux.IA32/nio/makefile?rev=383845&r1=383844&r2=383845&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/native-src/linux.IA32/nio/makefile (original)
+++ incubator/harmony/enhanced/classlib/trunk/native-src/linux.IA32/nio/makefile Tue Mar  7 03:29:14 2006
@@ -21,9 +21,10 @@
 CFLAGS += -fpic -I$(SHARED)common -I../zlib -I../zip -I../fdlibm
 
 BUILDFILES = \
-	$(SHAREDSUB)nio_copyright.o helpers.o $(SHAREDSUB)OSFileSystem.o \
-	OSFileSystemLinux32.o OSMemory.o OSMemoryLinux32.o nethelp.o \
-	OSNetworkSystem.o socket.o
+	$(SHAREDSUB)nio_copyright.o
+# helpers.o $(SHAREDSUB)OSFileSystem.o \
+#	OSFileSystemLinux32.o OSMemory.o OSMemoryLinux32.o nethelp.o \
+#	OSNetworkSystem.o socket.o
 
 MDLLIBFILES = \
 	../libhysig.so ../lib/libhyzip.a ../libhyzlib.so ../lib/libhycommon.a \

Copied: incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/luni/OSFileSystemWin32.c (from r383844, incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/nio/OSFileSystemWin32.c)
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/luni/OSFileSystemWin32.c?p2=incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/luni/OSFileSystemWin32.c&p1=incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/nio/OSFileSystemWin32.c&r1=383844&r2=383845&rev=383845&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/nio/OSFileSystemWin32.c (original)
+++ incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/luni/OSFileSystemWin32.c Tue Mar  7 03:29:14 2006
@@ -214,14 +214,14 @@
     SOCKET socket;
 	//TODO IPV6
 
-	hysocket_t hysocketP = getJavaIoFileDescriptorContentsAsAPointer(env,sd);
+	hysocket_t hysocketP = getJavaIoFileDescriptorContentsAsPointer(env,sd);
 	if (!hysock_socketIsValid (hysocketP)){
       	printf("not valid socket\n");
     }
 	printf("hysocketP:%p\n",hysocketP);
 	if(hysocketP == NULL)
 	{   
-	printf("Error getJavaIoFileDescriptorContentsAsAPointer!\n");
+	printf("Error getJavaIoFileDescriptorContentsAsPointer!\n");
 	return -1;}
 	
 	socket = (SOCKET)hysocketP->ipv4;

Copied: incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/luni/OSNetworkSystem.c (from r383844, incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/nio/OSNetworkSystem.c)
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/luni/OSNetworkSystem.c?p2=incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/luni/OSNetworkSystem.c&p1=incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/nio/OSNetworkSystem.c&r1=383844&r2=383845&rev=383845&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/nio/OSNetworkSystem.c (original)
+++ incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/luni/OSNetworkSystem.c Tue Mar  7 03:29:14 2006
@@ -20,158 +20,23 @@
 #include "jclprots.h"
 #include "portsock.h"
 #include "socket.h"
+#include "jclglob.h"
 
-
-void setSocketImplPort (JNIEnv * env, jobject socketImpl, U_16 hPort);
-void setSocketImplAddress (JNIEnv * env, jobject socketImpl,
-	 jobject anInetAddress);
-void updateSocket (JNIEnv * env, hysockaddr_t sockaddrP, hysocket_t socketNew,
-       jobject socketImpl, jobject fileDescriptorSocketImpl);
 void * getConnectContext(JNIEnv	*env,jobject longclass);
 void setConnectContext(JNIEnv *env,jobject longclass,U_8 * context);
 
-void setDatagramPacketAddress (JNIEnv *	env, jobject datagramPacket,
-	     jobject anInetAddress);
-void setDatagramPacketPort (JNIEnv * env, jobject datagramPacket, U_16 hPort);
+int selectRead (JNIEnv * env,hysocket_t hysocketP, I_32 uSecTime,
+                BOOLEAN accept);
+void updateSocket (JNIEnv * env, hysockaddr_t sockaddrP, hysocket_t socketNew,
+                   jobject socketImpl, jobject fileDescriptorSocketImpl);
 void updateAddress (JNIEnv * env, hysockaddr_t sockaddrP,
 	jobject	senderAddress);	
 void updatePacket (JNIEnv * env, hysockaddr_t sockaddrP,
        jobject datagramPacket, I_32 bytesRead);	
 void setDatagramPacketLength (JNIEnv * env, jobject datagramPacket,
 	    I_32 length);
-int 
-selectRead (JNIEnv * env,hysocket_t hysocketP, I_32 uSecTime, BOOLEAN accept);
-
-/**
- * A helper method, to set the remote address into the DatagramPacket.
- *
- * @param env		pointer	to the JNI library
- * @param datagramPacket  pointer to the java DatagramPacket object to update
- * @param anInetAddress	  pointer to the java InetAddress to update the	packet with
- *
- */
-
-void
-setDatagramPacketAddress (JNIEnv * env,	jobject	datagramPacket,	
-	jobject	anInetAddress)
-{
-  /*----------------------former cache get/set ----------------------------
-  //jfieldID fid = JCL_CACHE_GET (env, FID_java_net_DatagramPacket_address);
-  */
-  jfieldID fid = getJavaNetDatagramPacketAddress(env);
-  (*env)->SetObjectField (env, datagramPacket, fid, anInetAddress);
-}
-
-/**
- * A helper method, to set the remote port into	the java DatagramPacket.
- *
- * @param env		pointer	to the JNI library
- * @param datagramPacket  pointer to the java DatagramPacket object to update
- * @param hPort		the port value to update the packet with, in host order	
- */
-
-void
-setDatagramPacketPort (JNIEnv *	env, jobject datagramPacket, U_16 hPort)
-{
-  /*----------------------former cache get/set ----------------------------
-  //jfieldID fid = JCL_CACHE_GET (env, FID_java_net_DatagramPacket_port);
-  */
-  jfieldID fid = getJavaNetDatagramPacketPort(env);
-  (*env)->SetIntField (env, datagramPacket, fid, hPort);
-}
-
-/**
- * A helper method, to set the data length into	a java DatagramPacket.
- *
- * @param env		pointer	to the JNI library
- * @param datagramPacket  pointer to the java DatagramPacket object to update
- * @param length	  the length value to update the packet	with
- */
-
-void
-setDatagramPacketLength	(JNIEnv	* env, jobject datagramPacket, I_32 length)
-{
-  /*----------------------former cache get/set ----------------------------
-  //jfieldID fid = JCL_CACHE_GET (env, FID_java_net_DatagramPacket_length);
-  */
-  jfieldID fid = getJavaNetDatagramPacketLength(env);
-  (*env)->SetIntField (env, datagramPacket, fid, length);
-}
-
-/**
- * A helper method, to update the java DatagramPacket argument.	 Used after receiving a	datagram packet, 
- * to update the DatagramPacket	with the network address and port of the sending machine.
- *
- * @param env		pointer	to the JNI library
- * @param sockaddrP	pointer	to the hysockaddr struct with the sending host address & port
- * @param datagramPacket  pointer to the java DatagramPacket object to update
- * @param bytesRead	the bytes read value to	update the packet with
- */
-
-void
-updatePacket (JNIEnv * env, hysockaddr_t sockaddrP, jobject datagramPacket,
-	I_32 bytesRead)	
-{
-  PORT_ACCESS_FROM_ENV (env);
-  jobject anInetAddress;
-  U_16 nPort;
-  U_32 length;
-  U_32 scope_id	= 0;
-  jbyte	byte_array[HYSOCK_INADDR6_LEN];	
-  hysock_sockaddr_address6 (sockaddrP, (U_8 *) byte_array, &length,
-	  &scope_id);
-
-  nPort	= hysock_sockaddr_port (sockaddrP);
-  anInetAddress	=
-    newJavaNetInetAddressGenericB (env,	byte_array, length, scope_id);
-
-  setDatagramPacketAddress (env, datagramPacket, anInetAddress);
-  setDatagramPacketPort	(env, datagramPacket, hysock_ntohs (nPort));
-  setDatagramPacketLength (env,	datagramPacket,	bytesRead);
-}
-
-/**
- * A helper method, to set address of the java InetAddress argument.
- *
- * @param env		pointer	to the JNI library
- * @param sockaddrP	pointer	to the hysockaddr struct containing the	network	address	
- * @param senderAddress	pointer	to the java InetAddress	object to update
- */
-
-void
-updateAddress (JNIEnv *	env, hysockaddr_t sockaddrP, jobject senderAddress)
-{
-  PORT_ACCESS_FROM_ENV (env);
-  jbyte	ipv4Addr[16];
-  U_32 length;
-  U_32 scope_id	= 0;
-  hysock_sockaddr_address6 (sockaddrP, (U_8 *) ipv4Addr, &length, &scope_id);
-  /*-------------- Here is the cache get/set,remain for next change  ---------------
-  
-  //(*env)->SetObjectField (env, senderAddress,	
-  //	  JCL_CACHE_GET	(env,
-  //	     FID_java_net_InetAddress_address),	
-  //	  newJavaByteArray (env, ipv4Addr, length));
-  */
-  (*env)->SetObjectField (env, senderAddress,
-	getJavaNetInetAddressIpaddress(env),
-	newJavaByteArray (env, ipv4Addr, length));
-  if (jcl_supports_ipv6	(env) && (scope_id != 0))
-    {
-      jclass tempClass = getJavaNetInetAddressClass(env);
-      jfieldID fid = NULL;
-
-      fid = (*env)->GetFieldID (env, tempClass,	"scope_id", "I");
-      if ((*env)->ExceptionCheck (env))	
-	{
-	  (*env)->ExceptionClear (env);	
-	}
-      else
-	{
-	  (*env)->SetIntField (env, senderAddress, fid,	scope_id);
-	}
-    }
-}
+jfieldID getJavaNetInetAddressIpaddress(JNIEnv * env);
+void setJavaIoFileDescriptorContents (JNIEnv * env, jobject fd, void *value);
 
 /**
  * A helper method, to set the connect context to a Long object.
@@ -203,77 +68,6 @@
   return  (void	*) ((*env)->GetLongField (env, longclass, descriptorFID));
 };
 
-/**
- * A helper method, to set the remote address into the socketImpl.
- *
- * @param env		pointer	to the JNI library
- * @param socketImpl	  pointer to the java SocketImpl object	to update
- * @param anInetAddress	  pointer to the java InetAddress to update the	socket with
- */
-
-void
-setSocketImplAddress (JNIEnv * env, jobject socketImpl,	jobject	anInetAddress)
-{
-  /*-------------- Here is the cache get/set,remain for next change  ---------------
-  //jfieldID fid = JCL_CACHE_GET (env, FID_java_net_SocketImpl_address);
-  */
-  jfieldID fid = getJavaNetSocketImplAddress(env);
-  (*env)->SetObjectField (env, socketImpl, fid,	anInetAddress);	
-}
-
-/**
- * A helper method, to set the remote port into	the socketImpl.	
- *
- * @param env	      pointer to the JNI library
- * @param socketImpl	pointer	to the java SocketImpl object to update	
- * @param hPort	      the port number, in host order, to update	the socket with	
- */
-
-void
-setSocketImplPort (JNIEnv * env, jobject socketImpl, U_16 hPort)
-{
-  /*----------------------former cache get/set ---------------
-  //jfieldID fid = JCL_CACHE_GET (env, FID_java_net_SocketImpl_port);
-  */
-  jfieldID fid = getJavaNetSocketImplPort( env);
-  (*env)->SetIntField (env, socketImpl,	fid, hPort);
-}
-
-/**
- * A helper method, to update the java SocketImpl argument.  Used after	connecting, to 'link' the 
- * system socket with the java socketImpl and update the address/port fields with the values
- * corresponding to the	remote machine.	
- *
- * @param env			pointer	to the JNI library
- * @param sockaddrP		pointer	to the hysockaddr struct with the remote host address &	port
- * @param socketNew		pointer	to the new hysocket
- * @param socketImpl		  pointer to the new java (connected) socket
- * @param fileDescriptorSocketImpl    pointer to the java file descriptor of the socketImpl
- */
-
-void
-updateSocket (JNIEnv * env,
-	hysockaddr_t sockaddrP,	hysocket_t socketNew,
-	jobject	socketImpl, jobject fileDescriptorSocketImpl)
-{
-  PORT_ACCESS_FROM_ENV (env);
-  U_8 nipAddress[HYSOCK_INADDR6_LEN];
-  U_32 length;
-  jobject anInetAddress;
-  U_16 nPort;
-  U_32 scope_id	= 0;
-
-  hysock_sockaddr_address6 (sockaddrP, nipAddress, &length, &scope_id);	
-  nPort	= hysock_sockaddr_port (sockaddrP);
-  anInetAddress	=
-    newJavaNetInetAddressGenericB (env,	nipAddress, length, scope_id);
-
-  setJavaIoFileDescriptorContents (env,	fileDescriptorSocketImpl,
-	      socketNew);
-  setSocketImplAddress (env, socketImpl, anInetAddress);
-  setSocketImplPort (env, socketImpl, hysock_ntohs (nPort));
-}
-
 /*----------------------former cache get/set ------------------------------------
 /*
  * Class:     com_ibm_platform_OSNetworkSystem
@@ -391,7 +185,7 @@
 #define	INTERNAL_RECEIVE_BUFFER_MAX 2048
   U_8 internalBuffer[INTERNAL_RECEIVE_BUFFER_MAX];
 
-  hysocketP =getJavaIoFileDescriptorContentsAsAPointer (env, fileDescriptor);
+  hysocketP =getJavaIoFileDescriptorContentsAsPointer (env, fileDescriptor);
 
   /*----------------the older form,nearly the same with below------------
   //result = pollSelectRead (env, fileDescriptor, timeout, TRUE);
@@ -490,7 +284,7 @@
   while	(sent <	count)
     {
       socketP =	
-	getJavaIoFileDescriptorContentsAsAPointer (env,	fileDescriptor);
+	getJavaIoFileDescriptorContentsAsPointer (env, fileDescriptor);
       if (!hysock_socketIsValid	(socketP))
 	{
 	  if (message != internalBuffer)
@@ -544,7 +338,7 @@
 	PORT_ACCESS_FROM_ENV (env);
 	hysocket_t socketP;
 	int result;		
-	socketP	=getJavaIoFileDescriptorContentsAsAPointer (env, afd);
+	socketP	=getJavaIoFileDescriptorContentsAsPointer (env, afd);
 	if (!hysock_socketIsValid (socketP))
     	{
     		// return silently, leave validation in real I/O operation      		
@@ -580,7 +374,7 @@
   hysockaddr_struct sockaddrP;
   U_32 scope_id	= 0;
 
-  socketP = getJavaIoFileDescriptorContentsAsAPointer (env, fileDescriptor);
+  socketP = getJavaIoFileDescriptorContentsAsPointer (env, fileDescriptor);
   if (!hysock_socketIsValid (socketP))
     {
       throwJavaNetSocketException (env,	HYPORT_ERROR_SOCKET_BADSOCKET);	
@@ -643,7 +437,7 @@
   U_8 *	context	= NULL;	
   context = getConnectContext(env,passContext);	
   
-  socketP = getJavaIoFileDescriptorContentsAsAPointer (env, fileDescriptor);
+  socketP = getJavaIoFileDescriptorContentsAsPointer (env, fileDescriptor);
 
   if (!hysock_socketIsValid (socketP))
     {
@@ -726,7 +520,7 @@
   hysockaddr_struct sockaddrP;
   U_32 scope_id	= 0;
 
-  socketP = getJavaIoFileDescriptorContentsAsAPointer (env, fileDescriptor);
+  socketP = getJavaIoFileDescriptorContentsAsPointer (env, fileDescriptor);
   if (!hysock_socketIsValid (socketP))
     {
       throwJavaNetSocketException (env,	HYPORT_ERROR_SOCKET_BADSOCKET);	
@@ -774,7 +568,7 @@
   hysocket_t socketP;
   I_32 result;
 
-  socketP = getJavaIoFileDescriptorContentsAsAPointer (env, fileDescriptor);
+  socketP = getJavaIoFileDescriptorContentsAsPointer (env, fileDescriptor);
   if (!hysock_socketIsValid (socketP))
     {
       throwJavaNetSocketException (env,	HYPORT_ERROR_SOCKET_BADSOCKET);	
@@ -804,7 +598,7 @@
 
   I_32 result, flags = 0;
 
-  hysocketP = getJavaIoFileDescriptorContentsAsAPointer	(env, fileDescriptor);
+  hysocketP = getJavaIoFileDescriptorContentsAsPointer (env, fileDescriptor);
   if (!hysock_socketIsValid (hysocketP))
     {
       throwJavaNetSocketException (env,	HYPORT_ERROR_SOCKET_BADSOCKET);	
@@ -866,7 +660,7 @@
     return;
 
   socketS =
-    getJavaIoFileDescriptorContentsAsAPointer (env, fileDescriptorServer);
+    getJavaIoFileDescriptorContentsAsPointer (env, fileDescriptorServer);
   if (!hysock_socketIsValid (socketS))
     {
       throwJavaNetSocketException (env,	HYPORT_ERROR_SOCKET_BADSOCKET);	
@@ -901,7 +695,7 @@
   I_32 flags = 0;
   I_32 result;
 
-  socketP = getJavaIoFileDescriptorContentsAsAPointer (env, fileDescriptor);
+  socketP = getJavaIoFileDescriptorContentsAsPointer (env, fileDescriptor);
   if (!hysock_socketIsValid (socketP))
     {
       return FALSE;
@@ -924,7 +718,7 @@
   I_32 flags = 0;
   I_32 result =	0;
 
-  socketP = getJavaIoFileDescriptorContentsAsAPointer (env, fileDescriptor);
+  socketP = getJavaIoFileDescriptorContentsAsPointer (env, fileDescriptor);
   if (!hysock_socketIsValid (socketP))
     {
       throwJavaNetSocketException (env,	HYPORT_ERROR_SOCKET_BADSOCKET);	
@@ -967,7 +761,7 @@
   hysockaddr_struct sockaddrP;
   U_32 scope_id	= 0;
 
-  socketP = getJavaIoFileDescriptorContentsAsAPointer (env, fileDescriptor);
+  socketP = getJavaIoFileDescriptorContentsAsPointer (env, fileDescriptor);
   if (!hysock_socketIsValid (socketP))
     {
       throwJavaNetSocketException (env,	HYPORT_ERROR_SOCKET_BADSOCKET);	
@@ -1016,7 +810,7 @@
   hysocket_t socketP;
   hysockaddr_struct sockaddrP;
 
-  socketP = getJavaIoFileDescriptorContentsAsAPointer (env, fileDescriptor);
+  socketP = getJavaIoFileDescriptorContentsAsPointer (env, fileDescriptor);
   if (!hysock_socketIsValid (socketP))
     {
       throwJavaNetSocketException (env,	HYPORT_ERROR_SOCKET_BADSOCKET);	
@@ -1064,7 +858,7 @@
 
   /* This method still needs work for IPv6 support */
 
-  socketP = getJavaIoFileDescriptorContentsAsAPointer (env, fileDescriptor);
+  socketP = getJavaIoFileDescriptorContentsAsPointer (env, fileDescriptor);
   if (!hysock_socketIsValid (socketP))
     {
       throwJavaNetSocketException (env,	HYPORT_ERROR_SOCKET_BADSOCKET);	
@@ -1124,7 +918,7 @@
   if (0	> result)
     return (jint) 0;
 
-  hysocketP = getJavaIoFileDescriptorContentsAsAPointer	(env, fileDescriptor);
+  hysocketP = getJavaIoFileDescriptorContentsAsPointer (env, fileDescriptor);
   if (!hysock_socketIsValid (hysocketP))
     {
       throwJavaNetSocketException (env,	HYPORT_ERROR_SOCKET_BADSOCKET);	
@@ -1187,7 +981,7 @@
   if (0	> result)
     return (jint) 0;
 
-  hysocketP = getJavaIoFileDescriptorContentsAsAPointer	(env, fileDescriptor);
+  hysocketP = getJavaIoFileDescriptorContentsAsPointer (env, fileDescriptor);
   if (!hysock_socketIsValid (hysocketP))
     {
       throwJavaNetSocketException (env,	HYPORT_ERROR_SOCKET_BADSOCKET);	
@@ -1267,7 +1061,7 @@
     }
 
   /* get the handle to the socket */
-  hysocketP = getJavaIoFileDescriptorContentsAsAPointer	(env, fileDescriptor);
+  hysocketP = getJavaIoFileDescriptorContentsAsPointer (env, fileDescriptor);
   if (!hysock_socketIsValid (hysocketP))
     {
       throwJavaNetSocketException (env,	HYPORT_ERROR_SOCKET_BADSOCKET);	
@@ -1362,7 +1156,7 @@
   netGetJavaNetInetAddressValue	(env, inetAddress, nhostAddrBytes, &length);
   nPort	= hysock_htons ((U_16) targetPort);
 
-  socketP = getJavaIoFileDescriptorContentsAsAPointer (env, fileDescriptor);
+  socketP = getJavaIoFileDescriptorContentsAsPointer (env, fileDescriptor);
   if (length ==	HYSOCK_INADDR6_LEN)
     {
       netGetJavaNetInetAddressScopeId (env, inetAddress, &scope_id);
@@ -1390,7 +1184,7 @@
   do
     {
       socketP =	
-	getJavaIoFileDescriptorContentsAsAPointer (env,	fileDescriptor);
+	getJavaIoFileDescriptorContentsAsPointer (env, fileDescriptor);
       if (!hysock_socketIsValid	(socketP))
 	{
 	  hymem_free_memory ( message);	
@@ -1460,7 +1254,7 @@
     {
       /* make sure the socket is still valid */	
       socketP =	
-	(hysocket_t) getJavaIoFileDescriptorContentsAsAPointer (env,
+	(hysocket_t) getJavaIoFileDescriptorContentsAsPointer (env,
 	fileDescriptor);
       if (!hysock_socketIsValid	(socketP))
 	{
@@ -1523,7 +1317,7 @@
   hysocket_t socketP;
   createSocket (env, thisObjFD,	HYSOCK_STREAM, preferIPv4Stack);
   socketP =
-    (hysocket_t) getJavaIoFileDescriptorContentsAsAPointer (env, thisObjFD);
+    (hysocket_t) getJavaIoFileDescriptorContentsAsPointer (env, thisObjFD);
   setDefaultServerSocketOptions	(env, socketP);	
 }
 
@@ -1546,7 +1340,7 @@
   hysocket_t socketP;
   createSocket (env, thisObjFD,	HYSOCK_DGRAM, preferIPv4Stack);	
   socketP =
-    (hysocket_t) getJavaIoFileDescriptorContentsAsAPointer (env, thisObjFD);
+    (hysocket_t) getJavaIoFileDescriptorContentsAsPointer (env, thisObjFD);
 
   hysock_setopt_bool (socketP, HY_SOL_SOCKET, HY_SO_REUSEPORT, &value);	
   hysock_setopt_bool (socketP, HY_SOL_SOCKET, HY_SO_REUSEADDR, &value);	
@@ -1587,7 +1381,7 @@
       finishTime = hytime_msec_clock ()	+ (UDATA) timeout;
     }
 
-  socketP = getJavaIoFileDescriptorContentsAsAPointer (env, fileDescriptor);
+  socketP = getJavaIoFileDescriptorContentsAsPointer (env, fileDescriptor);
   if (!hysock_socketIsValid (socketP))
     {
       throwJavaNetSocketException (env,	HYPORT_ERROR_SOCKET_BADSOCKET);	
@@ -1661,7 +1455,7 @@
 	  /* now check if the socket is	still connected.  Do it	here as	some platforms seem to think they 
 	   * are connected if the socket is closed on them. */
 	  socketP =
-	    getJavaIoFileDescriptorContentsAsAPointer (env, fileDescriptor);
+	    getJavaIoFileDescriptorContentsAsPointer (env, fileDescriptor);
 	  if (!hysock_socketIsValid (socketP))
 	    {
 	      hysock_connect_with_timeout (socketP, &sockaddrP,	0,
@@ -1757,7 +1551,7 @@
 	&length);
 
       socketP =	
-	(hysocket_t) getJavaIoFileDescriptorContentsAsAPointer (env,
+	(hysocket_t) getJavaIoFileDescriptorContentsAsPointer (env,
 	fileDescriptor);
       nPort = hysock_htons ((U_16) targetPort);	
       if (length == HYSOCK_INADDR_LEN)
@@ -1785,7 +1579,7 @@
   while	(sent <	msgLength)
     {
       socketP =	
-	(hysocket_t) getJavaIoFileDescriptorContentsAsAPointer (env,
+	(hysocket_t) getJavaIoFileDescriptorContentsAsPointer (env,
 	fileDescriptor);
       if (!hysock_socketIsValid	(socketP))
 	{
@@ -1837,7 +1631,7 @@
   if (0	> result)
     return (jint) 0;
 
-  hysocketP = getJavaIoFileDescriptorContentsAsAPointer	(env, fileDescriptor);
+  hysocketP = getJavaIoFileDescriptorContentsAsPointer (env, fileDescriptor);
   if (!hysock_socketIsValid (hysocketP))
     {
       throwJavaNetSocketException (env,	HYPORT_ERROR_SOCKET_BADSOCKET);	
@@ -1921,7 +1715,7 @@
   while	(sent <	count)
     {
       socketP =	
-	getJavaIoFileDescriptorContentsAsAPointer (env,	fileDescriptor);
+	getJavaIoFileDescriptorContentsAsPointer (env, fileDescriptor);
       if (!hysock_socketIsValid	(socketP))
 	{
 	  if (message != internalBuffer)
@@ -1976,7 +1770,7 @@
   hysocket_t socketP;
 
   socketP =
-    (hysocket_t) getJavaIoFileDescriptorContentsAsAPointer (env,
+    (hysocket_t) getJavaIoFileDescriptorContentsAsPointer (env,
 		 fileDescriptor);
   if (!hysock_socketIsValid (socketP))
     {
@@ -2004,7 +1798,7 @@
   hysocket_t socketP;
 
   socketP =
-    (hysocket_t) getJavaIoFileDescriptorContentsAsAPointer (env,
+    (hysocket_t) getJavaIoFileDescriptorContentsAsPointer (env,
 		 fileDescriptor);
   if (!hysock_socketIsValid (socketP))
     {
@@ -2042,7 +1836,7 @@
     return;
 
   socketS =
-    getJavaIoFileDescriptorContentsAsAPointer (env, fileDescriptorServer);
+    getJavaIoFileDescriptorContentsAsPointer (env, fileDescriptorServer);
   if (!hysock_socketIsValid (socketS))
     {
       throwJavaNetSocketException (env,	HYPORT_ERROR_SOCKET_BADSOCKET);	
@@ -2077,7 +1871,7 @@
   hysocket_t socketP;
   createSocket (env, thisObjFD,	HYSOCK_STREAM, preferIPv4Stack);
   socketP =
-    (hysocket_t) getJavaIoFileDescriptorContentsAsAPointer (env, thisObjFD);
+    (hysocket_t) getJavaIoFileDescriptorContentsAsPointer (env, thisObjFD);
   setPlatformBindOptions (env, socketP);
 }
 
@@ -2160,7 +1954,7 @@
   PORT_ACCESS_FROM_ENV (env);
   hysocket_t hysocketP;	
 
-  hysocketP = getJavaIoFileDescriptorContentsAsAPointer	(env, aFileDescriptor);	
+  hysocketP = getJavaIoFileDescriptorContentsAsPointer (env, aFileDescriptor);	
   if (!hysock_socketIsValid (hysocketP))
     {
       throwJavaNetSocketException (env,	HYPORT_ERROR_SOCKET_BADSOCKET);	
@@ -2221,7 +2015,7 @@
   PORT_ACCESS_FROM_ENV (env);
   hysocket_t hysocketP;	
 
-  hysocketP = getJavaIoFileDescriptorContentsAsAPointer	(env, aFileDescriptor);	
+  hysocketP = getJavaIoFileDescriptorContentsAsPointer (env, aFileDescriptor);	
   if (!hysock_socketIsValid (hysocketP))
     {
       throwJavaNetSocketException (env,	HYPORT_ERROR_SOCKET_BADSOCKET);	
@@ -2331,7 +2125,7 @@
   hysocket_t socketP;
   I_32 result =	0;
 
-  socketP = getJavaIoFileDescriptorContentsAsAPointer (env, fileDescriptor);
+  socketP = getJavaIoFileDescriptorContentsAsPointer (env, fileDescriptor);
   if (hysock_socketIsValid (socketP))
     {
       /* Set the file descriptor before	closing	so the select polling loop will	terminate. */
@@ -2467,11 +2261,13 @@
   (JNIEnv *env,	jobject	thisClz, jobject sender, jbyteArray address){
    PORT_ACCESS_FROM_ENV	(env);
    I_8 * passAddr = NULL;
-   jbyteArray addr_array =    (jbyteArray) ((*env)->GetObjectField (env, getJavaNetInetAddressClass(env),
-	    getJavaNetInetAddressIpaddress(env)));
+   jbyteArray addr_array =
+     (jbyteArray) ((*env)->GetObjectField (env,
+                                           sender,
+                                           JCL_CACHE_GET (env,
+                                                          FID_java_net_InetAddress_address)));
    I_32	length = (*env)->GetArrayLength	(env, address);	
    addr_array =	(*env)->NewByteArray(env, (jsize) length);
    (*env)->GetByteArrayRegion (env, address, 0,	length,	passAddr);
    (*env)->SetByteArrayRegion (env, addr_array,	0, length, passAddr);
 }
-

Copied: incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/luni/OSNetworkSystemWin32.c (from r383844, incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/nio/OSNetworkSystemWin32.c)
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/luni/OSNetworkSystemWin32.c?p2=incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/luni/OSNetworkSystemWin32.c&p1=incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/nio/OSNetworkSystemWin32.c&r1=383844&r2=383845&rev=383845&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/nio/OSNetworkSystemWin32.c (original)
+++ incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/luni/OSNetworkSystemWin32.c Tue Mar  7 03:29:14 2006
@@ -43,7 +43,7 @@
   FD_ZERO (&fdset_write->handle);
   for (val = 0; val<countReadC; val++){
 	  gotFD	= (*env)->GetObjectArrayElement(env,readFDArray,val);
-	  hysocketP = getJavaIoFileDescriptorContentsAsAPointer	(env, gotFD);
+	  hysocketP = getJavaIoFileDescriptorContentsAsPointer (env, gotFD);
 	  if (!hysock_socketIsValid (hysocketP)){
       		continue;
     	  }
@@ -62,7 +62,7 @@
 	}
   for (val = 0; val<countWriteC; val++){
 	  gotFD	= (*env)->GetObjectArrayElement(env,writeFDArray,val);
-	  hysocketP = getJavaIoFileDescriptorContentsAsAPointer	(env, gotFD);
+	  hysocketP = getJavaIoFileDescriptorContentsAsPointer (env, gotFD);
 	  if (!hysock_socketIsValid (hysocketP)){
       		continue;
     	  }
@@ -103,7 +103,7 @@
 	  flagArray = (*env)->GetIntArrayElements(env,outFlags,	&isCopy);
 	  for (val=0;val<countReadC;val++){
 		gotFD =	(*env)->GetObjectArrayElement(env,readFDArray,val);
-		hysocketP = getJavaIoFileDescriptorContentsAsAPointer (env, gotFD);
+		hysocketP = getJavaIoFileDescriptorContentsAsPointer (env, gotFD);
 		if (!hysock_socketIsValid (hysocketP)){
       			continue;
     	  	}
@@ -125,7 +125,7 @@
 		
 	  for (val=0;val<countWriteC;val++){
 		gotFD =	(*env)->GetObjectArrayElement(env,writeFDArray,val);
-		hysocketP = getJavaIoFileDescriptorContentsAsAPointer (env, gotFD);
+		hysocketP = getJavaIoFileDescriptorContentsAsPointer (env, gotFD);
 		if (!hysock_socketIsValid (hysocketP)){
       			continue;
     	  	}

Modified: incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/luni/hyluni.def
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/luni/hyluni.def?rev=383845&r1=383844&r2=383845&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/luni/hyluni.def (original)
+++ incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/luni/hyluni.def Tue Mar  7 03:29:14 2006
@@ -184,4 +184,87 @@
 	Java_java_util_TimeZone_getCustomTimeZone
 	JNI_OnLoad
 	JNI_OnUnload
+	Java_com_ibm_platform_OSFileSystem_truncateImpl
+	Java_com_ibm_platform_OSFileSystem_getPageSize
+	Java_com_ibm_platform_OSFileSystem_writevImpl
+	Java_com_ibm_platform_OSFileSystem_readvImpl
+	Java_com_ibm_platform_OSFileSystem_writeImpl
+	Java_com_ibm_platform_OSFileSystem_openImpl		
+	Java_com_ibm_platform_OSFileSystem_readDirectImpl
+	Java_com_ibm_platform_OSFileSystem_writeDirectImpl
+	Java_com_ibm_platform_OSFileSystem_readImpl
+	Java_com_ibm_platform_OSFileSystem_seekImpl
+	Java_com_ibm_platform_OSFileSystem_fflushImpl
+	Java_com_ibm_platform_OSFileSystem_closeImpl
+	Java_com_ibm_platform_OSFileSystem_lockImpl
+	Java_com_ibm_platform_OSFileSystem_unlockImpl
+	Java_com_ibm_platform_OSFileSystem_transferImpl
+	Java_com_ibm_platform_OSMemory_isLoadedImpl
+	Java_com_ibm_platform_OSMemory_loadImpl
+	Java_com_ibm_platform_OSMemory_mmapImpl
+	Java_com_ibm_platform_OSMemory_unmapImpl
+	Java_com_ibm_platform_OSMemory_flushImpl
+	Java_com_ibm_platform_OSMemory_isLittleEndianImpl
+	Java_com_ibm_platform_OSMemory_getPointerSizeImpl
+	Java_com_ibm_platform_OSMemory_getAddress
+	Java_com_ibm_platform_OSMemory_setAddress
+	Java_com_ibm_platform_OSMemory_malloc
+	Java_com_ibm_platform_OSMemory_free
+	Java_com_ibm_platform_OSMemory_memmove
+	Java_com_ibm_platform_OSMemory_memset
+	Java_com_ibm_platform_OSMemory_getByteArray
+	Java_com_ibm_platform_OSMemory_setByteArray
+	Java_com_ibm_platform_OSMemory_getByte
+	Java_com_ibm_platform_OSMemory_setByte
+	Java_com_ibm_platform_OSMemory_getShort
+	Java_com_ibm_platform_OSMemory_setShort
+	Java_com_ibm_platform_OSMemory_getInt
+	Java_com_ibm_platform_OSMemory_setInt
+	Java_com_ibm_platform_OSMemory_getLong
+	Java_com_ibm_platform_OSMemory_setLong
+	Java_com_ibm_platform_OSMemory_getFloat
+	Java_com_ibm_platform_OSMemory_setFloat
+	Java_com_ibm_platform_OSMemory_getDouble
+	Java_com_ibm_platform_OSMemory_setDouble
+	Java_com_ibm_platform_OSNetworkSystem_createSocketImpl
+	Java_com_ibm_platform_OSNetworkSystem_createDatagramSocketImpl
+	Java_com_ibm_platform_OSNetworkSystem_readSocketImpl
+	Java_com_ibm_platform_OSNetworkSystem_writeSocketImpl
+	Java_com_ibm_platform_OSNetworkSystem_setNonBlockingImpl
+	Java_com_ibm_platform_OSNetworkSystem_connectSocketImpl
+	Java_com_ibm_platform_OSNetworkSystem_connectWithTimeoutSocketImpl
+	Java_com_ibm_platform_OSNetworkSystem_connectStreamWithTimeoutSocketImpl
+	Java_com_ibm_platform_OSNetworkSystem_socketBindImpl
+	Java_com_ibm_platform_OSNetworkSystem_listenStreamSocketImpl
+	Java_com_ibm_platform_OSNetworkSystem_availableStreamImpl
+	Java_com_ibm_platform_OSNetworkSystem_acceptSocketImpl
+	Java_com_ibm_platform_OSNetworkSystem_supportsUrgentDataImpl
+	Java_com_ibm_platform_OSNetworkSystem_sendUrgentDataImpl
+	Java_com_ibm_platform_OSNetworkSystem_connectDatagramImpl2
+	Java_com_ibm_platform_OSNetworkSystem_disconnectDatagramImpl
+	Java_com_ibm_platform_OSNetworkSystem_socketBindImpl2
+	Java_com_ibm_platform_OSNetworkSystem_peekDatagramImpl
+	Java_com_ibm_platform_OSNetworkSystem_receiveDatagramImpl
+	Java_com_ibm_platform_OSNetworkSystem_recvConnectedDatagramImpl
+	Java_com_ibm_platform_OSNetworkSystem_sendDatagramImpl
+	Java_com_ibm_platform_OSNetworkSystem_sendConnectedDatagramImpl
+	Java_com_ibm_platform_OSNetworkSystem_createServerStreamSocketImpl
+	Java_com_ibm_platform_OSNetworkSystem_createMulticastSocketImpl
+	Java_com_ibm_platform_OSNetworkSystem_receiveStreamImpl
+	Java_com_ibm_platform_OSNetworkSystem_sendStreamImpl
+	Java_com_ibm_platform_OSNetworkSystem_shutdownInputImpl
+	Java_com_ibm_platform_OSNetworkSystem_shutdownOutputImpl
+	Java_com_ibm_platform_OSNetworkSystem_acceptStreamSocketImpl
+	Java_com_ibm_platform_OSNetworkSystem_createStreamSocketImpl
+	Java_com_ibm_platform_OSNetworkSystem_sendDatagramImpl2
+	Java_com_ibm_platform_OSNetworkSystem_selectImpl
+	Java_com_ibm_platform_OSNetworkSystem_getSocketLocalAddressImpl
+	Java_com_ibm_platform_OSNetworkSystem_getSocketLocalPortImpl
+	Java_com_ibm_platform_OSNetworkSystem_getSocketOptionImpl
+	Java_com_ibm_platform_OSNetworkSystem_setSocketOptionImpl
+	Java_com_ibm_platform_OSNetworkSystem_getSocketFlagsImpl
+	Java_com_ibm_platform_OSNetworkSystem_socketCloseImpl
+	Java_com_ibm_platform_OSNetworkSystem_getHostByAddrImpl
+	Java_com_ibm_platform_OSNetworkSystem_getHostByNameImpl
+	Java_com_ibm_platform_OSNetworkSystem_setInetAddressImpl
 

Modified: incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/luni/makefile
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/luni/makefile?rev=383845&r1=383844&r2=383845&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/luni/makefile (original)
+++ incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/luni/makefile Tue Mar  7 03:29:14 2006
@@ -34,11 +34,13 @@
   luniglob.obj $(SHAREDSUB)proxy.obj $(SHAREDSUB)netif.obj process.obj \
   bigint.obj $(SHAREDSUB)osc.obj socket.obj inetadds.obj \
   $(SHAREDSUB)pssimpl.obj $(SHAREDSUB)filedesc.obj $(SHAREDSUB)timezone.obj \
-  $(SHAREDSUB)pmsimpl.obj pdsimpl.obj $(SHAREDSUB)fileos.obj
+  $(SHAREDSUB)pmsimpl.obj pdsimpl.obj $(SHAREDSUB)fileos.obj \
+  OSFileSystemWin32.obj $(SHAREDSUB)OSFileSystem.obj OSMemoryWin32.obj \
+  OSMemory.obj OSNetworkSystem.obj OSNetworkSystemWin32.obj
 
 VIRTFILES = hyluni.res
 
-SYSLIBFILES = ws2_32.lib Iphlpapi.lib
+SYSLIBFILES = ws2_32.lib Iphlpapi.lib Mswsock.lib
 
 MDLLIBFILES = \
   ..\lib\hycommon.lib ..\lib\hysig.lib ..\lib\hyzip.lib ..\lib\hyzlib.lib \

Modified: incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/luni/nethelp.c
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/luni/nethelp.c?rev=383845&r1=383844&r2=383845&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/luni/nethelp.c (original)
+++ incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/luni/nethelp.c Tue Mar  7 03:29:14 2006
@@ -56,6 +56,9 @@
 void throwJavaNetSocketException (JNIEnv * env, I_32 errorNumber);
 I_32 netGetSockAddr (JNIEnv * env, jobject fileDescriptor,
          hysockaddr_t sockaddrP, jboolean preferIPv6Addresses);
+jfieldID getJavaNetInetAddressIpaddress(JNIEnv * env);
+void setJavaIoFileDescriptorContents (JNIEnv * env, jobject fd, void *value);
+jfieldID getJavaIoFileDescriptorDescriptorFID (JNIEnv * env);
 
 /**
  * Set the exception state of the VM with a new java.lang.IllegalArgumentException.
@@ -1291,4 +1294,25 @@
   /* clear any exception that might have occured */
   (*env)->ExceptionClear (env);
 
+}
+
+jfieldID
+getJavaNetInetAddressIpaddress(JNIEnv * env){
+  jfieldID fid;
+  jclass lookupClass = (*env)->FindClass (env, "java/net/InetAddress");
+  if (!lookupClass)
+    return NULL;
+  fid = (*env)->GetFieldID (env, lookupClass, "ipaddress", "[B");
+  if (!fid)
+    return NULL;
+  return fid;
+}
+
+void setJavaIoFileDescriptorContents (JNIEnv * env, jobject fd, void *value)
+{
+  jfieldID fid = getJavaIoFileDescriptorDescriptorFID (env);
+  if (NULL != fid)
+    {
+      (*env)->SetLongField (env, fd, fid, (jlong) value);
+    }
 }

Modified: incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/nio/hynio.def
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/nio/hynio.def?rev=383845&r1=383844&r2=383845&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/nio/hynio.def (original)
+++ incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/nio/hynio.def Tue Mar  7 03:29:14 2006
@@ -5,86 +5,3 @@
 	.text	EXECUTE READ
 
 EXPORTS
-	Java_com_ibm_platform_OSFileSystem_truncateImpl
-	Java_com_ibm_platform_OSFileSystem_getPageSize
-	Java_com_ibm_platform_OSFileSystem_writevImpl
-	Java_com_ibm_platform_OSFileSystem_readvImpl
-	Java_com_ibm_platform_OSFileSystem_writeImpl
-	Java_com_ibm_platform_OSFileSystem_openImpl		
-	Java_com_ibm_platform_OSFileSystem_readDirectImpl
-	Java_com_ibm_platform_OSFileSystem_writeDirectImpl
-	Java_com_ibm_platform_OSFileSystem_readImpl
-	Java_com_ibm_platform_OSFileSystem_seekImpl
-	Java_com_ibm_platform_OSFileSystem_fflushImpl
-	Java_com_ibm_platform_OSFileSystem_closeImpl
-	Java_com_ibm_platform_OSFileSystem_lockImpl
-	Java_com_ibm_platform_OSFileSystem_unlockImpl
-	Java_com_ibm_platform_OSFileSystem_transferImpl
-	Java_com_ibm_platform_OSMemory_isLoadedImpl
-	Java_com_ibm_platform_OSMemory_loadImpl
-	Java_com_ibm_platform_OSMemory_mmapImpl
-	Java_com_ibm_platform_OSMemory_unmapImpl
-	Java_com_ibm_platform_OSMemory_flushImpl
-	Java_com_ibm_platform_OSMemory_isLittleEndianImpl
-	Java_com_ibm_platform_OSMemory_getPointerSizeImpl
-	Java_com_ibm_platform_OSMemory_getAddress
-	Java_com_ibm_platform_OSMemory_setAddress
-	Java_com_ibm_platform_OSMemory_malloc
-	Java_com_ibm_platform_OSMemory_free
-	Java_com_ibm_platform_OSMemory_memmove
-	Java_com_ibm_platform_OSMemory_memset
-	Java_com_ibm_platform_OSMemory_getByteArray
-	Java_com_ibm_platform_OSMemory_setByteArray
-	Java_com_ibm_platform_OSMemory_getByte
-	Java_com_ibm_platform_OSMemory_setByte
-	Java_com_ibm_platform_OSMemory_getShort
-	Java_com_ibm_platform_OSMemory_setShort
-	Java_com_ibm_platform_OSMemory_getInt
-	Java_com_ibm_platform_OSMemory_setInt
-	Java_com_ibm_platform_OSMemory_getLong
-	Java_com_ibm_platform_OSMemory_setLong
-	Java_com_ibm_platform_OSMemory_getFloat
-	Java_com_ibm_platform_OSMemory_setFloat
-	Java_com_ibm_platform_OSMemory_getDouble
-	Java_com_ibm_platform_OSMemory_setDouble
-	Java_com_ibm_platform_OSNetworkSystem_createSocketImpl
-	Java_com_ibm_platform_OSNetworkSystem_createDatagramSocketImpl
-	Java_com_ibm_platform_OSNetworkSystem_readSocketImpl
-	Java_com_ibm_platform_OSNetworkSystem_writeSocketImpl
-	Java_com_ibm_platform_OSNetworkSystem_setNonBlockingImpl
-	Java_com_ibm_platform_OSNetworkSystem_connectSocketImpl
-	Java_com_ibm_platform_OSNetworkSystem_connectWithTimeoutSocketImpl
-	Java_com_ibm_platform_OSNetworkSystem_connectStreamWithTimeoutSocketImpl
-	Java_com_ibm_platform_OSNetworkSystem_socketBindImpl
-	Java_com_ibm_platform_OSNetworkSystem_listenStreamSocketImpl
-	Java_com_ibm_platform_OSNetworkSystem_availableStreamImpl
-	Java_com_ibm_platform_OSNetworkSystem_acceptSocketImpl
-	Java_com_ibm_platform_OSNetworkSystem_supportsUrgentDataImpl
-	Java_com_ibm_platform_OSNetworkSystem_sendUrgentDataImpl
-	Java_com_ibm_platform_OSNetworkSystem_connectDatagramImpl2
-	Java_com_ibm_platform_OSNetworkSystem_disconnectDatagramImpl
-	Java_com_ibm_platform_OSNetworkSystem_socketBindImpl2
-	Java_com_ibm_platform_OSNetworkSystem_peekDatagramImpl
-	Java_com_ibm_platform_OSNetworkSystem_receiveDatagramImpl
-	Java_com_ibm_platform_OSNetworkSystem_recvConnectedDatagramImpl
-	Java_com_ibm_platform_OSNetworkSystem_sendDatagramImpl
-	Java_com_ibm_platform_OSNetworkSystem_sendConnectedDatagramImpl
-	Java_com_ibm_platform_OSNetworkSystem_createServerStreamSocketImpl
-	Java_com_ibm_platform_OSNetworkSystem_createMulticastSocketImpl
-	Java_com_ibm_platform_OSNetworkSystem_receiveStreamImpl
-	Java_com_ibm_platform_OSNetworkSystem_sendStreamImpl
-	Java_com_ibm_platform_OSNetworkSystem_shutdownInputImpl
-	Java_com_ibm_platform_OSNetworkSystem_shutdownOutputImpl
-	Java_com_ibm_platform_OSNetworkSystem_acceptStreamSocketImpl
-	Java_com_ibm_platform_OSNetworkSystem_createStreamSocketImpl
-	Java_com_ibm_platform_OSNetworkSystem_sendDatagramImpl2
-	Java_com_ibm_platform_OSNetworkSystem_selectImpl
-	Java_com_ibm_platform_OSNetworkSystem_getSocketLocalAddressImpl
-	Java_com_ibm_platform_OSNetworkSystem_getSocketLocalPortImpl
-	Java_com_ibm_platform_OSNetworkSystem_getSocketOptionImpl
-	Java_com_ibm_platform_OSNetworkSystem_setSocketOptionImpl
-	Java_com_ibm_platform_OSNetworkSystem_getSocketFlagsImpl
-	Java_com_ibm_platform_OSNetworkSystem_socketCloseImpl
-	Java_com_ibm_platform_OSNetworkSystem_getHostByAddrImpl
-	Java_com_ibm_platform_OSNetworkSystem_getHostByNameImpl
-	Java_com_ibm_platform_OSNetworkSystem_setInetAddressImpl

Modified: incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/nio/makefile
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/nio/makefile?rev=383845&r1=383844&r2=383845&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/nio/makefile (original)
+++ incubator/harmony/enhanced/classlib/trunk/native-src/win.IA32/nio/makefile Tue Mar  7 03:29:14 2006
@@ -26,11 +26,11 @@
 HYCFLAGS = $(HYCFLAGS) /I$(SHAREDSUB) /I$(SHARED)common /I..\zip /I..\fdlibm
 HYLDFLAGS = $(HYLDFLAGS) -def:$(LIBBASE).def
 
-BUILDFILES = \
-  $(SHAREDSUB)nio_copyright.obj OSFileSystemWin32.obj \
-  $(SHAREDSUB)OSFileSystem.obj OSMemoryWin32.obj \
-  OSMemory.obj nethelp.obj helpers.obj socket.obj OSNetworkSystem.obj \
-  OSNetworkSystemWin32.obj
+BUILDFILES = $(SHAREDSUB)nio_copyright.obj
+# OSFileSystemWin32.obj \
+#  $(SHAREDSUB)OSFileSystem.obj OSMemoryWin32.obj \
+#  OSMemory.obj nethelp.obj helpers.obj socket.obj OSNetworkSystem.obj \
+#  OSNetworkSystemWin32.obj
 
 VIRTFILES = $(LIBBASE).res
 



Mime
View raw message