<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi,<div class=""><br class=""></div><div class="">Junxiao pointed you to a link with specific steps on how to add a custom TLV to NDN packets in ndnSIM.</div><div class=""><br class=""></div><div class="">Please read through the steps described there and follow them.</div><div class=""><br class=""></div><div class="">Thanks,</div><div class=""><br class=""><div class="">
<div class=""><div class=""><div class=""><span class="" style="float: none; display: inline !important;">Spyridon (Spyros) Mastorakis</span><br class=""><span class="" style="float: none; display: inline !important;">Personal Website: </span><a href="http://cs.ucla.edu/~mastorakis/" class="">http://cs.ucla.edu/~mastorakis/</a><br class=""><span class="" style="float: none; display: inline !important;">Internet Research Laboratory</span><br class=""><span class="" style="float: none; display: inline !important;">Computer Science Department</span><br class=""><span class="" style="float: none; display: inline !important;">UCLA</span></div></div></div>
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On May 7, 2017, at 9:26 AM, Ru Jia <<a href="mailto:rujia721@gmail.com" class="">rujia721@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Dear Junxiao,<div class=""> </div><div class="">I am sorry I didn't make myself more clear, I dipected it more specific last time and I thought it would be the same gay reply to me. The thing is I want to determine whether the routers should cache the data based on the number of times the data was requested, so I only need to count the number of the first several times when data packet is still fetched from the provider. </div><div class=""><br class=""></div><div class=""><span style="font-size:12.800000190734863px" class="">Last time, Spyridon Mastorakis replied my email and told me I</span><span style="font-size:12.800000190734863px" class=""> could add a new TLV field to the Data packet and increment it every time that this data packet is requested.</span><span style="font-size:12.800000190734863px" class=""> But i am still a little confused about how to realize that.</span></div><div class=""><span style="font-size:12.800000190734863px" class=""><br class=""></span></div><div class=""><span style="font-size:12.800000190734863px" class="">Ru Jia</span></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Sun, May 7, 2017 at 3:39 AM, Junxiao Shi <span dir="ltr" class=""><<a href="mailto:shijunxiao@email.arizona.edu" target="_blank" class="">shijunxiao@email.arizona.edu</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto" class=""><div class="">Hi Ru</div><div dir="auto" class=""><br class=""></div><div dir="auto" class="">Before talking about code, we need to understand the protocol.</div><div dir="auto" class="">NDN network is a distributed system, c and forwarding is hop-by-hop. Every NDN node has a ContentStore which is an opportunistic cache of Data packets.</div><div dir="auto" class="">A Data is "requested" if a consumer expresses an Interest that can be satisfied by the Data. The Data can be served from a producer, or from a cache anywhere in the network.</div><div dir="auto" class="">While a node can count how many times a Data is "requested" by an Interest reaching this node, it would not be possible to count how many times a Data is requested globally without using additional control messages.</div><div dir="auto" class=""><br class=""></div><div dir="auto" class="">Regarding code: see <a href="https://lo.calho.st/networks/adding-custom-packet-fields-to-packets-in-ndnsim-2-3-without-forking-the-entire-repository/" target="_blank" class="">https://lo.calho.st/<wbr class="">networks/adding-custom-packet-<wbr class="">fields-to-packets-in-ndnsim-2-<wbr class="">3-without-forking-the-entire-<wbr class="">repository/</a></div><div dir="auto" class=""><br class=""></div><div dir="auto" class="">Yours, Junxiao<div class=""><div class="h5"><br class=""><div class="gmail_extra" dir="auto"><br class=""><div class="gmail_quote">On May 6, 2017 12:06, "Ru Jia" <<a href="mailto:rujia721@gmail.com" target="_blank" class="">rujia721@gmail.com</a>> wrote:<br type="attribution" class=""><blockquote class="m_-3770893860288521084quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class=""><div class=""><span style="font-size:12.800000190734863px" class="">Hello,</span></div><div class=""><span style="font-size:12.800000190734863px" class=""><br class=""></span></div><span style="font-size:12.800000190734863px" class="">If I want to record the number of times the data was requested, how to add a new TLV filed to the Data packet? Is there any material or codes that I can refer to? </span><br class=""><div class=""><span style="font-size:12.800000190734863px" class=""><br class=""></span></div><div class=""><span style="font-size:12.800000190734863px" class="">Thanks advanced for your response.</span></div><font color="#888888" class=""><div class=""><span style="font-size:12.800000190734863px" class="">Ru Jia</span></div></font></div></blockquote></div></div></div></div></div></div>
</blockquote></div></div><br class=""></div></blockquote></div><br class=""></div></body></html>