qemu-e2k/net
Zhi Yong Wu 011de2b512 net: add the support for -netdev socket, listen
The -net socket,listen option does not work with the newer -netdev
syntax:
 http://lists.gnu.org/archive/html/qemu-devel/2011-11/msg01508.html

This patch makes it work now.

For the case where one vlan has multiple listenning sockets,
the patch will also provide the support.

Supported syntax:
 1.) -net socket,listen=127.0.0.1:1234,vlan=0
 2.) -net socket,listen=127.0.0.1:1234,vlan=0 -net socket,listen=127.0.0.1:1235,vlan=0
 3.) -netdev socket,listen=127.0.0.1:1234,id=socket0

 Drop the NetSocketListenState struct and add a listen_fd field
to NetSocketState.  When a -netdev socket,listen= instance is created
there will be a NetSocketState with fd=-1 and a valid listen_fd.  The
net_socket_accept() handler waits for listen_fd to become readable and
then accepts the connection.  When this state transition happens, we no
longer monitor listen_fd for incoming connections...until the client
disconnects again.

Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
2012-08-01 13:32:11 +01:00
..
checksum.c Change license from GPLv2 to GPLv2+ 2012-02-01 16:24:54 -06:00
checksum.h
dump.c net: Rename VLANClientState to NetClientState 2012-08-01 13:32:10 +01:00
dump.h net: Rename VLANClientState to NetClientState 2012-08-01 13:32:10 +01:00
hub.c hub: add the support for hub own flow control 2012-08-01 13:32:11 +01:00
hub.h net: Rename VLANClientState to NetClientState 2012-08-01 13:32:10 +01:00
Makefile.objs net: Add a hub net client 2012-08-01 12:28:51 +01:00
queue.c net: determine if packets can be sent before net queue deliver packets 2012-08-01 13:32:11 +01:00
queue.h net: cleanup deliver/deliver_iov func pointers 2012-08-01 13:32:11 +01:00
slirp.c net: determine if packets can be sent before net queue deliver packets 2012-08-01 13:32:11 +01:00
slirp.h net: Rename VLANClientState to NetClientState 2012-08-01 13:32:10 +01:00
socket.c net: add the support for -netdev socket, listen 2012-08-01 13:32:11 +01:00
socket.h net: Rename VLANClientState to NetClientState 2012-08-01 13:32:10 +01:00
tap-aix.c convert net_init_tap() to NetClientOptions 2012-07-23 11:55:18 +01:00
tap-bsd.c convert net_init_tap() to NetClientOptions 2012-07-23 11:55:18 +01:00
tap-haiku.c convert net_init_tap() to NetClientOptions 2012-07-23 11:55:18 +01:00
tap-linux.c convert net_init_tap() to NetClientOptions 2012-07-23 11:55:18 +01:00
tap-linux.h
tap-solaris.c convert net_init_tap() to NetClientOptions 2012-07-23 11:55:18 +01:00
tap-win32.c net: Rename vc local variables to nc 2012-08-01 13:32:10 +01:00
tap.c net: Rename VLANClientState to NetClientState 2012-08-01 13:32:10 +01:00
tap.h net: Rename vc local variables to nc 2012-08-01 13:32:10 +01:00
util.c
util.h
vde.c net: Rename VLANClientState to NetClientState 2012-08-01 13:32:10 +01:00
vde.h net: Rename VLANClientState to NetClientState 2012-08-01 13:32:10 +01:00