From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:44684) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TP7A9-0008MD-8G for qemu-devel@nongnu.org; Fri, 19 Oct 2012 03:38:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TP7A8-0002Za-9T for qemu-devel@nongnu.org; Fri, 19 Oct 2012 03:38:33 -0400 Received: from mail-bk0-f45.google.com ([209.85.214.45]:34832) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TP7A8-0002ZT-2K for qemu-devel@nongnu.org; Fri, 19 Oct 2012 03:38:32 -0400 Received: by mail-bk0-f45.google.com with SMTP id jf3so44942bkc.4 for ; Fri, 19 Oct 2012 00:38:31 -0700 (PDT) Date: Fri, 19 Oct 2012 09:38:28 +0200 From: Stefan Hajnoczi Message-ID: <20121019073828.GB1126@stefanha-thinkpad.redhat.com> References: <1350572215-2231-1-git-send-email-stefanha@redhat.com> <1350572215-2231-5-git-send-email-stefanha@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH 4/4] net: convert NetClientState to QOM List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org On Thu, Oct 18, 2012 at 05:06:33PM +0200, Paolo Bonzini wrote: > Il 18/10/2012 16:56, Stefan Hajnoczi ha scritto: > > > > -static NetClientInfo net_tap_win32_info = { > > - .type = NET_CLIENT_OPTIONS_KIND_TAP, > > - .size = sizeof(TAPState), > > - .receive = tap_receive, > > - .cleanup = tap_cleanup, > > +#define TYPE_TAP_WIN32_NET_CLIENT "tap-win32-net-client" > > + > > +static void tap_win32_net_client_class_init(ObjectClass *klass, > > + void *class_data) > > +{ > > + NetClientClass *ncc = NET_CLIENT_CLASS(klass); > > + > > + ncc->type_str = "tap"; > > + ncc->receive = tap_receive; > > + ncc->cleanup = tap_cleanup; > > +} > > + > > +static TypeInfo tap_win32_net_client_info = { > > + .name = TYPE_TAP_WIN32_NET_CLIENT, > > + .parent = TYPE_NET_CLIENT, > > Why a separate type name than TYPE_NET_CLIENT? It doesn't really matter > if the client is Unix or Win32. You are right, there's no need to give UNIX and Win32 unique names. The QemuOpts they accept are the same already, so I can't think of a situation where we'd want to distinguish. Stefan