Changing internals. PIT, FIB, CS, and ForwardingStrategy now are aggregated onto the node
Also, CcnxStackHelper provide an easy way to set up individual
parameters for them.
diff --git a/model/ccnx-forwarding-strategy.cc b/model/ccnx-forwarding-strategy.cc
index a856577..93c3847 100644
--- a/model/ccnx-forwarding-strategy.cc
+++ b/model/ccnx-forwarding-strategy.cc
@@ -67,9 +67,18 @@
}
void
-CcnxForwardingStrategy::SetPit (Ptr<CcnxPit> pit)
+CcnxForwardingStrategy::NotifyNewAggregate ()
{
- m_pit = pit;
+ if (m_pit == 0)
+ {
+ m_pit = GetObject<CcnxPit> ();
+ }
+}
+
+void
+CcnxForwardingStrategy::DoDispose ()
+{
+ // nothing to do...
}
bool
@@ -79,6 +88,7 @@
const Ptr<const Packet> &packet)
{
NS_LOG_FUNCTION (this);
+ NS_ASSERT_MSG (m_pit != 0, "PIT should be aggregated with forwarding strategy");
int propagatedCount = 0;