<div dir="ltr">Hi<div>if you want to change the lifetime of an interest you can use this code </div><div>time::milliseconds interestLifeTime(100);<br>your_interest->setInterestLifetime(interestLifeTime);<br></div><div>for  the hop limit </div><div>you must add some code in the forwarder.cpp </div><div>As far as i know, the interest packet don't have a tag for hop limit but it has  a "hopCountTag"<br></div><div>auto hopCountTag = your_interest->getTag<lp::HopCountTag>();</div><div>int thenumberhopCount;<br>  if (hopCountTag != nullptr) { // e.g., packet came from local node's cache<br>    thenumberhopCount = *hopCountTag;<br>  }<br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le lun. 21 nov. 2022 à 08:15, <a href="http://arakawa.t.af">arakawa.t.af</a> <<a href="mailto:arakawa.t.af@m.titech.ac.jp">arakawa.t.af@m.titech.ac.jp</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Sorry.<br>
I misspelled the name of the code.<br>
<br>
I want to add an interest lifetime of 100ms and a hop limit of 2 to ''ndn-simple.cpp''.<br>
<br>
<br>
-----Original message-----<br>
From:<a href="http://arakawa.t.af" rel="noreferrer" target="_blank">arakawa.t.af</a> <<a href="mailto:arakawa.t.af@m.titech.ac.jp" target="_blank">arakawa.t.af@m.titech.ac.jp</a>><br>
To:ndnsim <<a href="mailto:ndnsim@lists.cs.ucla.edu" target="_blank">ndnsim@lists.cs.ucla.edu</a>><br>
Date:Mon, 21 Nov 2022 16:09:23<br>
Subject:Interest Lifetime and a Hop Limit<br>
<br>
Hello everyone,<br>
<br>
I'm trying to add a Lifetime and a Hop Limit to my Interests. <br>
<br>
For example, if I want to add an interest lifetime of 100ms and a hop limit of 2 to the simple-ndn code, <br>
what should I do? <br>
<br>
Thanks.<br>
_______________________________________________<br>
ndnSIM mailing list<br>
<a href="mailto:ndnSIM@lists.cs.ucla.edu" target="_blank">ndnSIM@lists.cs.ucla.edu</a><br>
<a href="https://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim" rel="noreferrer" target="_blank">https://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim</a><br>
</blockquote></div>