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.