<div dir="ltr">Hi Alex, <div><br></div><div>We tried the tmp.hpp and tmp.cpp files provided by you, but still have the same problem when installing the new forwarding strategy. </div><div><br></div><div>Below is our details procedures. Please take a look to see if there is any problem. </div><div><br></div><div>1. install ndn-cxx</div>git clone <a href="https://github.com/named-data/ndn-cxx">https://github.com/named-data/ndn-cxx</a> <div>./waf configure </div><div>./waf </div><div>sudo ./waf install<div><br></div><div>2. install NFD</div><div>git clone --recursive <a href="https://github.com/named-data/NFD">https://github.com/named-data/NFD</a><br></div><font color="#ff0000">added tmp.hpp and tmp.cpp files into daemon/fw folder</font></div><div><div>./waf configure </div><div>./waf </div><div>sudo ./waf install</div></div><div><br></div><div>3. run NFD and enable the new forwarding strategy</div><div>nfd-start</div>nfdc set-strategy /hello /localhost/nfd/strategy/tmp/%FD%00<div>ERROR: Failed to set strategy choice: unsupported strategy (code:504)</div><div><br></div><div>Other build-in forwarding strategies are working well on this machine, such as the client-control, best-route, etc.</div><div><br></div><div>Please let me know your opinion, </div><div>Thanks, </div><div>Best regards, </div><div><br></div><div>Lei <br><div><br><div><div><div class="gmail_extra"><br><div class="gmail_quote">2016-02-09 17:36 GMT-08:00 <a href="mailto:bigcatlei@gmail.com">bigcatlei@gmail.com</a> <span dir="ltr"><<a href="mailto:bigcatlei@gmail.com" target="_blank">bigcatlei@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div 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 class="h5"><div><div><br></div>On Feb 9, 2016,5:30 PM,Alex Afanasyev <<a href="mailto:aa@cs.ucla.edu" target="_blank">aa@cs.ucla.edu</a>> wrote:<br><br></div><blockquote type="cite"><div><br><div><blockquote type="cite"><div>On Feb 9, 2016, at 4:51 PM, <a href="mailto:bigcatlei@gmail.com" target="_blank">bigcatlei@gmail.com</a> wrote:</div><br><div><div dir="auto"><div>Hi Alex, </div><div><br></div><div>Thanks for your reply. We did add the following into our cpp program</div><div><br></div><div><blockquote type="cite"><font><span style="background-color:rgba(255,255,255,0)">const Name YourStrategyClass::STRATEGY_NAME("ndn:/localhost/nfd/strategy/you-strategy-name/%FD%00");<br>NFD_REGISTER_STRATEGY(YourStrategyClass);</span></font></blockquote><div><br></div>But it doesn't work. The nfdc cannot use the new strategy with the error code 504. </div><div><br></div><div>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></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></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></div></div></div></div></blockquote></div></div><blockquote type="cite"><div><add-tmp-strategy.patch></div></blockquote><blockquote type="cite"><div><div></div><div><br></div><div>Did you added your strategy files in some other location?</div><div><br></div><div>---</div><div>Alex</div><div><br><blockquote type="cite"><div><div dir="auto"><span class=""><div><br></div><div>Thanks, </div><div>Best regards, </div><div><br></div><div>Lei<br><br><br></div><div>On Feb 9, 2016,3:58 PM,Alex Afanasyev <<a href="mailto:aa@cs.ucla.edu" target="_blank">aa@cs.ucla.edu</a>> wrote:<br><br></div></span><blockquote type="cite"><div><span class=""><span></span><br><blockquote type="cite"><span>On Feb 9, 2016, at 2:31 PM, Lei Liu <<a href="mailto:bigcatlei@gmail.com" target="_blank">bigcatlei@gmail.com</a>> wrote:</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>Hi,</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>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></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>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></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>Thanks,</span><br></blockquote><blockquote type="cite"><span>Best regards,</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>Lei</span><br></blockquote><span></span><br><span>In .cpp file of your strategy just add</span><br><span></span><br></span><span class=""><span>const Name YourStrategyClass::STRATEGY_NAME("ndn:/localhost/nfd/strategy/you-strategy-name/%FD%00");</span><br><span>NFD_REGISTER_STRATEGY(YourStrategyClass);</span><br><span></span><br></span><span class=""><span>After that you should be able to use ndn:/localhost/nfd/strategy/you-strategy-name in nfdc.</span><br><span></span><br><span>---</span><br><span>Alex</span><br><span></span><br></span></div></blockquote></div></div></blockquote></div><br></div></blockquote></div></blockquote></div><br></div></div></div></div></div></div>