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

Junxiao Shi shijunxiao at email.arizona.edu
Wed Jun 9 01:36:09 PDT 2021

Hi Sonia

This is impossible.
ns3::Packet is lost when BlockHeader copies its content into ndn::Block

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>

> *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/20210609/43e0ec4d/attachment.html>

More information about the ndnSIM mailing list