nix-vector-routing: template-based Nix-Vector Routing - IPv4 and IPv6 compliant.
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:
- Change
IPv4NixVectorRouting
class toNixVectorRouting
template class with template parameter as the parent class for inheritance. This parameter can only take theIpv4RoutingProtocol
class for now but will be extended later to take theIpv6RoutingProtocol
class as well. - Change
IPv4NixVectorHelper
class toNixVectorHelper
template class with template parameter as the parent class for inheritance. This parameter can only take theIpv4RoutingHelper
class for now but will be extended later to take theIpv6RoutingHelper
class as well. - Create aliases for all existing IPv4-related classes. The aliases take on
classes based on the
parent
parameter. This is achieved using - Change every function and variable corresponding to IPv4 to IP to represent IPv4 and IPv6 generically.
- Rename files by removing the ipv4 prefix and make new
ipv4-nix-vector-routing.h
andipv4-nix-vector-helper.h
files which includenix-vector-routing.h
andnix-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