[ndnSIM] ndnSIM Digest, New forwarding strategy

Rajvardhan Deshmukh rdeshmukh at umass.edu
Wed Feb 22 17:14:14 PST 2017


hi Alex,
I have written a new forwarding strategy and
included :
const Name 
ZStrategy::STRATEGY_NAME("ndn:/localhost/nfd/strategy/ZStrategy/%FD%00");
NFD_REGISTER_STRATEGY(ZStrategy);

How do i call it in my main program(#include 
"NFD/daemon/fw/z-strategy.hpp") that implements this strategy?
1.
StrategyChoiceHelper::InstallAll("/", 
"/localhost/nfd/strategy/ZStrategy");
--------------------------------------------------------------------------------------------------------------
Problem: Can't test if this is implemented or not

OR

2.
StrategyChoiceHelper::Install<nfd::fw::ZStrategy>(nodes,"/");
---------------------------------------------------------------------------------------------------------------
Gives error:
scratch/rvanet.cc.2.o: In function `void 
ns3::ndn::StrategyChoiceHelper::Install<nfd::fw::ZStrategy>(ns3::Ptr<ns3::Node>, 
ndn::Name const&)':
/home/rajvardhan/ndnSIM/ns-3/build/./ns3/ndnSIM/helper/ndn-strategy-choice-helper.hpp:122: 
undefined reference to `nfd::fw::ZStrategy::STRATEGY_NAME'
/home/rajvardhan/ndnSIM/ns-3/build/./ns3/ndnSIM/helper/ndn-strategy-choice-helper.hpp:126: 
undefined reference to `nfd::fw::ZStrategy::STRATEGY_NAME'
scratch/rvanet.cc.2.o: In function `std::unique_ptr<nfd::fw::ZStrategy, 
std::default_delete<nfd::fw::ZStrategy> > 
ndn::make_unique<nfd::fw::ZStrategy, 
std::reference_wrapper<nfd::Forwarder> 
 >(std::reference_wrapper<nfd::Forwarder>&&)':
/home/rajvardhan/ndnSIM/ns-3/build/ns3/ndnSIM/ndn-cxx/util/backports.hpp:42: 
undefined reference to `nfd::fw::ZStrategy::STRATEGY_NAME'
/home/rajvardhan/ndnSIM/ns-3/build/ns3/ndnSIM/ndn-cxx/util/backports.hpp:42: 
undefined reference to `nfd::fw::ZStrategy::ZStrategy(nfd::Forwarder&, 
ndn::Name const&)'
collect2: error: ld returned 1 exit status
----------------------------------------------------------------------------------------------------------------




Let me know if further details are required to debug this problem.

Regards,
Raj
______________________________________________
>> ndnSIM mailing list
>> ndnSIM at lists.cs.ucla.edu
>> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim


More information about the ndnSIM mailing list