diff options
author | Marc-André Lureau | 2018-11-14 13:36:07 +0100 |
---|---|---|
committer | Samuel Thibault | 2019-01-14 00:40:54 +0100 |
commit | d846b927a613afbee7bd30756d1c8384085cfc64 (patch) | |
tree | c49b20e0f89bebf3097526e3ef76d120194f6d9c /net/slirp.c | |
parent | slirp: remove unused M_TRAILINGSPACE (diff) | |
download | qemu-d846b927a613afbee7bd30756d1c8384085cfc64.tar.gz qemu-d846b927a613afbee7bd30756d1c8384085cfc64.tar.xz qemu-d846b927a613afbee7bd30756d1c8384085cfc64.zip |
slirp: use a callback structure to interface with qemu
This will bring slirp a bit forward to the state of an independent
project.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Diffstat (limited to 'net/slirp.c')
-rw-r--r-- | net/slirp.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/net/slirp.c b/net/slirp.c index b7319ca6b2..031c324f02 100644 --- a/net/slirp.c +++ b/net/slirp.c @@ -140,6 +140,10 @@ static NetClientInfo net_slirp_info = { .cleanup = net_slirp_cleanup, }; +static const SlirpCb slirp_cb = { + .output = net_slirp_output, +}; + static int net_slirp_init(NetClientState *peer, const char *model, const char *name, int restricted, bool ipv4, const char *vnetwork, const char *vhost, @@ -379,7 +383,7 @@ static int net_slirp_init(NetClientState *peer, const char *model, vhostname, tftp_server_name, tftp_export, bootfile, dhcp, dns, ip6_dns, dnssearch, vdomainname, - net_slirp_output, s); + &slirp_cb, s); QTAILQ_INSERT_TAIL(&slirp_stacks, s, entry); for (config = slirp_configs; config; config = config->next) { |