From: Eddie Kohler <kohler@cs.ucla.edu>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] add VNC reverse connections
Date: Wed, 16 Jan 2008 16:51:37 -0800 [thread overview]
Message-ID: <478EA699.3070406@cs.ucla.edu> (raw)
In-Reply-To: <478E9BA5.8090704@codemonkey.ws>
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
next prev parent reply other threads:[~2008-01-17 0:51 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-16 7:27 [Qemu-devel] [PATCH] add VNC reverse connections Eddie Kohler
2008-01-16 8:55 ` Avi Kivity
2008-01-16 12:42 ` Daniel P. Berrange
2008-01-16 15:00 ` Anthony Liguori
2008-01-16 15:09 ` Eddie Kohler
2008-01-16 16:31 ` Anthony Liguori
2008-01-16 16:35 ` Daniel P. Berrange
2008-01-17 0:04 ` Anthony Liguori
2008-01-17 0:51 ` Eddie Kohler [this message]
2008-01-17 16:29 ` Eddie Kohler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=478EA699.3070406@cs.ucla.edu \
--to=kohler@cs.ucla.edu \
--cc=anthony@codemonkey.ws \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).