Hi

On Tue, Nov 29, 2022 at 6:55 PM Markus Armbruster <[email protected]> wrote:

> QMP command add_client's schema:
>
>     ##
>     # @add_client:
>     #
>     # Allow client connections for VNC, Spice and socket based
>     # character devices to be passed in to QEMU via SCM_RIGHTS.
>     #
>     # @protocol: protocol name. Valid names are "vnc", "spice",
> "@dbus-display" or
>     #            the name of a character device (eg. from -chardev id=XXXX)
>     #
>     # @fdname: file descriptor name previously passed via 'getfd' command
>     #
>     # @skipauth: whether to skip authentication. Only applies
>     #            to "vnc" and "spice" protocols
>     #
>     # @tls: whether to perform TLS. Only applies to the "spice"
>     #       protocol
>     #
>     # Returns: nothing on success.
>     #
>     # Since: 0.14
>     #
>     # Example:
>     #
>     # -> { "execute": "add_client", "arguments": { "protocol": "vnc",
>     #                                              "fdname": "myclient" } }
>     # <- { "return": {} }
>     #
>     ##
>     { 'command': 'add_client',
>       'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool',
>                 '*tls': 'bool' } }
>
> Spot the design flaw!
>
> It's overloaded @protocol.  Two issues.
>
> One, character device IDs "vnc", "spice", "@dbus-display" don't work
> here.  If we ever add another protocol, we make another device ID not
> work.  Perhaps this is why Marc-André chose "@dbus-display", which
> otherwise looks like a typo :)
>

That's right, I tried to avoid conflicting with chardev ID namespace. IDs
can't start with '@'.

btw, I have a few patches pending to extend add_client for windows sockets.

I also have patches to check if fds are actually sockets, since that
command doesn't make much sense with other fds.


> Two, introspection can't tell us what protocols are supported.
>

Hmm, not really a big deal I suppose. You would have both compile-time and
run-time config. There are other means to introspect the display protocol,
like query-vnc or query-spice. I thought I had something covering dbus as
well, but I can't find it, I'll look at it.

Let me know if you plan to touch that command, it will likely conflict with
my work. I plan to submit it soon after the release, but I might do it
earlier.

Reply via email to