qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Patch to allow user-mode networking for Win32
@ 2004-10-06 21:14 Gregory Alexander
  2004-10-07 14:05 ` [Qemu-devel] " Ronald
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Gregory Alexander @ 2004-10-06 21:14 UTC (permalink / raw)
  To: fabrice, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 475 bytes --]

Win32 networking doesn't work with the write() and read() calls, it has 
to use send() and recv().  This code replaces socket write() and read() 
calls in the slirp code, and also adds a changes a few other minor 
changes that were necessary to make the slirp code work in a Windows 
environment.

Thanks,

GREG

Fabrice, sorry to send this to your personal account, but my ISP's mail 
server got blackhole listed and a lot of mailing lists aren't working 
for me right now.

[-- Attachment #2: patch-slirp-win32.diff --]
[-- Type: text/plain, Size: 5858 bytes --]

? foo
Index: if.c
===================================================================
RCS file: /cvsroot/qemu/qemu/slirp/if.c,v
retrieving revision 1.2
diff -u -r1.2 if.c
--- if.c	13 Sep 2004 21:42:51 -0000	1.2
+++ if.c	6 Oct 2004 21:01:03 -0000
@@ -79,14 +79,14 @@
 	int total;
 	
 	/* This should succeed most of the time */
-	ret = write(fd, bptr, n);
+	ret = send(fd, bptr, n,0);
 	if (ret == n || ret <= 0)
 	   return ret;
 	
 	/* Didn't write everything, go into the loop */
 	total = ret;
 	while (n > total) {
-		ret = write(fd, bptr+total, n-total);
+		ret = send(fd, bptr+total, n-total,0);
 		if (ret <= 0)
 		   return ret;
 		total += ret;
@@ -111,7 +111,7 @@
 	DEBUG_CALL("if_input");
 	DEBUG_ARG("ttyp = %lx", (long)ttyp);
 	
-	if_n = read(ttyp->fd, (char *)if_inbuff, INBUFF_SIZE);
+	if_n = recv(ttyp->fd, (char *)if_inbuff, INBUFF_SIZE,0);
 	
 	DEBUG_MISC((dfd, " read %d bytes\n", if_n));
 	
Index: slirp.c
===================================================================
RCS file: /cvsroot/qemu/qemu/slirp/slirp.c,v
retrieving revision 1.6
diff -u -r1.6 slirp.c
--- slirp.c	5 Sep 2004 23:10:26 -0000	1.6
+++ slirp.c	6 Oct 2004 21:01:04 -0000
@@ -414,7 +414,7 @@
 			    /* Connected */
 			    so->so_state &= ~SS_ISFCONNECTING;
 			    
-			    ret = write(so->s, &ret, 0);
+			    ret = send(so->s, &ret, 0, 0);
 			    if (ret < 0) {
 			      /* XXXXX Must fix, zero bytes is a NOP */
 			      if (errno == EAGAIN || errno == EWOULDBLOCK ||
@@ -447,7 +447,7 @@
 	 	 	 */
 #ifdef PROBE_CONN
 			if (so->so_state & SS_ISFCONNECTING) {
-			  ret = read(so->s, (char *)&ret, 0);
+			  ret = recv(so->s, (char *)&ret, 0,0);
 			  
 			  if (ret < 0) {
 			    /* XXX */
@@ -460,7 +460,7 @@
 			    
 			    /* tcp_input will take care of it */
 			  } else {
-			    ret = write(so->s, &ret, 0);
+			    ret = send(so->s, &ret, 0,0);
 			    if (ret < 0) {
 			      /* XXX */
 			      if (errno == EAGAIN || errno == EWOULDBLOCK ||
Index: slirp.h
===================================================================
RCS file: /cvsroot/qemu/qemu/slirp/slirp.h,v
retrieving revision 1.6
diff -u -r1.6 slirp.h
--- slirp.h	24 Aug 2004 21:57:12 -0000	1.6
+++ slirp.h	6 Oct 2004 21:01:04 -0000
@@ -329,4 +329,8 @@
 #define max(x,y) ((x) > (y) ? (x) : (y))
 #endif
 
+#ifdef _WIN32
+#define errno (WSAGetLastError())
+#endif
+
 #endif
Index: socket.c
===================================================================
RCS file: /cvsroot/qemu/qemu/slirp/socket.c,v
retrieving revision 1.2
diff -u -r1.2 socket.c
--- socket.c	12 Jul 2004 22:33:05 -0000	1.2
+++ socket.c	6 Oct 2004 21:01:05 -0000
@@ -152,7 +152,7 @@
 	nn = readv(so->s, (struct iovec *)iov, n);
 	DEBUG_MISC((dfd, " ... read nn = %d bytes\n", nn));
 #else
-	nn = read(so->s, iov[0].iov_base, iov[0].iov_len);
+	nn = recv(so->s, iov[0].iov_base, iov[0].iov_len,0);
 #endif	
 	if (nn <= 0) {
 		if (nn < 0 && (errno == EINTR || errno == EAGAIN))
@@ -176,7 +176,7 @@
 	 * A return of -1 wont (shouldn't) happen, since it didn't happen above
 	 */
 	if (n == 2 && nn == iov[0].iov_len)
-	   nn += read(so->s, iov[1].iov_base, iov[1].iov_len);
+	   nn += recv(so->s, iov[1].iov_base, iov[1].iov_len,0);
 	
 	DEBUG_MISC((dfd, " ... read nn = %d bytes\n", nn));
 #endif
@@ -333,7 +333,7 @@
 	
 	DEBUG_MISC((dfd, "  ... wrote nn = %d bytes\n", nn));
 #else
-	nn = write(so->s, iov[0].iov_base, iov[0].iov_len);
+	nn = send(so->s, iov[0].iov_base, iov[0].iov_len,0);
 #endif
 	/* This should never happen, but people tell me it does *shrug* */
 	if (nn < 0 && (errno == EAGAIN || errno == EINTR))
@@ -349,7 +349,7 @@
 	
 #ifndef HAVE_READV
 	if (n == 2 && nn == iov[0].iov_len)
-	   nn += write(so->s, iov[1].iov_base, iov[1].iov_len);
+	   nn += send(so->s, iov[1].iov_base, iov[1].iov_len,0);
         DEBUG_MISC((dfd, "  ... wrote nn = %d bytes\n", nn));
 #endif
 	
@@ -572,7 +572,11 @@
 		close(s);
 		sofree(so);
 		/* Restore the real errno */
+#ifdef _WIN32
+		WSASetLastError(tmperrno);
+#else
 		errno = tmperrno;
+#endif
 		return NULL;
 	}
 	setsockopt(s,SOL_SOCKET,SO_REUSEADDR,(char *)&opt,sizeof(int));
@@ -643,7 +647,9 @@
 {
 	if ((so->so_state & SS_NOFDREF) == 0) {
 		shutdown(so->s,0);
-		FD_CLR(so->s, global_writefds);
+		if(global_writefds) {
+		  FD_ZERO(global_writefds);
+		}
 	}
 	so->so_state &= ~(SS_ISFCONNECTING);
 	if (so->so_state & SS_FCANTSENDMORE)
@@ -658,8 +664,12 @@
 {
 	if ((so->so_state & SS_NOFDREF) == 0) {
 		shutdown(so->s,1);           /* send FIN to fhost */
-		FD_CLR(so->s, global_readfds);
-		FD_CLR(so->s, global_xfds);
+	    if(global_readfds) {
+		FD_ZERO(global_readfds);
+	    }
+	    if(global_xfds) {
+		FD_ZERO(global_xfds);
+	    }
 	}
 	so->so_state &= ~(SS_ISFCONNECTING);
 	if (so->so_state & SS_FCANTRCVMORE)
Index: tcp_input.c
===================================================================
RCS file: /cvsroot/qemu/qemu/slirp/tcp_input.c,v
retrieving revision 1.3
diff -u -r1.3 tcp_input.c
--- tcp_input.c	5 Sep 2004 23:10:26 -0000	1.3
+++ tcp_input.c	6 Oct 2004 21:01:06 -0000
@@ -681,7 +681,7 @@
 	    goto cont_input;
 	  }
 	  
-	  if(tcp_fconnect(so) == -1 && errno != EINPROGRESS) {
+	  if((tcp_fconnect(so) == -1) && (errno != EINPROGRESS) && (errno != EWOULDBLOCK)) {
 	    u_char code=ICMP_UNREACH_NET;
 	    DEBUG_MISC((dfd," tcp fconnect errno = %d-%s\n",
 			errno,strerror(errno)));
Index: udp.c
===================================================================
RCS file: /cvsroot/qemu/qemu/slirp/udp.c,v
retrieving revision 1.3
diff -u -r1.3 udp.c
--- udp.c	24 Aug 2004 21:57:12 -0000	1.3
+++ udp.c	6 Oct 2004 21:01:07 -0000
@@ -339,7 +339,11 @@
       int lasterrno=errno;
       closesocket(so->s);
       so->s=-1;
+#ifdef _WIN32
+      WSASetLastError(lasterrno);
+#else
       errno=lasterrno;
+#endif
     } else {
       /* success, insert in queue */
       so->so_expire = curtime + SO_EXPIRE;

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Qemu-devel] Re: Patch to allow user-mode networking for Win32
  2004-10-06 21:14 [Qemu-devel] Patch to allow user-mode networking for Win32 Gregory Alexander
@ 2004-10-07 14:05 ` Ronald
  2004-10-07 15:54   ` Gregory Alexander
  2004-10-07 15:39 ` [Qemu-devel] " Gregory Alexander
  2004-10-07 16:34 ` Andreas Bollhalder
  2 siblings, 1 reply; 8+ messages in thread
From: Ronald @ 2004-10-07 14:05 UTC (permalink / raw)
  To: qemu-devel

Le Wed, 06 Oct 2004 16:14:28 -0500, Gregory Alexander a écrit :

> Win32 networking doesn't work with the write() and read() calls, it has to
> use send() and recv().  This code replaces socket write() and read() calls
> in the slirp code, and also adds a changes a few other minor changes that
> were necessary to make the slirp code work in a Windows environment.
> 

This fixes host -> guest connexion, now telnet or ssh are working.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] Patch to allow user-mode networking for Win32
  2004-10-06 21:14 [Qemu-devel] Patch to allow user-mode networking for Win32 Gregory Alexander
  2004-10-07 14:05 ` [Qemu-devel] " Ronald
