• Guillaume Subiron's avatar
    slirp: Adding IPv6, ICMPv6 Echo and NDP autoconfiguration · 0d6ff71a
    Guillaume Subiron authored
    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: 's avatarGuillaume Subiron <maethor@subiron.org>
    Signed-off-by: 's avatarSamuel Thibault <samuel.thibault@ens-lyon.org>
    Reviewed-by: 's avatarThomas Huth <thuth@redhat.com>
    0d6ff71a
ndp_table.c 3.1 KB