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

Alex Afanasyev aa at CS.UCLA.EDU
Tue Feb 9 15:58:55 PST 2016


> 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 --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 841 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://www.lists.cs.ucla.edu/pipermail/nfd-dev/attachments/20160209/5b630c19/attachment.bin>


More information about the Nfd-dev mailing list