<div dir="ltr">Hi Alex, and Junxiao, <div><br></div><div>Thank you for your reply. I understand better now. </div><div><br></div><div>To enable the local control feature, this link (<a href="http://redmine.named-data.net/projects/nfd/wiki/FaceMgmt#Enable-a-LocalControlHeader-feature" target="_blank">http://redmine.named-data.net/projects/nfd/wiki/FaceMgmt#Enable-a-LocalControlHeader-feature</a>) mentioned a command like </div><div><br></div><div>enable-local-control  </div><div><p style="color:rgb(72,72,72);font-family:'Lucida Grande',verdana,arial,helvetica,sans-serif;font-size:12px">ControlParameters fields:</p><ul style="margin-bottom:1em;color:rgb(72,72,72);font-family:'Lucida Grande',verdana,arial,helvetica,sans-serif;font-size:12px"><li>LocalControlFeature (required): 1=IncomingFaceId, 2=NextHopFaceId, 3=CachingPolicy</li></ul><div><font color="#484848" face="Lucida Grande, verdana, arial, helvetica, sans-serif"><span style="font-size:12px"><br></span></font></div></div><div><font color="#484848" face="Lucida Grande, verdana, arial, helvetica, sans-serif"><span style="font-size:12px">But I am still unclear about how to run this command. Also, what is difference / relationship between this command and the command "</span></font>nfdc set-strategy ndn:/app1/video ndn:/localhost/nfd/strategy/client-control"? Do we need to run both of them? </div><div><br></div><div>Thanks for your attention, </div><div>Best regards, </div><div><br></div><div>Lei</div><div><div class="gmail_extra"><br><div class="gmail_quote">2016-02-08 17:22 GMT-08:00 Alex Afanasyev <span dir="ltr"><<a href="mailto:aa@cs.ucla.edu" target="_blank">aa@cs.ucla.edu</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 style="word-wrap:break-word"><div>Hi Lei,</div><div><br></div><div>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.</div><div><br></div><div>To enable the feature, you can refer to  <a href="http://redmine.named-data.net/projects/nfd/wiki/FaceMgmt#Enable-a-LocalControlHeader-feature" target="_blank">http://redmine.named-data.net/projects/nfd/wiki/FaceMgmt#Enable-a-LocalControlHeader-feature</a>  </div><div><br></div><div>With ndn-cxx, you can write something like this (or follow Junxiao's example)</div><div><br></div><div>  ndn::Face **face**;</div><div>  ndn::KeyChain keyChain;</div><div>  ndn::nfd::Controller controller(**face**, keyChain);</div><div><br></div><div><div>  controller.start<ndn::nfd::FaceEnableLocalControlCommand>(</div><div>    ControlParameters()</div><div>      .setLocalControlFeature(ndn::nfd::LOCAL_CONTROL_FEATURE_NEXT_HOP_FACE_ID),</div><div>    ... callback for success ...,</div><div>    ... callback for failure (e.g., permission denied) ...);</div></div><div><br></div><div>  ...</div><div><br></div><div>  ndn::Interest x("/hello/world");</div><div>  x.setTag(make_shared<lp::NextHopFaceIdTag>(m_faceId));</div><div>  **face**.expressInterest(x, ...);</div><div>  ...</div><div><br></div><div>---</div><div>Alex</div><div><div class="h5"><div><br></div><div><blockquote type="cite"><div>On Feb 8, 2016, at 5:19 PM, Junxiao Shi <<a href="mailto:shijunxiao@email.arizona.edu" target="_blank">shijunxiao@email.arizona.EDU</a>> wrote:</div><br><div><p dir="ltr">Hi Liu</p><p dir="ltr">I've used client-control in one simple app.<br>
<a href="https://github.com/yoursunny/ndn6-tools/blob/7322ea378dbcdd0014b5217cb49da6283c3f9e94/remote-register-prefix.cpp#L92-L121" target="_blank">https://github.com/yoursunny/ndn6-tools/blob/7322ea378dbcdd0014b5217cb49da6283c3f9e94/remote-register-prefix.cpp#L92-L121</a><br>
(not intended as a tutorial)</p><p dir="ltr">Yours, Junxiao</p>
<div class="gmail_quote">On Feb 8, 2016 17:36, "Lei Liu" <<a href="mailto:bigcatlei@gmail.com" target="_blank">bigcatlei@gmail.com</a>> wrote:<br type="attribution"><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="ltr">Hi, <div><br></div><div>Can anyone help to elaborate how to enable the client control forwarding strategy in NFD? </div><br>I understand that by using nfdc, we can set strategy to a name such as: <br><br>nfdc set-strategy ndn:/app1/video ndn:/localhost/nfd/strategy/client-control<br><div><br></div><div>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? </div><div><br></div><div>Thanks, </div><div>Best regards, </div><div><br></div><div>Lei</div></div>
<br>_______________________________________________<br>
Nfd-dev mailing list<br>
<a href="mailto:Nfd-dev@lists.cs.ucla.edu" target="_blank">Nfd-dev@lists.cs.ucla.edu</a><br>
<a href="http://www.lists.cs.ucla.edu/mailman/listinfo/nfd-dev" rel="noreferrer" target="_blank">http://www.lists.cs.ucla.edu/mailman/listinfo/nfd-dev</a><br>
<br></blockquote></div>
_______________________________________________<br>Nfd-dev mailing list<br><a href="mailto:Nfd-dev@lists.cs.ucla.edu" target="_blank">Nfd-dev@lists.cs.ucla.edu</a><br><a href="http://www.lists.cs.ucla.edu/mailman/listinfo/nfd-dev" target="_blank">http://www.lists.cs.ucla.edu/mailman/listinfo/nfd-dev</a><br></div></blockquote></div><br></div></div></div></blockquote></div><br></div></div></div>