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?