[Ns-developers] Delete a packet in WifiMacQueue

Mathieu Lacage mathieu.lacage at sophia.inria.fr
Sun Jan 18 03:12:39 PST 2009


On Fri, 2009-01-16 at 12:03 +0100, Mirko Banchi wrote:
> Hi all,
> 
> I have to realize aggregation for packets in WifiMacQueue. I have to
> select all packets that have same receiver address as first packet in
> the queue and aggregate some of them. If aggregated packet is sent
> correctly i also have to delete from the queue all packets contained in
> aggregated packet.
> 
> Which could be the best way to realize this?


I think that it is much simpler to avoid this problem:
1) when you need to transmit a set of packets, remove them from the
queue
2) keep a copy of the packets in EdcaTxopN after the transmission is
started to ensure that you can do retransmissions
3) drop the copy when the transmission is done.

> 
> My idea:
> 
> - add these methods:
> 
> void WifiMacQueue::ErasePacket (uint32_t uid);
> 
> Is it right?
> Can i indentify a specific packet in this way?

Generally, it is a very bad idea to use the Packet::GetUid as a way to
uniquely identify packets, especially if you use aggregation and
fragmentation.

[lengthy explanation elided]

regards,
Mathieu



More information about the Ns-developers mailing list