[v4,0/5] dumpcap and pcapng fixes

Message ID 20231109173412.108093-1-stephen@networkplumber.org (mailing list archive)
Headers
Series dumpcap and pcapng fixes |

Message

Stephen Hemminger Nov. 9, 2023, 5:34 p.m. UTC
  This series has bugfixes and tests for dumpcap and pcapng.
It should be in 23.11!

It fixes issues related to timestamping. The design choices are
to maximize performance in the primary process; and do
all the time adjustment in the secondary (dumpcap) since
the dumpcap needs to system calls anyway to write the result.

This patches set changes where the adjustment is calculated
into the pcapng portion that opens the output file.
All details of the format of timestamp are contained inside
pcapng (data hiding).

v4 - incorporate review feedback
v3 - don't use alloca() since can have VLA type issues

Stephen Hemminger (5):
  pdump: fix setting rte_errno on mp error
  dumpcap: allow multiple invocations
  pcapng: modify timestamp calculation
  pcapng: avoid using alloca()
  test: cleanups to pcapng test

 app/dumpcap/main.c      |  53 ++---
 app/test/meson.build    |   2 +-
 app/test/test_pcapng.c  | 418 +++++++++++++++++++++++++++-------------
 lib/graph/graph_pcap.c  |   2 +-
 lib/pcapng/rte_pcapng.c | 156 ++++++---------
 lib/pcapng/rte_pcapng.h |  19 +-
 lib/pdump/rte_pdump.c   |   9 +-
 7 files changed, 374 insertions(+), 285 deletions(-)