[ndnSIM] Unable to Use NDN Link Control Helper on the Annotated Topology [‘FailLink’ was not declared in this scope]

Md Monjurul Karim karim.npu at gmail.com
Wed Sep 12 06:58:41 PDT 2018

Greetings Everyone,

*I am having following error while compiling*

[3118/3564] Compiling scratch/icn-test-1.cc
../scratch/icn-test-1.cc: In function ‘int ns3::main(int, char**)’:
../scratch/icn-test-1.cc:105:41: error: ‘FailLink’ was not declared in this
    Simulator::Schedule (Seconds (10.0), FailLink, consumer1, router1 );

*My Annotated Topology (partial) looks like this:*
# node  comment     yPos    xPos
C1        NA          1       1
R1        NA          1       2
R2        NA          2       2
P1        NA          1       3

# srcNode   dstNode     bandwidth   metric  delay   queue
# bandwidth: link bandwidth
# metric: routing metric
# delay:  link delay
# queue:  MaxPackets for transmission queue on the link (both directions)
C1       R1     10Mbps     1    10ms     10
P1       R1     10Mbps     1    10ms     10
R2       C1     10Mbps     1    10ms     10
R2       R1     10Mbps     1    10ms     10
R2       P1     10Mbps     1    10ms     10

*And here is the code*

 #include "ns3/core-module.h"
 #include "ns3/network-module.h"
 #include "ns3/point-to-point-module.h"
 #include "ns3/ndnSIM-module.h"

 // for LinkStatusControl::FailLinks and LinkStatusControl::UpLinks
* #include "ns3/ndnSIM/helper/ndn-link-control-helper.hpp"*

 namespace ns3 {

 main(int argc, char* argv[])


   // Read optional command-line parameters (e.g., enable visualizer with
./waf --run=<> --visualize
   CommandLine cmd;
   cmd.Parse (argc, argv);

   // Reading a Topology File from a given directory
   AnnotatedTopologyReader topologyReader("", 25);


   // Install NDN stack on all nodes
   ndn::StackHelper ndnHelper;
   ndnHelper.SetOldContentStore("ns3::ndn::cs::Lru", "MaxSize", "10000");

   // Choosing forwarding strategy {Available Strategy: Best-Route,

   // Installing global routing interface on all nodes
   //ndn::GlobalRoutingHelper ndnGlobalRoutingHelper;

   // Installing applications

   // Getting containers for the consumer/producer/router
   Ptr<Node> consumer1 = Names::Find<Node>("C1");
   Ptr<Node> producer1 = Names::Find<Node>("P1");
*   Ptr<Node> router1 = Names::Find<Node> ("R1");*
*   Ptr<Node> router2 = Names::Find<Node> ("R2");*

   // Installing applications for the consumer
   ndn::AppHelper consumerHelper("ns3::ndn::ConsumerCbr");
   //consumer node install a Consumer application that will express
interests in /p1 namespace
   consumerHelper.SetAttribute("Frequency", StringValue("10")); // 10
interests a second

   // Installing applications for the producer
   ndn::AppHelper producerHelper("ns3::ndn::Producer");
   // Producer will reply to all requests starting with /prefix
   producerHelper.SetAttribute("PayloadSize", StringValue("1024"));
   // Register /dst1 prefix with global routing controller and
   //ndnGlobalRoutingHelper.AddOrigins("/p1", producer1);

   // Calculate and install FIBs

   // The failure of the link connecting consumer and router will start
from seconds 10.0
*   Simulator::Schedule (Seconds (10.0), FailLink, consumer1, router1 );*



   return 0;

   } // namespace ns3

   main(int argc, char* argv[])
   return ns3::main(argc, argv);

Md Monjurul Karim
Ph.D. Student
Beijing Institute of Technology
5 South Zhong Guan Cun Street
Haidian District
P R China
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20180912/20c713dc/attachment-0001.html>

More information about the ndnSIM mailing list