<div><div>Hi Thiago</div><div dir="auto"><br></div><div dir="auto">See <a href="https://lo.calho.st/networks/adding-custom-packet-fields-to-packets-in-ndnsim-2-3-without-forking-the-entire-repository/">https://lo.calho.st/networks/adding-custom-packet-fields-to-packets-in-ndnsim-2-3-without-forking-the-entire-repository/</a></div><div dir="auto">Pay attention to the two sections about LinkService. Your tag got lost in that component.</div><div dir="auto"><br></div><div dir="auto">Yours, Junxiao</div><div><br><div class="gmail_quote"><div dir="ltr">On Thu, Aug 2, 2018 at 17:00 Thiago Teixeira <<a href="mailto:tteixeira@umass.edu">tteixeira@umass.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-US" link="blue" vlink="purple">
<div class="m_2251359263870114744WordSection1">
<p class="MsoNormal">Hi Spyros,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Thanks for your comments. We are able to read the tag in the net-device as expected.<u></u><u></u></p>
<p class="MsoNormal">We then added a new NDNLP field and TLV to pass this value and later be able to read it in the strategy. More specifically, we added the following code in NetDeviceTransport::receiveFromNetDevice after the nfdPacket is created in
<a href="https://github.com/named-data-ndnSIM/ndnSIM/blob/master/model/ndn-net-device-transport.cpp#L133" target="_blank">
L133</a>. <u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">::ndn::lp::Packet lpPacket = ::ndn::lp::Packet(nfdPacket.packet);<u></u><u></u></p>
<p class="MsoNormal">  if (sinrValue){<u></u><u></u></p>
<p class="MsoNormal">    lpPacket.add<lp::SinrTagField>(sinrValue);<u></u><u></u></p>
<p class="MsoNormal">  }<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">In our strategy, we are reading the tag in the afterReceiveInterest like this:<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">auto sinrTag = interest.getTag<lp::SinrTag>();<u></u><u></u></p>
<p class="MsoNormal">      if (sinrTag != nullptr) {<u></u><u></u></p>
<p class="MsoNormal">        sinr = *sinrTag;<u></u><u></u></p>
<p class="MsoNormal">      }<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Though the value of sinr is always zero. Our suspicion is that the lpPacket is not being added to the nfdPacket when receive is called (below).<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">this->receive(std::move(nfdPacket)); <u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">We couldn’t find any topic or article related to this issue. Do you know how can we accomplish this?<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Cheers<u></u><u></u></p>
<p class="MsoNormal"><u></u> </p></div></div></blockquote></div></div></div>