3

Closed

Support sub-milliseconds timestamps

description

The translation of DateTime to WinPcap's timestamp rounds everything to milliseconds, which makes sub milliseconds precision unsupported.
Closed Mar 31, 2012 at 6:25 PM by Brickner
Released in 0.9.0

comments

DrCornelius wrote Sep 28, 2011 at 2:33 AM

Hi Boaz,

I am interested in getting this fixed, so I looked through the code and wonder if the problem is within PacketTimestamp::DateTimeToPcapTimestamp with a related change needed in PacketTimestamp::PcapTimestampToDateTime. I will get the dev environment on my machine (need to download ultimate, ouch on the price, will have to demo) and try out some changes. I am not familiar with your code or pcap API, but I will share my results if you like.

Am I duplicating effort here? Is the fix done and ready to be tested, just looking for some guinea pig? :)

Brickner wrote Sep 28, 2011 at 9:33 AM

I believe the bug is in PacketTimestamp::DateTimeToPcapTimestamp(), but obviously also the reversed PacketTimestamp::PcapTimestampToDateTime() has the same bug.
I haven't fixed it yet, though it shouldn't too complicated. Unfortunately, I will only get to it in a few weeks.
Basically I first plan to write a test that reproduces the bug, make the fix and make sure the test (and all other tests, that might need some modifications) passes.

Brickner wrote Oct 19, 2011 at 10:11 AM

This has been fixed and will be released in the next version.
The latest source code includes this fix.