diff options
author | Mark McLoughlin <markmc@redhat.com> | 2009-10-22 17:43:41 +0100 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-10-27 12:29:01 -0500 |
commit | ca77d175912f7d0b2296e8e3a803a0763c00bc0b (patch) | |
tree | d1b7908cee9de4ee213179b7b027aba610f6fd6e /net.h | |
parent | c0b8e49c695ac11e3ef543db9ea2d8a1f62ccfce (diff) | |
download | hqemu-ca77d175912f7d0b2296e8e3a803a0763c00bc0b.zip hqemu-ca77d175912f7d0b2296e8e3a803a0763c00bc0b.tar.gz |
net: add an API for 'raw' packets
In the case where a NIC and backend agree on a packet header format,
this API allows injecting packets which lack the agreed upon header.
We need this for sending our gratuitous ARP.
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'net.h')
-rw-r--r-- | net.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -45,6 +45,7 @@ typedef void (LinkStatusChanged)(VLANClientState *); struct VLANClientState { net_client_type type; NetReceive *receive; + NetReceive *receive_raw; NetReceiveIOV *receive_iov; /* Packets may still be sent if this returns zero. It's used to rate-limit the slirp code. */ @@ -89,6 +90,7 @@ ssize_t qemu_sendv_packet(VLANClientState *vc, const struct iovec *iov, ssize_t qemu_sendv_packet_async(VLANClientState *vc, const struct iovec *iov, int iovcnt, NetPacketSent *sent_cb); void qemu_send_packet(VLANClientState *vc, const uint8_t *buf, int size); +ssize_t qemu_send_packet_raw(VLANClientState *vc, const uint8_t *buf, int size); ssize_t qemu_send_packet_async(VLANClientState *vc, const uint8_t *buf, int size, NetPacketSent *sent_cb); void qemu_purge_queued_packets(VLANClientState *vc); |