[ndnSIM] [EXT] Can we access ns3 packet tags in forwarder.cc

Sonia zohanoor67 at gmail.com
Wed Jun 9 19:18:44 PDT 2021


Hi Junxiao Shi

Thank you for the response. I will try one of the above tricks and update
here.

Warm Regards





On Wed, Jun 9, 2021 at 5:36 PM Junxiao Shi <shijunxiao at email.arizona.edu>
wrote:

> Hi Sonia
>
> This is impossible.
> ns3::Packet is lost when BlockHeader copies its content into ndn::Block
> class.
>
> https://github.com/named-data-ndnSIM/ndnSIM/blob/28da73c868ad7444dba7a754fb77a41f6ca7cb07/model/ndn-net-device-transport.cpp#L139
>
> https://github.com/named-data-ndnSIM/ndnSIM/blob/28da73c868ad7444dba7a754fb77a41f6ca7cb07/model/ndn-block-header.cpp#L106
>
> A possible trick:
> 1. Make ndn::Block inherit from ndn::TagHost.
> 2. Define a ndn::Tag that contains ns3::PacketTagList.
> 3. Copy ns3 packet tags in BlockHeader when converting between ns3::Packet
> and ndn::Block.
> 4. Preserve ndn::Tag when converting between ndn::Block and
> Interest/Data/Nack in LinkService.
>
> If you attempt this idea, be sure to let us know whether it works.
>
> Yours, Junxiao
>
>
> On Wed, Jun 9, 2021, 02:06 Sonia via ndnSIM <ndnsim at lists.cs.ucla.edu>
> wrote:
>
>> *External Email*
>> Hi,
>>
>> Can we access ns3 packet in forwarder.cc?
>>
>> Particularly, I want to access ns3 packet tag (snrtag). I have
>> attached this tag to the ns3 packet and can access it in
>> ndn-net-device-transport.cpp but I want to access it in Forwarder.cc too.
>>
>> Any help would be highly appreciated.
>>
>> Warm Regards
>> Sonia
>>
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20210610/460bff8a/attachment.html>


More information about the ndnSIM mailing list