[Nfd-dev] How to use the client control forwarding strategy

Lei Liu bigcatlei at gmail.com
Tue Feb 9 11:03:21 PST 2016


Hi Alex, and Junxiao,

Thank you for your reply. I understand better now.

To enable the local control feature, this link (
http://redmine.named-data.net/projects/nfd/wiki/FaceMgmt#Enable-a-LocalControlHeader-feature)
mentioned a command like

enable-local-control

ControlParameters fields:

   - LocalControlFeature (required): 1=IncomingFaceId, 2=NextHopFaceId,
   3=CachingPolicy


But I am still unclear about how to run this command. Also, what is
difference / relationship between this command and the command "nfdc
set-strategy ndn:/app1/video ndn:/localhost/nfd/strategy/client-control"?
Do we need to run both of them?

Thanks for your attention,
Best regards,

Lei

2016-02-08 17:22 GMT-08:00 Alex Afanasyev <aa at cs.ucla.edu>:

> Hi Lei,
>
> To use client-control strategy you will need two pieces:  enable local
> control feature on the face and use the corresponding NDNLP header to
> indicate where to forward.
>
> To enable the feature, you can refer to
> http://redmine.named-data.net/projects/nfd/wiki/FaceMgmt#Enable-a-LocalControlHeader-feature
>
>
> With ndn-cxx, you can write something like this (or follow Junxiao's
> example)
>
>   ndn::Face **face**;
>   ndn::KeyChain keyChain;
>   ndn::nfd::Controller controller(**face**, keyChain);
>
>   controller.start<ndn::nfd::FaceEnableLocalControlCommand>(
>     ControlParameters()
>
> .setLocalControlFeature(ndn::nfd::LOCAL_CONTROL_FEATURE_NEXT_HOP_FACE_ID),
>     ... callback for success ...,
>     ... callback for failure (e.g., permission denied) ...);
>
>   ...
>
>   ndn::Interest x("/hello/world");
>   x.setTag(make_shared<lp::NextHopFaceIdTag>(m_faceId));
>   **face**.expressInterest(x, ...);
>   ...
>
> ---
> Alex
>
> On Feb 8, 2016, at 5:19 PM, Junxiao Shi <shijunxiao at email.arizona.EDU
> <shijunxiao at email.arizona.edu>> wrote:
>
> Hi Liu
>
> I've used client-control in one simple app.
>
> https://github.com/yoursunny/ndn6-tools/blob/7322ea378dbcdd0014b5217cb49da6283c3f9e94/remote-register-prefix.cpp#L92-L121
> (not intended as a tutorial)
>
> Yours, Junxiao
> On Feb 8, 2016 17:36, "Lei Liu" <bigcatlei at gmail.com> wrote:
>
>> Hi,
>>
>> Can anyone help to elaborate how to enable the client control forwarding
>> strategy in NFD?
>>
>> I understand that by using nfdc, we can set strategy to a name such as:
>>
>> nfdc set-strategy ndn:/app1/video
>> ndn:/localhost/nfd/strategy/client-control
>>
>> Then, suppose we have an interest like /app1/video, how can we force it
>> to be forwarded to a specific face? NFD developer guide mentioned a
>> NextHopFaceId field in the interest message, but how to enable this feature
>> and send an interest with a NextHopFaceId field?
>>
>> Thanks,
>> Best regards,
>>
>> Lei
>>
>> _______________________________________________
>> Nfd-dev mailing list
>> Nfd-dev at lists.cs.ucla.edu
>> http://www.lists.cs.ucla.edu/mailman/listinfo/nfd-dev
>>
>> _______________________________________________
> Nfd-dev mailing list
> Nfd-dev at lists.cs.ucla.edu
> http://www.lists.cs.ucla.edu/mailman/listinfo/nfd-dev
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/nfd-dev/attachments/20160209/46773bc4/attachment.html>


More information about the Nfd-dev mailing list