mirror of
https://github.com/mii443/qemu.git
synced 2025-08-22 23:25:48 +00:00
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>
This commit is contained in:
committed by
Samuel Thibault
parent
cf2b315265
commit
d846b927a6
@ -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) {
|
||||
|
Reference in New Issue
Block a user