[ndnSIM] ndnSIM Digest, New forwarding strategy

Spyridon (Spyros) Mastorakis mastorakis at CS.UCLA.EDU
Mon Feb 27 15:58:58 PST 2017


Hi,

have you tried to register your strategy like this?

https://github.com/named-data-ndnSIM/NFD/blob/38111cde9bab698f6eaf1a9d430130c2cbb3eca4/daemon/fw/multicast-strategy.cpp#L32-L33 <https://github.com/named-data-ndnSIM/NFD/blob/38111cde9bab698f6eaf1a9d430130c2cbb3eca4/daemon/fw/multicast-strategy.cpp#L32-L33>

Thanks,

Spyridon (Spyros) Mastorakis
Personal Website: http://cs.ucla.edu/~mastorakis/ <http://cs.ucla.edu/~mastorakis/>
Internet Research Laboratory
Computer Science Department
UCLA


> On Feb 27, 2017, at 11:07 AM, Rajvardhan Deshmukh <rdeshmukh at umass.edu> wrote:
> 
> 
> 
> -------- Original Message --------
> Subject: Re: [ndnSIM] ndnSIM Digest, New forwarding strategy
> Date: 2017-02-22 20:14
> From: Rajvardhan Deshmukh <rdeshmukh at umass.edu <mailto:rdeshmukh at umass.edu>>
> To: Alex Afanasyev <aa at cs.ucla.edu <mailto:aa at cs.ucla.edu>>
> Cc: ndnSIM at lists.cs.ucla.edu <mailto:ndnSIM at lists.cs.ucla.edu>
> 
> 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.
> I also tried placing my code in examples to run   StrategyChoiceHelper::Install<nfd::fw::RandomLoadBalancerStrategy>(nodes,"/");
> used ./waf configure --enable-examples
> still gave error:
> -----------------------------------------------------------------------------------------------------------------
> src/ndnSIM/examples/ndn-raj-custom.cpp.13.o: In function `void ns3::ndn::StrategyChoiceHelper::Install<nfd::fw::RandomLoadBalancerStrategy>(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::RandomLoadBalancerStrategy::STRATEGY_NAME'
> /home/rajvardhan/ndnSIM/ns-3/build/./ns3/ndnSIM/helper/ndn-strategy-choice-helper.hpp:126: undefined reference to `nfd::fw::RandomLoadBalancerStrategy::STRATEGY_NAME'
> src/ndnSIM/examples/ndn-raj-custom.cpp.13.o: In function `std::unique_ptr<nfd::fw::RandomLoadBalancerStrategy, std::default_delete<nfd::fw::RandomLoadBalancerStrategy> > ndn::make_unique<nfd::fw::RandomLoadBalancerStrategy, 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::RandomLoadBalancerStrategy::STRATEGY_NAME'
> /home/rajvardhan/ndnSIM/ns-3/build/ns3/ndnSIM/ndn-cxx/util/backports.hpp:42: undefined reference to `nfd::fw::RandomLoadBalancerStrategy::RandomLoadBalancerStrategy(nfd::Forwarder&, ndn::Name const&)'
> collect2: error: ld returned 1 exit status
> --------------------------------------------------------------------------------------------------------------
> 
> 
> 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20170227/e620867d/attachment-0001.html>


More information about the ndnSIM mailing list