kisom / pypcapfile

Pure Python library for handling libpcap savefiles.
http://kisom.github.com/pypcapfile
ISC License
76 stars 33 forks source link

timestamp_ms is misleading #12

Closed eclazi closed 8 years ago

eclazi commented 8 years ago

timestamp_ms member of pcap_packet is confusing. I think is should be renamed timestamp_us as it is in microseconds.

Don42 commented 8 years ago

Just found the same problem. According to the pcap documentation [1] the time is split in seconds and microseconds. This means timestamp_ms should be renamed to timestamp_us. Since this would be a breaking change it might be useful to add a property timestamp_ms that returns the time in milliseconds.

I am unsure on what to do with the constructor, but I do not expected that to be used outside of this package, so a change in parameter naming shouldn't have a large impact.

[1] https://wiki.wireshark.org/Development/LibpcapFileFormat