Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
Fixes #64
|
|
It uses a saner strictly "from low to high bit" rule.
|
|
Since msvc provides the support through push/pop pragmas.
|
|
The introduction of .timer_new_opaque adds an interesting conundrum.
The Slirp* needs to be stored in .timer_new_opaque so that it can be
passed back to slirp_handle_timer, but it is not returned by slirp_new
and slirp_init until after the first call to .timer_new_opaque (which
is in ip6_init). This is a problem for programs that, like QEMU, use
more than one Slirp*.
Fix them by passing the Slirp* to a callback before slirp_new returns,
and initializing the timer afterwards.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
In order to support CFI, we would like to avoid passing function pointers out of
libslirp, and instead use opaque integers for the timer callbacks. This patch
introduces an internal API for creating a timer that is based on such a timer
callback.
For now, it receives the id (SLIRP_TIMER_RA is the only one) and calls
slirp->cb->timer_new. The prototype of ra_timer_handler is changed slightly
to fit better with the next patch which introduces a new libslirp function,
to be called on timer expiration.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
They work like icmp_send_error and icmp6_send_error but allow to specify
the source IP address
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
|
|
Add SPDX license identifier to clarify the license of files without
explicit license header.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
|
|
Prepare for making slirp/ a standalone project.
Remove some useless includes while at it.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20190212162524.31504-5-marcandre.lureau@redhat.com>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
|