On Tue, Apr 17, 2012 at 03:32:39PM +0300, Dmitry Fleytman wrote: > diff --git a/hw/vmxnet_utils.h b/hw/vmxnet_utils.h > new file mode 100644 > index 0000000..18d218d > --- /dev/null > +++ b/hw/vmxnet_utils.h > @@ -0,0 +1,341 @@ > +/* > + * QEMU VMWARE VMXNET* paravirtual NICs - network auxiliary code > + * > + * Copyright (c) 2012 Ravello Systems LTD (http://ravellosystems.com) > + * > + * Developed by Daynix Computing LTD (http://www.daynix.com) > + * > + * Authors: > + * Dmitry Fleytman <dmi...@daynix.com> > + * Tamir Shomer <tam...@daynix.com> > + * Yan Vugenfirer <y...@daynix.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. > + * > + */ > + > +#ifndef _VMXNET_UTILS_H_ > +#define _VMXNET_UTILS_H_
Please do not start identifiers with _ followed by an uppercase lattters. > + > +#include <sys/types.h> > +#include <bswap.h> > +#include <string.h> > +#include <targphys.h> > +#include <hw/virtio-net.h> > + > +struct eth_header { > + uint8_t h_dest[ETH_ALEN]; /* destination eth addr */ > + uint8_t h_source[ETH_ALEN]; /* source ether addr */ > + uint16_t h_proto; /* packet type ID field */ > +}; > + And fix struct definitions to 1. follow qemu coding style 2. start with vmxnet I also don't really understand why are these functions split out - vmxnet is the only user, no?