aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2018-11-14 16:36:07 +0400
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2019-01-14 00:40:54 +0100
commitd846b927a613afbee7bd30756d1c8384085cfc64 (patch)
treec49b20e0f89bebf3097526e3ef76d120194f6d9c /net
parentcf2b315265d416cdef1c06120957dc48c098d550 (diff)
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')
-rw-r--r--net/slirp.c6
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) {