Separating interface and implementation of FIB. Right now everything is
kind of broken.
diff --git a/model/ccnx-l3-protocol.cc b/model/ccnx-l3-protocol.cc
index 9abe297..72273d5 100644
--- a/model/ccnx-l3-protocol.cc
+++ b/model/ccnx-l3-protocol.cc
@@ -40,6 +40,7 @@
#include "ccnx-forwarding-strategy.h"
#include "ccnx-interest-header.h"
#include "ccnx-content-object-header.h"
+#include "ccnx-fib-impl.h"
#include "ccnx-net-device-face.h"
@@ -333,9 +334,9 @@
ll::bind (&CcnxPitEntry::RemoveIncoming, ll::_1, incomingFace));
}
- m_fib->m_fib.modify (pitEntry->m_fibEntry,
- ll::bind (&CcnxFibEntry::UpdateStatus,
- ll::_1, incomingFace, CcnxFibFaceMetric::NDN_FIB_YELLOW));
+ StaticCast<CcnxFibImpl> (m_fib)->modify (pitEntry->m_fibEntry,
+ ll::bind (&CcnxFibEntry::UpdateStatus,
+ ll::_1, incomingFace, CcnxFibFaceMetric::NDN_FIB_YELLOW));
if (pitEntry->m_incoming.size () == 0) // interest was actually satisfied
{
@@ -484,9 +485,9 @@
// ?? not sure if we need to do that ?? ...
- m_fib->m_fib.modify(pitEntry->m_fibEntry,
- ll::bind (&CcnxFibEntry::UpdateStatus,
- ll::_1, incomingFace, CcnxFibFaceMetric::NDN_FIB_YELLOW));
+ StaticCast<CcnxFibImpl> (m_fib)->modify(pitEntry->m_fibEntry,
+ ll::bind (&CcnxFibEntry::UpdateStatus,
+ ll::_1, incomingFace, CcnxFibFaceMetric::NDN_FIB_YELLOW));
}
else
if (!isNew && !isRetransmitted)
@@ -588,11 +589,11 @@
// If we have sent interest for this data via this face, then update stats.
if (out != pitEntry->m_outgoing.end ())
{
- m_fib->m_fib.modify (pitEntry->m_fibEntry,
- ll::bind (&CcnxFibEntry::UpdateFaceRtt,
- ll::_1,
- incomingFace,
- Simulator::Now () - out->m_sendTime));
+ StaticCast<CcnxFibImpl> (m_fib)->modify (pitEntry->m_fibEntry,
+ ll::bind (&CcnxFibEntry::UpdateFaceRtt,
+ ll::_1,
+ incomingFace,
+ Simulator::Now () - out->m_sendTime));
}
else
{
@@ -615,9 +616,9 @@
}
// Update metric status for the incoming interface in the corresponding FIB entry
- m_fib->m_fib.modify (pitEntry->m_fibEntry,
- ll::bind (&CcnxFibEntry::UpdateStatus, ll::_1,
- incomingFace, CcnxFibFaceMetric::NDN_FIB_GREEN));
+ StaticCast<CcnxFibImpl>(m_fib)->modify (pitEntry->m_fibEntry,
+ ll::bind (&CcnxFibEntry::UpdateStatus, ll::_1,
+ incomingFace, CcnxFibFaceMetric::NDN_FIB_GREEN));
// Add or update entry in the content store
m_contentStore->Add (header, payload);