diff options
| author | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-12-17 19:13:11 +0000 |
|---|---|---|
| committer | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-12-17 19:13:11 +0000 |
| commit | fbe78f4f55c6fdf1f8df3d82bf31835de9283fa3 (patch) | |
| tree | e56c27af0fd2bb0b2116779e556f51a2a019f9e6 /net.h | |
| parent | fc9902d9c7793a5b854df126a059cce14ecc29f3 (diff) | |
| download | focaccia-qemu-fbe78f4f55c6fdf1f8df3d82bf31835de9283fa3.tar.gz focaccia-qemu-fbe78f4f55c6fdf1f8df3d82bf31835de9283fa3.zip | |
virtio-net support
This adds virtio-net support. This is based on the virtio-net driver that exists in kvm-userspace. This also adds a new qemu_sendv_packet which virtio-net requires. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6073 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'net.h')
| -rw-r--r-- | net.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net.h b/net.h index a2b01aeb57..63ba7ed29b 100644 --- a/net.h +++ b/net.h @@ -1,12 +1,17 @@ #ifndef QEMU_NET_H #define QEMU_NET_H +#include "qemu-common.h" + /* VLANs support */ +typedef ssize_t (IOReadvHandler)(void *, const struct iovec *, int); + typedef struct VLANClientState VLANClientState; struct VLANClientState { IOReadHandler *fd_read; + IOReadvHandler *fd_readv; /* Packets may still be sent if this returns zero. It's used to rate-limit the slirp code. */ IOCanRWHandler *fd_can_read; @@ -30,6 +35,8 @@ VLANClientState *qemu_new_vlan_client(VLANState *vlan, void *opaque); void qemu_del_vlan_client(VLANClientState *vc); int qemu_can_send_packet(VLANClientState *vc); +ssize_t qemu_sendv_packet(VLANClientState *vc, const struct iovec *iov, + int iovcnt); void qemu_send_packet(VLANClientState *vc, const uint8_t *buf, int size); void qemu_handler_true(void *opaque); |