You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The latest Winpcap release does not support nanosecond precision pcap files, due to being based on libpcap 1.0.x. Nanosecond precision was added in 1.5.x+.
The currently used tests to confirm functionality are flawed, due to not using a static nanosecond pcap file to compare to, but instead writing a new one and reading from it.
The PcapFileWriter implementation is flawed, due to providing little feedback if a nanosecond precision file is requested, but the runtime does not support it. Only an error message is provided, while the error makes the writer unusable for the requested purpose.
If used it instead silently falls back on using pcap_open_dead which will use the default precision.
Fix recommendation:
Add static nanoseconds pcap file to be tested and compared against.
Convert the error message in PcapFileWriterDevice's constructor to an exception to fail loudly at construction, as the constructed device instance is ill-formed with respect to its construction parameters otherwise.