diff --git a/src/routing/static-route-manager.cc b/src/routing/static-route-manager.cc index 8deb95337..61c5af8c0 100644 --- a/src/routing/static-route-manager.cc +++ b/src/routing/static-route-manager.cc @@ -305,6 +305,28 @@ StaticRouteManager::SPFCalculate(Ipv4Address root) namespace ns3 { +class StaticRouterTestNode : public Node +{ +public: + StaticRouterTestNode(); + +private: + virtual void DoAddDevice (Ptr device) const {}; + virtual TraceResolver *DoCreateTraceResolver (TraceContext const &context); +}; + +StaticRouterTestNode::StaticRouterTestNode () +{ +// Ptr ipv4 = Create (this); +} + +TraceResolver* +StaticRouterTestNode::DoCreateTraceResolver (TraceContext const &context) +{ + return 0; +} + + class StaticRouteManagerTest : public Test { public: StaticRouteManagerTest (); @@ -454,6 +476,9 @@ StaticRouteManagerTest::RunTests (void) srmlsdb->Insert(lsa3->m_linkStateId, v3); NS_ASSERT(v2 == srmlsdb->GetVertex(lsa2->m_linkStateId)); + // We need a dummy node to populate the routing tables + Ptr n2 = Create (); + // XXX next, calculate routes based on the manually created LSDB StaticRouteManager* srm = new StaticRouteManager(); srm->DebugUseLsdb (srmlsdb);