Skip to content

opapacketcapture: ERF/PCAP writing fixes#3

Open
antcodd wants to merge 2 commits intocornelisnetworks:masterfrom
antcodd:erf_fixes
Open

opapacketcapture: ERF/PCAP writing fixes#3
antcodd wants to merge 2 commits intocornelisnetworks:masterfrom
antcodd:erf_fixes

Conversation

@antcodd
Copy link

@antcodd antcodd commented Aug 4, 2016

Fixes the following issues with PCAP DLT_ERF files written by opapacketcapture:

  • 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 calculated based off the wrong (PCAP) struct length.
  • Change PCAP magic to nanosecond format to match what was being written to the file.

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.

antcodd added 2 commits August 4, 2016 17:24
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant