qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC][PATCH v3 18/21] virtproxy: qemu integration, add


From: Jes Sorensen
Subject: Re: [Qemu-devel] [RFC][PATCH v3 18/21] virtproxy: qemu integration, add virtproxy chardev
Date: Thu, 18 Nov 2010 12:47:06 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101103 Fedora/1.0-0.33.b2pre.fc14 Lightning/1.0b3pre Thunderbird/3.1.6

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 <address@hidden>
> ---
>  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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]