<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hi Marcia,<div><br></div><div>First of all, thanks for using ndnSIM :)<br><div><br><div><div>On Nov 19, 2013, at 2:19 AM, Marica Amadeo <<a href="mailto:marica.amadeo@gmail.com">marica.amadeo@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr"><span style="font-family:arial,sans-serif;font-size:13px">Dear Alex and all,</span><div style="font-family:arial,sans-serif;font-size:13px">I have been working with the ndnSIM simulator for a few months.</div>
<div style="font-family:arial,sans-serif;font-size:13px">
My topic is about wireless scenarios. I'm developing a NDN ad hoc network that uses the LIsten First Broadcast Later Protocol or a simple Controlled Flooding scheme, while consumers employ an extended version of the Consumer Window Application.</div>

<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">Working in this field, I recently noticed a suspect behavior when I tried to set the Interest Lifetime to a value minor than 1s.</div>

<div style="font-family:arial,sans-serif;font-size:13px">Consider, for instance, that I want an Interest Lifetime equal to 0.1s.</div><div style="font-family:arial,sans-serif;font-size:13px">So the lifetime of the correspondent PIT entry in every forwarding node should be set to 0.1s.</div>

<div style="font-family:arial,sans-serif;font-size:13px">However, first, I noticed that the lifetime of every PIT entry was set to the default value.</div><div style="font-family:arial,sans-serif;font-size:13px">Then, by looking at the code, I noticed that the Serialize function in <a href="http://ndnsim.cc">ndnsim.cc</a> assumes: </div>

<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">start.WriteU16 (static_cast<uint16_t> (m_interest->GetInterestLifetime ().ToInteger (Time::S)));<br>

</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">As a consequence, the value 0.1s is approximated to zero (A thing that I really do not want). And, as a further consequence, the PIT entry lifetime is set to the default value, (because it cannot be zero).<br>
</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">I'm looking for the best solution to support Interest Lifetimes with duration <1s, without complicating the system.</div></div></blockquote><div><br></div><div>Thanks for catching this issue.  As a quick hack you can replace Time::S to Time:MS (line 134) here and on line 169 replace</div><div><br></div><div><div>  m_interest->SetInterestLifetime (Seconds (i.ReadU16 ()));</div><div><br></div><div>with</div><div><br></div><div><div>  m_interest->SetInterestLifetime (MilliSeconds (i.ReadU16 ()));</div></div><div><br></div></div><div>These two changes should alter the semantics of what is the lifetime.</div><div><br></div><div><br></div><div>Currently, we are working on implementing a new NDN packet format that uses milliseconds as a time unit.  But this will take some time to finalize and then to implement.</div><div><br></div><div>Btw.  I'm really curious of your intention to use such a short interest lifetime?</div><div><br></div><div>---</div><div>Alex </div><br><blockquote type="cite"><div dir="ltr"><div style="font-family:arial,sans-serif;font-size:13px">Thanks in advance.</div><div style="font-family:arial,sans-serif;font-size:13px">Marica.</div>
<div><br></div><div><br></div><div><br></div>-- <br>Eng. Marica Amadeo<br>University "Mediterranea" of Reggio Calabria<br>DIIES Department, ARTS Lab<br>Via Graziella Feo di Vito I - 89100 Reggio Calabria (RC), Italy<br>

------------------------------<br><br>Email: <a href="mailto:marica.amadeo@gmail.com" target="_blank">marica.amadeo@gmail.com</a>, <a href="mailto:marica.amadeo@unirc.it" target="_blank">marica.amadeo@unirc.it</a>
</div>
_______________________________________________<br>ndnSIM mailing list<br><a href="mailto:ndnSIM@lists.cs.ucla.edu">ndnSIM@lists.cs.ucla.edu</a><br>http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim<br></blockquote></div><br></div></div></body></html>