Patchwork [08/44] net: introduce NetClientInfo

login
register
mail settings
Submitter Mark McLoughlin
Date Nov. 25, 2009, 6:49 p.m.
Message ID <1259174977-26212-9-git-send-email-markmc@redhat.com>
Download mbox | patch
Permalink /patch/39454/
State New
Headers show

Comments

Mark McLoughlin - Nov. 25, 2009, 6:49 p.m.
This structure holds data which is common to all instances of a given
net client type/model.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
---
 net.h |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

Patch

diff --git a/net.h b/net.h
index 9ffcfe3..56c5849 100644
--- a/net.h
+++ b/net.h
@@ -42,6 +42,17 @@  typedef ssize_t (NetReceiveIOV)(VLANClientState *, const struct iovec *, int);
 typedef void (NetCleanup) (VLANClientState *);
 typedef void (LinkStatusChanged)(VLANClientState *);
 
+typedef struct NetClientInfo {
+    net_client_type type;
+    size_t size;
+    NetReceive *receive;
+    NetReceive *receive_raw;
+    NetReceiveIOV *receive_iov;
+    NetCanReceive *can_receive;
+    NetCleanup *cleanup;
+    LinkStatusChanged *link_status_changed;
+} NetClientInfo;
+
 struct VLANClientState {
     net_client_type type;
     NetReceive *receive;