aboutsummaryrefslogtreecommitdiff
path: root/qemu-common.h
diff options
context:
space:
mode:
authorZhi Yong Wu <wuzhy@linux.vnet.ibm.com>2012-07-20 14:25:53 +0100
committerStefan Hajnoczi <stefanha@linux.vnet.ibm.com>2012-08-01 13:32:11 +0100
commit011de2b512a83aa5e9f8899ed5bbf2f31995b90e (patch)
tree08fce8a9e95c37e5701ebab75614baf80f17a401 /qemu-common.h
parente34cde35e7c69efcf0bd53d2ff7c90f89a5fc6d0 (diff)
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>
Diffstat (limited to 'qemu-common.h')
0 files changed, 0 insertions, 0 deletions