mirror of
https://github.com/mii443/qemu.git
synced 2025-08-22 23:25:48 +00:00
slirp: associate slirp_output callback with the Slirp context
Let's make the slirp interface a bit more library-like. Associate the slirp_output() with a Slirp context. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
This commit is contained in:
committed by
Samuel Thibault
parent
27df21ca38
commit
62c1d2c483
@ -99,7 +99,7 @@ static void slirp_smb_cleanup(SlirpState *s);
|
||||
static inline void slirp_smb_cleanup(SlirpState *s) { }
|
||||
#endif
|
||||
|
||||
void slirp_output(void *opaque, const uint8_t *pkt, int pkt_len)
|
||||
static void net_slirp_output(void *opaque, const uint8_t *pkt, int pkt_len)
|
||||
{
|
||||
SlirpState *s = opaque;
|
||||
|
||||
@ -378,7 +378,8 @@ static int net_slirp_init(NetClientState *peer, const char *model,
|
||||
ipv6, ip6_prefix, vprefix6_len, ip6_host,
|
||||
vhostname, tftp_server_name,
|
||||
tftp_export, bootfile, dhcp,
|
||||
dns, ip6_dns, dnssearch, vdomainname, s);
|
||||
dns, ip6_dns, dnssearch, vdomainname,
|
||||
net_slirp_output, s);
|
||||
QTAILQ_INSERT_TAIL(&slirp_stacks, s, entry);
|
||||
|
||||
for (config = slirp_configs; config; config = config->next) {
|
||||
|
Reference in New Issue
Block a user