@ 2004-10-07 15:39 ` Gregory Alexander
  2004-10-07 23:28   ` Fabrice Bellard
  2004-10-07 16:34 ` Andreas Bollhalder
  2 siblings, 1 reply; 8+ messages in thread
From: Gregory Alexander @ 2004-10-07 15:39 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 516 bytes --]

Oops, I've got an updated patch.  Version 2.

I earlier fixed a memory problem in the wrong way.  This version should 
prevent a possible SEGFAULT under linux as well.

Thanks,

GREG

Gregory Alexander wrote:
> Win32 networking doesn't work with the write() and read() calls, it has 
> to use send() and recv().  This code replaces socket write() and read() 
> calls in the slirp code, and also adds a changes a few other minor 
> changes that were necessary to make the slirp code work in a Windows 
> environment.

[-- Attachment #2: patch-slirp-win32-2.diff --]
[-- Type: text/plain, Size: 6274 bytes --]

? foo
? patch-slirp-win32.diff
Index: if.c
===================================================================
RCS file: /cvsroot/qemu/qemu/slirp/if.c,v
retrieving revision 1.2
diff -u -r1.2 if.c
--- if.c	13 Sep 2004 21:42:51 -0000	1.2
+++ if.c	7 Oct 2004 15:34:25 -0000
@@ -79,14 +79,14 @@
 	int total;
 	
 	/* This should succeed most of the time */
-	ret = write(fd, bptr, n);
+	ret = send(fd, bptr, n,0);
 	if (ret == n || ret <= 0)
 	   return ret;
 	
 	/* Didn't write everything, go into the loop */
 	total = ret;
 	while (n > total) {
-		ret = write(fd, bptr+total, n-total);
+		ret = send(fd, bptr+total, n-total,0);
 		if (ret <= 0)
 		   return ret;
 		total += ret;
@@ -111,7 +111,7 @@
 	DEBUG_CALL("if_input");
 	DEBUG_ARG("ttyp = %lx", (long)ttyp);
 	
-	if_n = read(ttyp->fd, (char *)if_inbuff, INBUFF_SIZE);
+	if_n = recv(ttyp->fd, (char *)if_inbuff, INBUFF_SIZE,0);
 	
 	DEBUG_MISC((dfd, " read %d bytes\n", if_n));
 	
Index: slirp.c
===================================================================
RCS file: /cvsroot/qemu/qemu/slirp/slirp.c,v
retrieving revision 1.6
diff -u -r1.6 slirp.c
--- slirp.c	5 Sep 2004 23:10:26 -0000	1.6
+++ slirp.c	7 Oct 2004 15:34:26 -0000
@@ -414,7 +414,7 @@
 			    /* Connected */
 			    so->so_state &= ~SS_ISFCONNECTING;
 			    
-			    ret = write(so->s, &ret, 0);
+			    ret = send(so->s, &ret, 0, 0);
 			    if (ret < 0) {
 			      /* XXXXX Must fix, zero bytes is a NOP */
 			      if (errno == EAGAIN || errno == EWOULDBLOCK ||
@@ -447,7 +447,7 @@
 	 	 	 */
 #ifdef PROBE_CONN
 			if (so->so_state & SS_ISFCONNECTING) {
-			  ret = read(so->s, (char *)&ret, 0);
+			  ret = recv(so->s, (char *)&ret, 0,0);
 			  
 			  if (ret < 0) {
 			    /* XXX */
@@ -460,7 +460,7 @@
 			    
 			    /* tcp_input will take care of it */
 			  } else {
-			    ret = write(so->s, &ret, 0);
+			    ret = send(so->s, &ret, 0,0);
 			    if (ret < 0) {
 			      /* XXX */
 			      if (errno == EAGAIN || errno == EWOULDBLOCK ||
@@ -496,6 +496,15 @@
 	 */
 	if (if_queued && link_up)
 	   if_start();
+
+	/* clear global file descriptor sets.
+	 * these reside on the stack in vl.c
+	 * so they're unusable if we're not in
+	 * slirp_select_fill or slirp_select_poll.
+	 */
+	 global_readfds = NULL;
+	 global_writefds = NULL;
+	 global_xfds = NULL;
 }
 
 #define ETH_ALEN 6
Index: slirp.h
===================================================================
RCS file: /cvsroot/qemu/qemu/slirp/slirp.h,v
retrieving revision 1.6
diff -u -r1.6 slirp.h
--- slirp.h	24 Aug 2004 21:57:12 -0000	1.6
+++ slirp.h	7 Oct 2004 15:34:26 -0000
@@ -329,4 +329,8 @@
 #define max(x,y) ((x) > (y) ? (x) : (y))
 #endif
 
+#ifdef _WIN32
+#define errno (WSAGetLastError())
+#endif
+
 #endif
Index: socket.c
===================================================================
RCS file: /cvsroot/qemu/qemu/slirp/socket.c,v
retrieving revision 1.2
diff -u -r1.2 socket.c
--- socket.c	12 Jul 2004 22:33:05 -0000	1.2
+++ socket.c	7 Oct 2004 15:34:27 -0000
@@ -152,7 +152,7 @@
 	nn = readv(so->s, (struct iovec *)iov, n);
 	DEBUG_MISC((dfd, " ... read nn = %d bytes\n", nn));
 #else
-	nn = read(so->s, iov[0].iov_base, iov[0].iov_len);
+	nn = recv(so->s, iov[0].iov_base, iov[0].iov_len,0);
 #endif	
 	if (nn <= 0) {
 		if (nn < 0 && (errno == EINTR || errno == EAGAIN))
@@ -176,7 +176,7 @@
 	 * A return of -1 wont (shouldn't) happen, since it didn't happen above
 	 */
 	if (n == 2 && nn == iov[0].iov_len)
-	   nn += read(so->s, iov[1].iov_base, iov[1].iov_len);
+	   nn += recv(so->s, iov[1].iov_base, iov[1].iov_len,0);
 	
 	DEBUG_MISC((dfd, " ... read nn = %d bytes\n", nn));
 #endif
@@ -333,7 +333,7 @@
 	
 	DEBUG_MISC((dfd, "  ... wrote nn = %d bytes\n", nn));
 #else
-	nn = write(so->s, iov[0].iov_base, iov[0].iov_len);
+	nn = send(so->s, iov[0].iov_base, iov[0].iov_len,0);
 #endif
 	/* This should never happen, but people tell me it does *shrug* */
 	if (nn < 0 && (errno == EAGAIN || errno == EINTR))
@@ -349,7 +349,7 @@
 	
 #ifndef HAVE_READV
 	if (n == 2 && nn == iov[0].iov_len)
-	   nn += write(so->s, iov[1].iov_base, iov[1].iov_len);
+	   nn += send(so->s, iov[1].iov_base, iov[1].iov_len,0);
         DEBUG_MISC((dfd, "  ... wrote nn = %d bytes\n", nn));
 #endif
 	
@@ -572,7 +572,11 @@
 		close(s);
 		sofree(so);
 		/* Restore the real errno */
+#ifdef _WIN32
+		WSASetLastError(tmperrno);
+#else
 		errno = tmperrno;
+#endif
 		return NULL;
 	}
 	setsockopt(s,SOL_SOCKET,SO_REUSEADDR,(char *)&opt,sizeof(int));
@@ -643,7 +647,9 @@
 {
 	if ((so->so_state & SS_NOFDREF) == 0) {
 		shutdown(so->s,0);
-		FD_CLR(so->s, global_writefds);
+		if(global_writefds) {
+		  FD_CLR(so->s,global_writefds);
+		}
 	}
 	so->so_state &= ~(SS_ISFCONNECTING);
 	if (so->so_state & SS_FCANTSENDMORE)
@@ -658,8 +664,12 @@
 {
 	if ((so->so_state & SS_NOFDREF) == 0) {
 		shutdown(so->s,1);           /* send FIN to fhost */
-		FD_CLR(so->s, global_readfds);
-		FD_CLR(so->s, global_xfds);
+		if(global_readfds) {
+		  FD_CLR(so->s,global_readfds);
+		}
+		if(global_xfds && (1 || FD_ISSET(so->s,global_xfds))) {
+		  FD_CLR(so->s,global_xfds);
+		}
 	}
 	so->so_state &= ~(SS_ISFCONNECTING);
 	if (so->so_state & SS_FCANTRCVMORE)
Index: tcp_input.c
===================================================================
RCS file: /cvsroot/qemu/qemu/slirp/tcp_input.c,v
retrieving revision 1.3
diff -u -r1.3 tcp_input.c
--- tcp_input.c	5 Sep 2004 23:10:26 -0000	1.3
+++ tcp_input.c	7 Oct 2004 15:34:28 -0000
@@ -681,7 +681,7 @@
 	    goto cont_input;
 	  }
 	  
-	  if(tcp_fconnect(so) == -1 && errno != EINPROGRESS) {
+	  if((tcp_fconnect(so) == -1) && (errno != EINPROGRESS) && (errno != EWOULDBLOCK)) {
 	    u_char code=ICMP_UNREACH_NET;
 	    DEBUG_MISC((dfd," tcp fconnect errno = %d-%s\n",
 			errno,strerror(errno)));
Index: udp.c
===================================================================
RCS file: /cvsroot/qemu/qemu/slirp/udp.c,v
retrieving revision 1.3
diff -u -r1.3 udp.c
--- udp.c	24 Aug 2004 21:57:12 -0000	1.3
+++ udp.c	7 Oct 2004 15:34:28 -0000
@@ -339,7 +339,11 @@
       int lasterrno=errno;
       closesocket(so->s);
       so->s=-1;
+#ifdef _WIN32
+      WSASetLastError(lasterrno);
+#else
       errno=lasterrno;
+#endif
     } else {
       /* success, insert in queue */
       so->so_expire = curtime + SO_EXPIRE;

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] Re: Patch to allow user-mode networking for Win32
  2004-10-07 14:05 ` [Qemu-devel] " Ronald
