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 <mdr...@linux.vnet.ibm.com> > --- > 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