[ndnSIM] Interest Lifetime and a Hop Limit

bellaj mohammed che.bellaj at gmail.com
Mon Nov 21 01:43:10 PST 2022


Hi
if you want to change the lifetime of an interest you can use this code
time::milliseconds interestLifeTime(100);
your_interest->setInterestLifetime(interestLifeTime);
for  the hop limit
you must add some code in the forwarder.cpp
As far as i know, the interest packet don't have a tag for hop limit but it
has  a "hopCountTag"
auto hopCountTag = your_interest->getTag<lp::HopCountTag>();
int thenumberhopCount;
  if (hopCountTag != nullptr) { // e.g., packet came from local node's cache
    thenumberhopCount = *hopCountTag;
  }


Le lun. 21 nov. 2022 à 08:15, arakawa.t.af <arakawa.t.af at m.titech.ac.jp> a
écrit :

> Sorry.
> I misspelled the name of the code.
>
> I want to add an interest lifetime of 100ms and a hop limit of 2 to
> ''ndn-simple.cpp''.
>
>
> -----Original message-----
> From:arakawa.t.af <arakawa.t.af at m.titech.ac.jp>
> To:ndnsim <ndnsim at lists.cs.ucla.edu>
> Date:Mon, 21 Nov 2022 16:09:23
> Subject:Interest Lifetime and a Hop Limit
>
> Hello everyone,
>
> I'm trying to add a Lifetime and a Hop Limit to my Interests.
>
> For example, if I want to add an interest lifetime of 100ms and a hop
> limit of 2 to the simple-ndn code,
> what should I do?
>
> Thanks.
> _______________________________________________
> ndnSIM mailing list
> ndnSIM at lists.cs.ucla.edu
> https://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/20221121/1e44b956/attachment.html>


More information about the ndnSIM mailing list