[ndnSIM] Set tag to wifi attributes

Junxiao Shi shijunxiao at email.arizona.edu
Wed Jul 31 10:00:08 PDT 2019


Hi Zhongxiang

As I understand, your question is: in an application, you want to tag a
packet with a value that is related to an attribute of a WifiNetDevice.
In ns-3, this can be achieved with:

   1. Get hold of Ptr<Node>, by looking up NodeList with current execution
   context ID.
   2. Enumerate NetDevices attached to the Node.
   3. Find the WiFiNetDevice, and read its attribute.
   4. Tag the packet.


Yours, Junxiao

On Tue, Jul 23, 2019 at 7:55 PM Zhongxiang Zhu via ndnSIM <
ndnsim at lists.cs.ucla.edu> wrote:

> Hi all,
>
> I'm working on a wifi scenario where I have a new tag field attached and
> tested that works fine.
> Now I would like to set the tag value to producer node's wifiNetDevices
> attributes from Producer::onInterest( ) but can't achieve it. Could you
> please suggest how can tag access wifiNetDevices attributes from inside
> Producer/Consumer.
>
> I have read relevant tag posts but couldn't find what I'm looking for.
> Appreciate your help!
>
> Best Regards
> Fisher
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20190731/93fdbd9f/attachment.html>


More information about the ndnSIM mailing list