diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2019-01-17 15:43:58 +0400 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2019-02-07 15:49:08 +0200 |
commit | 3e0fad3aa5f9f36566ac2815a54288d214e58689 (patch) | |
tree | f2714d8506fe29bcaaaa4edabe341ee8befddc34 /slirp/libslirp.h | |
parent | deaeb3f71d1fdf199d5b949e8575303486e3dec8 (diff) |
slirp: pass opaque to all callbacks
This is friendlier for FFI bindings.
Signed-off-by: Marc-André Lureau <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.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/slirp/libslirp.h b/slirp/libslirp.h index b5c1b2122b..9b13d8250c 100644 --- a/slirp/libslirp.h +++ b/slirp/libslirp.h @@ -40,21 +40,21 @@ typedef struct SlirpCb { */ SlirpWriteCb send_packet; /* Print a message for an error due to guest misbehavior. */ - void (*guest_error)(const char *msg); + void (*guest_error)(const char *msg, void *opaque); /* Return the virtual clock value in nanoseconds */ - int64_t (*clock_get_ns)(void); + int64_t (*clock_get_ns)(void *opaque); /* Create a new timer with the given callback and opaque data */ - void *(*timer_new)(SlirpTimerCb cb, void *opaque); + void *(*timer_new)(SlirpTimerCb cb, void *cb_opaque, void *opaque); /* Remove and free a timer */ - void (*timer_free)(void *timer); + void (*timer_free)(void *timer, void *opaque); /* Modify a timer to expire at @expire_time */ - void (*timer_mod)(void *timer, int64_t expire_time); + void (*timer_mod)(void *timer, int64_t expire_time, void *opaque); /* Register a fd for future polling */ - void (*register_poll_fd)(int fd); + void (*register_poll_fd)(int fd, void *opaque); /* Unregister a fd */ - void (*unregister_poll_fd)(int fd); + void (*unregister_poll_fd)(int fd, void *opaque); /* Kick the io-thread, to signal that new events may be processed */ - void (*notify)(void); + void (*notify)(void *opaque); } SlirpCb; |