Wlan packet radio duration sometimes larger than inter-packet delay
asked Oct 30 '17
updated Nov 01 '17
In my .pcap file captured in WLAN, I am getting the duration of the current packet more than the difference between capture times of current and next packets.
How come is it possible? If such a thing happened, it will mean that the first packet was still being captured when the next packet arrived. For example, for two packets, capture times are T1=0.002124s, T2=0.003407s, so T2-T1=0.001283s, and the duration of the first packet (given by the wlan_radio.duration display filter), D=0.002112s, which makes D>T2-T1. So, which one is correct: the duration field displayed by the Wireshark, or the packet capture times?

Can you please tell me where to disable preference, as I can see under the Edit->Preferences->.protocols a menu name IEEE802.11 and IEEERariotap, but I can't find the "TSF indicates the end of the PPDU" preference under these.
You'll find it at '802.11 Radio' protocol preferences.
In the preferences under Edit menu, there is only 'IEEE Raditap' protocol preference, and that shows only two fields: 'Assume bit 14 means FCS in header' and 'Interpret High rates as MCS'. Is there any other path?
Wireshark version?
Version 2.2.6, running on Ubuntu 16.06
This does not exist in Wireshark 2.2. You'll need to run Wireshark 2.4 for this.
What is the duration of Frame T2 showing?
1072 usec.
Even after installing Wireshark 2.4.2, I am seeing the same values. The packet duration is more than interpacket capture delay, in the example I gave in the question. (Here duration is shown by wlanradio.duration, and captures times are given by frame.timerelative
But is the '802.11 Radio' protocol preferences available? Have to disabled TSF indicates the end of the PPDU?
That makes sense. Then the capture time will be the time when the last byte has been captured. So:
And what is the capture time of the frame in front of T1?
@User 23750: No, that does not make sense. Or at least I think so. It should be D1 < T2-T1, but D1 is 0.002112s. Or, it will only be correct if I assume that Wireshark records the end time of the frame.as the capture time. Is it that the case?
@User 39986: It still shows the same values for duration filed. But now it has added some more fields under the duration, like start and end fields.
@User 92967 why can’t you imagine that the last Byte counts for stamping the capture time. As this is thetime where the frame arrives the stack for further processing.
@ml Perhaps have a look at some at some small sample wifi captures attached to wireshark bug 13460. https://bugs.wireshark.org/bugzilla/s... Specifically look at the capture labeled "Small 12 frame wifi trace with Beacon and VHT NDP Announcement" (12-exported-wifi-with-beacon.pcapng). If you enable the wireless timeline feature and toggle the "TSF indicates the end of the PPDU" option you will actually see the difference this makes w.r.t to packets 2-6. The left edge of Packet 6's shows up before packets 2-5 when TSF indicates the end is enabled.
@User 23750: It's now clear to me that the capture time of a packet is the time the capture of that packet ends. Thank you for that. @User 86582 The problem still remains, as it does not change the Duration, In the new version, three more fields appear after Duration: Preamble, Start, Stop, and for some frames, IFS. Toggling the said preference changes the "Start" and "End" values and not the "Duration" value. What I wanted was to get the remaining time when I subtract Duration of the current packet from the difference in capture times of the current and the previous packets. I call it the idle time. (for the time being I assume all other times like IFS, backoff, and any undecoded energy etc are part of idle time). The idle time can never be negative. But that is happening now, as I explained in the question.
Thank you to @User 39986 and @User 86582 too. Please feel free to correct me if I understood wrong.