From: Marc-André Lureau
Signed-off-by: Marc-André Lureau
Signed-off-by: Samuel Thibault
---
net/slirp.c | 25 ++---
1 file changed, 18 insertions(+), 7 deletions(-)
diff --git a/net/slirp.c b/net/slirp.c
index b91741b8fc..750105a466 100644
--- a/net/slirp.c
+++ b/net
From: Marc-André Lureau
It would be legitimate to use libslirp without glib. Let's
add_poll/get_revents pair of callbacks to provide the same
functionality.
Signed-off-by: Marc-André Lureau
Signed-off-by: Samuel Thibault
---
net/slirp.c
From: Marc-André Lureau
Remove hard-coded dependency on slirp in main-loop, and use a "poll"
notifier instead. The notifier is registered per slirp instance.
Signed-off-by: Marc-André Lureau
Signed-off-by: Samuel Thibault
---
include/qemu/main-loop.h | 15 ++
net/slirp.c
From: Marc-André Lureau
Some of those could have been squashed earlier, but it is easier to do
it all here.
Signed-off-by: Marc-André Lureau
Signed-off-by: samuel Thibault
---
slirp/dhcpv6.c | 1 -
slirp/ip6_icmp.c | 2 --
slirp/misc.c | 2 --
slirp/sbuf.c | 1 -
slirp/slirp.c
From: Marc-André Lureau
Make state saving optional: this will allow to build SLIRP without
QEMU. (eventually, the vmstate helpers will be extracted, so an
external project & process could save its state)
Signed-off-by: Marc-André Lureau
Signed-off-by: Samuel Thibault
---
slirp/Makefile.
From: Marc-André Lureau
qemu_set_nonblock() is slightly more problematic and will be dealt
with in a separate patch.
Signed-off-by: Marc-André Lureau
Signed-off-by: Samuel Thibault
---
slirp/Makefile.objs | 3 +-
slirp/ip_icmp.c | 6 +-
slirp/misc.c| 20 ++---
slirp/socket.c
From: Marc-André Lureau
This is friendlier for FFI bindings.
Signed-off-by: Marc-André Lureau
Signed-off-by: Samuel Thibault
---
net/slirp.c | 25 -
slirp/dhcpv6.c | 2 +-
slirp/if.c | 2 +-
slirp/ip6_icmp.c | 15 +--
slirp/ip_icmp.c | 2
Signed-off-by: Samuel Thibault
---
net/slirp.c | 6 ++
slirp/libslirp.h| 2 ++
slirp/misc.c| 3 ++-
slirp/tcp_subr.c| 6 --
slirp/util.c| 14 ++
slirp/util.h| 1 +
stubs/Makefile.objs | 2 +-
7 files changed, 30 insertions(+), 4
: Samuel Thibault
---
slirp/slirp.h | 22 +++---
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/slirp/slirp.h b/slirp/slirp.h
index 8d9d72ca9d..5a830ddcb8 100644
--- a/slirp/slirp.h
+++ b/slirp/slirp.h
@@ -3,10 +3,19 @@
#ifdef _WIN32
+/* as defined in
From: Marc-André Lureau
Except for the migration code which is gated by WITH_QEMU, only
include our own headers, so libslirp can be built standalone.
Signed-off-by: Marc-André Lureau
Signed-off-by: Samuel Thibault
---
slirp/arp_table.c | 3 ++-
slirp/bootp.c | 1 -
slirp/cksum.c
From: Marc-André Lureau
Use a more descriptive name for the callback.
Reuse the SlirpWriteCb type. Wrap it to check that all data has been written.
Return a ssize_t for potential error handling and data-loss reporting.
Signed-off-by: Marc-André Lureau
Signed-off-by: Samuel Thibault
From: Marc-André Lureau
Make it possible to use headers easily with C++ projects.
Signed-off-by: Marc-André Lureau
Signed-off-by: Samuel Thibault
---
slirp/libslirp.h | 9 -
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/slirp/libslirp.h b/slirp/libslirp.h
index
From: Marc-André Lureau
Signed-off-by: Marc-André Lureau
Signed-off-by: Samuel Thibault
---
slirp/libslirp.h | 12 +++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/slirp/libslirp.h b/slirp/libslirp.h
index 679a25422b..02cbec9f8b 100644
--- a/slirp/libslirp.h
+++ b
From: Marc-André Lureau
Signed-off-by: Marc-André Lureau
Signed-off-by: Samuel Thibault
---
net/slirp.c | 25 ++---
1 file changed, 18 insertions(+), 7 deletions(-)
diff --git a/net/slirp.c b/net/slirp.c
index b91741b8fc..750105a466 100644
--- a/net/slirp.c
+++ b/net
From: Marc-André Lureau
Now that polling is done per-instance, we don't need a global list of
slirp instances.
Signed-off-by: Marc-André Lureau
Signed-off-by: Samuel Thibault
---
slirp/slirp.c | 5 -
1 file changed, 5 deletions(-)
diff --git a/slirp/slirp.c b/slirp/slirp.c
to remove another dependency on qemu.
Signed-off-by: Samuel Thibault
Reviewed-by: Marc-André Lureau
Reviewed-by: Richard Henderson
Reviewed-by: Stefano Garzarella
Reviewed-by: Alex Bennée
---
slirp/ip.h | 4 ++--
slirp/ip6.h | 4 ++--
slirp/ip6_icmp.h | 10 +-
3 files
From: Marc-André Lureau
Replace:
- u_char -> uint8_t
- u_short -> uint16_t
- u_long -> uint32_t
- u_int -> unsigned
- caddr_t -> char *
Signed-off-by: Marc-André Lureau
Signed-off-by: Samuel Thibault
---
slirp/ip_icmp.c| 6 +++---
slirp/ip_icmp.h| 18 +-
Only slirp actually needs it, and will need it along in libslirp.
Signed-off-by: Samuel Thibault
Reviewed-by: Marc-André Lureau
---
include/glib-compat.h | 57 ---
slirp/misc.c | 62 +++
2 files changed, 62
From: Marc-André Lureau
Signed-off-by: Marc-André Lureau
Signed-off-by: Samuel Thibault
---
net/slirp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/slirp.c b/net/slirp.c
index ec07f662c0..b91741b8fc 100644
--- a/net/slirp.c
+++ b/net/slirp.c
@@ -773,7 +773,7
From: Marc-André Lureau
Signed-off-by: Marc-André Lureau
Signed-off-by: Samuel Thibault
---
slirp/qtailq.h | 193 +
slirp/slirp.h | 3 +-
2 files changed, 194 insertions(+), 2 deletions(-)
create mode 100644 slirp/qtailq.h
diff --git a
pkt parameter may be unaligned, so we must access it byte-wise.
This fixes sparc64 host SIGBUS during pxe boot.
Signed-off-by: Samuel Thibault
Reviewed-by: Richard Henderson
---
slirp/slirp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/slirp/slirp.c b/slirp/slirp.c
From: Marc-André Lureau
Signed-off-by: Marc-André Lureau
Signed-off-by: Samuel Thibault
---
net/slirp.c | 21 +
slirp/ip6_icmp.c | 16 +++-
slirp/libslirp.h | 14 +++---
slirp/slirp.h| 2 +-
4 files changed, 40 insertions(+), 13 deletions
From: Marc-André Lureau
Instead of calling into QEMU chardev directly, and mixing it with
slirp_add_exec() handling, add a new function slirp_add_guestfwd()
which takes a write callback.
Signed-off-by: Marc-André Lureau
Signed-off-by: Samuel Thibault
---
net/slirp.c | 14
ith the ipf_link of the struct
ipasfrag, as documented in the comment on that struct; assert
at build time that this is the case.
Signed-off-by: Peter Maydell
Reviewed-by: Eric Blake
Signed-off-by: Samuel Thibault
---
slirp/ip.h | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a
From: Marc-André Lureau
Remove a dependency on QEMU. Use the existing logging facilities.
Set SLIRP_DEBUG=tftp to get tftp log.
Signed-off-by: Marc-André Lureau
Signed-off-by: Samuel Thibault
---
Makefile.objs | 1 -
slirp/debug.h | 13 ++---
slirp/slirp.c | 1
From: Marc-André Lureau
Introduce a SlirpCb callback to kick the main io-thread.
Add an intermediary sodrop() function that will call SlirpCb.notify
callback when sbdrop() returns true.
Signed-off-by: Marc-André Lureau
Signed-off-by: Samuel Thibault
---
net/slirp.c | 1 +
slirp
o take the address of fields within the structs
without risking undefined behaviour, and suppresses clang
-Waddress-of-packed-member warnings.
Signed-off-by: Peter Maydell
Reviewed-by: Eric Blake
Signed-off-by: Samuel Thibault
---
slirp/ip6.h | 12 ++--
slirp/ip6_i
From: Marc-André Lureau
Signed-off-by: Marc-André Lureau
Signed-off-by: Samuel Thibault
---
slirp/ip6.h | 1 -
slirp/slirp.h | 1 -
slirp/util.h | 10 ++
3 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/slirp/ip6.h b/slirp/ip6.h
index 1e3e329ce6..4e7c366505 100644
From: Marc-André Lureau
Remove a dependency on qemu util.
Signed-off-by: Marc-André Lureau
Signed-off-by: Samuel Thibault
---
slirp/slirp.c | 4 ++--
slirp/tftp.c | 2 +-
slirp/util.c | 17 +
slirp/util.h | 2 ++
4 files changed, 22 insertions(+), 3 deletions(-)
diff
From: Marc-André Lureau
Add a counter-part to register_poll_fd() for completeness.
(so far, register_poll_fd() is called only on struct socket fd)
Suggested-by: Paolo Bonzini
Signed-off-by: Marc-André Lureau
Signed-off-by: Samuel Thibault
---
net/slirp.c | 6 ++
slirp/ip_icmp.c
From: Marc-André Lureau
Signed-off-by: Marc-André Lureau
Signed-off-by: Samuel Thibault
---
net/slirp.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/slirp.c b/net/slirp.c
index 750105a466..0b15f427f5 100644
--- a/net/slirp.c
+++ b/net/slirp.c
@@ -807,6 +807,7 @@ static int
From: Marc-André Lureau
Signed-off-by: Marc-André Lureau
Signed-off-by: Samuel Thibault
---
slirp/ip.h | 10 +-
slirp/ip6_icmp.h | 6 +++---
slirp/slirp.h| 5 +++--
slirp/util.h | 32
4 files changed, 43 insertions(+), 10 deletions
u.git tags/samuel-thibault
for you to fetch changes up to cf20be34d44a953c9b52a4d5cf6f4232968e6f3c:
slirp: API is extern C (2019-02-05 18:56:17 +0200)
More work towards libslirp
Marc-André Lureau (27):
slirp: generalize guest
From: Marc-André Lureau
Signed-off-by: Marc-André Lureau
Signed-off-by: Samuel Thibault
---
slirp/if.c | 1 -
slirp/ip6_icmp.c | 1 -
slirp/slirp.c| 1 -
slirp/util.h | 2 ++
4 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/slirp/if.c b/slirp/if.c
index 73e3705740
Only slirp actually needs it, and will need it along in libslirp.
Signed-off-by: Samuel Thibault
---
include/glib-compat.h | 57 ---
slirp/misc.c | 57 +++
2 files changed, 57 insertions(+), 57 deletions
Peter Maydell, le lun. 28 janv. 2019 15:44:21 +, a ecrit:
> Note that g_spawn_async_with_fds() is one of the glib routines
> which we have a version of in glib-compat.h to cope with older
> glib versions -- have you removed the #include of that and
> not provided the equivalent code for slirp?
Alex Bennée, le lun. 28 janv. 2019 10:35:37 +, a ecrit:
> Samuel Thibault writes:
>
> > Signed-off-by: Samuel Thibault
>
> Is there a rationale as to why we should replace QEMU_BUILD_BUG_ON with
> G_STATIC_ASSERT or is it particular to these QEMU_BUILD_BUG_ON
> ins
From: Marc-André Lureau
Replace:
- u_char -> uint8_t
- u_short -> uint16_t
- u_long -> uint32_t
- u_int -> unsigned
- caddr_t -> char *
Signed-off-by: Marc-André Lureau
Signed-off-by: Samuel Thibault
---
slirp/ip_icmp.c| 6 +++---
slirp/ip_icmp.h| 18 +-
From: Marc-André Lureau
Use a more descriptive name for the callback.
Reuse the SlirpWriteCb type. Wrap it to check that all data has been written.
Return a ssize_t for potential error handling and data-loss reporting.
Signed-off-by: Marc-André Lureau
Signed-off-by: Samuel Thibault
From: Marc-André Lureau
Except for the migration code which is gated by WITH_QEMU, only
include our own headers, so libslirp can be built standalone.
Signed-off-by: Marc-André Lureau
Signed-off-by: Samuel Thibault
---
slirp/arp_table.c | 1 -
slirp/bootp.c | 1 -
slirp/cksum.c
From: Marc-André Lureau
It would be legitimate to use libslirp without glib. Let's
add_poll/get_revents pair of callbacks to provide the same
functionality.
Signed-off-by: Marc-André Lureau
Signed-off-by: Samuel Thibault
---
net/slirp.c
From: Marc-André Lureau
Make it possible to use headers easily with C++ projects.
Signed-off-by: Marc-André Lureau
Signed-off-by: Samuel Thibault
---
slirp/libslirp.h | 9 -
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/slirp/libslirp.h b/slirp/libslirp.h
index
From: Marc-André Lureau
Signed-off-by: Marc-André Lureau
Signed-off-by: Samuel Thibault
---
slirp/qtailq.h | 193 +
slirp/slirp.h | 3 +-
2 files changed, 194 insertions(+), 2 deletions(-)
create mode 100644 slirp/qtailq.h
diff --git a
From: Marc-André Lureau
Remove hard-coded dependency on slirp in main-loop, and use a "poll"
notifier instead. The notifier is registered per slirp instance.
Signed-off-by: Marc-André Lureau
Signed-off-by: Samuel Thibault
---
include/qemu/main-loop.h | 15 ++
net/slirp.c
From: Marc-André Lureau
qemu_set_nonblock() is slightly more problematic and will be dealt
with in a separate patch.
Signed-off-by: Marc-André Lureau
Signed-off-by: Samuel Thibault
---
slirp/Makefile.objs | 3 +-
slirp/ip_icmp.c | 6 +-
slirp/misc.c| 20 ++---
slirp/socket.c
From: Marc-André Lureau
Signed-off-by: Marc-André Lureau
Signed-off-by: Samuel Thibault
---
slirp/ip.h | 10 +-
slirp/ip6_icmp.h | 6 +++---
slirp/slirp.h| 5 +++--
slirp/util.h | 32
4 files changed, 43 insertions(+), 10 deletions
From: Marc-André Lureau
This is friendlier for FFI bindings.
Signed-off-by: Marc-André Lureau
Signed-off-by: Samuel Thibault
---
net/slirp.c | 25 -
slirp/dhcpv6.c | 2 +-
slirp/if.c | 2 +-
slirp/ip6_icmp.c | 15 +--
slirp/ip_icmp.c | 2
From: Marc-André Lureau
Add a counter-part to register_poll_fd() for completeness.
(so far, register_poll_fd() is called only on struct socket fd)
Suggested-by: Paolo Bonzini
Signed-off-by: Marc-André Lureau
Signed-off-by: Samuel Thibault
---
net/slirp.c | 6 ++
slirp/ip_icmp.c
From: Marc-André Lureau
Introduce a SlirpCb callback to kick the main io-thread.
Add an intermediary sodrop() function that will call SlirpCb.notify
callback when sbdrop() returns true.
Signed-off-by: Marc-André Lureau
Signed-off-by: Samuel Thibault
---
net/slirp.c | 1 +
slirp
From: Marc-André Lureau
Some of those could have been squashed earlier, but it is easier to do
it all here.
Signed-off-by: Marc-André Lureau
Signed-off-by: samuel Thibault
---
slirp/dhcpv6.c | 1 -
slirp/ip6_icmp.c | 2 --
slirp/misc.c | 2 --
slirp/sbuf.c | 1 -
slirp/slirp.c
This is actually superseded by the complete pull I have just sent.
Samuel
From: Marc-André Lureau
Make state saving optional: this will allow to build SLIRP without
QEMU. (eventually, the vmstate helpers will be extracted, so an
external project & process could save its state)
Signed-off-by: Marc-André Lureau
Signed-off-by: Samuel Thibault
---
slirp/Makefile.
Signed-off-by: Samuel Thibault
Reviewed-by: Marc-André Lureau
---
slirp/ip.h | 4 ++--
slirp/ip6.h | 4 ++--
slirp/ip6_icmp.h | 10 +-
3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/slirp/ip.h b/slirp/ip.h
index 2baeeb9a3a..73a4d2a3d2 100644
--- a/slirp/ip.h
From: Marc-André Lureau
Remove a dependency on qemu util.
Signed-off-by: Marc-André Lureau
Signed-off-by: Samuel Thibault
---
slirp/slirp.c | 4 ++--
slirp/tftp.c | 2 +-
slirp/util.c | 17 +
slirp/util.h | 2 ++
4 files changed, 22 insertions(+), 3 deletions(-)
diff
: Samuel Thibault
---
slirp/slirp.h | 22 +++---
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/slirp/slirp.h b/slirp/slirp.h
index 8d9d72ca9d..5a830ddcb8 100644
--- a/slirp/slirp.h
+++ b/slirp/slirp.h
@@ -3,10 +3,19 @@
#ifdef _WIN32
+/* as defined in
From: Marc-André Lureau
Now that polling is done per-instance, we don't need a global list of
slirp instances.
Signed-off-by: Marc-André Lureau
Signed-off-by: Samuel Thibault
---
slirp/slirp.c | 5 -
1 file changed, 5 deletions(-)
diff --git a/slirp/slirp.c b/slirp/slirp.c
From: Marc-André Lureau
Signed-off-by: Marc-André Lureau
Signed-off-by: Samuel Thibault
---
slirp/ip6.h | 1 -
slirp/slirp.h | 1 -
slirp/util.h | 10 ++
3 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/slirp/ip6.h b/slirp/ip6.h
index 1e3e329ce6..4e7c366505 100644
From: Marc-André Lureau
Signed-off-by: Marc-André Lureau
Signed-off-by: Samuel Thibault
---
slirp/if.c | 1 -
slirp/ip6_icmp.c | 1 -
slirp/slirp.c| 1 -
slirp/util.h | 2 ++
4 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/slirp/if.c b/slirp/if.c
index 73e3705740
From: Marc-André Lureau
Signed-off-by: Marc-André Lureau
Signed-off-by: Samuel Thibault
---
slirp/libslirp.h | 12 +++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/slirp/libslirp.h b/slirp/libslirp.h
index 679a25422b..02cbec9f8b 100644
--- a/slirp/libslirp.h
+++ b
From: Marc-André Lureau
Instead of calling into QEMU chardev directly, and mixing it with
slirp_add_exec() handling, add a new function slirp_add_guestfwd()
which takes a write callback.
Signed-off-by: Marc-André Lureau
Signed-off-by: Samuel Thibault
---
net/slirp.c | 14
o take the address of fields within the structs
without risking undefined behaviour, and suppresses clang
-Waddress-of-packed-member warnings.
Signed-off-by: Peter Maydell
Reviewed-by: Eric Blake
Signed-off-by: Samuel Thibault
---
slirp/ip6.h | 12 ++--
slirp/ip6_i
u.git tags/samuel-thibault
for you to fetch changes up to 10163f695fe66f9d3d099a33752996dae70be98c:
slirp: API is extern C (2019-01-27 13:03:59 +0100)
More work towards libslirp
Marc-André Lureau (27):
slirp: generalize guest
Signed-off-by: Samuel Thibault
---
net/slirp.c | 6 ++
slirp/libslirp.h| 2 ++
slirp/misc.c| 3 ++-
slirp/tcp_subr.c| 6 --
slirp/util.c| 14 ++
slirp/util.h| 1 +
stubs/Makefile.objs | 2 +-
7 files changed, 30 insertions(+), 4
From: Marc-André Lureau
Signed-off-by: Marc-André Lureau
Signed-off-by: Samuel Thibault
---
net/slirp.c | 21 +
slirp/ip6_icmp.c | 16 +++-
slirp/libslirp.h | 14 +++---
slirp/slirp.h| 2 +-
4 files changed, 40 insertions(+), 13 deletions
ith the ipf_link of the struct
ipasfrag, as documented in the comment on that struct; assert
at build time that this is the case.
Signed-off-by: Peter Maydell
Reviewed-by: Eric Blake
Signed-off-by: Samuel Thibault
---
slirp/ip.h | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a
pkt parameter may be unaligned, so we must access it byte-wise.
This fixes sparc64 host SIGBUS during pxe boot.
Signed-off-by: Samuel Thibault
Reviewed-by: Richard Henderson
---
slirp/slirp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/slirp/slirp.c b/slirp/slirp.c
From: Marc-André Lureau
Remove a dependency on QEMU. Use the existing logging facilities.
Set SLIRP_DEBUG=tftp to get tftp log.
Signed-off-by: Marc-André Lureau
Signed-off-by: Samuel Thibault
---
Makefile.objs | 1 -
slirp/debug.h | 13 ++---
slirp/slirp.c | 1
From: Marc-André Lureau
Signed-off-by: Marc-André Lureau
Signed-off-by: Samuel Thibault
---
net/slirp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/slirp.c b/net/slirp.c
index ec07f662c0..b91741b8fc 100644
--- a/net/slirp.c
+++ b/net/slirp.c
@@ -773,7 +773,7
From: Marc-André Lureau
Signed-off-by: Marc-André Lureau
Signed-off-by: Samuel Thibault
---
net/slirp.c | 25 ++---
1 file changed, 18 insertions(+), 7 deletions(-)
diff --git a/net/slirp.c b/net/slirp.c
index b91741b8fc..750105a466 100644
--- a/net/slirp.c
+++ b/net
From: Marc-André Lureau
Signed-off-by: Marc-André Lureau
Signed-off-by: Samuel Thibault
---
net/slirp.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/slirp.c b/net/slirp.c
index 750105a466..0b15f427f5 100644
--- a/net/slirp.c
+++ b/net/slirp.c
@@ -807,6 +807,7 @@ static int
Signed-off-by: Samuel Thibault
---
slirp/ip.h | 4 ++--
slirp/ip6.h | 4 ++--
slirp/ip6_icmp.h | 10 +-
3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/slirp/ip.h b/slirp/ip.h
index 2baeeb9a3a..73a4d2a3d2 100644
--- a/slirp/ip.h
+++ b/slirp/ip.h
@@ -229,8
Marc-André Lureau, le dim. 27 janv. 2019 15:37:38 +0400, a ecrit:
> On Sun, Jan 27, 2019 at 5:55 AM Samuel Thibault
> wrote:
> >
> > (Which I'll fold as appropriate within Marc-André's patch series)
>
> Did you try using G_STATIC_ASSERT* instead?
Ah, rig
Marc-André Lureau, le dim. 27 janv. 2019 15:42:41 +0400, a ecrit:
> On Sun, Jan 27, 2019 at 4:17 AM Samuel Thibault
> wrote:
> > Marc-André Lureau, le jeu. 17 janv. 2019 15:43:37 +0400, a ecrit:
> > > +/* Create a new timer with the given callback and opaque da
(Which I'll fold as appropriate within Marc-André's patch series)
Samuel Thibault, le dim. 27 janv. 2019 02:51:13 +0100, a ecrit:
> Signed-off-by: Samuel Thibault
> ---
> slirp/ip.h | 6 --
> slirp/ip6.h | 6 --
> slirp/ip6_icmp.h | 12 +++-
Signed-off-by: Samuel Thibault
---
slirp/ip.h | 6 --
slirp/ip6.h | 6 --
slirp/ip6_icmp.h | 12 +++-
slirp/util.h | 25 +
4 files changed, 40 insertions(+), 9 deletions(-)
diff --git a/slirp/ip.h b/slirp/ip.h
index 2baeeb9a3a..77182e61a9
Marc-André Lureau, le jeu. 17 janv. 2019 15:43:58 +0400, a ecrit:
> This is friendlier for FFI bindings.
>
> Signed-off-by: Marc-André Lureau
Applied, thanks!
Marc-André Lureau, le jeu. 17 janv. 2019 15:43:59 +0400, a ecrit:
> Make it possible to use headers easily with C++ projects.
>
> Signed-off-by: Marc-André Lureau
Applied, thanks!
Marc-André Lureau, le ven. 18 janv. 2019 15:02:46 +0400, a ecrit:
> > may want to change the API (nobody can do something perfect at first
> > try), and when that breaks qemu build it would nasty if people couldn't
> > just disable libslirp usage to get qemu built for needs which don't
> > require
Marc-André Lureau, le jeu. 17 janv. 2019 15:43:57 +0400, a ecrit:
> It would be legitimate to use libslirp without glib. Let's
> add_poll/get_revents pair of callbacks to provide the same
> functionality.
>
> Signed-off-by: Marc-André Lureau
Applied, thanks!
Marc-André Lureau, le jeu. 17 janv. 2019 15:43:56 +0400, a ecrit:
> Now that polling is done per-instance, we don't need a global list of
> slirp instances.
>
> Signed-off-by: Marc-André Lureau
Applied, thanks!
Marc-André Lureau, le jeu. 17 janv. 2019 15:43:55 +0400, a ecrit:
> Remove hard-coded dependency on slirp in main-loop, and use a "poll"
> notifier instead. The notifier is registered per slirp instance.
>
> Signed-off-by: Marc-André Lureau
Applied, thanks!
Marc-André Lureau, le jeu. 17 janv. 2019 15:43:54 +0400, a ecrit:
> Use a more descriptive name for the callback.
>
> Reuse the SlirpWriteCb type. Wrap it to check that all data has been written.
>
> Return a ssize_t for potential error handling and data-loss reporting.
> Signed-off-by: Marc-And
Marc-André Lureau, le jeu. 17 janv. 2019 15:43:53 +0400, a ecrit:
> Replace:
> - u_char -> uint8_t
> - u_short -> uint16_t
> - u_long -> uint32_t
> - u_int -> unsigned
> - caddr_t -> char *
>
> Signed-off-by: Marc-André Lureau
Applied, thanks!
Marc-André Lureau, le jeu. 17 janv. 2019 15:43:52 +0400, a ecrit:
> Except for the migration code which is gated by WITH_QEMU, only
> include our own headers, so libslirp can be built standalone.
>
> Signed-off-by: Marc-André Lureau
Applied, thanks!
Marc-André Lureau, le jeu. 17 janv. 2019 15:43:51 +0400, a ecrit:
> Signed-off-by: Marc-André Lureau
Applied, thanks!
Marc-André Lureau, le jeu. 17 janv. 2019 15:43:50 +0400, a ecrit:
> Signed-off-by: Marc-André Lureau
Applied, thanks!
Marc-André Lureau, le jeu. 17 janv. 2019 15:43:49 +0400, a ecrit:
> Some of those could have been squashed earlier, but it is easier to do
> it all here.
>
> Signed-off-by: Marc-André Lureau
Applied, thanks!
Marc-André Lureau, le jeu. 17 janv. 2019 15:43:48 +0400, a ecrit:
> Signed-off-by: Marc-André Lureau
Applied, thanks!
Marc-André Lureau, le jeu. 17 janv. 2019 15:43:46 +0400, a ecrit:
> Our API usage requires Vista, set WIN32_LEAN_AND_MEAN to fix a number
> of issues (winsock2.h include order for ex, which is better to include
> first for legacy reasons).
>
> While at it, group redundants #ifndef _WIN32 blocks.
>
Marc-André Lureau, le jeu. 17 janv. 2019 15:43:47 +0400, a ecrit:
> Remove a dependency on qemu util.
>
> Signed-off-by: Marc-André Lureau
Applied, thanks!
Marc-André Lureau, le jeu. 17 janv. 2019 15:43:45 +0400, a ecrit:
> Signed-off-by: Marc-André Lureau
Applied, thanks!
Marc-André Lureau, le jeu. 17 janv. 2019 15:43:44 +0400, a ecrit:
> Make state saving optional: this will allow to build SLIRP without
> QEMU. (eventually, the vmstate helpers will be extracted, so an
> external project & process could save its state)
>
> Signed-off-by: Marc-André Lureau
Applied
Marc-André Lureau, le jeu. 17 janv. 2019 15:43:43 +0400, a ecrit:
> Introduce a SlirpCb callback to kick the main io-thread.
>
> Add an intermediary sodrop() function that will call SlirpCb.notify
> callback when sbdrop() returns true.
>
> Signed-off-by: Marc-André Lureau
Applied, thanks!
Marc-André Lureau, le jeu. 17 janv. 2019 15:43:42 +0400, a ecrit:
> Add a counter-part to register_poll_fd() for completeness.
>
> (so far, register_poll_fd() is called only on struct socket fd)
>
> Suggested-by: Paolo Bonzini
> Signed-off-by: Marc-André Lureau
Applied, thanks!
Marc-André Lureau, le jeu. 17 janv. 2019 15:43:41 +0400, a ecrit:
> Replace qemu_set_nonblock() with slirp_set_nonblock()
>
> qemu_set_nonblock() does some event registration with the main
> loop. Add a new callback register_poll_fd() for that reason.
>
> Always build the fd-register stub, to avo
Marc-André Lureau, le jeu. 17 janv. 2019 15:43:40 +0400, a ecrit:
> qemu_set_nonblock() is slightly more problematic and will be dealt
> with in a separate patch.
>
> Signed-off-by: Marc-André Lureau
Applied, I just added a -DWITH_QEMU in the Makefile, for inet_aton,
thanks!
Marc-André Lureau, le jeu. 17 janv. 2019 15:43:38 +0400, a ecrit:
> Remove a dependency on QEMU. Use the existing logging facilities.
> Set SLIRP_DEBUG=tftp to get tftp log.
>
> Signed-off-by: Marc-André Lureau
Applied with just an additional G_UNLIKELY, thanks!
Marc-André Lureau, le jeu. 17 janv. 2019 15:43:39 +0400, a ecrit:
> Signed-off-by: Marc-André Lureau
Applied except the ones which are removed in the other thread, thanks!
Applied too, but
Marc-André Lureau, le jeu. 17 janv. 2019 15:43:37 +0400, a ecrit:
> +/* Create a new timer with the given callback and opaque data */
> +void *(*timer_new)(SlirpTimerCb cb, void *opaque);
> +/* Remove and free a timer */
> +void (*timer_free)(void *timer);
> +/
Marc-André Lureau, le jeu. 17 janv. 2019 15:43:36 +0400, a ecrit:
> Signed-off-by: Marc-André Lureau
Applied, thanks!
301 - 400 of 1571 matches
Mail list logo