[ndnSIM] OnInterest/OnData functions : access to an output queue

Alex Afanasyev alexander.afanasyev at ucla.edu
Wed Dec 12 13:55:11 PST 2012


Hi, Natalya!

It is easy, but would take a couple of steps. 

First, you need to figure out what from which type of face you have received a packet (as it could be an application face, which doesn't have a queue).  This could be done using DynamicCast call, like in https://github.com/NDN-Routing/ndnSIM/blob/master/model/ndn-l3-protocol.cc#L229.

Second, you will need to get netdevice pointer from the NetDeviceFace using GetNetDevice method (http://ndnsim.net/doxygen/classns3_1_1ndn_1_1_net_device_face.html#ae5ee510df5ba24c4a1aa94343302bb46).

Finally, you can access queue and other NetDevice attributes in a standard NS-3 way.

---
Alex

On Dec 12, 2012, at 1:46 PM, Natalya Rozhnova <natalya.rozhnova at lip6.fr> wrote:

> Hi everyone,
>  
> I'm trying to access to the output queue from m_forwardingStrategy::OnInterest(...) and OnData(...) functions. I need to access to the output queue installed on the interface from where the router just received a packet.
> Like:
> +-----+
> | R     |->out
> |        |
> +-----+<-in
>  
> What I'm actually trying to do is : when the router receives an Interest (or Data) packet on the Interface "in", I'd like to access to the queue instaled on interface "out" and to put there some values.
> How I could access to this queue correctly?
>  
> Thanks in advance!
> Best,
> Natalya





More information about the ndnSIM mailing list