<html><head>
<meta content="text/html; charset=utf-8" http-equiv="content-type">
<style type="text/css">
BLOCKQUOTE{margin-Top: 0px; margin-Bottom: 0px; margin-Left: 2em}
</style>

<meta name="GENERATOR" content="MSHTML 8.00.7601.17514"><!-- flashmail style begin -->
<style type="text/css">
body {border-width:0;margin:0}
img {border:0;margin:0;padding:0}
</style>
<base target="_blank"><!-- flashmail style end -->
</head><body style="LINE-HEIGHT: 1.5; BORDER-RIGHT-WIDTH: 0px; MARGIN: 12px; FONT-FAMILY: 微软雅黑; BORDER-TOP-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; COLOR: #000000; FONT-SIZE: 10.5pt; BORDER-LEFT-WIDTH: 0px" marginheight="0" marginwidth="0"><div>Hi, I had the same problem, but I added a string rather than int in the interest. My solution was to recreate the interest at each hop with the new string value. I don't know why but this fixed the problem.<br><br><br><br></div>
<div><!-- tmjah_g_1299s -->Sent from <!-- tmjah_g_1299e --><a href="http://www.bluemail.me/r"><!-- tmjah_g_1299s -->BlueMail<!-- tmjah_g_1299e --></a><br><br></div>
<div class="gmail_quote" >On Mar 28, 2017, at 3:26 AM, gc199211 <<a href="mailto:gc199211@mail.ustc.edu.cn" target="_blank">gc199211@mail.ustc.edu.cn</a>> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<stationery>
<div> </div>
<div>Hi sir :<br>     I find  out that my last 
email is incomplete in maillist, so I  finish it  and send 
again.  </div>
<div>     I am  trying to add  hop information in 
Interest recently on <strong>ndnSIM 2.2</strong>. Here is my code.</div>
<div>1). I add a private member variable  which is named 
hop in ndnSIM/ndn-cxx/src/interest.h </div>
<div>            
private:</div>
<div>                         
 Name m_name;</div>
<div>                                      
......</div>
<div>                        
 mutable Block m_wire;</div>
<div>                       
   <span style="FONT-SIZE: 16pt"><strong><span style="FONT-SIZE: 14pt"><span style="FONT-SIZE: 16pt"><span style="FONT-SIZE: 16pt">int 
hop;</span></span></span></strong> </span>          
// a new private member 
variable                       </div>
<div>                   </div>
<div>2). I increace the value of hop in the 
nfd::Forwarder::onOutgoingInterest(shared_ptr<pit::Entry> pitEntry, 
Face& outFace,<span style="COLOR: rgb(96,64,32)" class="keywordtype">bool  </span>wantNewNonce),so as to caculate the hop 
.</div>
<div>  </div>
<div style="FONT-SIZE: 16pt">              <span style="FONT-SIZE: 10.5pt"><strong><span style="FONT-SIZE: 16pt"> int 
tmpHop=interest->getHop();</span></strong></span></div>
<div style="FONT-SIZE: 10.5pt"><strong><span style="FONT-SIZE: 16pt">               
tmpHop++;</span></strong></div>
<div style="FONT-SIZE: 16pt"><span style="FONT-SIZE: 10.5pt"><span style="FONT-SIZE: 16pt"><strong><span style="FONT-SIZE: 16pt">               
interest->setHop(tmpHop);</span></strong> </span>       </span>         
</div>
<div align="center"> </div>
<div align="left">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 style="WIDOWS: 2; TEXT-TRANSFORM: none; BACKGROUND-COLOR: rgb(232,232,232); FONT-STYLE: normal; TEXT-INDENT: 0px; DISPLAY: inline !important; 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">ns3::ndn::FwHopCountTag 
</span>a to caculate the hop in <span style="WIDOWS: 2; TEXT-TRANSFORM: none; BACKGROUND-COLOR: rgb(232,232,232); FONT-STYLE: normal; TEXT-INDENT: 0px; DISPLAY: inline !important; 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">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>                                                                                                                                                                     &nb
sp;                 </div>
<div style="FONT-FAMILY: Verdana; COLOR: #c0c0c0; FONT-SIZE: 10pt">
<div align="left">2016-12-20</div>
<hr style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; WIDTH: 122px; HEIGHT: 1px; BORDER-TOP: #c0c0c0 1px solid; BORDER-RIGHT: 0px" id="SignNameHR" align="left">
<span id="_FlashSignName">gc199211</span> </div></stationery><pre class="blue"><hr><br>ndnSIM mailing list<br>ndnSIM@lists.cs.ucla.edu<br><a href="http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim">http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim</a><br></pre></blockquote></div></body></html>