[ndnSIM] How to count the forwarding hops of an Interest
Zhuhua Liao (zliao)
Z.Liao at memphis.edu
Tue May 16 07:29:04 PDT 2017
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.
From: Amir Ibrahim <a.ibrahim at fci-cu.edu.eg>
Sent: Monday, May 15, 2017 9:54:11 PM
To: Zhuhua Liao (zliao)
Cc: ndnsim at lists.cs.ucla.edu
Subject: Re: [ndnSIM] How to count the forwarding hops of an Interest
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<mailto:Z.Liao at memphis.edu>> wrote:
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?
ndnSIM mailing list
ndnSIM at lists.cs.ucla.edu<mailto:ndnSIM at lists.cs.ucla.edu>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ndnSIM