@ 2004-10-07 15:54   ` Gregory Alexander
  2004-10-07 17:14     ` [Qemu-devel] " Ronald
  0 siblings, 1 reply; 8+ messages in thread
From: Gregory Alexander @ 2004-10-07 15:54 UTC (permalink / raw)
  To: daimon55, qemu-devel

guest -> host wasn't even working for me, and this fixed it.  I'm 
running KNOPPIX guest on an XP host.

I earlier sent an updated patch (fixes a memory bug in a non-broken way).

Please try out the new patch and make sure it works for you.  If so, 
that patch is better.

Thanks,

GREG

Ronald wrote:

> Le Wed, 06 Oct 2004 16:14:28 -0500, Gregory Alexander a écrit :
> 
> 
>>Win32 networking doesn't work with the write() and read() calls, it has to
>>use send() and recv().  This code replaces socket write() and read() calls
>>in the slirp code, and also adds a changes a few other minor changes that
>>were necessary to make the slirp code work in a Windows environment.
>>
> 
> 
> This fixes host -> guest connexion, now telnet or ssh are working.
> 
> 
> 
> 
> _______________________________________________
> Qemu-devel mailing list
> Qemu-devel@nongnu.org
> http://lists.nongnu.org/mailman/listinfo/qemu-devel
> 
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [Qemu-devel] Patch to allow user-mode networking for Win32
  2004-10-06 21:14 [Qemu-devel] Patch to allow user-mode networking for Win32 Gregory Alexander
  2004-10-07 14:05 ` [Qemu-devel] " Ronald
  2004-10-07 15:39 ` [Qemu-devel] " Gregory Alexander
