Skip to content

Fix IPcapStatisticsProvider::getStatistics() unresolved symbol error when building without libpcap.#2146

Open
Dimi1010 wants to merge 8 commits into
seladb:devfrom
Dimi1010:refactor/cleaup-pcppdevice
Open

Fix IPcapStatisticsProvider::getStatistics() unresolved symbol error when building without libpcap.#2146
Dimi1010 wants to merge 8 commits into
seladb:devfrom
Dimi1010:refactor/cleaup-pcppdevice

Conversation

@Dimi1010
Copy link
Copy Markdown
Collaborator

@Dimi1010 Dimi1010 commented May 23, 2026

This PR cleans up a potential unresolved symbol error due to PcapDevice.h being always included and PcapDevice.cpp only being conditionally included in pcap builds. The inlining solution was chosen due to PcapDevice.cpp containing only a single small function.

The PcapDevice.cpp file is removed after the move due to having no implementation details.

Additional notes:

Remove `PcapDevice.cpp` file due to no implementation.
@Dimi1010 Dimi1010 changed the title Move IPcapStatisticsProvider:;getStatistics to be implemented inline. Fix IPcapStatisticsProvider::getStatistics() unresolved symbol error when building without libpcap. May 23, 2026
@Dimi1010 Dimi1010 added the bug label May 23, 2026
@Dimi1010
Copy link
Copy Markdown
Collaborator Author

Dimi1010 commented May 23, 2026

CI pre-commit: Clang tidy is complaining because PcapDevice.cpp has been deleted.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.73%. Comparing base (6ba29cf) to head (2469f54).

Additional details and impacted files
@@           Coverage Diff            @@
##              dev    #2146    +/-   ##
========================================
  Coverage   82.72%   82.73%            
========================================
  Files         332      331     -1     
  Lines       59807    59805     -2     
  Branches    12591    12297   -294     
========================================
+ Hits        49475    49477     +2     
+ Misses       8947     8920    -27     
- Partials     1385     1408    +23     
Flag Coverage Δ
23.11.6 7.30% <0.00%> (+0.02%) ⬆️
24.11.5 7.27% <0.00%> (-0.04%) ⬇️
25.11.1 7.31% <0.00%> (-0.01%) ⬇️
alpine320 76.86% <100.00%> (+<0.01%) ⬆️
fedora42 76.44% <100.00%> (+<0.01%) ⬆️
macos-14 82.27% <100.00%> (+<0.01%) ⬆️
macos-15 82.26% <100.00%> (+<0.01%) ⬆️
mingw32 71.12% <100.00%> (+<0.01%) ⬆️
mingw64 71.01% <100.00%> (-0.01%) ⬇️
npcap ?
rhel94 76.26% <100.00%> (+<0.01%) ⬆️
ubuntu2204 76.27% <100.00%> (+<0.01%) ⬆️
ubuntu2204-icpx 59.41% <100.00%> (+0.01%) ⬆️
ubuntu2404 76.58% <100.00%> (+<0.01%) ⬆️
ubuntu2404-arm64 76.54% <100.00%> (-0.03%) ⬇️
ubuntu2604 76.47% <100.00%> (-0.03%) ⬇️
unittest 82.73% <100.00%> (+<0.01%) ⬆️
windows-2022 85.80% <100.00%> (+0.11%) ⬆️
windows-2025 85.83% <100.00%> (+0.12%) ⬆️
winpcap 85.83% <100.00%> (-0.07%) ⬇️
xdp 53.14% <0.00%> (-0.01%) ⬇️

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.

@Dimi1010 Dimi1010 marked this pull request as ready for review May 23, 2026 10:39
@Dimi1010 Dimi1010 requested a review from seladb as a code owner May 23, 2026 10:39
Copy link
Copy Markdown
Owner

@seladb seladb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Dimi1010 can you please fix the clang-tidy error https://github.com/seladb/PcapPlusPlus/actions/runs/26329991756/job/77568080302?pr=2146 ?

It looks like it still looks for PcapDevice.cpp for some reason 🤔

@Dimi1010
Copy link
Copy Markdown
Collaborator Author

@Dimi1010 can you please fix the clang-tidy error https://github.com/seladb/PcapPlusPlus/actions/runs/26329991756/job/77568080302?pr=2146 ?

It looks like it still looks for PcapDevice.cpp for some reason 🤔

Should be fixed by ea0ef85. It adds a diff filter to exclude newly deleted files from being added to the list of files to check.

@Dimi1010 Dimi1010 requested a review from seladb May 25, 2026 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants