Revision bb6e6364 net.h
b/net.h | ||
---|---|---|
26 | 26 |
|
27 | 27 |
/* VLANs support */ |
28 | 28 |
|
29 |
typedef enum { |
|
30 |
NET_CLIENT_TYPE_NONE, |
|
31 |
NET_CLIENT_TYPE_NIC, |
|
32 |
NET_CLIENT_TYPE_SLIRP, |
|
33 |
NET_CLIENT_TYPE_TAP, |
|
34 |
NET_CLIENT_TYPE_SOCKET, |
|
35 |
NET_CLIENT_TYPE_VDE, |
|
36 |
NET_CLIENT_TYPE_DUMP |
|
37 |
} net_client_type; |
|
38 |
|
|
29 | 39 |
typedef int (NetCanReceive)(VLANClientState *); |
30 | 40 |
typedef ssize_t (NetReceive)(VLANClientState *, const uint8_t *, size_t); |
31 | 41 |
typedef ssize_t (NetReceiveIOV)(VLANClientState *, const struct iovec *, int); |
... | ... | |
33 | 43 |
typedef void (LinkStatusChanged)(VLANClientState *); |
34 | 44 |
|
35 | 45 |
struct VLANClientState { |
46 |
net_client_type type; |
|
36 | 47 |
NetReceive *receive; |
37 | 48 |
NetReceiveIOV *receive_iov; |
38 | 49 |
/* Packets may still be sent if this returns zero. It's used to |
Also available in: Unified diff