From patchwork Tue Jan 13 16:57:51 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= X-Patchwork-Id: 428527 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id F3EDC1401B5 for ; Wed, 14 Jan 2015 03:58:34 +1100 (AEDT) Received: from localhost ([::1]:40195 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YB4nX-0002m0-KY for incoming@patchwork.ozlabs.org; Tue, 13 Jan 2015 11:58:31 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40675) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YB4nG-0002Vc-0Y for qemu-devel@nongnu.org; Tue, 13 Jan 2015 11:58:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YB4nB-0002I7-Mf for qemu-devel@nongnu.org; Tue, 13 Jan 2015 11:58:13 -0500 Received: from mail-qg0-x236.google.com ([2607:f8b0:400d:c04::236]:53321) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YB4nB-0002I1-I5 for qemu-devel@nongnu.org; Tue, 13 Jan 2015 11:58:09 -0500 Received: by mail-qg0-f54.google.com with SMTP id l89so3032011qgf.13 for ; Tue, 13 Jan 2015 08:58:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=z9RtZUGqMeHzsYqJjUO6Kg59WHonERdGmcWdyy6aHUo=; b=oB7oWoLIq7nBqewrP7yKq/+/NOgbQY3Z+DvvjCNbgoZFoDN0fpBKtWL3kK5bCaVeec o2ujoBV1eB9TjknviSzk6XPYWUaoN1A4HTYpAMgJKTL1SLnVpTvyExDqMmEZG1pdQkss KunKsRVrcKDoi1nTVWhWiH1grGpNomSMAM6+Rtqnm4LOROvQmPH/4FdsY2xDOdPZXv2f XrOq2XZvuaBgntUYxj5JXQzNXDnfLWgIlq3Kh4T4FtzW1MR2i8mSS6LrLxNgXKMzNAwC 12h223GmH92oeWtO6XoB3jhMoGGUnD1HA7c7OThSl6vDpTYKlYeKzPxn4ByIRcbiXIGV rozg== X-Received: by 10.140.92.209 with SMTP id b75mr57763517qge.60.1421168288626; Tue, 13 Jan 2015 08:58:08 -0800 (PST) Received: from localhost (bne75-h02-31-39-163-232.dsl.sta.abo.bbox.fr. [31.39.163.232]) by mx.google.com with ESMTPSA id a4sm18095691qge.24.2015.01.13.08.58.07 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Jan 2015 08:58:07 -0800 (PST) From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= To: qemu-devel@nongnu.org Date: Tue, 13 Jan 2015 17:57:51 +0100 Message-Id: <1421168271-19026-1-git-send-email-marcandre.lureau@gmail.com> X-Mailer: git-send-email 2.1.0 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400d:c04::236 Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , kraxel@redhat.com Subject: [Qemu-devel] [PATCH] spice: add unix address support X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Teach qemu to set up a Spice server with a UNIX socket using the following arguments -spice unix,addr=path. --- The Spice server patches are under review: http://lists.freedesktop.org/archives/spice-devel/2015-January/018559.html 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=]\n" " [,x509-key-file=][,x509-key-password=]\n" " [,x509-cert-file=][,x509-cacert-file=]\n" - " [,x509-dh-key-file=][,addr=addr][,ipv4|ipv6]\n" + " [,x509-dh-key-file=][,addr=addr][,ipv4|ipv6|unix]\n" " [,tls-ciphers=]\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= 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();