<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>Hi Alex, </div><div><br></div><div>Thanks! </div><div><br></div><div>We also put it in <span style="background-color: rgba(255, 255, 255, 0);">daemon/fw. Maybe something is wrong in our side. We will double check carefully. </span></div><div><br></div><div>Thanks, </div><div>Best regards, </div><div><br></div><div>Lei<br><br></div><div><div><br></div>On Feb 9, 2016,5:30 PM,Alex Afanasyev <<a href="mailto:aa@cs.ucla.edu">aa@cs.ucla.edu</a>> wrote:<br><br></div><blockquote type="cite"><div><meta http-equiv="Content-Type" content="text/html charset=us-ascii"><br class=""><div><blockquote type="cite" class=""><div class="">On Feb 9, 2016, at 4:51 PM, <a href="mailto:bigcatlei@gmail.com" class="">bigcatlei@gmail.com</a> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="content-type" content="text/html; charset=utf-8" class=""><div dir="auto" class=""><div class="">Hi Alex, </div><div class=""><br class=""></div><div class="">Thanks for your reply. We did add the following into our cpp program</div><div class=""><br class=""></div><div class=""><blockquote type="cite" class=""><font class=""><span style="background-color: rgba(255, 255, 255, 0);" class="">const Name YourStrategyClass::STRATEGY_NAME("ndn:/localhost/nfd/strategy/you-strategy-name/%FD%00");<br class="">NFD_REGISTER_STRATEGY(YourStrategyClass);</span></font></blockquote><div class=""><br class=""></div>But it doesn't work. The nfdc cannot use the new strategy with the error code 504. </div><div class=""><br class=""></div><div class="">Is there any other particular things that we need to note in order to install a new forwarding strategy? </div></div></div></blockquote><div><br class=""></div><div>Hmm. It should work.  I just tried to create a dummy strategy.  I just added tmp.hpp and tmp.cpp files into daemon/fw folder and had invocation of NFD_REGISTER_STRATEGY macro.  After I run the compiled NFD, I'm able to use nfdc to set strategy:</div><div><br class=""></div><div><div>    # nfdc set-strategy /hello /localhost/nfd/strategy/tmp/%FD%00</div><div>    Successfully set strategy choice: ControlParameters(Name: /hello, Strategy: /localhost/nfd/strategy/tmp/%FD%00, )</div><div><br class=""></div></div></div></div></blockquote><blockquote type="cite"><div><add-tmp-strategy.patch></div></blockquote><blockquote type="cite"><div><meta http-equiv="Content-Type" content="text/html charset=utf-8"><div></div><div><br class=""></div><div>Did you added your strategy files in some other location?</div><div><br class=""></div><div>---</div><div>Alex</div><div><br class=""><blockquote type="cite" class=""><div class=""><div dir="auto" class=""><div class=""><br class=""></div><div class="">Thanks, </div><div class="">Best regards, </div><div class=""><br class=""></div><div class="">Lei<br class=""><br class=""><br class=""></div><div class="">On Feb 9, 2016,3:58 PM,Alex Afanasyev <<a href="mailto:aa@cs.ucla.edu" class="">aa@cs.ucla.edu</a>> wrote:<br class=""><br class=""></div><blockquote type="cite" class=""><div class=""><span class=""></span><br class=""><blockquote type="cite" class=""><span class="">On Feb 9, 2016, at 2:31 PM, Lei Liu <<a href="mailto:bigcatlei@gmail.com" class="">bigcatlei@gmail.com</a>> wrote:</span><br class=""></blockquote><blockquote type="cite" class=""><span class=""></span><br class=""></blockquote><blockquote type="cite" class=""><span class="">Hi,</span><br class=""></blockquote><blockquote type="cite" class=""><span class=""></span><br class=""></blockquote><blockquote type="cite" class=""><span class="">We developed a new forwarding strategy, but how to actually use it in NFD? nfdc command-line tool does not recognize this new forwarding strategy.</span><br class=""></blockquote><blockquote type="cite" class=""><span class=""></span><br class=""></blockquote><blockquote type="cite" class=""><span class="">NFD developer guide mentioned to modify daemon/fw/available-strategies.cpp and install the new strategy to the list of existing built-in strategies. But this file "daemon/fw/available-strategies.cpp" is no longer available in the latest NFD.</span><br class=""></blockquote><blockquote type="cite" class=""><span class=""></span><br class=""></blockquote><blockquote type="cite" class=""><span class="">Thanks,</span><br class=""></blockquote><blockquote type="cite" class=""><span class="">Best regards,</span><br class=""></blockquote><blockquote type="cite" class=""><span class=""></span><br class=""></blockquote><blockquote type="cite" class=""><span class="">Lei</span><br class=""></blockquote><span class=""></span><br class=""><span class="">In .cpp file of your strategy just add</span><br class=""><span class=""></span><br class=""><span class="">const Name YourStrategyClass::STRATEGY_NAME("ndn:/localhost/nfd/strategy/you-strategy-name/%FD%00");</span><br class=""><span class="">NFD_REGISTER_STRATEGY(YourStrategyClass);</span><br class=""><span class=""></span><br class=""><span class="">After that you should be able to use ndn:/localhost/nfd/strategy/you-strategy-name in nfdc.</span><br class=""><span class=""></span><br class=""><span class="">---</span><br class=""><span class="">Alex</span><br class=""><span class=""></span><br class=""></div></blockquote></div></div></blockquote></div><br class=""></div></blockquote></body></html>