@ 2004-10-07 16:34 ` Andreas Bollhalder
  2004-10-08 14:51   ` Gregory Alexander
  2 siblings, 1 reply; 8+ messages in thread
From: Andreas Bollhalder @ 2004-10-07 16:34 UTC (permalink / raw)
  To: qemu-devel

Hello Greg

> Win32 networking doesn't
work with the write() and
read() calls, it has 
> to use send() and recv().
This code replaces socket
write() and read() 
> calls in the slirp code, and
also adds a changes a few
other minor 
> changes that were necessary
to make the slirp code work in
a Windows 
> environment.

Thank you very much for this
patch. My FreeDOS-GEOS image
works again with the ISA
NE2000 driver for the DOSODI
network. The last QEmu version
which worked was the one from
http://www.h7.dion.ne.jp/~qemu
-win/index.html (2004/07/12).

I had started too with daily
builds and tried to apply the
slirp patch from the same site
mentioned above, but got stuck
after 3 or 4 hours. Also the
DEBUG output didn't worked for
me. Maybe, I need to spend
more time in deeper C
programming.

Greetings

Andreas

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Qemu-devel] Re: Re: Patch to allow user-mode networking for Win32
  2004-10-07 15:54   ` Gregory Alexander
@ 2004-10-07 17:14     ` Ronald
  0 siblings, 0 replies; 8+ messages in thread
