<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif;" dir="ltr">
<p>Thanks a lot. I have got the hop count in the forwarder through your hint.</p>
<p><br>
</p>
<p>Zhuhua<br>
</p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Amir Ibrahim <a.ibrahim@fci-cu.edu.eg><br>
<b>Sent:</b> Tuesday, May 16, 2017 2:30:18 PM<br>
<b>To:</b> Zhuhua Liao (zliao)<br>
<b>Cc:</b> ndnsim@lists.cs.ucla.edu<br>
<b>Subject:</b> Re: [ndnSIM] How to count the forwarding hops of an Interest</font>
<div> </div>
</div>
<div>
<div dir="auto">
<div>In the forwarder::onIncomingInterest method you can extract the interest hop count tag the same way as in consumer::onData method. <br>
<div class="gmail_extra"><br>
<div class="gmail_quote">On May 16, 2017 10:29 AM, "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>
<div id="m_-6547495223369832841divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif" dir="ltr">
<p>Thank you for your reply, but can I get the hop count at the forwarder? Because I want to stop forwarding an Interest, if its forwarding hops exceed a certain amount.
<br>
</p>
</div>
<hr style="display:inline-block;width:98%">
<div id="m_-6547495223369832841divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Amir Ibrahim <<a href="mailto:a.ibrahim@fci-cu.edu.eg" target="_blank">a.ibrahim@fci-cu.edu.eg</a>><br>
<b>Sent:</b> Monday, May 15, 2017 9:54:11 PM<br>
<b>To:</b> Zhuhua Liao (zliao)<br>
<b>Cc:</b> <a href="mailto:ndnsim@lists.cs.ucla.edu" target="_blank">ndnsim@lists.cs.ucla.edu</a><br>
<b>Subject:</b> Re: [ndnSIM] How to count the forwarding hops of an Interest</font>
<div> </div>
</div>
<div class="elided-text">
<div>
<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" target="_blank">Z.Liao@memphis.edu</a>> wrote:<br type="attribution">
<blockquote class="m_-6547495223369832841quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<div id="m_-6547495223369832841m_7683671599856906824divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif" dir="ltr">
<p><span style="font-size:12pt" id="m_-6547495223369832841m_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<l<wbr>p::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" target="_blank">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/m<wbr>ailman/listinfo/ndnsim</a><br>
<br>
</blockquote>
</div>
<br>
</div>
<br>
<br>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
<br>
<br>
</div>
</body>
</html>