I want to keep a log of each packet that passes through a wireless access point.

I'm looking for the following timestamps for each packet:

- When a packet was queued for downlink transmission
- When the access point started to contend on the wireless channel for the first time to transmit the packet (there can be collisions, etc. which can lead to retransmissions but I'm not interested in those timestamps)
- When the packet was transmitted successfully on the downlink
- When a packet was received on the uplink

and the corresponding packet sizes for each of the above 4 cases. Also, some kind of a identifier to know whether the timestamps belong to a particular packet or another packet (e.g. there can be a time when the packet was queued, when the AP started to contend and when the packet was successfully transmitted. But it's important to know that all the timestamps belong to a specific packet or different packets.)

I'm not looking for any fancy APs with the latest wireless standards. Even a simple 802.11g AP should be fine.

If anyone knows of any tools/setups/any way of getting the above information, can you please help me out. Also, if you have used these tools on a specific AP, can you please tell me the AP specifications?

I'm very new to openwrt and have no experience using it. So no idea how to get started on the above setup.