From de45ae77a240bc65f256a9749d00b9cff929a29b Mon Sep 17 00:00:00 2001 From: seladb Date: Sun, 12 Jul 2026 20:06:08 -0700 Subject: [PATCH 1/3] Bump version to 26.07 --- CMakeLists.txt | 2 +- Common++/header/PcapPlusPlusVersion.h | 4 +- cmake/package/READMEs/README.release.header | 4 +- cmake/package/READMEs/release_notes.txt | 157 +++++++++++--------- 4 files changed, 91 insertions(+), 76 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 44486a2a33..851125350f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ # We need 3.12 or later, so that we can set policy CMP0074; see below. cmake_minimum_required(VERSION 3.12) -set(PCAPPP_VERSION "25.05+") +set(PCAPPP_VERSION "26.07") # MAIN_PROJECT CHECK set(PCAPPP_MAIN_PROJECT OFF) diff --git a/Common++/header/PcapPlusPlusVersion.h b/Common++/header/PcapPlusPlusVersion.h index 81dc45a29c..a08f9e9b07 100644 --- a/Common++/header/PcapPlusPlusVersion.h +++ b/Common++/header/PcapPlusPlusVersion.h @@ -8,8 +8,8 @@ /// @brief The main namespace for the PcapPlusPlus lib namespace pcpp { -#define PCAPPLUSPLUS_VERSION "25.05+" -#define PCAPPLUSPLUS_VERSION_OFFICIAL "non-official release" +#define PCAPPLUSPLUS_VERSION "26.07" +#define PCAPPLUSPLUS_VERSION_OFFICIAL "official release" #define PCAPPLUSPLUS_VERSION_FULL "v" PCAPPLUSPLUS_VERSION " (" PCAPPLUSPLUS_VERSION_OFFICIAL ")" diff --git a/cmake/package/READMEs/README.release.header b/cmake/package/READMEs/README.release.header index f2c85f25c0..5cdd3c26c6 100644 --- a/cmake/package/READMEs/README.release.header +++ b/cmake/package/READMEs/README.release.header @@ -1,2 +1,2 @@ -May 2025 release of PcapPlusPlus (v25.05) -========================================= +July 2026 release of PcapPlusPlus (v26.07) +========================================== diff --git a/cmake/package/READMEs/release_notes.txt b/cmake/package/READMEs/release_notes.txt index c8f5d143af..e69a0ee41f 100644 --- a/cmake/package/READMEs/release_notes.txt +++ b/cmake/package/READMEs/release_notes.txt @@ -1,82 +1,97 @@ -Release notes (changes from v24.09) +Release notes (changes from v25.05) ----------------------------------- -- New protocol support: - - WireGuard (thanks @nadongjun !) - - Add gratuitous ARP requests (thanks @Dimi1010 !) - - GTPv2 - - Cisco HDLC -- Added the option to build only `Common++` and `Packet++` libraries without `Pcap++`, removing the dependency on third-party libraries like libpcap or WinPcap/Npcap (thanks @Dimi1010 !) -- Updated the CMake files to support using `pcapplusplus/` as the include prefix (thanks @clementperon !) -- Added support for DPDK 23.11 and 24.11 -- Introduced nanosecond precision for timestamps in TCP reassembly -- Added support for timestamp-related libpcap options (thanks @vcomito-apexai !) -- Added multi-language README support (Traditional Chinese, Korean) (thanks @tigercosmos, @nadongjun !) -- Updated OS/platform support running in CI: Ubuntu ARM64, Alpine 3.20, Fedora 42, FreeBSD 13.4/14.1, newer macOS runners (thanks @clementperon !) -- Migrated Android build to use the new version of ToyVPN -- Introduced a new benchmark system using Google Benchmark (thanks @egecetin !) -- Enhanced Python testing and linting infrastructure with `ruff` (thanks @tigercosmos !) -- Code refactoring: - - Overhauled the logging infrastructure for better performance and flexibility (thanks @Dimi1010 !) - - Reformatted `CMakeLists` files using `gersemi` (thanks @egecetin !) - - Updated the internal implementation of `PcapLiveDevice` to store IP information as `IPAddress` (thanks @Dimi1010 !) - - Streamlined packet parsing using templated next-layer sub-construction (thanks @Dimi1010 !) - - Refactored device list classes (`PcapLiveDeviceList`, `DpdkDeviceList`, etc.) to use smart pointers internally for memory management and consolidated common behavior under a base class (thanks @Dimi1010 !) - - Improved the internal implementation of `MacAddress`, `IPAddress` and `IPNetwork` classes (thanks @Dimi1010 !) - - Enhanced and modernized the internal implementation of `PfRingDevice` (thanks @Dimi1010 !) - - Removed usage of VLAs (Variable Length Arrays) for C++ standard compliance (thanks @Dimi1010 !) - - Numerous C++11 modernization efforts (thanks @Dimi1010, @egecetin, @lumiZGorlic, @kiwixz, @ol-imorozko !) -- Improved documentation using triple-slash Doxygen formatting (thanks @Dimi1010, @tigercosmos !) -- Tons of bug fixes, security fixes and small improvements (thanks @Dimi1010, @clementperon, @rndx21033, @prudens, @Doekin, @egecetin, @ol-imorozko, @1ndahous3, @fxlb, @jj683, @oss-patch, @enomis101, @Shivam7-1, @orgads, @Alexis-Lapierre, @s-genereux, @fasonju !) +- libpcap / WinPcap / Npcap is now optional. You can build `Common++` and `Packet++` on their own, without `Pcap++` and without any dependency on a packet-capture engine. As part of this, PcapPlusPlus can now read and write `.pcap` files entirely without libpcap (thanks @Dimi1010 for the follow-up performance fixes and keeping this working across build configs!) +- Bumped the minimum required C++ standard to C++14 (thanks @Dimi1010 !) +- Protocol support: + * Added Modbus protocol (thanks @yahyayozo !) + * Added DoIP – Diagnostic over Internet Protocol (thanks @raissi-oussema !) + * Added PostgreSQL Wire Protocol (PGWire), including additional message types (thanks @Mfon-19 for a follow-up refactor!) + * Added MySQL Wire Protocol + * Discrete `FTPControl` and `FTPData` protocol types (thanks @Dimi1010 !) + * Add support for `AccurateECN` TCP flag (thanks @turtleman123 !) + * Improve SIP packet detection using heuristic parsing (thanks @sorooshm78 !) + * Recognize LLC payload in SLL2 (thanks @Dimi1010 !) +- Added extensive X.509 / cryptography support: + * X.509 certificate decoding, extension parsing, and parsing of X.509 certificates embedded in SSL/TLS messages + * Export/import of X.509 certificates to PEM format, plus a new general-purpose PEM codec + * Cryptographic key decoders (RSA/EC private and public keys) + * Base64 encoding/decoding + * A new `X509Toolkit` example application + * Expanded ASN.1 codec support: `BitString`, `UTCTime`/`GeneralizedTime`, `ObjectIdentifier` and string records, plus arbitrary-size integer support (thanks @Dimi1010 for internal Asn1Codec/Asn1Record improvements along the way!) +- Added support for WinDivert as a packet capture engine on Windows +- Added support for DPDK 25.11, plus new dedicated DPDK CI tests (thanks @minhnhatnoe for an `rte_eal_cleanup` fix on device destructure!) +- `IFileReaderDevice::createReader()` and `IFileReaderDevice::tryCreateReader()` use file-content heuristics to automatically pick the right reader (pcap/pcapng/snoop) instead of relying solely on the file extension (thanks @Dimi1010 !) +- Add incremental packet parsing support with `Packet::parsePacket()` (thanks @Dimi1010 !) +- Added multi-language README support: Japanese (thanks @tigercosmos !) and Russian (thanks @camelsayswhat !) - in addition to the existing Traditional Chinese and Korean translations +- AI/LLM support: added `AGENTS.md` to make it easier for LLMs to work on PcapPlusPlus, added `translation/ai_translation_prompt.md` to use AI to maintain the README translations (thanks @tigercosmos !) +- `IPv4Address`/`IPv6Address`/`MacAddress` user-defined literals, e.g. constructing addresses directly from string literals, and sized buffer-construction overloads (thanks @Dimi1010 !) +- Explicit-ownership overloads for `RawPacket::setRawData()`, and a sized overload for `Layer::copyData()` (thanks @Dimi1010 !) +- Improved zstd support: added a build flag to control zstd support (thanks @Dimi1010 !), fixed compression level not being applied consistently (thanks @MerinoSheep !), and fixed a memory leak when reading zstd-compressed files (thanks @SuperBigYB !) +- A new `SuppressLogs` RAII class for temporarily suppressing log output (thanks @Dimi1010 !) +- Platform/CI updates: added Ubuntu 26.04 support, removed Ubuntu 20.04, added macOS 26 support, and moved Windows CI to Visual Studio 2026 / Windows Server 2025 (thanks @Dimi1010 and @tigercosmos for CI work along the way!) +- Large-scale internal refactoring of the device layer (`PcapLiveDevice`, `DpdkDeviceList`, file readers/writers, statistics tracking), the logging infrastructure, and the packet parsing infrastructure, improving encapsulation, thread-safety, and maintainability (thanks @Dimi1010 for the bulk of this work, with additional C++ modernization from @tigercosmos, @adityaxa and @gyl30 !) +- Improved benchmarking: added a pure-parsing benchmark and extended benchmarks to support PcapNG and Snoop files (thanks @Dimi1010 !) +- Test refactoring: replace packet creation macros in with C++ functions (thanks @Dimi1010 !) +- Tons of security and correctness bug fixes (thanks @Dimi1010, @egecetin, @alacrity-aya, @gyl30, @SAY-5, @ZX41R, @danasana, @bratbiswas, @BohdanBuinich, @BraedonKlock, @KangLin, @sorooshm78, @turtleman123 !) -Breaking changes ----------------- +## Breaking changes -- `Logger::LogLevel` has been deprecated and moved to `LogLevel`. `LogLevel` is now an `enum class`, so arithmetic operations on it will fail to compile -- The `Logger` copy constructor and copy assignment operator are marked as deleted -- The return type of `Packet::getRawPacketReadOnly()` has been changed from `RawPacket*` to `RawPacket const*` -- SSLv2 support has been removed (it was non-functional in previous versions) (thanks to @droe!) +- The minimum required C++ standard has been raised to C++14 +- `IPcapDevice` has been removed; its logic now lives in `PcapLiveDevice` +- libpcap/WinPcap/Npcap is now an optional dependency — building without it disables `Pcap++` capture features, though `Common++`/`Packet++` (including pcap file I/O) remain fully usable +- Various internal APIs around device lists and statistics tracking were reworked as part of the refactoring above; this may affect code relying on undocumented internals -Deprecation list ----------------- +## Deprecation list -- `PcapLiveDevice::getAddresses()`, which was previously deprecated, has now been removed -- libpcap versions < 0.9 are no longer supported. As a result, the following CMake options have been removed: `PCAPPP_ENABLE_PCAP_IMMEDIATE_MODE` and `PCAPPP_ENABLE_PCAP_SET_DIRECTION` -- The following methods are now deprecated and will be removed in future versions: - - `Logger::Error`, `Logger::Info`, and `Logger::Debug` are deprecated. Please use `LogLevel::XXX` instead - - `PcapLiveDeviceList::getPcapLiveDeviceBy***` methods have been deprecated in favor of `PcapLiveDeviceList::getDeviceBy***` - - `ArpLayer(ArpOpcode opCode, const MacAddress &senderMacAddr, const MacAddress &targetMacAddr, const IPv4Address &senderIpAddr, const IPv4Address &targetIpAddr)` constructor has been deprecated in favor of more explicit overloads +- `IPv6Address::copyTo()` has been deprecated, please use `IPv6Address::copyToNewBuffer()` instead +- `MacAddress::copyTo()` has been deprecated, please use `MacAddress::copyToNewBuffer()` instead +- `Asn1IntegerRecord::getValue()` has been deprecated, please use `Asn1IntegerRecord::getIntValue()` instead +- `RawPacket::getObjectType()` has been deprecated due to unclear semantics +- `RawPacket::setRawData()` has been deprecated, please use the overload that takes `takeOwnership` parameter for explicit control +- `RawPacket::initWithRawData()` has been deprecated, please use `RawPacket::setRawData()` with `takeOwnership=false` instead +- `SSLExtension::SSLExtension()` has been deprecated, please use the constructor with bounded span instead +- Several `TcpOptionBuilder` constructors have been deprecated, please use the new constructors with `TcpOptionEnumType` instead +- `TcpLayer::getTcpOption(TcpOptionType option)` has been deprecated, please use the overload `TcpLayer::getTcpOption(TcpOptionEnumType option)` instead +- `TcpLayer::removeTcpOption(TcpOptionType optionType)` has been deprecated, please use the overload `TcpLayer::removeTcpOption(TcpOptionEnumType optionType)` instead +- `MBufRawPacket::getObjectType()` has been deprecated due to unclear semantics +- `IFileReaderDevice::getReader()` has been deprecated, please use `IFileReaderDevice::tryCreateReader()` instead +- `PcapFileReaderDevice::isNanoSecondPrecisionSupported()` has been deprecated, nanosecond precision is now natively supported by the internal parser and always returns true +- `PcapFileWriterDevice::isNanoSecondPrecisionSupported()` has been deprecated, nanosecond precision is now natively supported by the internal parser and always returns true +- `BpfFilterWrapper::matchPacketWithFilter()` has been deprecated, please use `BpfFilterWrapper::matches()` instead +- `GeneralFilter::matchPacketWithFilter()` has been deprecated, please use `GeneralFilter::matches()` instead +- `PcapLiveDevice::matchPacketWithFilter()` has been deprecated, please use `PcapLiveDevice::matches()` instead +- `PcapLiveDevice::sendPacket(Packet* packet, bool checkMtu = true)` has been deprecated, please use `PcapLiveDevice::sendPacket(Packet const& packet, bool checkMtu)` instead +- `PcapRemoteDeviceList::getRemoteDeviceByIP()` has been deprecated, please use `PcapRemoteDeviceList::getDeviceByIP()` instead +- `PfRingDeviceList::getPfRingDeviceByName()` has been deprecated, please use `PfRingDeviceList::getDeviceByIP()` instead -Collaborators -------------- +## Collaborators - - @Dimi1010 - - @tigercosmos - - @egecetin - - @clementperon - - @seladb +- @Dimi1010 +- @tigercosmos +- @egecetin +- @clementperon +- @seladb -Contributors ------------- +## Contributors -- @ol-imorozko -- @rndx21033 -- @nadongjun -- @lumiZGorlic -- @1ndahous3 -- @s-genereux -- @prudens -- @oss-patch -- @kiwixz -- @jj683 -- @fxlb -- @enomis101 -- @vcomito-apexai -- @Shivam7-1 -- @orgads -- @Doekin -- @Alexis-Lapierre -- @droe -- @fasonju +- @alacrity-aya +- @gyl30 +- @danasana +- @bratbiswas +- @minhnhatnoe +- @adityaxa +- @SuperBigYB +- @turtleman123 +- @raissi-oussema +- @yahyayozo +- @sorooshm78 +- @KangLin +- @MerinoSheep +- @camelsayswhat +- @SAY-5 +- @ZX41R +- @Mfon-19 +- @BraedonKlock -**Full Changelog**: https://github.com/seladb/PcapPlusPlus/compare/v24.09...v25.05 +**Full Changelog**: https://github.com/seladb/PcapPlusPlus/compare/v25.05...v26.07 From 0afab3970adc3a5134656e7d7bc384a99f620e39 Mon Sep 17 00:00:00 2001 From: seladb Date: Sun, 12 Jul 2026 21:34:02 -0700 Subject: [PATCH 2/3] Test packaging --- .github/workflows/package.yml | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index acee7b4351..7d31d513b8 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -4,6 +4,7 @@ on: push: tags: - '*' + branches: ["bump-version-to-26-07"] pull_request: paths: # Also run this workflow when this package.yml is update by a PR @@ -81,18 +82,19 @@ jobs: run: cmake --build "$BUILD_DIR" --target package - name: Generate artifact attestation - if: github.ref_type == 'tag' + # if: github.ref_type == 'tag' uses: actions/attest-build-provenance@a2bbfa25375fe432b6a289bc6b6cd05ecd0c4c32 # v4.1.0 with: subject-path: "${{ env.BUILD_DIR }}/*.tar.gz,${{ env.BUILD_DIR }}/*.deb,${{ env.BUILD_DIR }}/*.rpm" - name: Upload binaries to release - if: github.ref_type == 'tag' + # if: github.ref_type == 'tag' uses: ncipollo/release-action@339a81892b84b4eeb0f6e744e4574d79d0d9b8dd # v1.21.0 with: draft: true allowUpdates: true updateOnlyUnreleased: true + tag: v26.07-test artifacts: "${{ env.BUILD_DIR }}/*.tar.gz,${{ env.BUILD_DIR }}/*.deb,${{ env.BUILD_DIR }}/*.rpm" freebsd: @@ -123,18 +125,19 @@ jobs: cmake --build "$BUILD_DIR" --target package - name: Generate artifact attestation - if: github.ref_type == 'tag' + # if: github.ref_type == 'tag' uses: actions/attest-build-provenance@a2bbfa25375fe432b6a289bc6b6cd05ecd0c4c32 # v4.1.0 with: subject-path: "${{ env.BUILD_DIR }}/*.tar.gz" - name: Upload binaries to release - if: github.ref_type == 'tag' + # if: github.ref_type == 'tag' uses: ncipollo/release-action@339a81892b84b4eeb0f6e744e4574d79d0d9b8dd # v1.21.0 with: draft: true allowUpdates: true updateOnlyUnreleased: true + tag: v26.07-test artifacts: "${{ env.BUILD_DIR }}/*.tar.gz" macos: @@ -178,18 +181,19 @@ jobs: run: cmake --build "$BUILD_DIR" --target package - name: Generate artifact attestation - if: github.ref_type == 'tag' + # if: github.ref_type == 'tag' uses: actions/attest-build-provenance@a2bbfa25375fe432b6a289bc6b6cd05ecd0c4c32 # v4.1.0 with: subject-path: "${{ env.BUILD_DIR }}/*.tar.gz,${{ env.BUILD_DIR }}/*.pkg" - name: Upload binaries to release - if: github.ref_type == 'tag' + # if: github.ref_type == 'tag' uses: ncipollo/release-action@339a81892b84b4eeb0f6e744e4574d79d0d9b8dd # v1.21.0 with: draft: true allowUpdates: true updateOnlyUnreleased: true + tag: v26.07-test artifacts: "${{ env.BUILD_DIR }}/*.tar.gz,${{ env.BUILD_DIR }}/*.pkg" mingw-w64: @@ -248,18 +252,19 @@ jobs: run: cmake --build "$BUILD_DIR" --target package - name: Generate artifact attestation - if: github.ref_type == 'tag' + # if: github.ref_type == 'tag' uses: actions/attest-build-provenance@a2bbfa25375fe432b6a289bc6b6cd05ecd0c4c32 # v4.1.0 with: subject-path: "${{ env.BUILD_DIR }}/*.zip" - name: Upload binaries to release - if: github.ref_type == 'tag' + # if: github.ref_type == 'tag' uses: ncipollo/release-action@339a81892b84b4eeb0f6e744e4574d79d0d9b8dd # v1.21.0 with: draft: true allowUpdates: true updateOnlyUnreleased: true + tag: v26.07-test artifacts: "${{ env.BUILD_DIR }}/*.zip" visual-studio: @@ -298,18 +303,19 @@ jobs: run: cmake --build "$env:BUILD_DIR" --config ${{ matrix.configuration }} --target package - name: Generate artifact attestation - if: github.ref_type == 'tag' + # if: github.ref_type == 'tag' uses: actions/attest-build-provenance@a2bbfa25375fe432b6a289bc6b6cd05ecd0c4c32 # v4.1.0 with: subject-path: "${{ env.BUILD_DIR }}/*.zip" - name: Upload binaries to release - if: github.ref_type == 'tag' + # if: github.ref_type == 'tag' uses: ncipollo/release-action@339a81892b84b4eeb0f6e744e4574d79d0d9b8dd # v1.21.0 with: draft: true allowUpdates: true updateOnlyUnreleased: true + tag: v26.07-test artifacts: "${{ env.BUILD_DIR }}/*.zip" android-build: @@ -389,16 +395,17 @@ jobs: tar cvf "${PACKAGE_DIR}.tar.gz" "${PACKAGE_DIR}" - name: Generate artifact attestation - if: github.ref_type == 'tag' + # if: github.ref_type == 'tag' uses: actions/attest-build-provenance@a2bbfa25375fe432b6a289bc6b6cd05ecd0c4c32 # v4.1.0 with: subject-path: "${{ env.PACKAGE_DIR }}.tar.gz" - name: Upload binaries to release - if: github.ref_type == 'tag' + # if: github.ref_type == 'tag' uses: ncipollo/release-action@339a81892b84b4eeb0f6e744e4574d79d0d9b8dd # v1.21.0 with: draft: true allowUpdates: true updateOnlyUnreleased: true + tag: v26.07-test artifacts: "${{ env.PACKAGE_DIR }}.tar.gz" From 63272ea2e156d63337df5d81f9c7b97c7a34106b Mon Sep 17 00:00:00 2001 From: seladb Date: Mon, 13 Jul 2026 19:47:40 -0700 Subject: [PATCH 3/3] Fix release notes --- cmake/package/READMEs/release_notes.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/package/READMEs/release_notes.txt b/cmake/package/READMEs/release_notes.txt index e69a0ee41f..7ead006440 100644 --- a/cmake/package/READMEs/release_notes.txt +++ b/cmake/package/READMEs/release_notes.txt @@ -20,7 +20,7 @@ Release notes (changes from v25.05) * A new `X509Toolkit` example application * Expanded ASN.1 codec support: `BitString`, `UTCTime`/`GeneralizedTime`, `ObjectIdentifier` and string records, plus arbitrary-size integer support (thanks @Dimi1010 for internal Asn1Codec/Asn1Record improvements along the way!) - Added support for WinDivert as a packet capture engine on Windows -- Added support for DPDK 25.11, plus new dedicated DPDK CI tests (thanks @minhnhatnoe for an `rte_eal_cleanup` fix on device destructure!) +- Added support for DPDK 25.11, plus new dedicated DPDK CI tests (thanks @minhnhatnoe for an `rte_eal_cleanup` fix on device destruction!) - `IFileReaderDevice::createReader()` and `IFileReaderDevice::tryCreateReader()` use file-content heuristics to automatically pick the right reader (pcap/pcapng/snoop) instead of relying solely on the file extension (thanks @Dimi1010 !) - Add incremental packet parsing support with `Packet::parsePacket()` (thanks @Dimi1010 !) - Added multi-language README support: Japanese (thanks @tigercosmos !) and Russian (thanks @camelsayswhat !) - in addition to the existing Traditional Chinese and Korean translations @@ -60,7 +60,7 @@ Release notes (changes from v25.05) - `PcapFileWriterDevice::isNanoSecondPrecisionSupported()` has been deprecated, nanosecond precision is now natively supported by the internal parser and always returns true - `BpfFilterWrapper::matchPacketWithFilter()` has been deprecated, please use `BpfFilterWrapper::matches()` instead - `GeneralFilter::matchPacketWithFilter()` has been deprecated, please use `GeneralFilter::matches()` instead -- `PcapLiveDevice::matchPacketWithFilter()` has been deprecated, please use `PcapLiveDevice::matches()` instead +- `PcapLiveDevice::matchPacketWithFilter()` has been deprecated, please use `GeneralFilter::matches()` directly - `PcapLiveDevice::sendPacket(Packet* packet, bool checkMtu = true)` has been deprecated, please use `PcapLiveDevice::sendPacket(Packet const& packet, bool checkMtu)` instead - `PcapRemoteDeviceList::getRemoteDeviceByIP()` has been deprecated, please use `PcapRemoteDeviceList::getDeviceByIP()` instead - `PfRingDeviceList::getPfRingDeviceByName()` has been deprecated, please use `PfRingDeviceList::getDeviceByIP()` instead