From patchwork Fri Oct 16 13:41:58 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 36223 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 808EBB7BB2 for ; Sat, 17 Oct 2009 01:30:42 +1100 (EST) Received: from localhost ([127.0.0.1]:55034 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MynpH-0005dM-GT for incoming@patchwork.ozlabs.org; Fri, 16 Oct 2009 10:30:39 -0400 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 Received: from zweiblum.home.kraxel.org (vpn2-9-112.ams2.redhat.com [10.36.9.112]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id n9GDg5VO015189; Fri, 16 Oct 2009 09:42:06 -0400 Received: by zweiblum.home.kraxel.org (Postfix, from userid 500) id F16D070101; Fri, 16 Oct 2009 15:42:03 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org 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> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.18 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: Gerd Hoffmann Subject: [Qemu-devel] [RfC PATCH v3 05/10] qdev/net: common nic property bits X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 *);