Skip to content

Conversation

@Dimi1010
Copy link
Collaborator

@Dimi1010 Dimi1010 commented Jan 8, 2026

This PR improves the parsing options by adding deferred parsing and incremental parsing.

The parsing procedure has been extracted from the setRawData procedure and placed into parsePacket.
The new procedure can be called repeatedly on the same packet with different options and will incrementally parse the packet.

The packet parsing options have been grouped into the struct ParseOptions for better method readability.
The PR introduces new constructors and overloads to Packet and setRawPacket that take the parse options structure or a NoParseTag if parsing is to be deferred.

@codecov
Copy link

codecov bot commented Jan 8, 2026

Codecov Report

❌ Patch coverage is 78.49462% with 20 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.44%. Comparing base (50c8430) to head (d055115).

Files with missing lines Patch % Lines
Packet++/src/Packet.cpp 78.49% 19 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #2042      +/-   ##
==========================================
- Coverage   83.46%   83.44%   -0.02%     
==========================================
  Files         312      312              
  Lines       54858    54899      +41     
  Branches    11819    11829      +10     
==========================================
+ Hits        45787    45811      +24     
- Misses       7864     7875      +11     
- Partials     1207     1213       +6     
Flag Coverage Δ
alpine320 75.92% <69.33%> (-0.05%) ⬇️
fedora42 75.48% <68.65%> (-0.03%) ⬇️
macos-14 81.46% <69.33%> (-0.03%) ⬇️
macos-15 81.45% <69.33%> (-0.04%) ⬇️
mingw32 70.04% <66.10%> (-0.10%) ⬇️
mingw64 69.99% <66.10%> (+<0.01%) ⬆️
npcap ?
rhel94 75.37% <68.65%> (-0.05%) ⬇️
ubuntu2004 59.40% <68.65%> (-0.03%) ⬇️
ubuntu2004-zstd 59.51% <68.65%> (-0.03%) ⬇️
ubuntu2204 75.31% <68.65%> (-0.05%) ⬇️
ubuntu2204-icpx 58.05% <68.00%> (-0.03%) ⬇️
ubuntu2404 75.54% <68.65%> (-0.03%) ⬇️
ubuntu2404-arm64 75.57% <69.33%> (-0.07%) ⬇️
unittest 83.44% <78.49%> (-0.02%) ⬇️
windows-2022 85.36% <77.77%> (+0.11%) ⬆️
windows-2025 85.39% <77.77%> (+0.06%) ⬆️
winpcap 85.39% <77.77%> (-0.13%) ⬇️
xdp 52.98% <68.65%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant