26 #ifndef NIX_VECTOR_HELPER_H
27 #define NIX_VECTOR_HELPER_H
29 #include "ns3/object-factory.h"
30 #include "ns3/ipv4-routing-helper.h"
31 #include "ns3/ipv6-routing-helper.h"
50 class NixVectorHelper :
public std::enable_if<std::is_same<Ipv4RoutingHelper, T>::value || std::is_same<Ipv6RoutingHelper, T>::value, T>::type
53 using IsIpv4 = std::is_same <Ipv4RoutingHelper, T>;
55 using Ip =
typename std::conditional <IsIpv4::value, Ipv4, Ipv6>::type;
57 using IpAddress =
typename std::conditional<IsIpv4::value, Ipv4Address, Ipv6Address>::type;
59 using IpRoutingProtocol =
typename std::conditional<IsIpv4::value, Ipv4RoutingProtocol, Ipv6RoutingProtocol>::type;
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.
std::is_same< Ipv4RoutingHelper, T > IsIpv4
Alias for determining whether the parent is Ipv4RoutingHelper or Ipv6RoutingHelper.
typename std::conditional< IsIpv4::value, Ipv4Address, Ipv6Address >::type IpAddress
Alias for Ipv4Address and Ipv6Address classes.
NixVectorHelper< T > * Copy(void) const
ObjectFactory m_agentFactory
Object factory.
typename std::conditional< IsIpv4::value, Ipv4RoutingProtocol, Ipv6RoutingProtocol >::type IpRoutingProtocol
Alias for Ipv4RoutingProtocol and Ipv6RoutingProtocol classes.
typename std::conditional< IsIpv4::value, Ipv4, Ipv6 >::type Ip
Alias for Ipv4 and Ipv6 classes.
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.
virtual Ptr< IpRoutingProtocol > Create(Ptr< Node > node) const
NixVectorHelper()
Construct an NixVectorHelper to make life easier while adding Nix-vector routing to nodes.
NixVectorHelper & operator=(const NixVectorHelper &)
Assignment operator declared private and not implemented to disallow assignment and prevent the compi...
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.