22 #include "ns3/names.h" 
   25 #include "ns3/ipv4-route.h" 
   26 #include "ns3/ipv4-list-routing.h" 
   27 #include "ns3/assert.h" 
   28 #include "ns3/ipv4-address.h" 
   29 #include "ns3/ipv4-routing-protocol.h" 
   53   return CreateObject<Ipv4StaticRouting> ();
 
   62   NS_ASSERT_MSG (ipv4rp, 
"No routing protocol associated with Ipv4");
 
   63   if (DynamicCast<Ipv4StaticRouting> (ipv4rp))
 
   65       NS_LOG_LOGIC (
"Static routing found as the main IPv4 routing protocol.");
 
   66       return DynamicCast<Ipv4StaticRouting> (ipv4rp); 
 
   68   if (DynamicCast<Ipv4ListRouting> (ipv4rp))
 
   72       for (uint32_t i = 0; i < lrp->GetNRoutingProtocols ();  i++)
 
   76           if (DynamicCast<Ipv4StaticRouting> (temp))
 
   79               return DynamicCast<Ipv4StaticRouting> (temp);
 
   99   std::vector<uint32_t> outputInterfaces;
 
  103       int32_t 
interface = ipv4->GetInterfaceForDevice (nd);
 
  105                      "Ipv4StaticRoutingHelper::AddMulticastRoute(): " 
  106                      "Expected an interface associated with the device nd");
 
  107       outputInterfaces.push_back (interface);
 
  110   int32_t inputInterface = ipv4->GetInterfaceForDevice (input);
 
  112                  "Ipv4StaticRoutingHelper::AddMulticastRoute(): " 
  113                  "Expected an interface associated with the device input");
 
  116   if (!ipv4StaticRouting)
 
  119                      "Ipv4StaticRoutingHelper::SetDefaultMulticastRoute(): " 
  120                      "Expected an Ipv4StaticRouting associated with this node");
 
  122   ipv4StaticRouting->AddMulticastRoute (source, group, inputInterface, outputInterfaces);
 
  130   std::string inputName, 
 
  154   std::string inputName, 
 
  168   int32_t interfaceSrc = ipv4->GetInterfaceForDevice (nd);
 
  170                  "Ipv4StaticRoutingHelper::SetDefaultMulticastRoute(): " 
  171                  "Expected an interface associated with the device");
 
  174   if (!ipv4StaticRouting)
 
  177                      "Ipv4StaticRoutingHelper::SetDefaultMulticastRoute(): " 
  178                      "Expected an Ipv4StaticRouting associated with this node");
 
  180   ipv4StaticRouting->SetDefaultMulticastRoute (interfaceSrc);
 
Iterator Begin(void) const 
Get an iterator which refers to the first NetDevice in the container. 
 
Smart pointer class similar to boost::intrusive_ptr. 
 
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
 
Ipv4StaticRoutingHelper()
 
Ptr< T > GetObject(void) const 
Get a pointer to the requested aggregated Object. 
 
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name. 
 
void SetDefaultMulticastRoute(Ptr< Node > n, Ptr< NetDevice > nd)
Add a default route to the static routing protocol to forward packets out a particular interface...
 
void AddMulticastRoute(Ptr< Node > n, Ipv4Address source, Ipv4Address group, Ptr< NetDevice > input, NetDeviceContainer output)
Add a multicast route to a node and net device using explicit Ptr and Ptr ...
 
NS_ASSERT_MSG(false,"Ipv4AddressGenerator::MaskToIndex(): Impossible")
 
holds a vector of ns3::NetDevice pointers 
 
Access to the IPv4 forwarding table, interfaces, and configuration. 
 
Every class exported by the ns3 library is enclosed in the ns3 namespace. 
 
NS_LOG_LOGIC("Net device "<< nd<< " is not bridged")
 
Ipv4 addresses are stored in host order in this class. 
 
Ptr< Ipv4StaticRouting > GetStaticRouting(Ptr< Ipv4 > ipv4) const 
Try and find the static routing protocol as either the main routing protocol or in the list of routin...
 
Helper class that adds ns3::Ipv4StaticRouting objects. 
 
std::vector< Ptr< NetDevice > >::const_iterator Iterator
NetDevice container iterator. 
 
Ipv4StaticRoutingHelper * Copy(void) const 
 
virtual Ptr< Ipv4RoutingProtocol > Create(Ptr< Node > node) const 
 
Iterator End(void) const 
Get an iterator which indicates past-the-last NetDevice in the container.