<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<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"><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></STRONG> </SPAN></SPAN> </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> </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></BODY></HTML>