rusticata / pcap-parser

PCAP/PCAPNG file format parser written in pure Rust. Fast, zero-copy, safe.
Other
104 stars 24 forks source link

`if_tsoffset` is unsigned and should be signed #21

Closed gerard-ryan-immersaview closed 9 months ago

gerard-ryan-immersaview commented 1 year ago

Looking at V5 of the PCAP next-generation capture file format specification. It appears that the if_tsoffset is a signed 64-bit integer. However, it seems that it was implemented as an unsigned 64-bit interger. I suspect that it is signed so that packets before 1970-01-01 00:00:00 UTC can be represented, though I admit that its usefulness would be niche.