IPv6 model overview

IPv6 support is implemented by several cooperating modules. The IPv6 module implements IPv6 datagram handling (sending, forwarding etc). It relies on IPv6RoutingTable to get access to the routes. IPv6RoutingTable also contains the neighbour discovery data structures (destination cache, neighbour cache, prefix list -- the latter effectively merged into the route table). Interface configuration (address, state, timeouts etc) is held in the InterfaceTable, in IPv6InterfaceData objects attached to InterfaceEntry as its ipv6() member.

The IPv6NeighbourDiscovery module implements all tasks associated with neighbour discovery and stateless address autoconfiguration. The data structures themselves (destination cache, neighbour cache, prefix list) are kept in IPv6RoutingTable, and are accessed via public C++ methods. Neighbour discovery packets are only sent and processed by this module -- when IPv6 receives one, it forwards the packet to IPv6NeighbourDiscovery.

The rest of ICMPv6 (ICMP errors, echo request/reply etc) is implemented in the ICMPv6 module, just like with IPv4. ICMP errors are sent to IPv6ErrorHandling, which the user can extend or replace to have errors handled in the way she likes.