summaryrefslogtreecommitdiffstats
path: root/slirp/ip6.h
Commit message (Collapse)AuthorAgeFilesLines
* slirp: replace remaining qemu headers dependencyMarc-André Lureau2019-02-071-0/+1
| | | | | | | | 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 <marcandre.lureau@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* slirp: replace QEMU_BUILD_BUG_ON with G_STATIC_ASSERTSamuel Thibault2019-02-071-2/+2
| | | | | | | | | | to remove another dependency on qemu. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Stefano Garzarella <sgarzare@redhat.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
* slirp: replace net/eth.h inclusion with own definesMarc-André Lureau2019-02-071-1/+0Star
| | | | | Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* slirp: Avoid marking naturally packed structs as QEMU_PACKEDPeter Maydell2019-02-071-2/+10
| | | | | | | | | | | | | | Various ipv6 structs in the slirp headers are marked QEMU_PACKED, but they are actually naturally aligned and will have no padding in them. Instead of marking them with the 'packed' attribute, assert at compile time that they are the size we expect. This allows us to 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 <peter.maydell@linaro.org> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* slirp: replace HOST_WORDS_BIGENDIAN with glib equivalentMarc-André Lureau2019-01-141-1/+2
| | | | | | | | | One more step towards making the project independent from QEMU. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* slirp: use DIV_ROUND_UPMarc-André Lureau2017-07-151-3/+3
| | | | | | | | I used the clang-tidy qemu-round check to generate the fix: https://github.com/elmarco/clang-tools-extra Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* Clean up ill-advised or unusual header guardsMarkus Armbruster2016-07-121-2/+2
| | | | | | | Cleaned up with scripts/clean-header-guards.pl. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Richard Henderson <rth@twiddle.net>
* slirp: Add dns6 resolutionSamuel Thibault2016-07-031-0/+9
| | | | | | | | This makes get_dns_addr address family-agnostic, thus allowing to add the IPv6 case. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Reviewed-by: Thomas Huth <thuth@redhat.com>
* slirp: Adding IPv6 address for DNS relayGuillaume Subiron2016-03-151-1/+5
| | | | | | | | | | | | | | | This patch adds an IPv6 address to the DNS relay. in6_equal_dns() is developed using this Slirp attribute. sotranslate_in/out/accept() are also updated to manage the IPv6 case so the guest can be able to join the host using one of the Slirp addresses. For now this only points to localhost. Further development will be needed to automatically fetch the IPv6 address from resolv.conf, and announce this via RDNSS. Signed-off-by: Guillaume Subiron <maethor@subiron.org> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Reviewed-by: Thomas Huth <thuth@redhat.com>
* slirp: Adding IPv6, ICMPv6 Echo and NDP autoconfigurationGuillaume Subiron2016-03-151-0/+137
This patch adds the functions needed to handle IPv6 packets. ICMPv6 and NDP headers are implemented. Slirp is now able to send NDP Router or Neighbor Advertisement when it receives Router or Neighbor Solicitation. Using a 64bit-sized IPv6 prefix, the guest is now able to perform stateless autoconfiguration (SLAAC) and to compute its IPv6 address. This patch adds an ndp_table, mainly inspired by arp_table, to keep an NDP cache and manage network address resolution. Slirp regularly sends NDP Neighbor Advertisement, as recommended by the RFC, to make the guest refresh its route. This also adds ip6_cksum() to compute ICMPv6 checksums using IPv6 pseudo-header. Some #define ETH_* are moved upper in slirp.h to make them accessible to other slirp/*.h Signed-off-by: Guillaume Subiron <maethor@subiron.org> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Reviewed-by: Thomas Huth <thuth@redhat.com>