<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi,<div class=""><br class=""></div><div class="">why you do not use the hopCount of a data packet? This is already provided by ndnSIM.</div><div class=""><br class=""></div><div class="">I guess that you do not encode your hop count as a TLV field for the Interest. You will to modify the wireEncode and wireDecode methods of the Interest class to do that.</div><div class=""><br class=""></div><div class="">Thanks,</div><div class=""><br class=""><div class="">
<div class=""><div class=""><div class=""><span class="" style="float: none; display: inline !important;">Spyridon (Spyros) Mastorakis</span><br class=""><span class="" style="float: none; display: inline !important;">Personal Website: </span><a href="http://cs.ucla.edu/~mastorakis/" class="">http://cs.ucla.edu/~mastorakis/</a><br class=""><span class="" style="float: none; display: inline !important;">Internet Research Laboratory</span><br class=""><span class="" style="float: none; display: inline !important;">Computer Science Department</span><br class=""><span class="" style="float: none; display: inline !important;">UCLA</span></div></div></div>
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On Mar 27, 2017, at 7:25 PM, gc199211 <<a href="mailto:gc199211@mail.ustc.edu.cn" class="">gc199211@mail.ustc.edu.cn</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><stationery style="font-family: 微软雅黑; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div class=""> </div><div class="">Hi sir :<br class="">     I find  out that my last email is incomplete in maillist, so I  finish it  and send again. <span class="Apple-converted-space"> </span></div><div class="">     I am  trying to add  hop information in Interest recently on<span class="Apple-converted-space"> </span><strong class="">ndnSIM 2.2</strong>. Here is my code.</div><div class="">1). I add a private member variable  which is named hop in ndnSIM/ndn-cxx/src/interest.h </div><div class="">            private:</div><div class="">                          Name m_name;</div><div class="">                                      ......</div><div class="">                         mutable Block m_wire;</div><div class="">                         <span class="Apple-converted-space"> </span><span style="font-size: 16pt;" class=""><strong class=""><span style="font-size: 14pt;" class=""><span style="font-size: 16pt;" class=""><span style="font-size: 16pt;" class="">int hop;</span></span></span></strong> </span>          // a new private member variable                       </div><div class="">                   </div><div class="">2). I increace the value of hop in the nfd::Forwarder::onOutgoingInterest(shared_ptr<pit::Entry> pitEntry, Face& outFace,<span class="keywordtype" style="color: rgb(96, 64, 32);">bool <span class="Apple-converted-space"> </span></span>wantNewNonce),so as to caculate the hop .</div><div class="">  </div><div style="font-size: 16pt;" class="">              <span style="font-size: 10.5pt;" class=""><strong class=""><span style="font-size: 16pt;" class=""> int tmpHop=interest->getHop();</span></strong></span></div><div style="font-size: 10.5pt;" class=""><strong class=""><span style="font-size: 16pt;" class="">               tmpHop++;</span></strong></div><div style="font-size: 16pt;" class=""><span style="font-size: 10.5pt;" class=""><span style="font-size: 16pt;" class=""><strong class=""><span style="font-size: 16pt;" class="">               interest->setHop(tmpHop);</span></strong> </span>       </span>        <span class="Apple-converted-space"> </span></div><div align="center" class=""> </div><div align="left" class="">Here is my problem,It seems that the hop value is always 0 no matter how many nodes it is forwarded.How to solve the problem? I know there is a<span class="Apple-converted-space"> </span><span style="widows: 2; text-transform: none; background-color: rgb(232, 232, 232); font-style: normal; text-indent: 0px; font-family: 'Lucida Grande', Verdana, Geneva, Arial, sans-serif; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(50, 50, 50); font-size: 13px; font-weight: bold; word-spacing: 0px; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; display: inline !important;" class="">ns3::ndn::FwHopCountTag<span class="Apple-converted-space"> </span></span>a to caculate the hop in<span class="Apple-converted-space"> </span><span style="widows: 2; text-transform: none; background-color: rgb(232, 232, 232); font-style: normal; text-indent: 0px; font-family: 'Lucida Grande', Verdana, Geneva, Arial, sans-serif; white-space: normal; orphans: 2; float: none; letter-spacing: normal; color: rgb(50, 50, 50); font-size: 13px; font-weight: bold; word-spacing: 0px; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; display: inline !important;" class="">ns3::ndn::NetDeviceLinkService</span> ,But I want to caculate the hop value directly in Interest. If it works ,I can add other member variable in Interest  which is quite important for my research.Thank you very much .</div><div class=""><br class=""></div></stationery></div></blockquote></div><br class=""></div></body></html>