<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="">I do not know what exactly you have changed in the ndnSIM codebase, but I will try to make a guess on what might be going on.</div><div class=""><br class=""></div><div class="">When you retrieve a data packet from a cache, a hop count tag is added to the data packet (with a value of 0). Probably you tried to print out the value of the hop count before this is set to 0 after you retrieve a data packet from a cache. In this way, you are printing out the value of a variable that has not been initialized yet.</div><div class=""><br class=""></div><div class="">Hope that this helps.</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 class=""><span class="" style="float: none; display: inline !important;"><br class=""></span></div></div></div><div class=""><br class=""></div></div><div><blockquote type="cite" class=""><div class="">On Apr 9, 2016, at 6:43 AM, qhsong <<a href="mailto:ndn@sqh.me" class="">ndn@sqh.me</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><br class=""><div class="gmail_quote"><div dir="ltr" class=""><font face="arial, helvetica, sans-serif" class="">Hello, </font><div class=""><font face="arial, helvetica, sans-serif" class="">Recently I want to accomplish a Path coordination Content Store policy on ndnSIM, and I want to a node receive a data and see the data can be or not stored in it.</font></div><div class=""><font face="arial, helvetica, sans-serif" class="">So I add a int attribute named hop in Data class, and then decrease it in Forward::</font>onOutgoingData, When I find this hop is 0, then I add it.</div><div class=""><br class=""></div><div class="">But I found some problem, First, It seems onOutgoingData function will call not one times in same face, and also called by may threads.So hop count number seem so wired,just like following ,Count is the hop attribute:</div><div class=""><br class=""></div><div class=""><div class="">Face ID: 256 data=/prefix/%FE%1E Count:5</div><div class="">Face ID: 257 data=/prefix/%FE%1E Count:4</div><div class="">Face ID: 256 data=/prefix/%FE%1E Count:4</div><div class="">Face ID: 256 data=/prefix/%FE%1E Count:-1</div><div class="">Face ID: 256 data=/prefix/%FE%1E Count:160658872</div><div class="">Face ID: 256 data=/prefix/%FE%1E Count:160680288</div><div class="">Face ID: 256 data=/prefix/%FE%1E Count:161002048</div><div class="">Face ID: 257 data=/prefix/%FE%1E Count:160788463</div><div class="">Face ID: 256 data=/prefix/%FE%1E Count:160579534</div><div class="">Face ID: 258 data=/prefix/%FE%1E Count:160429366</div><div class="">Face ID: 256 data=/prefix/%FE%1E Count:5</div><div class="">Face ID: 257 data=/prefix/%FE%1E Count:161011245</div><div class="">Face ID: 256 data=/prefix/%FE%1E Count:161011240</div><div class="">Face ID: 256 data=/prefix/%FE%1E Count:161011235</div><div class="">Face ID: 256 data=/prefix/%FE%1E Count:160825346</div><div class="">Face ID: 256 data=/prefix/%FE%1E Count:160825342</div><div class="">Face ID: 256 data=/prefix/%FE%1E Count:160825338</div><div class="">Face ID: 256 data=/prefix/%FE%1E Count:160825334</div><div class="">Face ID: 256 data=/prefix/%FE%1E Count:160825330</div><div class="">Face ID: 257 data=/prefix/%FE%1E Count:160825327</div><div class="">Face ID: 258 data=/prefix/%FE%1E Count:160825325</div>​<br class=""></div><div class="">I have no idea about this, could your gives me some clue on this, and how to avoid this?</div><div class=""><br class=""></div><div class="">thanks for your help.</div><span class=""><font color="#888888" class=""><div class=""><br class=""></div><div class="">qhsong</div>
                
        
        
                <div title="Page 6" class=""><div class=""><div class=""><p class=""><br class=""></p></div></div></div></font></span></div></div></div></div></blockquote></div><br class=""></div></body></html>