forwarder.cpp:there are two functions,<br>void  find(const Interest& interest, const HitCallback& hitCallback, const MissCallback& missCallback) const ; <br>  shared_ptr<Data>  Lookup(shared_ptr<const Interest> interest);<br> What's the difference between them?<br><br>At 2016-07-01 22:22:57, "Junxiao Shi" <shijunxiao@email.arizona.edu> wrote:<br> <blockquote id="isReplyContent" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><style></style><div class="WordSection1"><p class="MsoNormal">Hi Qinchao</p><p class="MsoNormal"><o:p> </o:p></p><p class="MsoNormal">I understand your question as: given a ContentStore and a Data packet, determine whether the same Data packet already exists in the ContentStore.</p><p class="MsoNormal">This can be achieved as:</p><p class="MsoNormal"><o:p> </o:p></p><p class="MsoNormal"><span style="font-family:"Courier New"">void<o:p></o:p></span></p><p class="MsoNormal"><span style="font-family:"Courier New"">isDataInContentStore(const ndn::Data& data, const nfd::cs::Cs& cs,<o:p></o:p></span></p><p class="MsoNormal"><span style="font-family:"Courier New"">                     std::function<void(bool)> cb)<o:p></o:p></span></p><p class="MsoNormal"><span style="font-family:"Courier New"">{<o:p></o:p></span></p><p class="MsoNormal"><span style="font-family:"Courier New"">  ndn::Name fullName = data.getFullName();<o:p></o:p></span></p><p class="MsoNormal"><span style="font-family:"Courier New"">  ndn::Interest interest(fullName);<o:p></o:p></span></p><p class="MsoNormal"><span style="font-family:"Courier New"">  cs.find(interest,<o:p></o:p></span></p><p class="MsoNormal"><span style="font-family:"Courier New"">          bind([cb] { cb(true); }),<o:p></o:p></span></p><p class="MsoNormal"><span style="font-family:"Courier New"">          bind([cb] { cb(false); }));<o:p></o:p></span></p><p class="MsoNormal"><span style="font-family:"Courier New"">}<o:p></o:p></span></p><p class="MsoNormal"><o:p> </o:p></p><p class="MsoNormal">First we create an Interest that would match the specified Data packet if it exists in the CS; the Interest would not match any other Data packet because it contains the implicit digest. The CS is then queried with the Interest, and the result is returned asynchronously.</p><p class="MsoNormal"><o:p> </o:p></p><p class="MsoNormal">Yours, Junxiao</p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><o:p> </o:p></span></p><div style="mso-element:para-border-div;border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in"><p class="MsoNormal" style="border:none;padding:0in"><b>From: </b><a href="mailto:15045081947@163.com"><span lang="ZH-CN" style="font-family:DengXian">潘庆超</span></a><br><b>Sent: </b>Friday, July 1, 2016 07:06<br><b>To: </b><a href="mailto:ndnsim@lists.cs.ucla.edu">ndnsim@lists.cs.ucla.edu</a><br><b>Subject: </b>[ndnSIM] Find corresponding CS entry for the given data packet</p></div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><o:p> </o:p></span></p><div><p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Arial",sans-serif;color:black">hello ,i am doing some simulations about NDN . I have a problem. i want to know whether there are some contents in cs can match the given data packet when a node receive a data packet, how can i do ?<o:p></o:p></span></p></div><p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><o:p> </o:p></span></p><p><br> </p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><o:p> </o:p></span></p></div></blockquote>