summaryrefslogtreecommitdiffstats
path: root/include/net/net.h
diff options
context:
space:
mode:
authorMarc-André Lureau2019-01-17 12:43:54 +0100
committerSamuel Thibault2019-02-07 14:49:08 +0100
commit625a526b3298ce593983923b4d10fa582555f26d (patch)
tree23a61e6bd768759314f416b5674e776d5c1868c5 /include/net/net.h
parentslirp: prefer c99 types over BSD kind (diff)
downloadqemu-625a526b3298ce593983923b4d10fa582555f26d.tar.gz
qemu-625a526b3298ce593983923b4d10fa582555f26d.tar.xz
qemu-625a526b3298ce593983923b4d10fa582555f26d.zip
slirp: improve send_packet() callback
Use a more descriptive name for the callback. Reuse the SlirpWriteCb type. Wrap it to check that all data has been written. Return a ssize_t for potential error handling and data-loss reporting. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Diffstat (limited to 'include/net/net.h')
-rw-r--r--include/net/net.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/net.h b/include/net/net.h
index 643295d163..075cc01267 100644
--- a/include/net/net.h
+++ b/include/net/net.h
@@ -146,7 +146,7 @@ ssize_t qemu_sendv_packet(NetClientState *nc, const struct iovec *iov,
int iovcnt);
ssize_t qemu_sendv_packet_async(NetClientState *nc, const struct iovec *iov,
int iovcnt, NetPacketSent *sent_cb);
-void qemu_send_packet(NetClientState *nc, const uint8_t *buf, int size);
+ssize_t qemu_send_packet(NetClientState *nc, const uint8_t *buf, int size);
ssize_t qemu_send_packet_raw(NetClientState *nc, const uint8_t *buf, int size);
ssize_t qemu_send_packet_async(NetClientState *nc, const uint8_t *buf,
int size, NetPacketSent *sent_cb);