src/routing/olsr/olsr-routing-protocol.cc
changeset 4560 2f106fd728ab
parent 4472 e20a31541404
child 4603 67a0a49c1db4
--- a/src/routing/olsr/olsr-routing-protocol.cc	Fri Jun 19 09:17:08 2009 +0200
+++ b/src/routing/olsr/olsr-routing-protocol.cc	Fri Jun 12 13:44:19 2009 -0700
@@ -185,19 +185,21 @@
 
 
 RoutingProtocol::RoutingProtocol ()
-  :
-  m_helloTimer (Timer::CANCEL_ON_DESTROY),
-  m_tcTimer (Timer::CANCEL_ON_DESTROY),
-  m_midTimer (Timer::CANCEL_ON_DESTROY),
-  m_queuedMessagesTimer (Timer::CANCEL_ON_DESTROY)
+  : m_ipv4 (0),
+    m_helloTimer (Timer::CANCEL_ON_DESTROY),
+    m_tcTimer (Timer::CANCEL_ON_DESTROY),
+    m_midTimer (Timer::CANCEL_ON_DESTROY),
+    m_queuedMessagesTimer (Timer::CANCEL_ON_DESTROY)
 {}
 
 RoutingProtocol::~RoutingProtocol ()
 {}
 
 void
-RoutingProtocol::SetNode (Ptr<Node> node)
+RoutingProtocol::SetIpv4 (Ptr<Ipv4> ipv4)
 {
+  NS_ASSERT (ipv4 != 0);
+  NS_ASSERT (m_ipv4 == 0);
   NS_LOG_DEBUG ("Created olsr::RoutingProtocol");
   m_helloTimer.SetFunction (&RoutingProtocol::HelloTimerExpire, this);
   m_tcTimer.SetFunction (&RoutingProtocol::TcTimerExpire, this);
@@ -210,8 +212,7 @@
 
   m_linkTupleTimerFirstTime = true;
 
-  m_ipv4 = node->GetObject<Ipv4> ();
-  NS_ASSERT (m_ipv4);
+  m_ipv4 = ipv4;
 }
 
 void RoutingProtocol::DoDispose ()
@@ -2651,6 +2652,18 @@
       return false;
     }
 }
+void 
+RoutingProtocol::NotifyInterfaceUp (uint32_t i)
+{}
+void 
+RoutingProtocol::NotifyInterfaceDown (uint32_t i)
+{}
+void 
+RoutingProtocol::NotifyAddAddress (uint32_t interface, Ipv4InterfaceAddress address)
+{}
+void 
+RoutingProtocol::NotifyRemoveAddress (uint32_t interface, Ipv4InterfaceAddress address)
+{}
 
 
 ///