slirp: Use internal state in interface
This now also exports the internal state to the slirp users in qemu,
returning it from slirp_init and expecting it along with service
invocations. Additionally provide an opaque value interface for the
callbacks from slirp into the qemu core.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
diff --git a/slirp/if.c b/slirp/if.c
index 75b15e4..0f04e13 100644
--- a/slirp/if.c
+++ b/slirp/if.c
@@ -162,7 +162,7 @@
again:
/* check if we can really output */
- if (!slirp_can_output())
+ if (!slirp_can_output(slirp->opaque))
return;
/*