From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=40252 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PJ2Js-0000Ti-7Q for qemu-devel@nongnu.org; Thu, 18 Nov 2010 06:06:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PJ2Jr-0003HG-27 for qemu-devel@nongnu.org; Thu, 18 Nov 2010 06:06:23 -0500 Received: from mx1.redhat.com ([209.132.183.28]:35825) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PJ2Jq-0003HB-QG for qemu-devel@nongnu.org; Thu, 18 Nov 2010 06:06:23 -0500 Message-ID: <4CE508AA.7000405@redhat.com> Date: Thu, 18 Nov 2010 12:06:18 +0100 From: Jes Sorensen MIME-Version: 1.0 Subject: Re: [Qemu-devel] [RFC][PATCH v3 01/21] virtproxy: base data structures and constants References: <1289870175-14880-1-git-send-email-mdroth@linux.vnet.ibm.com> <1289870175-14880-2-git-send-email-mdroth@linux.vnet.ibm.com> In-Reply-To: <1289870175-14880-2-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:15, Michael Roth wrote: > Signed-off-by: Michael Roth > --- > virtproxy.c | 136 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > virtproxy.h | 34 +++++++++++++++ > 2 files changed, 170 insertions(+), 0 deletions(-) > create mode 100644 virtproxy.c > create mode 100644 virtproxy.h > > diff --git a/virtproxy.c b/virtproxy.c > new file mode 100644 > index 0000000..8f18d83 > --- /dev/null > +++ b/virtproxy.c > @@ -0,0 +1,136 @@ > +/* > + * virt-proxy - host/guest communication layer > + * > + * Copyright IBM Corp. 2010 > + * > + * Authors: > + * Michael Roth > + * > + * This work is licensed under the terms of the GNU GPL, version 2 or later. > + * See the COPYING file in the top-level directory. > + * > + */ > + > +#include "virtproxy.h" > + > +#define VP_SERVICE_ID_LEN 32 /* max length of service id string */ > +#define VP_PKT_DATA_LEN 1024 /* max proxied bytes per VPPacket */ > +#define VP_CONN_DATA_LEN 1024 /* max bytes conns can send at a time */ > +#define VP_MAGIC 0x1F374059 > + > +/* listening fd, one for each service we're forwarding to remote end */ > +typedef struct VPOForward { > + VPDriver *drv; > + int listen_fd; > + char service_id[VP_SERVICE_ID_LEN]; > + QLIST_ENTRY(VPOForward) next; > +} VPOForward; I am really not a fan of the typedefmeharder approach you are taking in here, but others may disagree with me. Cheers, Jes