Enhance 'info vnc' monitor output ("Daniel P. Berrange")
commit37beb4aa5dd10764a492d76822f2d7ec04b33fd0
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>
Fri, 6 Mar 2009 20:27:05 +0000 (6 20:27 +0000)
committerMark McLoughlin <markmc@redhat.com>
Fri, 11 Sep 2009 10:37:31 +0000 (11 11:37 +0100)
tree596e516a578d4220aabce860f9e3b0b75b8e9ad7
parent9883355cd27949061b396a42bb724853b75ce7f9
Enhance 'info vnc' monitor output ("Daniel P. Berrange")

The current 'info vnc' monitor output just displays the VNC server address
as provided by the -vnc command line flag. This isn't particularly useful
since it doesn't tell you what VNC is actually listening on. eg, if you
use '-vnc :1' it is useful to know whether this translated to '0.0.0.0:5901'
or chose IPv6 ':::5901'.  It is also useful to know the address of the
client that is currently connected. It is also useful to know the active
authentication (if any).

This patch tweaks the monitor output to look like:

   (qemu) info vnc
    Server:
         address: 0.0.0.0:5902
            auth: vencrypt+x509
    Client: none

And when 2 clients are connected

   (qemu) info vnc
    Server:
         address: 0.0.0.0:5902
            auth: vencrypt+x509
    Client:
         address: 10.33.6.67:38621
    Client:
         address: 10.33.6.63:38620

More data will be added to this later in the patch series...

The 'addr_to_string' helper method in this patch is overly generic
for the needs of this patch alone. This is because it will be re-used
by the later SASL patches in this series, where the flexibility is
important.

(cherry picked from commit 1ff7df1a848044f58d0f3540f1447db4bb1d2d20)

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Fedora-patch: 02-vnc-monitor-info.patch
vnc.c