mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
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
This commit is contained in:
parent
fc9902d9c7
commit
fbe78f4f55
6 changed files with 466 additions and 3 deletions
7
net.h
7
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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue