qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [RfC PATCH v3 05/10] qdev/net: common nic property bits


From: Gerd Hoffmann
Subject: [Qemu-devel] [RfC PATCH v3 05/10] qdev/net: common nic property bits
Date: Fri, 16 Oct 2009 15:41:58 +0200

Signed-off-by: Gerd Hoffmann <address@hidden>
---
 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]