diff --git a/SConstruct b/SConstruct index a91b232cf..bd90edd57 100644 --- a/SConstruct +++ b/SConstruct @@ -373,12 +373,14 @@ ns3.add(routing) routing.add_sources([ 'routing-environment.cc', 'static-router.cc', + 'static-route-manager.cc', ]) routing.add_headers ([ ]) routing.add_inst_headers([ 'routing-environment.h', 'static-router.h', + 'static-route-manager.h', ]) # utils diff --git a/examples/simple-static-routing.cc b/examples/simple-static-routing.cc index 1fc92fd04..50bc38a17 100644 --- a/examples/simple-static-routing.cc +++ b/examples/simple-static-routing.cc @@ -63,6 +63,7 @@ #include "ns3/ipv4-route.h" #include "ns3/p2p-topology.h" #include "ns3/onoff-application.h" +#include "ns3/static-route-manager.h" using namespace ns3; @@ -135,6 +136,10 @@ int main (int argc, char *argv[]) channel2, n2, Ipv4Address("10.1.3.1"), n3, Ipv4Address("10.1.3.2")); + // Here, we will use the StaticRoutingManager to build routes + Ptr route_manager = Create (); + + // XXX this goes away once static routing is in place // Finally, we add static routes. These three steps (Channel and // NetDevice creation, IP Address assignment, and routing) are // separated because there may be a need to postpone IP Address