<div dir="auto">I think that interest, as well as data packet,  already has a hop count field. If you want to get total hop count of an interest you can get it at the producer application. </div><div class="gmail_extra"><br><div class="gmail_quote">On May 15, 2017 10:25 PM, "Zhuhua Liao (zliao)" <<a href="mailto:Z.Liao@memphis.edu">Z.Liao@memphis.edu</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div dir="ltr">
<div id="m_7683671599856906824divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif" dir="ltr">
<p><span style="font-size:12pt" id="m_7683671599856906824divtagdefaultwrapper"></span></p>
<div style="margin-top:0;margin-bottom:0">Greetings All,<br>
    Now I have a question regarding how to count the forwarding hops of an Interest in ndnSIM.  I simply added the below codes, but it seems like I got the wrong forwarding hops:</div>
<div style="margin-top:0;margin-bottom:0">  1. added "interest->setTag(make_shared<<wbr>lp::HopCountTag>(0));" for hopcount initialization at the function "SendPacket" in consumer.cpp;</div>
<div style="margin-top:0;margin-bottom:0"> 2. added "interest.setTag(make_shared<<wbr>lp::HopCountTag>(hopCount + 1))" for one hop increment when forwarding a time at the function "onIncomingInterest" in Forwarder.cpp.</div>
<div style="margin-top:0;margin-bottom:0"><br>
</div>
<div style="margin-top:0;margin-bottom:0">I do not know if you have a right solution to count the forwarding hops for an interest?
<br>
</div>
<div style="margin-top:0;margin-bottom:0"><br>
</div>
<div style="margin-top:0;margin-bottom:0">Thanks!</div><font color="#888888">
<div style="margin-top:0;margin-bottom:0"><br>
</div>
<div style="margin-top:0;margin-bottom:0">Zhuhua<br>
</div>
<br>
<p></p>
</font></div>
</div>

<br>______________________________<wbr>_________________<br>
ndnSIM mailing list<br>
<a href="mailto:ndnSIM@lists.cs.ucla.edu">ndnSIM@lists.cs.ucla.edu</a><br>
<a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim" rel="noreferrer" target="_blank">http://www.lists.cs.ucla.edu/<wbr>mailman/listinfo/ndnsim</a><br>
<br></blockquote></div><br></div>

<br>
<br>