On 11/16/10 02:15, Michael Roth wrote:
> Signed-off-by: Michael Roth <mdr...@linux.vnet.ibm.com>
> ---
>  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      <mdr...@linux.vnet.ibm.com>
> + *
> + * 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


Reply via email to