opapacketcapture: ERF/PCAP writing fixes#3
Open
antcodd wants to merge 2 commits intocornelisnetworks:masterfrom
Open
opapacketcapture: ERF/PCAP writing fixes#3antcodd wants to merge 2 commits intocornelisnetworks:masterfrom
antcodd wants to merge 2 commits intocornelisnetworks:masterfrom
Conversation
Fixes: Timestamp (64-bit fixed point little endian not seconds/nanoseconds). Record length field (total record length not packet length). PCAP length fields (to be ERF record length). These were coincidentally the correct value despite being calcuated based off the wrong struct length.
May reduce compatibility with tools, alternative is to change PCAP timestamp (not ERF) to microseconds since Wireshark ignores the PCAP timestamp for ERF records anyway.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the following issues with PCAP DLT_ERF files written by opapacketcapture:
correct value despite being calculated based off the wrong (PCAP) struct length.
The PCAP magic change may reduce compatibility with tools and versions of PCAP that only support microsecond timestamps. The alternative would be to change PCAP timestamp (not ERF) to microseconds. Wireshark uses the ERF timestamp instead of the PCAP timestamp for DLT_ERF records anyway. Without this a tool reading the PCAP timestamp will show the wrong subsecond value.
As we don't currently have Omni-Path hardware so have been unable to test these changes beyond compiling and careful reading. We would like to check some resulting PCAP files to confirm the changes are working as intended.