aboutsummaryrefslogtreecommitdiff
path: root/slirp/libslirp.h
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2019-02-12 17:25:18 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2019-03-07 12:46:28 +0100
commitb92a1ff497dd2f84902b252ad3de22fcc33b60e3 (patch)
tree6a80a29c48e5ff53db54f839500edad2cb292054 /slirp/libslirp.h
parentffe02f5585d3fd722f9eb0ecdce6f128444c63d1 (diff)
slirp: adapt a subset of QEMU vmstate code
Add vmstate serialization code adapted from QEMU. Keep only the bits that are required for libslirp. Introduce a IStream/OStream interface to replace QEMU QFile abstraction. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20190212162524.31504-2-marcandre.lureau@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Diffstat (limited to 'slirp/libslirp.h')
-rw-r--r--slirp/libslirp.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/slirp/libslirp.h b/slirp/libslirp.h
index fccab42518..57bd6f597c 100644
--- a/slirp/libslirp.h
+++ b/slirp/libslirp.h
@@ -3,6 +3,7 @@
#include <stdint.h>
#include <stdbool.h>
+#include <sys/types.h>
#ifdef _WIN32
#include <winsock2.h>
@@ -26,6 +27,7 @@ enum {
SLIRP_POLL_HUP = 1 << 4,
};
+typedef ssize_t (*SlirpReadCb)(void *buf, size_t len, void *opaque);
typedef ssize_t (*SlirpWriteCb)(const void *buf, size_t len, void *opaque);
typedef void (*SlirpTimerCb)(void *opaque);
typedef int (*SlirpAddPollCb)(int fd, int events, void *opaque);