pcapplusplus/23.09

PcapPlusPlus is a multiplatform C++ library for capturing, parsing and crafting of network packets
Recipe info
2023-10-17

Available packages
Linux
Windows
macOS
macOS Apple Silicon

Install
Add the following line to your conanfile.txt:
[requires]
pcapplusplus/23.09

Using pcapplusplus

Note

If you are a new Conan user, we recommend reading the how to consume packages tutorial.

If you need additional assistance, please ask a question in the Conan Center Index repository.

Simplest use case consuming this recipe and assuming CMake as your local build tool:

[requires]
pcapplusplus/23.09
[generators]
CMakeDeps
CMakeToolchain
[layout]
cmake_layout
from conan import ConanFile
from conan.tools.cmake import cmake_layout


class ExampleRecipe(ConanFile):
    settings = "os", "compiler", "build_type", "arch"
    generators = "CMakeDeps", "CMakeToolchain"

    def requirements(self):
        self.requires("pcapplusplus/23.09")

    def layout(self):
        cmake_layout(self)

Now, you can run this Conan command to locally install (and build if necessary) this recipe and its dependencies (if any):

$ conan install conanfile.txt --build=missing

Useful information to take into account to consume this library:


These are the main declared targets:

  • CMake package name(s): PcapPlusPlus
  • CMake target name(s): PcapPlusPlus::PcapPlusPlus
  • pkg-config file name(s): pcapplusplus.pc

A simple use case using the CMake file name and the global target:

# ...
find_package(PcapPlusPlus REQUIRED)
# ...
target_link_libraries(YOUR_TARGET PcapPlusPlus::PcapPlusPlus)

These are all the available headers. Some of these ones might be non-public; make sure of it by visiting the pcapplusplus homepage listed above:

#include "pcapplusplus/ArpLayer.h"
#include "pcapplusplus/BgpLayer.h"
#include "pcapplusplus/CotpLayer.h"
#include "pcapplusplus/Device.h"
#include "pcapplusplus/DhcpLayer.h"
#include "pcapplusplus/DhcpV6Layer.h"
#include "pcapplusplus/DnsLayer.h"
#include "pcapplusplus/DnsLayerEnums.h"
#include "pcapplusplus/DnsResource.h"
#include "pcapplusplus/DnsResourceData.h"
#include "pcapplusplus/EthDot3Layer.h"
#include "pcapplusplus/EthLayer.h"
#include "pcapplusplus/FtpLayer.h"
#include "pcapplusplus/GeneralUtils.h"
#include "pcapplusplus/GreLayer.h"
#include "pcapplusplus/GtpLayer.h"
#include "pcapplusplus/HttpLayer.h"
#include "pcapplusplus/IPLayer.h"
#include "pcapplusplus/IPReassembly.h"
#include "pcapplusplus/IPSecLayer.h"
#include "pcapplusplus/IPv4Layer.h"
#include "pcapplusplus/IPv6Extensions.h"
#include "pcapplusplus/IPv6Layer.h"
#include "pcapplusplus/IcmpLayer.h"
#include "pcapplusplus/IcmpV6Layer.h"
#include "pcapplusplus/IgmpLayer.h"
#include "pcapplusplus/IpAddress.h"
#include "pcapplusplus/IpUtils.h"
#include "pcapplusplus/LLCLayer.h"
#include "pcapplusplus/LRUList.h"
#include "pcapplusplus/Layer.h"
#include "pcapplusplus/LinuxNicInformationSocket.h"
#include "pcapplusplus/Logger.h"
#include "pcapplusplus/MacAddress.h"
#include "pcapplusplus/MplsLayer.h"
#include "pcapplusplus/NdpLayer.h"
#include "pcapplusplus/NetworkUtils.h"
#include "pcapplusplus/NflogLayer.h"
#include "pcapplusplus/NtpLayer.h"
#include "pcapplusplus/NullLoopbackLayer.h"
#include "pcapplusplus/OUILookup.h"
#include "pcapplusplus/PPPoELayer.h"
#include "pcapplusplus/Packet.h"
#include "pcapplusplus/PacketTrailerLayer.h"
#include "pcapplusplus/PacketUtils.h"
#include "pcapplusplus/PayloadLayer.h"
#include "pcapplusplus/PcapDevice.h"
#include "pcapplusplus/PcapFileDevice.h"
#include "pcapplusplus/PcapFilter.h"
#include "pcapplusplus/PcapLiveDevice.h"
#include "pcapplusplus/PcapLiveDeviceList.h"
#include "pcapplusplus/PcapPlusPlusVersion.h"
#include "pcapplusplus/PointerVector.h"
#include "pcapplusplus/ProtocolType.h"
#include "pcapplusplus/RadiusLayer.h"
#include "pcapplusplus/RawPacket.h"
#include "pcapplusplus/RawSocketDevice.h"
#include "pcapplusplus/SSHLayer.h"
#include "pcapplusplus/SSLCommon.h"
#include "pcapplusplus/SSLHandshake.h"
#include "pcapplusplus/SSLLayer.h"
#include "pcapplusplus/SdpLayer.h"
#include "pcapplusplus/SingleCommandTextProtocol.h"
#include "pcapplusplus/SipLayer.h"
#include "pcapplusplus/Sll2Layer.h"
#include "pcapplusplus/SllLayer.h"
#include "pcapplusplus/SomeIpLayer.h"
#include "pcapplusplus/SomeIpSdLayer.h"
#include "pcapplusplus/StpLayer.h"
#include "pcapplusplus/SystemUtils.h"
#include "pcapplusplus/TLVData.h"
#include "pcapplusplus/TablePrinter.h"
#include "pcapplusplus/TcpLayer.h"
#include "pcapplusplus/TcpReassembly.h"
#include "pcapplusplus/TelnetLayer.h"
#include "pcapplusplus/TextBasedProtocol.h"
#include "pcapplusplus/TimespecTimeval.h"
#include "pcapplusplus/TpktLayer.h"
#include "pcapplusplus/UdpLayer.h"
#include "pcapplusplus/VlanLayer.h"
#include "pcapplusplus/VrrpLayer.h"
#include "pcapplusplus/VxlanLayer.h"
#include "pcapplusplus/WakeOnLanLayer.h"