<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></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="">since the Interest hop count is the same with the hop count of the corresponding Data packet, you could use the hop count attached to a received Data packet:</div><div class=""><br class=""></div><div class=""><a href="https://github.com/named-data-ndnSIM/ndnSIM/blob/a4915caa0c4121f2dd87fd3d7cc3b6eb91632f16/apps/ndn-consumer.cpp#L226-L234" class="">https://github.com/named-data-ndnSIM/ndnSIM/blob/a4915caa0c4121f2dd87fd3d7cc3b6eb91632f16/apps/ndn-consumer.cpp#L226-L234</a></div><div class=""><br class=""></div><div class="">Would that work for you?</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><br class="Apple-interchange-newline">
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On Apr 7, 2016, at 1:45 AM, ndn ndn <<a href="mailto:ndn@sqh.me" class="">ndn@sqh.me</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hi,<div class="">Recently, I want to add a hop-count number in interest class and when interest pass a node, this number will increase one.</div><div class=""> so I define a mutable int in interest class, init it in construct function, and increase it in Forward::onIncomingInterest(). But I try it failed, I found every time when Forward got a interest in onIncomingInterest, the number always zero.</div><div class=""><br class=""></div><div class="">I didn't found any function to make this interest got zero, and How to increase it one by one ?</div><div class=""><br class=""></div><div class="">Thanks for your help?</div><div class=""><br class=""></div><div class="">qhsong</div><div class=""><br class=""></div></div></div></blockquote></div><br class=""></div></body></html>