From: Ronald @ 2004-10-07 17:14 UTC (permalink / raw)
  To: qemu-devel

Le Thu, 07 Oct 2004 10:54:52 -0500, Gregory Alexander a écrit :

> guest -> host wasn't even working for me, and this fixed it.  I'm running
> KNOPPIX guest on an XP host.
> 
> I earlier sent an updated patch (fixes a memory bug in a non-broken way).
> 
> Please try out the new patch and make sure it works for you.  If so, that
> patch is better.
> 

This is ok for me, just tried in the same way as previously : host
(win98) to guest (slackware), telnet, ssh and scp.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] Patch to allow user-mode networking for Win32
  2004-10-07 15:39 ` [Qemu-devel] " Gregory Alexander
@ 2004-10-07 23:28   ` Fabrice Bellard
  0 siblings, 0 replies; 8+ messages in thread
From: Fabrice Bellard @ 2004-10-07 23:28 UTC (permalink / raw)
  To: qemu-devel

Applied.

Fabrice.

Gregory Alexander wrote:
> Oops, I've got an updated patch.  Version 2.
> 
> I earlier fixed a memory problem in the wrong way.  This version should 
> prevent a possible SEGFAULT under linux as well.
> 
> Thanks,
> 
> GREG
> 
> Gregory Alexander wrote:
> 
>> Win32 networking doesn't work with the write() and read() calls, it 
>> has to use send() and recv().  This code replaces socket write() and 
>> read() calls in the slirp code, and also adds a changes a few other 
>> minor changes that were necessary to make the slirp code work in a 
>> Windows environment.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] Patch to allow user-mode networking for Win32
  2004-10-07 16:34 ` Andreas Bollhalder
@ 2004-10-08 14:51   ` Gregory Alexander
  0 siblings, 0 replies; 8+ messages in thread
