From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Myn4c-0001yT-9w for qemu-devel@nongnu.org; Fri, 16 Oct 2009 09:42:27 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Myn4P-0001pw-3l for qemu-devel@nongnu.org; Fri, 16 Oct 2009 09:42:18 -0400 Received: from [199.232.76.173] (port=40517 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Myn4M-0001p9-Db for qemu-devel@nongnu.org; Fri, 16 Oct 2009 09:42:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54030) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Myn4L-0007n1-VF for qemu-devel@nongnu.org; Fri, 16 Oct 2009 09:42:10 -0400 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n9GDg8A0000354 for ; Fri, 16 Oct 2009 09:42:08 -0400 From: Gerd Hoffmann Date: Fri, 16 Oct 2009 15:41:58 +0200 Message-Id: <1255700523-15270-6-git-send-email-kraxel@redhat.com> In-Reply-To: <1255700523-15270-1-git-send-email-kraxel@redhat.com> References: <1255700523-15270-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [RfC PATCH v3 05/10] qdev/net: common nic property bits List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann Signed-off-by: Gerd Hoffmann --- net.h | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/net.h b/net.h index 6a24f55..77720af 100644 --- a/net.h +++ b/net.h @@ -11,6 +11,19 @@ struct MACAddr { uint8_t a[6]; }; +/* qdev nic properties */ + +typedef struct NICConf { + MACAddr macaddr; + VLANState *vlan; + VLANClientState *peer; +} NICConf; + +#define DEFINE_NIC_PROPERTIES(_state, _conf) \ + DEFINE_PROP_MACADDR("mac", _state, _conf.macaddr), \ + DEFINE_PROP_VLAN("vlan", _state, _conf.vlan), \ + DEFINE_PROP_NETDEV("netdev", _state, _conf.peer) + /* VLANs support */ typedef int (NetCanReceive)(VLANClientState *); -- 1.6.2.5