0

I have to count packets for each incoming flow actively in RED Queue in Ns2. I have to integrate it in the queue algorithm itself so that changes (in variables of active queues) occur when the packet in queued. For simple codes it's like:

 for each incoming packet
     count[i]=count[i]+packet[i]

How do I say “for each incoming packet” in NS2, and how do I define [i] such that [i] is the IP Address representing different individual flow?

Donal Fellows
  • 133,037
  • 18
  • 149
  • 215
instame
  • 23
  • 2

1 Answers1

0

You can do it by modifying the .cc and .h files of the queue implementation which can be found at

ns-allinone-x.xx\ns-x.xx\queue.

See the following link for more information

http://www.projectguideline.com/topic/can-we-view-the-packet-content-in-ns2-not-the-header/

  • Please take a look at [Limits for self-promotion in answers](http://meta.stackexchange.com/a/59302/349071). I would suggest removing your name and homepage from your answer, lest it be marked as spam. – Grisha Levit Jan 28 '17 at 08:34