Merge feature branch 'feature-trace-value-for-fib-entry'
diff --git a/bindings/modulegen__gcc_ILP32.py b/bindings/modulegen__gcc_ILP32.py
index 9ca7dea..bf1a2af 100644
--- a/bindings/modulegen__gcc_ILP32.py
+++ b/bindings/modulegen__gcc_ILP32.py
@@ -5946,7 +5946,7 @@
'void',
[param('ns3::Ptr< ns3::ndn::Face >', 'face'), param('ns3::ndn::fib::FaceMetric::Status', 'status')])
## ndn-fib-entry.h (module 'ndnSIM'): ns3::ndn::fib::Entry::m_faces [variable]
- cls.add_instance_attribute('m_faces', 'boost::multi_index::multi_index_container< ns3::ndn::fib::FaceMetric, boost::multi_index::indexed_by< boost::multi_index::ordered_unique< boost::multi_index::tag< ns3::ndn::fib::i_face, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na >, boost::multi_index::member< ns3::ndn::fib::FaceMetric, ns3::Ptr< ns3::ndn::Face >, & ( ns3::ndn::fib::FaceMetric::m_face ) >, mpl_::na >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< ns3::ndn::fib::i_metric, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na >, boost::multi_index::composite_key< ns3::ndn::fib::FaceMetric, boost::multi_index::member< ns3::ndn::fib::FaceMetric, ns3::ndn::fib::FaceMetric::Status, & ( ns3::ndn::fib::FaceMetric::m_status ) >, boost::multi_index::member< ns3::ndn::fib::FaceMetric, int, & ( ns3::ndn::fib::FaceMetric::m_routingCost ) >, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type >, mpl_::na >, boost::multi_index::random_access< boost::multi_index::tag< ns3::ndn::fib::i_nth, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na > >, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na >, std::allocator< ns3::ndn::fib::FaceMetric > >', is_const=False)
+ cls.add_instance_attribute('m_faces', 'boost::multi_index::multi_index_container< ns3::ndn::fib::FaceMetric, boost::multi_index::indexed_by< boost::multi_index::ordered_unique< boost::multi_index::tag< ns3::ndn::fib::i_face, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na >, boost::multi_index::const_mem_fun< ns3::ndn::fib::FaceMetric, ns3::Ptr< ns3::ndn::Face >, & ( ns3::ndn::fib::FaceMetric::GetFace ( ) const ) >, mpl_::na >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< ns3::ndn::fib::i_metric, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na >, boost::multi_index::composite_key< ns3::ndn::fib::FaceMetric, boost::multi_index::const_mem_fun< ns3::ndn::fib::FaceMetric, ns3::ndn::fib::FaceMetric::Status, & ( ns3::ndn::fib::FaceMetric::GetStatus ( ) const ) >, boost::multi_index::const_mem_fun< ns3::ndn::fib::FaceMetric, int, & ( ns3::ndn::fib::FaceMetric::GetRoutingCost ( ) const ) >, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type >, mpl_::na >, boost::multi_index::random_access< boost::multi_index::tag< ns3::ndn::fib::i_nth, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na > >, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na >, std::allocator< ns3::ndn::fib::FaceMetric > >', is_const=False)
## ndn-fib-entry.h (module 'ndnSIM'): ns3::ndn::fib::Entry::m_needsProbing [variable]
cls.add_instance_attribute('m_needsProbing', 'bool', is_const=False)
## ndn-fib-entry.h (module 'ndnSIM'): ns3::ndn::fib::Entry::m_prefix [variable]
@@ -5972,22 +5972,37 @@
'ns3::Ptr< ns3::ndn::Face >',
[],
is_const=True)
+ ## ndn-fib-entry.h (module 'ndnSIM'): ns3::Time ns3::ndn::fib::FaceMetric::GetRealDelay() const [member function]
+ cls.add_method('GetRealDelay',
+ 'ns3::Time',
+ [],
+ is_const=True)
+ ## ndn-fib-entry.h (module 'ndnSIM'): int32_t ns3::ndn::fib::FaceMetric::GetRoutingCost() const [member function]
+ cls.add_method('GetRoutingCost',
+ 'int32_t',
+ [],
+ is_const=True)
+ ## ndn-fib-entry.h (module 'ndnSIM'): ns3::ndn::fib::FaceMetric::Status ns3::ndn::fib::FaceMetric::GetStatus() const [member function]
+ cls.add_method('GetStatus',
+ 'ns3::ndn::fib::FaceMetric::Status',
+ [],
+ is_const=True)
+ ## ndn-fib-entry.h (module 'ndnSIM'): void ns3::ndn::fib::FaceMetric::SetRealDelay(ns3::Time realDelay) [member function]
+ cls.add_method('SetRealDelay',
+ 'void',
+ [param('ns3::Time', 'realDelay')])
+ ## ndn-fib-entry.h (module 'ndnSIM'): void ns3::ndn::fib::FaceMetric::SetRoutingCost(int32_t routingCost) [member function]
+ cls.add_method('SetRoutingCost',
+ 'void',
+ [param('int32_t', 'routingCost')])
+ ## ndn-fib-entry.h (module 'ndnSIM'): void ns3::ndn::fib::FaceMetric::SetStatus(ns3::ndn::fib::FaceMetric::Status status) [member function]
+ cls.add_method('SetStatus',
+ 'void',
+ [param('ns3::ndn::fib::FaceMetric::Status', 'status')])
## ndn-fib-entry.h (module 'ndnSIM'): void ns3::ndn::fib::FaceMetric::UpdateRtt(ns3::Time const & rttSample) [member function]
cls.add_method('UpdateRtt',
'void',
[param('ns3::Time const &', 'rttSample')])
- ## ndn-fib-entry.h (module 'ndnSIM'): ns3::ndn::fib::FaceMetric::m_face [variable]
- cls.add_instance_attribute('m_face', 'ns3::Ptr< ns3::ndn::Face >', is_const=False)
- ## ndn-fib-entry.h (module 'ndnSIM'): ns3::ndn::fib::FaceMetric::m_realDelay [variable]
- cls.add_instance_attribute('m_realDelay', 'ns3::Time', is_const=False)
- ## ndn-fib-entry.h (module 'ndnSIM'): ns3::ndn::fib::FaceMetric::m_routingCost [variable]
- cls.add_instance_attribute('m_routingCost', 'int32_t', is_const=False)
- ## ndn-fib-entry.h (module 'ndnSIM'): ns3::ndn::fib::FaceMetric::m_rttVar [variable]
- cls.add_instance_attribute('m_rttVar', 'ns3::Time', is_const=False)
- ## ndn-fib-entry.h (module 'ndnSIM'): ns3::ndn::fib::FaceMetric::m_sRtt [variable]
- cls.add_instance_attribute('m_sRtt', 'ns3::Time', is_const=False)
- ## ndn-fib-entry.h (module 'ndnSIM'): ns3::ndn::fib::FaceMetric::m_status [variable]
- cls.add_instance_attribute('m_status', 'ns3::ndn::fib::FaceMetric::Status', is_const=False)
return
def register_Ns3NdnFibFaceMetricContainer_methods(root_module, cls):
diff --git a/bindings/modulegen__gcc_LP64.py b/bindings/modulegen__gcc_LP64.py
index 9ca7dea..bf1a2af 100644
--- a/bindings/modulegen__gcc_LP64.py
+++ b/bindings/modulegen__gcc_LP64.py
@@ -5946,7 +5946,7 @@
'void',
[param('ns3::Ptr< ns3::ndn::Face >', 'face'), param('ns3::ndn::fib::FaceMetric::Status', 'status')])
## ndn-fib-entry.h (module 'ndnSIM'): ns3::ndn::fib::Entry::m_faces [variable]
- cls.add_instance_attribute('m_faces', 'boost::multi_index::multi_index_container< ns3::ndn::fib::FaceMetric, boost::multi_index::indexed_by< boost::multi_index::ordered_unique< boost::multi_index::tag< ns3::ndn::fib::i_face, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na >, boost::multi_index::member< ns3::ndn::fib::FaceMetric, ns3::Ptr< ns3::ndn::Face >, & ( ns3::ndn::fib::FaceMetric::m_face ) >, mpl_::na >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< ns3::ndn::fib::i_metric, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na >, boost::multi_index::composite_key< ns3::ndn::fib::FaceMetric, boost::multi_index::member< ns3::ndn::fib::FaceMetric, ns3::ndn::fib::FaceMetric::Status, & ( ns3::ndn::fib::FaceMetric::m_status ) >, boost::multi_index::member< ns3::ndn::fib::FaceMetric, int, & ( ns3::ndn::fib::FaceMetric::m_routingCost ) >, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type >, mpl_::na >, boost::multi_index::random_access< boost::multi_index::tag< ns3::ndn::fib::i_nth, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na > >, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na >, std::allocator< ns3::ndn::fib::FaceMetric > >', is_const=False)
+ cls.add_instance_attribute('m_faces', 'boost::multi_index::multi_index_container< ns3::ndn::fib::FaceMetric, boost::multi_index::indexed_by< boost::multi_index::ordered_unique< boost::multi_index::tag< ns3::ndn::fib::i_face, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na >, boost::multi_index::const_mem_fun< ns3::ndn::fib::FaceMetric, ns3::Ptr< ns3::ndn::Face >, & ( ns3::ndn::fib::FaceMetric::GetFace ( ) const ) >, mpl_::na >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< ns3::ndn::fib::i_metric, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na >, boost::multi_index::composite_key< ns3::ndn::fib::FaceMetric, boost::multi_index::const_mem_fun< ns3::ndn::fib::FaceMetric, ns3::ndn::fib::FaceMetric::Status, & ( ns3::ndn::fib::FaceMetric::GetStatus ( ) const ) >, boost::multi_index::const_mem_fun< ns3::ndn::fib::FaceMetric, int, & ( ns3::ndn::fib::FaceMetric::GetRoutingCost ( ) const ) >, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type >, mpl_::na >, boost::multi_index::random_access< boost::multi_index::tag< ns3::ndn::fib::i_nth, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na > >, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na, mpl_::na >, std::allocator< ns3::ndn::fib::FaceMetric > >', is_const=False)
## ndn-fib-entry.h (module 'ndnSIM'): ns3::ndn::fib::Entry::m_needsProbing [variable]
cls.add_instance_attribute('m_needsProbing', 'bool', is_const=False)
## ndn-fib-entry.h (module 'ndnSIM'): ns3::ndn::fib::Entry::m_prefix [variable]
@@ -5972,22 +5972,37 @@
'ns3::Ptr< ns3::ndn::Face >',
[],
is_const=True)
+ ## ndn-fib-entry.h (module 'ndnSIM'): ns3::Time ns3::ndn::fib::FaceMetric::GetRealDelay() const [member function]
+ cls.add_method('GetRealDelay',
+ 'ns3::Time',
+ [],
+ is_const=True)
+ ## ndn-fib-entry.h (module 'ndnSIM'): int32_t ns3::ndn::fib::FaceMetric::GetRoutingCost() const [member function]
+ cls.add_method('GetRoutingCost',
+ 'int32_t',
+ [],
+ is_const=True)
+ ## ndn-fib-entry.h (module 'ndnSIM'): ns3::ndn::fib::FaceMetric::Status ns3::ndn::fib::FaceMetric::GetStatus() const [member function]
+ cls.add_method('GetStatus',
+ 'ns3::ndn::fib::FaceMetric::Status',
+ [],
+ is_const=True)
+ ## ndn-fib-entry.h (module 'ndnSIM'): void ns3::ndn::fib::FaceMetric::SetRealDelay(ns3::Time realDelay) [member function]
+ cls.add_method('SetRealDelay',
+ 'void',
+ [param('ns3::Time', 'realDelay')])
+ ## ndn-fib-entry.h (module 'ndnSIM'): void ns3::ndn::fib::FaceMetric::SetRoutingCost(int32_t routingCost) [member function]
+ cls.add_method('SetRoutingCost',
+ 'void',
+ [param('int32_t', 'routingCost')])
+ ## ndn-fib-entry.h (module 'ndnSIM'): void ns3::ndn::fib::FaceMetric::SetStatus(ns3::ndn::fib::FaceMetric::Status status) [member function]
+ cls.add_method('SetStatus',
+ 'void',
+ [param('ns3::ndn::fib::FaceMetric::Status', 'status')])
## ndn-fib-entry.h (module 'ndnSIM'): void ns3::ndn::fib::FaceMetric::UpdateRtt(ns3::Time const & rttSample) [member function]
cls.add_method('UpdateRtt',
'void',
[param('ns3::Time const &', 'rttSample')])
- ## ndn-fib-entry.h (module 'ndnSIM'): ns3::ndn::fib::FaceMetric::m_face [variable]
- cls.add_instance_attribute('m_face', 'ns3::Ptr< ns3::ndn::Face >', is_const=False)
- ## ndn-fib-entry.h (module 'ndnSIM'): ns3::ndn::fib::FaceMetric::m_realDelay [variable]
- cls.add_instance_attribute('m_realDelay', 'ns3::Time', is_const=False)
- ## ndn-fib-entry.h (module 'ndnSIM'): ns3::ndn::fib::FaceMetric::m_routingCost [variable]
- cls.add_instance_attribute('m_routingCost', 'int32_t', is_const=False)
- ## ndn-fib-entry.h (module 'ndnSIM'): ns3::ndn::fib::FaceMetric::m_rttVar [variable]
- cls.add_instance_attribute('m_rttVar', 'ns3::Time', is_const=False)
- ## ndn-fib-entry.h (module 'ndnSIM'): ns3::ndn::fib::FaceMetric::m_sRtt [variable]
- cls.add_instance_attribute('m_sRtt', 'ns3::Time', is_const=False)
- ## ndn-fib-entry.h (module 'ndnSIM'): ns3::ndn::fib::FaceMetric::m_status [variable]
- cls.add_instance_attribute('m_status', 'ns3::ndn::fib::FaceMetric::Status', is_const=False)
return
def register_Ns3NdnFibFaceMetricContainer_methods(root_module, cls):
diff --git a/examples/custom-strategies/custom-strategy.cc b/examples/custom-strategies/custom-strategy.cc
index be1f25b..5812ca3 100644
--- a/examples/custom-strategies/custom-strategy.cc
+++ b/examples/custom-strategies/custom-strategy.cc
@@ -14,13 +14,13 @@
NS_OBJECT_ENSURE_REGISTERED(CustomStrategy);
LogComponent CustomStrategy::g_log = LogComponent (CustomStrategy::GetLogName ().c_str ());
-
+
std::string
CustomStrategy::GetLogName ()
{
return "ndn.fw.CustomStrategy";
}
-
+
TypeId
CustomStrategy::GetTypeId (void)
{
@@ -28,11 +28,11 @@
.SetGroupName ("Ndn")
.SetParent <BaseStrategy> ()
.AddConstructor <CustomStrategy> ()
-
+
// .AddAttribute ("Attribute", "Attribute spec",
// StringValue ("DefaultValue"),
// MakeStringAccessor (&BaseStrategy::m_variable),
- // MakeStringChecker ())
+ // MakeStringChecker ())
;
return tid;
}
@@ -57,7 +57,7 @@
// forward to best-metric face
if (faceIterator != faces.end ())
{
- if (TrySendOutInterest (inFace, faceIterator->m_face, header, origPacket, pitEntry))
+ if (TrySendOutInterest (inFace, faceIterator->GetFace (), header, origPacket, pitEntry))
propagatedCount ++;
faceIterator ++;
@@ -66,7 +66,7 @@
// forward to second-best-metric face
if (faceIterator != faces.end ())
{
- if (TrySendOutInterest (inFace, faceIterator->m_face, header, origPacket, pitEntry))
+ if (TrySendOutInterest (inFace, faceIterator->GetFace (), header, origPacket, pitEntry))
propagatedCount ++;
faceIterator ++;
@@ -92,11 +92,11 @@
{
m_counter --;
}
-
+
BaseStrategy::WillEraseTimedOutPendingInterest (pitEntry);
}
-
-
+
+
void
CustomStrategy::WillSatisfyPendingInterest (Ptr<Face> inFace,
Ptr<pit::Entry> pitEntry)
@@ -107,11 +107,11 @@
{
m_counter --;
}
-
+
BaseStrategy::WillSatisfyPendingInterest (inFace, pitEntry);
}
-
+
} // namespace fw
} // namespace ndn
} // namespace ns3
diff --git a/model/fib/ndn-fib-entry.cc b/model/fib/ndn-fib-entry.cc
index c04e43b..35b3a99 100644
--- a/model/fib/ndn-fib-entry.cc
+++ b/model/fib/ndn-fib-entry.cc
@@ -54,13 +54,13 @@
FaceMetric::UpdateRtt (const Time &rttSample)
{
// const Time & this->m_rttSample
-
+
//update srtt and rttvar (RFC 2988)
if (m_sRtt.IsZero ())
{
//first RTT measurement
NS_ASSERT_MSG (m_rttVar.IsZero (), "SRTT is zero, but variation is not");
-
+
m_sRtt = rttSample;
m_rttVar = Time (m_sRtt / 2.0);
}
@@ -97,7 +97,7 @@
"Update status can be performed only on existing faces of CcxnFibEntry");
m_faces.modify (record,
- (&ll::_1)->*&FaceMetric::m_status = status);
+ ll::bind (&FaceMetric::SetStatus, ll::_1, status));
// reordering random access index same way as by metric index
m_faces.get<i_nth> ().rearrange (m_faces.get<i_metric> ().begin ());
@@ -117,16 +117,16 @@
else
{
// don't update metric to higher value
- if (record->m_routingCost > metric || record->m_status == FaceMetric::NDN_FIB_RED)
+ if (record->GetRoutingCost () > metric || record->GetStatus () == FaceMetric::NDN_FIB_RED)
{
m_faces.modify (record,
- (&ll::_1)->*&FaceMetric::m_routingCost = metric);
+ ll::bind (&FaceMetric::SetRoutingCost, ll::_1, metric));
m_faces.modify (record,
- (&ll::_1)->*&FaceMetric::m_status = FaceMetric::NDN_FIB_YELLOW);
+ ll::bind (&FaceMetric::SetStatus, ll::_1, FaceMetric::NDN_FIB_YELLOW));
}
}
-
+
// reordering random access index same way as by metric index
m_faces.get<i_nth> ().rearrange (m_faces.get<i_metric> ().begin ());
}
@@ -141,7 +141,7 @@
if (record != m_faces.get<i_face> ().end ())
{
m_faces.modify (record,
- (&ll::_1)->*&FaceMetric::m_realDelay = delay);
+ ll::bind (&FaceMetric::SetRealDelay, ll::_1, delay));
}
}
@@ -154,10 +154,10 @@
face++)
{
m_faces.modify (face,
- (&ll::_1)->*&FaceMetric::m_routingCost = std::numeric_limits<uint16_t>::max ());
+ ll::bind (&FaceMetric::SetRoutingCost, ll::_1, std::numeric_limits<uint16_t>::max ()));
m_faces.modify (face,
- (&ll::_1)->*&FaceMetric::m_status = FaceMetric::NDN_FIB_RED);
+ ll::bind (&FaceMetric::SetStatus, ll::_1, FaceMetric::NDN_FIB_RED));
}
}
diff --git a/model/fib/ndn-fib-entry.h b/model/fib/ndn-fib-entry.h
index 214b0eb..93fa2aa 100644
--- a/model/fib/ndn-fib-entry.h
+++ b/model/fib/ndn-fib-entry.h
@@ -26,6 +26,7 @@
#include "ns3/ndn-face.h"
#include "ns3/ndn-name-components.h"
#include "ns3/ndn-limits.h"
+#include "ns3/traced-value.h"
#include <boost/multi_index_container.hpp>
#include <boost/multi_index/tag.hpp>
@@ -82,7 +83,7 @@
* @brief Comparison between FaceMetric and Face
*/
bool
- operator< (const Ptr<Face> &face) const { return *m_face < *face; }
+ operator< (const Ptr<Face> &face) const { return *m_face < *face; }
/**
* @brief Return Face associated with FaceMetric
@@ -96,17 +97,81 @@
*/
void
UpdateRtt (const Time &rttSample);
-
+
+ /**
+ * @brief Get current status of FIB entry
+ */
+ Status
+ GetStatus () const
+ {
+ return m_status;
+ }
+
+ /**
+ * @brief Set current status of FIB entry
+ */
+ void
+ SetStatus (Status status)
+ {
+ m_status.Set (status);
+ }
+
+ /**
+ * @brief Get current routing cost
+ */
+ int32_t
+ GetRoutingCost () const
+ {
+ return m_routingCost;
+ }
+
+ /**
+ * @brief Set routing cost
+ */
+ void
+ SetRoutingCost (int32_t routingCost)
+ {
+ m_routingCost = routingCost;
+ }
+
+ /**
+ * @brief Get real propagation delay to the producer, calculated based on NS-3 p2p link delays
+ */
+ Time
+ GetRealDelay () const
+ {
+ return m_realDelay;
+ }
+
+ /**
+ * @brief Set real propagation delay to the producer, calculated based on NS-3 p2p link delays
+ */
+ void
+ SetRealDelay (Time realDelay)
+ {
+ m_realDelay = realDelay;
+ }
+
+ /**
+ * @brief Get direct access to status trace
+ */
+ TracedValue<Status> &
+ GetStatusTrace ()
+ {
+ return m_status;
+ }
+
private:
friend std::ostream& operator<< (std::ostream& os, const FaceMetric &metric);
-public:
+
+private:
Ptr<Face> m_face; ///< Face
-
- Status m_status; ///< \brief Status of the next hop:
+
+ TracedValue<Status> m_status; ///< \brief Status of the next hop:
///< - NDN_FIB_GREEN
///< - NDN_FIB_YELLOW
///< - NDN_FIB_RED
-
+
int32_t m_routingCost; ///< \brief routing protocol cost (interpretation of the value depends on the underlying routing protocol)
Time m_sRtt; ///< \brief smoothed round-trip time
@@ -141,7 +206,7 @@
// For fast access to elements using Face
boost::multi_index::ordered_unique<
boost::multi_index::tag<i_face>,
- boost::multi_index::member<FaceMetric,Ptr<Face>,&FaceMetric::m_face>
+ boost::multi_index::const_mem_fun<FaceMetric,Ptr<Face>,&FaceMetric::GetFace>
>,
// List of available faces ordered by (status, m_routingCost)
@@ -149,8 +214,8 @@
boost::multi_index::tag<i_metric>,
boost::multi_index::composite_key<
FaceMetric,
- boost::multi_index::member<FaceMetric,FaceMetric::Status,&FaceMetric::m_status>,
- boost::multi_index::member<FaceMetric,int32_t,&FaceMetric::m_routingCost>
+ boost::multi_index::const_mem_fun<FaceMetric,FaceMetric::Status,&FaceMetric::GetStatus>,
+ boost::multi_index::const_mem_fun<FaceMetric,int32_t,&FaceMetric::GetRoutingCost>
>
>,
@@ -172,10 +237,10 @@
{
public:
typedef Entry base_type;
-
+
public:
class NoFaces {}; ///< @brief Exception class for the case when FIB entry is not found
-
+
/**
* \brief Constructor
* \param prefix smart pointer to the prefix for the FIB entry
@@ -185,7 +250,7 @@
, m_needsProbing (false)
{
}
-
+
/**
* \brief Update status of FIB next hop
* \param status Status to set on the FIB entry
@@ -204,7 +269,7 @@
*/
void
SetRealDelayToProducer (Ptr<Face> face, Time delay);
-
+
/**
* @brief Invalidate face
*
@@ -218,7 +283,7 @@
*/
void
UpdateFaceRtt (Ptr<Face> face, const Time &sample);
-
+
/**
* \brief Get prefix for the FIB entry
*/
diff --git a/model/fw/best-route.cc b/model/fw/best-route.cc
index 03400b7..08bbd7c 100644
--- a/model/fw/best-route.cc
+++ b/model/fw/best-route.cc
@@ -58,11 +58,11 @@
;
return tid;
}
-
+
BestRoute::BestRoute ()
{
}
-
+
bool
BestRoute::DoPropagateInterest (Ptr<Face> inFace,
Ptr<const InterestHeader> header,
@@ -77,14 +77,14 @@
return true;
int propagatedCount = 0;
-
+
BOOST_FOREACH (const fib::FaceMetric &metricFace, pitEntry->GetFibEntry ()->m_faces.get<fib::i_metric> ())
{
NS_LOG_DEBUG ("Trying " << boost::cref(metricFace));
- if (metricFace.m_status == fib::FaceMetric::NDN_FIB_RED) // all non-read faces are in front
+ if (metricFace.GetStatus () == fib::FaceMetric::NDN_FIB_RED) // all non-read faces are in front
break;
- if (!TrySendOutInterest (inFace, metricFace.m_face, header, origPacket, pitEntry))
+ if (!TrySendOutInterest (inFace, metricFace.GetFace (), header, origPacket, pitEntry))
{
continue;
}
diff --git a/model/fw/flooding.cc b/model/fw/flooding.cc
index 80b863a..0c369b7 100644
--- a/model/fw/flooding.cc
+++ b/model/fw/flooding.cc
@@ -59,7 +59,7 @@
;
return tid;
}
-
+
Flooding::Flooding ()
{
}
@@ -77,14 +77,14 @@
BOOST_FOREACH (const fib::FaceMetric &metricFace, pitEntry->GetFibEntry ()->m_faces.get<fib::i_metric> ())
{
NS_LOG_DEBUG ("Trying " << boost::cref(metricFace));
- if (metricFace.m_status == fib::FaceMetric::NDN_FIB_RED) // all non-read faces are in the front of the list
+ if (metricFace.GetStatus () == fib::FaceMetric::NDN_FIB_RED) // all non-read faces are in the front of the list
break;
-
- if (!TrySendOutInterest (inFace, metricFace.m_face, header, origPacket, pitEntry))
+
+ if (!TrySendOutInterest (inFace, metricFace.GetFace (), header, origPacket, pitEntry))
{
continue;
}
-
+
propagatedCount++;
}
diff --git a/model/fw/green-yellow-red.cc b/model/fw/green-yellow-red.cc
index 2045634..3b5fd13 100644
--- a/model/fw/green-yellow-red.cc
+++ b/model/fw/green-yellow-red.cc
@@ -75,11 +75,11 @@
BOOST_FOREACH (const fib::FaceMetric &metricFace, pitEntry->GetFibEntry ()->m_faces.get<fib::i_metric> ())
{
- if (metricFace.m_status == fib::FaceMetric::NDN_FIB_RED ||
- metricFace.m_status == fib::FaceMetric::NDN_FIB_YELLOW)
+ if (metricFace.GetStatus () == fib::FaceMetric::NDN_FIB_RED ||
+ metricFace.GetStatus () == fib::FaceMetric::NDN_FIB_YELLOW)
break; //propagate only to green faces
- if (!TrySendOutInterest (inFace, metricFace.m_face, header, origPacket, pitEntry))
+ if (!TrySendOutInterest (inFace, metricFace.GetFace (), header, origPacket, pitEntry))
{
continue;
}
@@ -108,11 +108,12 @@
GreenYellowRed::WillEraseTimedOutPendingInterest (Ptr<pit::Entry> pitEntry)
{
NS_LOG_DEBUG ("WillEraseTimedOutPendingInterest for " << pitEntry->GetPrefix ());
+
for (pit::Entry::out_container::iterator face = pitEntry->GetOutgoing ().begin ();
face != pitEntry->GetOutgoing ().end ();
face ++)
{
- NS_LOG_DEBUG ("Face: " << face->m_face);
+ // NS_LOG_DEBUG ("Face: " << face->m_face);
pitEntry->GetFibEntry ()->UpdateStatus (face->m_face, fib::FaceMetric::NDN_FIB_YELLOW);
}
diff --git a/model/fw/green-yellow-red.h b/model/fw/green-yellow-red.h
index 93c00ca..e82c93b 100644
--- a/model/fw/green-yellow-red.h
+++ b/model/fw/green-yellow-red.h
@@ -57,7 +57,6 @@
Ptr<const InterestHeader> header,
Ptr<const Packet> origPacket,
Ptr<pit::Entry> pitEntry);
-
private:
typedef Nacks super;
};
diff --git a/model/fw/per-fib-limits.h b/model/fw/per-fib-limits.h
index 47f9ee6..4affec9 100644
--- a/model/fw/per-fib-limits.h
+++ b/model/fw/per-fib-limits.h
@@ -57,13 +57,13 @@
*/
static std::string
GetLogName ();
-
+
/**
* @brief Default constructor
*/
PerFibLimits ()
{ }
-
+
/// \copydoc ForwardingStrategy::WillEraseTimedOutPendingInterest
virtual void
WillEraseTimedOutPendingInterest (Ptr<pit::Entry> pitEntry);
@@ -86,14 +86,14 @@
DidAddFibEntry (Ptr<fib::Entry> fibEntry)
{
ObjectFactory factory;
- factory.SetTypeId (fibEntry->m_faces.begin ()->m_face->GetObject<Limits> ()->GetInstanceTypeId ());
-
+ factory.SetTypeId (fibEntry->m_faces.begin ()->GetFace ()->GetObject<Limits> ()->GetInstanceTypeId ());
+
Ptr<Limits> limits = factory.template Create<Limits> ();
fibEntry->AggregateObject (limits);
super::DidAddFibEntry (fibEntry);
}
-
+
protected:
/// \copydoc ForwardingStrategy::CanSendOutInterest
virtual bool
@@ -102,7 +102,7 @@
Ptr<const InterestHeader> header,
Ptr<const Packet> origPacket,
Ptr<pit::Entry> pitEntry);
-
+
/// \copydoc ForwardingStrategy::WillSatisfyPendingInterest
virtual void
WillSatisfyPendingInterest (Ptr<Face> inFace,
@@ -110,7 +110,7 @@
protected:
static LogComponent g_log; ///< @brief Logging variable
-
+
private:
std::string m_limitType;
};
@@ -149,7 +149,7 @@
Ptr<Limits> fibLimits = pitEntry->GetFibEntry ()->template GetObject<Limits> ();
// no checks for the limit here. the check should be somewhere elese
-
+
if (fibLimits->IsBelowLimit ())
{
if (super::CanSendOutInterest (inFace, outFace, header, origPacket, pitEntry))
@@ -158,7 +158,7 @@
return true;
}
}
-
+
return false;
}
@@ -184,7 +184,7 @@
Ptr<Limits> fibLimits = pitEntry->GetFibEntry ()->template GetObject<Limits> ();
fibLimits->ReturnLimit ();
-
+
super::WillSatisfyPendingInterest (inFace, pitEntry);
}
diff --git a/model/fw/smart-flooding.cc b/model/fw/smart-flooding.cc
index 3777739..c8b8406 100644
--- a/model/fw/smart-flooding.cc
+++ b/model/fw/smart-flooding.cc
@@ -59,7 +59,7 @@
;
return tid;
}
-
+
SmartFlooding::SmartFlooding ()
{
}
@@ -82,14 +82,14 @@
BOOST_FOREACH (const fib::FaceMetric &metricFace, pitEntry->GetFibEntry ()->m_faces.get<fib::i_metric> ())
{
NS_LOG_DEBUG ("Trying " << boost::cref(metricFace));
- if (metricFace.m_status == fib::FaceMetric::NDN_FIB_RED) // all non-read faces are in the front of the list
+ if (metricFace.GetStatus () == fib::FaceMetric::NDN_FIB_RED) // all non-read faces are in the front of the list
break;
-
- if (!TrySendOutInterest (inFace, metricFace.m_face, header, origPacket, pitEntry))
+
+ if (!TrySendOutInterest (inFace, metricFace.GetFace (), header, origPacket, pitEntry))
{
continue;
}
-
+
propagatedCount++;
}
diff --git a/model/ndn-l3-protocol.cc b/model/ndn-l3-protocol.cc
index b0957c5..28d337b 100644
--- a/model/ndn-l3-protocol.cc
+++ b/model/ndn-l3-protocol.cc
@@ -69,7 +69,7 @@
}
-TypeId
+TypeId
L3Protocol::GetTypeId (void)
{
static TypeId tid = TypeId ("ns3::ndn::L3Protocol")
@@ -134,7 +134,7 @@
Object::NotifyNewAggregate ();
}
-void
+void
L3Protocol::DoDispose (void)
{
NS_LOG_FUNCTION (this);
@@ -152,7 +152,7 @@
Object::DoDispose ();
}
-uint32_t
+uint32_t
L3Protocol::AddFace (const Ptr<Face> &face)
{
NS_LOG_FUNCTION (this << &face);
@@ -165,7 +165,7 @@
m_faces.push_back (face);
m_faceCounter++;
- m_forwardingStrategy->AddFace (face); // notify that face is added
+ m_forwardingStrategy->AddFace (face); // notify that face is added
return face->GetId ();
}
@@ -181,11 +181,11 @@
for (Ptr<pit::Entry> pitEntry = pit->Begin (); pitEntry != 0; pitEntry = pit->Next (pitEntry))
{
pitEntry->RemoveAllReferencesToFace (face);
-
+
// If this face is the only for the associated FIB entry, then FIB entry will be removed soon.
// Thus, we have to remove the whole PIT entry
if (pitEntry->GetFibEntry ()->m_faces.size () == 1 &&
- pitEntry->GetFibEntry ()->m_faces.begin ()->m_face == face)
+ pitEntry->GetFibEntry ()->m_faces.begin ()->GetFace () == face)
{
entriesToRemoves.push_back (pitEntry);
}
@@ -200,7 +200,7 @@
m_faces.erase (face_it);
GetObject<Fib> ()->RemoveFromAll (face);
- m_forwardingStrategy->RemoveFace (face); // notify that face is removed
+ m_forwardingStrategy->RemoveFace (face); // notify that face is removed
}
Ptr<Face>
@@ -235,21 +235,21 @@
return 0;
}
-uint32_t
+uint32_t
L3Protocol::GetNFaces (void) const
{
return m_faces.size ();
}
// Callback from lower layer
-void
+void
L3Protocol::Receive (const Ptr<Face> &face, const Ptr<const Packet> &p)
{
if (!face->IsUp ())
return;
NS_LOG_DEBUG (*p);
-
+
NS_LOG_LOGIC ("Packet from face " << *face << " received on node " << m_node->GetId ());
Ptr<Packet> packet = p->Copy (); // give upper layers a rw copy of the packet
@@ -271,21 +271,21 @@
// if (header->GetNack () > 0)
// OnNack (face, header, p/*original packet*/);
// else
- // OnInterest (face, header, p/*original packet*/);
+ // OnInterest (face, header, p/*original packet*/);
break;
}
case HeaderHelper::CONTENT_OBJECT_NDNSIM:
{
s_dataCounter ++;
Ptr<ContentObjectHeader> header = Create<ContentObjectHeader> ();
-
+
static ContentObjectTail contentObjectTrailer; //there is no data in this object
// Deserialization. Exception may be thrown
packet->RemoveHeader (*header);
packet->RemoveTrailer (contentObjectTrailer);
- m_forwardingStrategy->OnData (face, header, packet/*payload*/, p/*original packet*/);
+ m_forwardingStrategy->OnData (face, header, packet/*payload*/, p/*original packet*/);
break;
}
case HeaderHelper::INTEREST_CCNB:
@@ -293,7 +293,7 @@
NS_FATAL_ERROR ("ccnb support is broken in this implementation");
break;
}
-
+
// exception will be thrown if packet is not recognized
}
catch (UnknownHeaderException)
diff --git a/test/ndnSIM-fib-entry.cc b/test/ndnSIM-fib-entry.cc
new file mode 100644
index 0000000..2fbdb85
--- /dev/null
+++ b/test/ndnSIM-fib-entry.cc
@@ -0,0 +1,154 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2011,2012 University of California, Los Angeles
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Author: Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ */
+
+#include "ndnSIM-fib-entry.h"
+#include "ns3/core-module.h"
+#include "ns3/ndnSIM-module.h"
+#include "ns3/point-to-point-module.h"
+#include "ns3/node-list.h"
+
+#include <boost/lexical_cast.hpp>
+#include <boost/foreach.hpp>
+#include <boost/shared_ptr.hpp>
+#include <boost/make_shared.hpp>
+
+#include "ns3/ndn-fib-entry.h"
+
+NS_LOG_COMPONENT_DEFINE ("ndn.FibEntryTest");
+
+namespace ns3
+{
+
+class Client : public ndn::App
+{
+protected:
+ void
+ StartApplication ()
+ {
+ ndn::App::StartApplication ();
+
+ // add default route
+ Ptr<ndn::fib::Entry> fibEntry = GetNode ()->GetObject<ndn::Fib> ()->Add (ndn::NameComponents ("/"), m_face, 0);
+ fibEntry->UpdateStatus (m_face, ndn::fib::FaceMetric::NDN_FIB_GREEN);
+
+ Simulator::Schedule (Seconds (0.5), &Client::SendPacket, this, std::string("/1"), 1);
+ Simulator::Schedule (Seconds (4.0), &Client::SendPacket, this, std::string("/2"), 1);
+ }
+
+ void
+ StopApplication ()
+ {
+ ndn::App::StopApplication ();
+ }
+
+private:
+ void
+ SendPacket (const std::string &prefix, uint32_t nonce)
+ {
+ Ptr<Packet> pkt = Create<Packet> (0);
+ ndn::InterestHeader i;
+ i.SetName (Create<ndn::NameComponents> (prefix));
+ i.SetNonce (nonce);
+ i.SetInterestLifetime (Seconds (0.5));
+
+ pkt->AddHeader (i);
+ m_protocolHandler (pkt);
+ }
+};
+
+struct StatusRecorder
+{
+ StatusRecorder (Ptr<Node> node, Ptr<ndn::fib::Entry> fibEntry, Ptr<ndn::Face> face)
+ : m_node (node)
+ , m_fibEntry (fibEntry)
+ , m_face (face)
+ {
+ count = 0;
+ }
+
+ void
+ StatusChange (ndn::fib::FaceMetric::Status oldStatus, ndn::fib::FaceMetric::Status newStatus)
+ {
+ count ++;
+ // std::cout << Simulator::Now ().ToDouble (Time::S) << "s\tnode " << m_node->GetId () << " has changed fibEntry " << m_fibEntry->GetPrefix () << " face " << *m_face << " to " << newStatus << " from " << oldStatus << std::endl;
+ }
+
+ int count;
+
+private:
+ Ptr<Node> m_node;
+ Ptr<ndn::fib::Entry> m_fibEntry;
+ Ptr<ndn::Face> m_face;
+};
+
+void
+FibEntryTest::DoRun ()
+{
+ Ptr<Node> node = CreateObject<Node> ();
+ Ptr<Node> nodeSink = CreateObject<Node> ();
+ PointToPointHelper p2p;
+ p2p.Install (node, nodeSink);
+
+ ndn::StackHelper ndn;
+ ndn.SetForwardingStrategy ("ns3::ndn::fw::BestRoute");
+ ndn.Install (node);
+ ndn.Install (nodeSink);
+
+ ndn::StackHelper::AddRoute (node, "/", 0, 0);
+
+ Ptr<Client> app1 = CreateObject<Client> ();
+ node->AddApplication (app1);
+
+ ndn::AppHelper sinkHelper ("ns3::ndn::Producer");
+ sinkHelper.SetPrefix ("/");
+ sinkHelper.Install (nodeSink)
+ .Stop (Seconds (2.0));
+
+ std::list< boost::shared_ptr<StatusRecorder> > recorders;
+
+ for (NodeList::Iterator anode = NodeList::Begin ();
+ anode != NodeList::End ();
+ anode ++)
+ {
+ Ptr<ndn::Fib> fib = (*anode)->GetObject<ndn::Fib> ();
+
+ for (Ptr<ndn::fib::Entry> entry = fib->Begin ();
+ entry != fib->End ();
+ entry = fib->Next (entry))
+ {
+ BOOST_FOREACH (const ndn::fib::FaceMetric & faceMetric, entry->m_faces)
+ {
+ boost::shared_ptr<StatusRecorder> recorder = boost::make_shared<StatusRecorder> (*anode, entry, faceMetric.GetFace ());
+ recorders.push_back (recorder);
+
+ const_cast<ndn::fib::FaceMetric &> (faceMetric).GetStatusTrace ().ConnectWithoutContext (MakeCallback (&StatusRecorder::StatusChange, recorder.get ()));
+ }
+ }
+ }
+
+ Simulator::Stop (Seconds (10.0));
+ Simulator::Run ();
+ Simulator::Destroy ();
+
+ NS_TEST_ASSERT_MSG_EQ (recorders.size (), 1, "only one recorder should be: only one real FIB record should have existed");
+ NS_TEST_ASSERT_MSG_EQ (recorders.front ()->count, 2, "two events should have been reported");
+}
+
+}
diff --git a/test/ndnSIM-fib-entry.h b/test/ndnSIM-fib-entry.h
new file mode 100644
index 0000000..4f78f53
--- /dev/null
+++ b/test/ndnSIM-fib-entry.h
@@ -0,0 +1,48 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2011-2013 University of California, Los Angeles
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Author: Alexander Afanasyev <alexander.afanasyev@ucla.edu>
+ */
+
+#ifndef NDNSIM_TEST_FIB_ENTRY_H
+#define NDNSIM_TEST_FIB_ENTRY_H
+
+#include "ns3/test.h"
+#include "ns3/ptr.h"
+
+namespace ns3 {
+
+namespace ndn {
+class Fib;
+class Pit;
+}
+
+class FibEntryTest : public TestCase
+{
+public:
+ FibEntryTest ()
+ : TestCase ("FIB entry test")
+ {
+ }
+
+private:
+ virtual void DoRun ();
+};
+
+}
+
+#endif // NDNSIM_TEST_FIB_ENTRY_H
diff --git a/test/ndnSIM-tests.cc b/test/ndnSIM-tests.cc
index 3f0c319..688fca4 100644
--- a/test/ndnSIM-tests.cc
+++ b/test/ndnSIM-tests.cc
@@ -23,6 +23,7 @@
#include "ndnSIM-serialization.h"
#include "ndnSIM-pit.h"
+#include "ndnSIM-fib-entry.h"
namespace ns3
{
@@ -34,9 +35,10 @@
: TestSuite ("ndnSIM-suite", UNIT)
{
SetDataDir (NS_TEST_SOURCEDIR);
-
+
AddTestCase (new InterestSerializationTest ());
AddTestCase (new ContentObjectSerializationTest ());
+ AddTestCase (new FibEntryTest ());
// AddTestCase (new PitTest ());
}
};