slirp: Adding IPv6, ICMPv6 Echo and NDP autoconfiguration
commit0d6ff71ae3c7ac3a446d295ef71884a05093b37c
authorGuillaume Subiron <maethor@subiron.org>
Tue, 15 Mar 2016 09:31:19 +0000 (15 10:31 +0100)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Tue, 15 Mar 2016 09:35:00 +0000 (15 10:35 +0100)
tree2498158f42ae513eda34e4f982afcc91718e67e9
parent618a5a8bc52ba0f2ecbb3dffd01e657f4d841f75
slirp: Adding IPv6, ICMPv6 Echo and NDP autoconfiguration

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>
12 files changed:
slirp/Makefile.objs
slirp/cksum.c
slirp/if.c
slirp/ip6.h [new file with mode: 0644]
slirp/ip6_icmp.c [new file with mode: 0644]
slirp/ip6_icmp.h [new file with mode: 0644]
slirp/ip6_input.c [new file with mode: 0644]
slirp/ip6_output.c [new file with mode: 0644]
slirp/ndp_table.c [new file with mode: 0644]
slirp/slirp.c
slirp/slirp.h
slirp/socket.h