From: Gregory Alexander @ 2004-10-08 14:51 UTC (permalink / raw)
  To: bolle, qemu-devel

I was compiling under cygwin and actually changed the debug output to 
print to stdout and hand-coded the debug level.  It wasn't too bad.

I still seem to be having problems with long downloads.  (like a debian 
install over the network.)

Oh, well, if I get the chance, I may look at it some more.

Thanks,

GREG

Andreas Bollhalder wrote:
> Hello Greg
> 
> 
>>Win32 networking doesn't
> 
> work with the write() and
> read() calls, it has 
> 
>>to use send() and recv().
> 
> This code replaces socket
> write() and read() 
> 
>>calls in the slirp code, and
> 
> also adds a changes a few
> other minor 
> 
>>changes that were necessary
> 
> to make the slirp code work in
> a Windows 
> 
>>environment.
> 
> 
> Thank you very much for this
> patch. My FreeDOS-GEOS image
> works again with the ISA
> NE2000 driver for the DOSODI
> network. The last QEmu version
> which worked was the one from
> http://www.h7.dion.ne.jp/~qemu
> -win/index.html (2004/07/12).
> 
> I had started too with daily
> builds and tried to apply the
> slirp patch from the same site
> mentioned above, but got stuck
> after 3 or 4 hours. Also the
> DEBUG output didn't worked for
> me. Maybe, I need to spend
> more time in deeper C
> programming.
> 
> Greetings
> 
> Andreas
> 
> 
> 
> _______________________________________________
> Qemu-devel mailing list
> Qemu-devel@nongnu.org
> http://lists.nongnu.org/mailman/listinfo/qemu-devel
> 
> 
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2004-10-08 15:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-06 21:14 [Qemu-devel] Patch to allow user-mode networking for Win32 Gregory Alexander
2004-10-07 14:05 ` [Qemu-devel] " Ronald
2004-10-07 15:54   ` Gregory Alexander
2004-10-07 17:14     ` [Qemu-devel] " Ronald
2004-10-07 15:39 ` [Qemu-devel] " Gregory Alexander
2004-10-07 23:28   ` Fabrice Bellard
2004-10-07 16:34 ` Andreas Bollhalder
2004-10-08 14:51   ` Gregory Alexander

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).