Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NIgMC-0006Df-2g for qemu-devel@nongnu.org; Thu, 10 Dec 2009 05:34:48 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NIgM6-0006Bu-On for qemu-devel@nongnu.org; Thu, 10 Dec 2009 05:34:47 -0500 Received: from [199.232.76.173] (port=40493 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NIgM6-0006Bn-BJ for qemu-devel@nongnu.org; Thu, 10 Dec 2009 05:34:42 -0500 Received: from mx1.redhat.com ([209.132.183.28]:20732) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NIgM4-0001JD-Qg for qemu-devel@nongnu.org; Thu, 10 Dec 2009 05:34:41 -0500 From: Markus Armbruster Subject: Re: [Qemu-devel] [PATCH 19/19] VNC: Convert do_info_vnc() to QObject References: <1260376078-8694-1-git-send-email-lcapitulino@redhat.com> <1260376078-8694-20-git-send-email-lcapitulino@redhat.com> Date: Thu, 10 Dec 2009 11:34:37 +0100 In-Reply-To: <1260376078-8694-20-git-send-email-lcapitulino@redhat.com> (Luiz Capitulino's message of "Wed, 9 Dec 2009 14:27:58 -0200") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org Luiz Capitulino writes: > Return a QDict with server information. Connected clients are returned > as a QList of QDicts. > > The new functions (vnc_qdict_remote_addr(), vnc_qdict_local_addr() and > put_addr_qdict()) are used to insert 'host' and 'service' information > in the returned QDict. > > This patch is big, but I don't see how to split it. > > Signed-off-by: Luiz Capitulino > --- > console.h | 3 +- > monitor.c | 3 +- > vnc.c | 191 +++++++++++++++++++++++++++++++++++++++++++++++++++---------- > 3 files changed, 164 insertions(+), 33 deletions(-) > [...] > diff --git a/vnc.c b/vnc.c > index 32c4678..f0fea6a 100644 > --- a/vnc.c > +++ b/vnc.c [...] > +/** > + * do_info_vnc(): Show VNC server information > + * > + * Return a QDict with server information. Connected clients are returned > + * as a QList of QDicts. > + * > + * The main QDict contains the following: > + * > + * - "status": "disabled" or "enabled" > + * - "host": server's IP address > + * - "service": server's port number > + * - "auth": authentication method (optional) > + * - "clients": a QList of all connected clients > + * > + * Clients are described by a QDict, with the following information: > + * > + * - "host": client's IP address > + * - "service": client's port number > + * - "x509 dname": TLS dname (optional) Sure you want dict keys with spaces? I'd prefer "x509-dname". > + * - "username": SASL username (optional) > + * > + * Example: > + * > + * { "status": "enabled", "host": "0.0.0.0", "service": "50402", "auth": "vnc", > + * "clients": [ { "host": "127.0.0.1", "service": "50401" } ] } > + */ > +void do_info_vnc(Monitor *mon, QObject **ret_data) [...]