diff options
author | Mark McLoughlin <markmc@redhat.com> | 2009-05-18 13:13:16 +0100 |
---|---|---|
committer | Mark McLoughlin <markmc@redhat.com> | 2009-06-09 11:38:49 +0100 |
commit | cda9046ba7dbba45f3016e5d60caffa2d72960fa (patch) | |
tree | da29fa06d782170b8214be44382549735eafa3b3 /net.h | |
parent | net: add fd_readv() handler to qemu_new_vlan_client() args (diff) | |
download | qemu-kvm-cda9046ba7dbba45f3016e5d60caffa2d72960fa.tar.gz qemu-kvm-cda9046ba7dbba45f3016e5d60caffa2d72960fa.tar.bz2 qemu-kvm-cda9046ba7dbba45f3016e5d60caffa2d72960fa.zip |
net: re-name vc->fd_read() to vc->receive()
VLANClientState's fd_read() handler doesn't read from file
descriptors, it adds a buffer to the client's receive queue.
Re-name the handlers to make things a little less confusing.
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Diffstat (limited to 'net.h')
-rw-r--r-- | net.h | 23 |
1 files changed, 12 insertions, 11 deletions
@@ -5,19 +5,20 @@ /* VLANs support */ -typedef ssize_t (IOReadvHandler)(void *, const struct iovec *, int); - typedef struct VLANClientState VLANClientState; +typedef int (NetCanReceive)(void *); +typedef void (NetReceive)(void *, const uint8_t *, size_t); +typedef ssize_t (NetReceiveIOV)(void *, const struct iovec *, int); typedef void (NetCleanup) (VLANClientState *); typedef void (LinkStatusChanged)(VLANClientState *); struct VLANClientState { - IOReadHandler *fd_read; - IOReadvHandler *fd_readv; + NetReceive *receive; + NetReceiveIOV *receive_iov; /* Packets may still be sent if this returns zero. It's used to rate-limit the slirp code. */ - IOCanRWHandler *fd_can_read; + NetCanReceive *can_receive; NetCleanup *cleanup; LinkStatusChanged *link_status_changed; int link_down; @@ -51,9 +52,9 @@ VLANState *qemu_find_vlan(int id); VLANClientState *qemu_new_vlan_client(VLANState *vlan, const char *model, const char *name, - IOCanRWHandler *fd_can_read, - IOReadHandler *fd_read, - IOReadvHandler *fd_readv, + NetCanReceive *can_receive, + NetReceive *receive, + NetReceiveIOV *receive_iov, NetCleanup *cleanup, void *opaque); void qemu_del_vlan_client(VLANClientState *vc); @@ -130,9 +131,9 @@ void net_host_device_remove(Monitor *mon, int vlan_id, const char *device); void qdev_get_macaddr(DeviceState *dev, uint8_t *macaddr); VLANClientState *qdev_get_vlan_client(DeviceState *dev, - IOCanRWHandler *fd_can_read, - IOReadHandler *fd_read, - IOReadvHandler *fd_readv, + NetCanReceive *can_receive, + NetReceive *receive, + NetReceiveIOV *receive_iov, NetCleanup *cleanup, void *opaque); |