[ndnSIM] How to count the forwarding hops of an Interest

Amir Ibrahim a.ibrahim at fci-cu.edu.eg
Mon May 15 19:54:11 PDT 2017


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.

On May 15, 2017 10:25 PM, "Zhuhua Liao (zliao)" <Z.Liao at memphis.edu> wrote:

Greetings All,
    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:
  1. added "interest->setTag(make_shared<lp::HopCountTag>(0));" for
hopcount initialization at the function "SendPacket" in consumer.cpp;
 2. added "interest.setTag(make_shared<lp::HopCountTag>(hopCount + 1))" for
one hop increment when forwarding a time at the function
"onIncomingInterest" in Forwarder.cpp.

I do not know if you have a right solution to count the forwarding hops for
an interest?

Thanks!

Zhuhua


_______________________________________________
ndnSIM mailing list
ndnSIM at lists.cs.ucla.edu
http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim

-- 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20170515/325a747e/attachment.html>


More information about the ndnSIM mailing list