[ndnSIM] SINR packet tag in ndnSIM 2.5

Junxiao Shi shijunxiao at email.arizona.edu
Thu Aug 2 14:26:14 PDT 2018


Hi Thiago

See
https://lo.calho.st/networks/adding-custom-packet-fields-to-packets-in-ndnsim-2-3-without-forking-the-entire-repository/
Pay attention to the two sections about LinkService. Your tag got lost in
that component.

Yours, Junxiao

On Thu, Aug 2, 2018 at 17:00 Thiago Teixeira <tteixeira at umass.edu> wrote:

> Hi Spyros,
>
>
>
> Thanks for your comments. We are able to read the tag in the net-device as
> expected.
>
> 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 L133
> <https://github.com/named-data-ndnSIM/ndnSIM/blob/master/model/ndn-net-device-transport.cpp#L133>.
>
>
>
>
> ::ndn::lp::Packet lpPacket = ::ndn::lp::Packet(nfdPacket.packet);
>
>   if (sinrValue){
>
>     lpPacket.add<lp::SinrTagField>(sinrValue);
>
>   }
>
>
>
> In our strategy, we are reading the tag in the afterReceiveInterest like
> this:
>
>
>
> auto sinrTag = interest.getTag<lp::SinrTag>();
>
>       if (sinrTag != nullptr) {
>
>         sinr = *sinrTag;
>
>       }
>
>
>
>
>
> 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).
>
>
>
> this->receive(std::move(nfdPacket));
>
>
>
> We couldn’t find any topic or article related to this issue. Do you know
> how can we accomplish this?
>
>
>
>
>
> Cheers
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20180802/461dee73/attachment.html>


More information about the ndnSIM mailing list