From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JFIz0-0007a5-4n for qemu-devel@nongnu.org; Wed, 16 Jan 2008 19:51:50 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JFIyy-0007Zt-EX for qemu-devel@nongnu.org; Wed, 16 Jan 2008 19:51:48 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JFIyy-0007Zk-7J for qemu-devel@nongnu.org; Wed, 16 Jan 2008 19:51:48 -0500 Received: from smtp-15.smtp.ucla.edu ([169.232.46.242]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JFIyx-00061G-Ni for qemu-devel@nongnu.org; Wed, 16 Jan 2008 19:51:47 -0500 Message-ID: <478EA699.3070406@cs.ucla.edu> Date: Wed, 16 Jan 2008 16:51:37 -0800 From: Eddie Kohler MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] add VNC reverse connections References: <478DB1D3.60905@cs.ucla.edu> <20080116124231.GB16624@redhat.com> <478E1E0F.1040303@cs.ucla.edu> <20080116163539.GA27604@redhat.com> <478E9BA5.8090704@codemonkey.ws> In-Reply-To: <478E9BA5.8090704@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org Anthony Liguori wrote: >>> This doesn't feel like an option to me, though; rather a different >>> means of connecting. Among other things, in "-vnc :0", the QEMU VNC >>> server opens port 5900. But the client's listening port for reverse >>> connections defaults to 5500. "-vnc :-400,rev" is clearly insane, >>> but it seems strange for an option like ",rev" to change the meaning >>> of the port field. >>> >> >> Yes that is a valid point. It is a little unfortunate we switched to >> using >> display num instead of port num for the current VNC code. Having a syntax >> which makes people use negative display nums for reverse connections >> would >> suck. So reluctantly I think your original proposal may actually be >> better. > > Yet this is the syntax we use for normal connections. I don't see why > the asymmetry is okay for reverse connections. Because reverse connections feel very different from normal connections, use ports instead of "display numbers", etc.? Here's what the manual would look like for the "rev:" syntax. interface:d TCP connections will only be allowed from interface on display d. By convention the TCP port is 5900+d. Optionally, interface can be omitted in which case the server will bind to all interfaces. ... rev:[address:]port Connects to a VNC client listening at address:port. Optionally, address can be omitted in which case the server connects to localhost:port. Here's what the manual would look like for the ",reverse" syntax. Valid syntax for the display is interface:d TCP connections will only be allowed from interface on display d. By convention the TCP port is 5900+d. Optionally, interface can be omitted in which case the server will bind to all interfaces. ... reverse QEMU will connect to a listening VNC client, rather than waiting for a client connection. If the connection has type "interface:d", then "interface" is the client address; if omitted, localhost is used. The display number "d" is added to 5900 to determine the port, so negative numbers might be necessary to connect to default client ports. Or are you thinking For reverse connections, the display number "d" is added to 5500 to determine the port. in which case the interface:d definition is incorrect? I'm not trying to make this look ugly on purpose. The prefix syntax seems friendlier. Eddie