<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi,<div class=""><br class=""></div><div class="">use the strategy choice helper. If there is not such a strategy implemented, NFD will log an appropriate error message:</div><div class=""><br class=""></div><div class=""><a href="https://github.com/named-data-ndnSIM/NFD/blob/NFD-0.5.0-30-g934f505-ndnSIM/daemon/mgmt/strategy-choice-manager.cpp#L58-L59" class="">https://github.com/named-data-ndnSIM/NFD/blob/NFD-0.5.0-30-g934f505-ndnSIM/daemon/mgmt/strategy-choice-manager.cpp#L58-L59</a></div><div class=""><br class=""></div><div class="">Enable the â€œStrategyChoiceManager" logging component to be able to see that.</div><div class=""><br class=""></div><div class="">Thanks,</div><div class=""><br class=""><div class="">
<div class=""><div class=""><div class=""><span class="" style="float: none; display: inline !important;">Spyridon (Spyros) Mastorakis</span><br class=""><span class="" style="float: none; display: inline !important;">Personal Website: </span><a href="http://cs.ucla.edu/~mastorakis/" class="">http://cs.ucla.edu/~mastorakis/</a><br class=""><span class="" style="float: none; display: inline !important;">Internet Research Laboratory</span><br class=""><span class="" style="float: none; display: inline !important;">Computer Science Department</span><br class=""><span class="" style="float: none; display: inline !important;">UCLA</span></div></div></div>
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On Mar 1, 2017, at 7:33 PM, Rajvardhan Deshmukh <<a href="mailto:rdeshmukh@umass.edu" class="">rdeshmukh@umass.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Hi Spyridon,<br class="">Thank you for helping me.I apologize for the back to back emails.<br class="">I have written a new forwarding strategy and<br class="">included following in z-strategy.cpp<br class="">const Name ZStrategy::STRATEGY_NAME("ndn:/localhost/nfd/strategy/ZStrategy/%FD%00");<br class="">NFD_REGISTER_STRATEGY(ZStrategy);<br class=""><br class="">after saving the files z-strategy.cpp and z-strategy.hpp in /NFD/daemon/fw<br class="">i used ./waf<br class="">then included the below method in my main(network simulation)program.<br class=""><br class="">How do i call it in my main program(#include "NFD/daemon/fw/z-strategy.hpp") that implements this strategy?<br class="">1.<br class="">StrategyChoiceHelper::InstallAll("/", "/localhost/nfd/strategy/ZStrategy");<br class="">--------------------------------------------------------------------------------------------------------------<br class="">Problem: Can't test if this is implemented or not<br class=""><br class="">OR<br class=""><br class="">2.<br class="">I moved the random-load-balancer-strategy.hpp and random-load-balancer-strategy.cpp to /NFD/daemon/fw/<br class="">and was able to use StrategyChoiceHelper::Install<nfd::fw::RandomLoadBalancerStrategy>(nodes,"/");<br class=""><br class="">I tried using:<br class="">StrategyChoiceHelper::Install<nfd::fw::ZStrategy>(nodes,"/");<br class="">---------------------------------------------------------------------------------------------------------------<br class="">Gives error:<br class="">scratch/<a href="http://rvanet.cc" class="">rvanet.cc</a>.2.o: In function `void ns3::ndn::StrategyChoiceHelper::Install<nfd::fw::ZStrategy>(ns3::Ptr<ns3::Node>, ndn::Name const&)':<br class="">/home/rajvardhan/ndnSIM/ns-3/build/./ns3/ndnSIM/helper/ndn-strategy-choice-helper.hpp:122: undefined reference to `nfd::fw::ZStrategy::STRATEGY_NAME'<br class="">/home/rajvardhan/ndnSIM/ns-3/build/./ns3/ndnSIM/helper/ndn-strategy-choice-helper.hpp:126: undefined reference to `nfd::fw::ZStrategy::STRATEGY_NAME'<br class="">scratch/<a href="http://rvanet.cc" class="">rvanet.cc</a>.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>&&)':<br class="">/home/rajvardhan/ndnSIM/ns-3/build/ns3/ndnSIM/ndn-cxx/util/backports.hpp:42: undefined reference to `nfd::fw::ZStrategy::STRATEGY_NAME'<br class="">/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&)'<br class="">collect2: error: ld returned 1 exit status<br class="">----------------------------------------------------------------------------------------------------------------<br class=""><br class=""><br class=""><br class=""><br class="">Let me know if further details are required to debug this problem.<br class=""><br class="">Thanks a lot.<br class=""><br class="">Regards,<br class="">Raj<br class=""></div></div></blockquote></div><br class=""></div></body></html>