net: introduce NetClientInfo
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> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
b50a3a21ca
commit
3ed79cc949
11
net.h
11
net.h
@ -42,6 +42,17 @@ typedef ssize_t (NetReceiveIOV)(VLANClientState *, const struct iovec *, int);
|
|||||||
typedef void (NetCleanup) (VLANClientState *);
|
typedef void (NetCleanup) (VLANClientState *);
|
||||||
typedef void (LinkStatusChanged)(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 {
|
struct VLANClientState {
|
||||||
net_client_type type;
|
net_client_type type;
|
||||||
NetReceive *receive;
|
NetReceive *receive;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user