aboutsummaryrefslogtreecommitdiff
path: root/slirp/libslirp.h
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2019-02-12 17:25:19 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2019-03-07 12:46:31 +0100
commitd890344166449c2c4cc039f19af61600920cd697 (patch)
tree39c0a5a5c95d4bc9bcc2005a7782762b006c649b /slirp/libslirp.h
parentb92a1ff497dd2f84902b252ad3de22fcc33b60e3 (diff)
slirp: use libslirp migration code
slirp migration code uses QEMU vmstate so far, when building WITH_QEMU. Introduce slirp_state_{load,save,version}() functions to move the state saving handling to libslirp side. So far, the bitstream compatibility should remain equal with current QEMU, as this is effectively using the same code, with the same format etc. When libslirp is made standalone, we will need some mechanism to ensure bitstream compatibility regardless of the libslirp version installed. See the FIXME note in the code. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20190212162524.31504-3-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.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/slirp/libslirp.h b/slirp/libslirp.h
index 57bd6f597c..2d13950065 100644
--- a/slirp/libslirp.h
+++ b/slirp/libslirp.h
@@ -102,6 +102,14 @@ void slirp_socket_recv(Slirp *slirp, struct in_addr guest_addr,
int guest_port, const uint8_t *buf, int size);
size_t slirp_socket_can_recv(Slirp *slirp, struct in_addr guest_addr,
int guest_port);
+
+void slirp_state_save(Slirp *s, SlirpWriteCb write_cb, void *opaque);
+
+int slirp_state_load(Slirp *s, int version_id,
+ SlirpReadCb read_cb, void *opaque);
+
+int slirp_state_version(void);
+
#ifdef __cplusplus
} /* extern "C" */
#endif