From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=48703 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PJ2xL-0008Vj-Ig for qemu-devel@nongnu.org; Thu, 18 Nov 2010 06:47:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PJ2xK-000290-Ha for qemu-devel@nongnu.org; Thu, 18 Nov 2010 06:47:11 -0500 Received: from mx1.redhat.com ([209.132.183.28]:43135) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PJ2xK-00028o-AA for qemu-devel@nongnu.org; Thu, 18 Nov 2010 06:47:10 -0500 Message-ID: <4CE5123A.3050508@redhat.com> Date: Thu, 18 Nov 2010 12:47:06 +0100 From: Jes Sorensen MIME-Version: 1.0 Subject: Re: [Qemu-devel] [RFC][PATCH v3 18/21] virtproxy: qemu integration, add virtproxy chardev References: <1289870175-14880-1-git-send-email-mdroth@linux.vnet.ibm.com> <1289870175-14880-19-git-send-email-mdroth@linux.vnet.ibm.com> In-Reply-To: <1289870175-14880-19-git-send-email-mdroth@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Roth Cc: agl@linux.vnet.ibm.com, abeekhof@redhat.com, qemu-devel@nongnu.org, aliguori@linux.vnet.ibm.com, ryanh@us.ibm.com, amit.shah@redhat.com On 11/16/10 02:16, Michael Roth wrote: > This allows us to create a virtproxy instance via a chardev. It can now > be created with something like: > > qemu -chardev virtproxy,id=vp1 \ > -device virtio-serial \ > -device virtserialport,chardev=vp1 > > In the future the ability to add oforwards/iforwards in the command-line > invocation and the monitor will be added. For now we leave it to users > of virtproxy (currently only virtagent) to set up the forwarding > sockets/ports they need via direct virtproxy API calls. > > Signed-off-by: Michael Roth > --- > qemu-char.c | 130 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > qemu-config.c | 6 +++ > 2 files changed, 136 insertions(+), 0 deletions(-) > > diff --git a/qemu-char.c b/qemu-char.c > index 88997f9..bc7925c 100644 > --- a/qemu-char.c > +++ b/qemu-char.c > @@ -1902,6 +1902,135 @@ return_err: > } > > /***********************************************************/ > +/* Virtproxy chardev driver */ > + > +#include "virtproxy.h" > + > +static int vp_init_oforward(VPDriver *drv, QemuOpts *opts) > +{ > + int ret, fd; > + const char *service_id; > + > + if (qemu_opt_get(opts, "host") != NULL) { > + fd = inet_listen_opts(opts, 0); > + } else if (qemu_opt_get(opts, "path") != NULL) { > + fd = unix_listen_opts(opts); > + } else { > + fprintf(stderr, "unable to find listening socket host/addr info"); > + return -1; -1 again Cheers, Jes