14#ifndef NIX_VECTOR_HELPER_H 
   15#define NIX_VECTOR_HELPER_H 
   17#include "ns3/ipv4-routing-helper.h" 
   18#include "ns3/ipv6-routing-helper.h" 
   19#include "ns3/object-factory.h" 
   39class NixVectorHelper : 
public std::enable_if_t<std::is_same_v<Ipv4RoutingHelper, T> ||
 
   40                                                    std::is_same_v<Ipv6RoutingHelper, T>,
 
   44    static constexpr bool IsIpv4 = std::is_same_v<Ipv4RoutingHelper, T>;
 
   46    using Ip = 
typename std::conditional_t<IsIpv4, Ipv4, Ipv6>;
 
   48    using IpAddress = 
typename std::conditional_t<IsIpv4, Ipv4Address, Ipv6Address>;
 
   51        typename std::conditional_t<IsIpv4, Ipv4RoutingProtocol, Ipv6RoutingProtocol>;
 
 
Helper class that adds Nix-vector routing to nodes.
static void PrintRoute(Ptr< Node > source, IpAddress dest, Ptr< OutputStreamWrapper > stream, Time::Unit unit=Time::S)
prints the routing path for the source and destination.
NixVectorHelper< T > * Copy() const override
typename std::conditional_t< IsIpv4, Ipv4, Ipv6 > Ip
Alias for Ipv4 and Ipv6 classes.
ObjectFactory m_agentFactory
NixVectorHelper & operator=(const NixVectorHelper &)=delete
static constexpr bool IsIpv4
void PrintRoutingPathAt(Time printTime, Ptr< Node > source, IpAddress dest, Ptr< OutputStreamWrapper > stream, Time::Unit unit=Time::S)
prints the routing path for a source and destination at a particular time.
typename std::conditional_t< IsIpv4, Ipv4RoutingProtocol, Ipv6RoutingProtocol > IpRoutingProtocol
Alias for Ipv4RoutingProtocol and Ipv6RoutingProtocol classes.
NixVectorHelper()
Construct an NixVectorHelper to make life easier while adding Nix-vector routing to nodes.
Ptr< IpRoutingProtocol > Create(Ptr< Node > node) const override
typename std::conditional_t< IsIpv4, Ipv4Address, Ipv6Address > IpAddress
Alias for Ipv4Address and Ipv6Address classes.
NixVectorHelper(const NixVectorHelper< T > &o)
Construct an NixVectorHelper from another previously initialized instance (Copy Constructor).
Instantiate subclasses of ns3::Object.
Smart pointer class similar to boost::intrusive_ptr.
Simulation virtual time values and global simulation resolution.
Unit
The unit to use to interpret a number representing time.
NixVectorHelper< Ipv6RoutingHelper > Ipv6NixVectorHelper
Create the typedef Ipv6NixVectorHelper with T as Ipv6RoutingHelper.
NixVectorHelper< Ipv4RoutingHelper > Ipv4NixVectorHelper
Create the typedef Ipv4NixVectorHelper with T as Ipv4RoutingHelper.
Every class exported by the ns3 library is enclosed in the ns3 namespace.