<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:DengXian;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"\@DengXian";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style></head><body lang=EN-US link=blue vlink="#954F72"><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></body></html>