[Nfd-dev] How to enable a new forwarding strategy

bigcatlei at gmail.com bigcatlei at gmail.com
Tue Feb 9 16:51:11 PST 2016


Hi Alex, 

Thanks for your reply. We did add the following into our cpp program

> const Name YourStrategyClass::STRATEGY_NAME("ndn:/localhost/nfd/strategy/you-strategy-name/%FD%00");
> NFD_REGISTER_STRATEGY(YourStrategyClass);

But it doesn't work. The nfdc cannot use the new strategy with the error code 504. 

Is there any other particular things that we need to note in order to install a new forwarding strategy? 

Thanks, 
Best regards, 

Lei


> On Feb 9, 2016,3:58 PM,Alex Afanasyev <aa at cs.ucla.edu> wrote:
> 
> 
>> On Feb 9, 2016, at 2:31 PM, Lei Liu <bigcatlei at gmail.com> wrote:
>> 
>> Hi,
>> 
>> 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.
>> 
>> 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.
>> 
>> Thanks,
>> Best regards,
>> 
>> Lei
> 
> In .cpp file of your strategy just add
> 
> const Name YourStrategyClass::STRATEGY_NAME("ndn:/localhost/nfd/strategy/you-strategy-name/%FD%00");
> NFD_REGISTER_STRATEGY(YourStrategyClass);
> 
> After that you should be able to use ndn:/localhost/nfd/strategy/you-strategy-name in nfdc.
> 
> ---
> Alex
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/nfd-dev/attachments/20160209/849df2b9/attachment.html>


More information about the Nfd-dev mailing list