Revision cda9046b net.h
b/net.h | ||
---|---|---|
5 | 5 |
|
6 | 6 |
/* VLANs support */ |
7 | 7 |
|
8 |
typedef ssize_t (IOReadvHandler)(void *, const struct iovec *, int); |
|
9 |
|
|
10 | 8 |
typedef struct VLANClientState VLANClientState; |
11 | 9 |
|
10 |
typedef int (NetCanReceive)(void *); |
|
11 |
typedef void (NetReceive)(void *, const uint8_t *, size_t); |
|
12 |
typedef ssize_t (NetReceiveIOV)(void *, const struct iovec *, int); |
|
12 | 13 |
typedef void (NetCleanup) (VLANClientState *); |
13 | 14 |
typedef void (LinkStatusChanged)(VLANClientState *); |
14 | 15 |
|
15 | 16 |
struct VLANClientState { |
16 |
IOReadHandler *fd_read;
|
|
17 |
IOReadvHandler *fd_readv;
|
|
17 |
NetReceive *receive;
|
|
18 |
NetReceiveIOV *receive_iov;
|
|
18 | 19 |
/* Packets may still be sent if this returns zero. It's used to |
19 | 20 |
rate-limit the slirp code. */ |
20 |
IOCanRWHandler *fd_can_read;
|
|
21 |
NetCanReceive *can_receive;
|
|
21 | 22 |
NetCleanup *cleanup; |
22 | 23 |
LinkStatusChanged *link_status_changed; |
23 | 24 |
int link_down; |
... | ... | |
51 | 52 |
VLANClientState *qemu_new_vlan_client(VLANState *vlan, |
52 | 53 |
const char *model, |
53 | 54 |
const char *name, |
54 |
IOCanRWHandler *fd_can_read,
|
|
55 |
IOReadHandler *fd_read,
|
|
56 |
IOReadvHandler *fd_readv,
|
|
55 |
NetCanReceive *can_receive,
|
|
56 |
NetReceive *receive,
|
|
57 |
NetReceiveIOV *receive_iov,
|
|
57 | 58 |
NetCleanup *cleanup, |
58 | 59 |
void *opaque); |
59 | 60 |
void qemu_del_vlan_client(VLANClientState *vc); |
... | ... | |
130 | 131 |
|
131 | 132 |
void qdev_get_macaddr(DeviceState *dev, uint8_t *macaddr); |
132 | 133 |
VLANClientState *qdev_get_vlan_client(DeviceState *dev, |
133 |
IOCanRWHandler *fd_can_read,
|
|
134 |
IOReadHandler *fd_read,
|
|
135 |
IOReadvHandler *fd_readv,
|
|
134 |
NetCanReceive *can_receive,
|
|
135 |
NetReceive *receive,
|
|
136 |
NetReceiveIOV *receive_iov,
|
|
136 | 137 |
NetCleanup *cleanup, |
137 | 138 |
void *opaque); |
138 | 139 |
|
Also available in: Unified diff