examples: Use the cs of NFD
Change-Id: I6864b52b6b9c44e590b3f6cfcd46754c8c1251c9
Signed-off-by: Xinyu Ma <bitmxy@gmail.com>
diff --git a/examples/ndn-simple-with-content-freshness.cpp b/examples/ndn-simple-with-content-freshness.cpp
index 9cac54d..5f0130d 100644
--- a/examples/ndn-simple-with-content-freshness.cpp
+++ b/examples/ndn-simple-with-content-freshness.cpp
@@ -66,8 +66,8 @@
// Install Ndn stack on all nodes
ndn::StackHelper ndnHelper;
ndnHelper.SetDefaultRoutes(true);
- ndnHelper.SetOldContentStore("ns3::ndn::cs::Freshness::Lru", "MaxSize",
- "2"); // allow just 2 entries to be cached
+ ndnHelper.setCsSize(2); // allow just 2 entries to be cached
+ ndnHelper.setPolicy("nfd::cs::lru");
ndnHelper.InstallAll();
// Installing applications
@@ -99,7 +99,7 @@
ndn::AppHelper producerHelper("ns3::ndn::Producer");
producerHelper.SetAttribute("PayloadSize", StringValue("1024"));
- producerHelper.SetAttribute("Freshness", TimeValue(Seconds(-1.0))); // unlimited freshness
+ producerHelper.SetAttribute("Freshness", TimeValue(Years(100))); // freshness long enough
producerHelper.SetPrefix("/no-freshness");
producerHelper.Install(nodes.Get(2)); // last node