From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Marc-André Lureau" <marcandre.lureau@gmail.com>,
"Gerd Hoffmann" <kraxel@redhat.com>,
"Anthony Liguori" <aliguori@amazon.com>
Subject: [Qemu-devel] [PULL 1/2] spice: add unix address support
Date: Thu, 22 Jan 2015 12:18:33 +0100 [thread overview]
Message-ID: <1421925514-12398-2-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1421925514-12398-1-git-send-email-kraxel@redhat.com>
From: Marc-André Lureau <marcandre.lureau@gmail.com>
Teach qemu to set up a Spice server with a UNIX socket using the
following arguments -spice unix,addr=path.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
qemu-options.hx | 3 ++-
ui/spice-core.c | 9 +++++++++
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/qemu-options.hx b/qemu-options.hx
index 10b9568..85ca3ad 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -953,7 +953,7 @@ DEF("spice", HAS_ARG, QEMU_OPTION_spice,
"-spice [port=port][,tls-port=secured-port][,x509-dir=<dir>]\n"
" [,x509-key-file=<file>][,x509-key-password=<file>]\n"
" [,x509-cert-file=<file>][,x509-cacert-file=<file>]\n"
- " [,x509-dh-key-file=<file>][,addr=addr][,ipv4|ipv6]\n"
+ " [,x509-dh-key-file=<file>][,addr=addr][,ipv4|ipv6|unix]\n"
" [,tls-ciphers=<list>]\n"
" [,tls-channel=[main|display|cursor|inputs|record|playback]]\n"
" [,plaintext-channel=[main|display|cursor|inputs|record|playback]]\n"
@@ -982,6 +982,7 @@ Set the IP address spice is listening on. Default is any address.
@item ipv4
@item ipv6
+@item unix
Force using the specified IP version.
@item password=<secret>
diff --git a/ui/spice-core.c b/ui/spice-core.c
index fe705c1..c8f7f18 100644
--- a/ui/spice-core.c
+++ b/ui/spice-core.c
@@ -436,6 +436,11 @@ static QemuOptsList qemu_spice_opts = {
},{
.name = "ipv6",
.type = QEMU_OPT_BOOL,
+#ifdef SPICE_ADDR_FLAG_UNIX_ONLY
+ },{
+ .name = "unix",
+ .type = QEMU_OPT_BOOL,
+#endif
},{
.name = "password",
.type = QEMU_OPT_STRING,
@@ -708,6 +713,10 @@ void qemu_spice_init(void)
addr_flags |= SPICE_ADDR_FLAG_IPV4_ONLY;
} else if (qemu_opt_get_bool(opts, "ipv6", 0)) {
addr_flags |= SPICE_ADDR_FLAG_IPV6_ONLY;
+#ifdef SPICE_ADDR_FLAG_UNIX_ONLY
+ } else if (qemu_opt_get_bool(opts, "unix", 0)) {
+ addr_flags |= SPICE_ADDR_FLAG_UNIX_ONLY;
+#endif
}
spice_server = spice_server_new();
--
1.8.3.1
next prev parent reply other threads:[~2015-01-22 11:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-22 11:18 [Qemu-devel] [PULL 0/2] spice: fix coverity defect, add unix address support Gerd Hoffmann
2015-01-22 11:18 ` Gerd Hoffmann [this message]
2015-01-22 11:18 ` [Qemu-devel] [PULL 2/2] spice: fix coverity reported defect in display code Gerd Hoffmann
2015-01-22 17:41 ` [Qemu-devel] [PULL 0/2] spice: fix coverity defect, add unix address support Peter Maydell
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=1421925514-12398-2-git-send-email-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=aliguori@amazon.com \
--cc=marcandre.lureau@gmail.com \
--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).