Queue Management Policy

The default ns-3.16 drops the newest packet whenever the queue is full in the MAC layer. Some applications need to preserve the newest generated packet and drop the oldest one from the MAC layer queue. This patch has been developed to add this feature to ns-3 MAC layer queueing policy.

A second queue management policy was added to WifiMacQueue::Enqueue(). Before a new packet can be inserted into the queue, the function checks whether the queue is full or not. If the queue is full and the drop newest policy is selected, the newly generated packet will be dropped ( as default ns-3 behaves). However, if the drop oldest policy is selected, the oldest packet in the queue will be dropped and the new packet will be inserted at the tail of the queue. The drop-oldest policy was added to transmit the latest generated packet with most recent information instead of an old packet.