Skip to content

nix-vector-routing: template-based Nix-Vector Routing - IPv4 and IPv6 compliant.

Ameya Deshpande requested to merge ameyanrd/ns-3-dev:ipv4-nix-templates into master

This Merge Request is a part of the GSoC'21 project to implement IPv6 Nix-Vector Routing with minimal code duplication.

This MR tries to rework the existing IPv4 Nix-Vector Routing by incorporating template-based inheritance.

The setup proposed here seems to be compatible with Python Bindings Generator and contains the rescanned Python Bindings. Along with this, there is full backward compatibility with existing implementations of Ipv4NixVectorRouting and Ipv4NixVectorHelper.

With respect to this, the following changes are made:

  1. Change IPv4NixVectorRouting class to NixVectorRouting template class with template parameter as the parent class for inheritance. This parameter can only take the Ipv4RoutingProtocol class for now but will be extended later to take the Ipv6RoutingProtocol class as well.
  2. Change IPv4NixVectorHelper class to NixVectorHelper template class with template parameter as the parent class for inheritance. This parameter can only take the Ipv4RoutingHelper class for now but will be extended later to take the Ipv6RoutingHelper class as well.
  3. Create aliases for all existing IPv4-related classes. The aliases take on classes based on the parent parameter. This is achieved using
  4. Change every function and variable corresponding to IPv4 to IP to represent IPv4 and IPv6 generically.
  5. Rename files by removing the ipv4 prefix and make new ipv4-nix-vector-routing.h and ipv4-nix-vector-helper.h files which include nix-vector-routing.h and nix-vector-helper.h respectively. This is done to maintain backward compatibility with existing implementations.

Edit: This MR also adds support for IPv6 Nix-Vector routing. The existing nix-simple.cc and `nms-p2p-nix.cc are modified to support Nix-Vector routing. Also, the existing IPv4 model and helper header files are deprecated.

Signed-off-by: Ameya Deshpande ameyanrd@outlook.com

Edited by Ameya Deshpande

Merge request reports