百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
P

PcapPlusPlus

> 数据库
开源

PcapPlusPlus 是一个用于捕获、解析和构建网络包的多平台 C++ 库。它旨在实现高效、强大且易于使用。

3.1K stars0 点赞0 次浏览
访问官网GitHub

工具介绍

PcapPlusPlus 是一个用于捕获、解析和构建网络包的多平台 C++ 库。它旨在实现高效、强大且易于使用。

PcapPlusPlus is a multiplatform C++ library for capturing, parsing and crafting of network packets. It is designed to be efficient, powerful and easy to use.

PcapPlusPlus enables decoding and forging capabilities for a large variety of network protocols. It also provides easy to use C++ wrappers for the most popular packet processing engines such as libpcap, WinPcap, Npcap, DPDK, eBPF AF_XDP, WinDivert and PF_RING.

Translations: English · 正體中文 · 한국어 · 日本語 · Русский

Table Of Contents

  • Table Of Contents
  • Download
    • GitHub Release Page
    • Homebrew
    • Vcpkg
    • Conan
    • Build It Yourself
    • Verify your packages
  • Feature Overview
  • Getting Started
  • API Documentation
  • Multi Platform Support
  • Supported Network Protocols
    • Data Link Layer (L2)
    • Network Layer (L3)
    • Transport Layer (L4)
    • Session Layer (L5)
    • Presentation Layer (L6)
    • Application Layer (L7)
  • DPDK And PF_RING Support
  • Benchmarks
  • Provide Feedback
  • Contributing
  • License

Download

You can choose between downloading from GitHub release page, use a package manager or build PcapPlusPlus yourself. For more details please visit the Download page in PcapPlusPlus web-site.

GitHub Release Page

https://github.com/seladb/PcapPlusPlus/releases/latest

Homebrew

brew install pcapplusplus

Homebrew formulae: https://formulae.brew.sh/formula/pcapplusplus

Vcpkg

Windows:

.\vcpkg install pcapplusplus

MacOS/Linux:

vcpkg install pcapplusplus

Vcpkg port: https://github.com/microsoft/vcpkg/tree/master/ports/pcapplusplus

Conan

conan install "pcapplusplus/[>0]@" -u

The package in ConanCenter: https://conan.io/center/pcapplusplus

Build It Yourself

Clone the git repository:

git clone https://github.com/seladb/PcapPlusPlus.git

Follow the build instructions according to your platform in the Build From Source page in PcapPlusPlus web-site.

Verify your packages

PcapPlusPlus releases which newer than v23.09 are signed with GitHub attestation. All of the attestations can be found here. You can verify the attestation of these packages with GitHub CLI. To verify packages you can follow the most recent instructions from gh attestation verify. For simple instructions you can use the following command:

gh attestation verify <path-to-package-file> --repository seladb/PcapPlusPlus

and you should see the following output in your terminal:

✓ Verification succeeded!

Feature Overview

  • Packet capture through an easy to use C++ wrapper for popular packet capture engines such as libpcap, WinPcap, Npcap, Intel DPDK, eBPF AF_XDP, WinDivert, ntop’s PF_RING and raw sockets [Learn more]
  • Packet parsing and crafting including detailed analysis of protocols and layers, packet generation and packet edit for a large variety of network protocols [Learn more]
  • Read and write packets from/to files in both PCAP and PCAPNG formats [Learn more]
  • Packet processing in line rate through an efficient and easy to use C++ wrapper for DPDK, eBPF AF_XDP and PF_RING [Learn more]
  • Multiplatform support - PcapPlusPlus is fully supported on Linux, MacOS, Windows, Android and FreeBSD
  • Packet reassembly - unique implementation of TCP Reassembly which includes TCP retransmission, out-of-order TCP packets and missing TCP data, and IP Fragmentation and Defragmentation to create and reassemble IPv4 and IPv6 fragments [Learn more]
  • Packet filtering that makes libpcap's BPF filters a lot more user-friendly [Learn more]
  • TLS Fingerprinting - a C++ implementation of JA3 and JA3S TLS fingerprinting [Learn more]

Getting Started

Writing applications with PcapPlusPlus is very easy and intuitive. Here is a simple application that shows how to read a packet from a PCAP file and parse it:

…

You can find much more information in the Getting Started page in PcapPlusPlus web-site. This page will walk you through few easy steps to have an app up and running.

API Documentation

PcapPlusPlus consists of 3 libraries:

  1. Packet++ - a library for parsing, creating and editing network packets
  2. Pcap++ - a library for intercepting and sending packets, providing network and NIC info, stats, etc. It is actually a C++ wrapper for packet capturing engines such as libpcap, WinPcap, Npcap, DPDK, AF_XDP, WinDivert and PF_RING
  3. Common++ - a library with some common code utilities used by both Packet++ and Pcap++

You can find an extensive API documentation in the API documentation section in PcapPlusPlus web-site. If you see any missing data please contact us.

Multi Platform Support

PcapPlusPlus is currently supported on Windows

, Linux

, MacOS

, Android

and FreeBSD

. Please visit PcapPlusPlus web-site to see all of the supported platforms and refer to the Download section to start using PcapPlusPlus on your platform.

Supported Network Protocols

PcapPlusPlus currently supports parsing, editing and creation of packets of the following protocols:

Data Link Layer (L2)

  1. Cisco HDLC
  2. Ethernet II
  3. IEEE 802.3 Ethernet
  4. LLC (Only BPDU supported)
  5. Null/Loopback
  6. Packet trailer (a.k.a footer or padding)
  7. PPPoE
  8. SLL (Linux cooked capture)
  9. SLL2 (Linux cooked capture v2)
  10. STP
  11. VLAN
  12. VXLAN
  13. Wake on LAN (WoL)
  14. NFLOG (Linux Netfilter NFLOG) - parsing only (no editing capabilities)

Network Layer (L3)

  1. ARP
  2. GRE
  3. ICMP
  4. ICMPv6
  5. IGMP (IGMPv1, IGMPv2 and IGMPv3 are supported)
  6. IPv4
  7. IPv6
  8. MPLS
  9. NDP
  10. Raw IP (IPv4 & IPv6)
  11. VRRP (IPv4 & IPv6)
  12. WireGuard

Transport Layer (L4)

  1. COTP
  2. GTP (v1 & v2)
  3. IPSec AH & ESP - parsing only (no editing capabilities)
  4. QUIC v1 - parsing only (no editing capabilities)
  5. TCP
  6. TPKT
  7. UDP

Session Layer (L5)

  1. SDP
  2. SIP

Presentation Layer (L6)

  1. SSL/TLS - parsing only (no editing capabilities)

Application Layer (L7)

  1. ASN.1 decoder and encoder
  2. BGP (v4)
  3. Cryptographic key decoders
  4. DHCP
  5. DHCPv6
  6. DNS
  7. DoIP
  8. FTP
  9. HTTP headers (request & response)
  10. LDAP
  11. Modbus
  12. MySQL - parsing only (no editing capabilities)
  13. NTP (v3, v4)
  14. PEM decoder and encoder
  15. PostgreSQL Wire Protocol (PGWire) - parsing only (no editing capabilities)
  16. Radius
  17. S7 Communication (S7comm)
  18. SMTP
  19. SOME/IP
  20. SSH - parsing only (no editing capabilities)
  21. Telnet - parsing only (no editing capabilities)
  22. X509 certificates - parsing only (no editing capabilities)
  23. Generic payload

DPDK And PF_RING Support

The Data Plane Development Kit (DPDK) is a set of data plane libraries and network interface controller drivers for fast packet processing.

PF_RING™ is a new type of network socket that dramatically improves the packet capture speed.

Both frameworks provide very fast packets processing (up to line speed) and are used in many network applications such as routers, firewalls, load balancers, etc. PcapPlusPLus provides a C++ abstraction layer over DPDK & PF_RING. This abstraction layer provides an easy to use interface that removes a lot of the boilerplate involved in using these frameworks. You can learn more by visiting the DPDK & PF_RING support pages in PcapPlusPlus web-site.

Benchmarks

We used Matias Fontanini's packet-capture-benchmarks project to compare the performance of PcapPlusPlus with other similar C++ libraries (such as libtins and libcrafter).

You can see the results in the Benchmarks page in PcapPlusPlus web-site.

Provide Feedback

We'd be more than happy to get feedback, please feel free to reach out to us in any of the following ways:

  • Open a GitHub ticket
  • Post a message in PcapPlusPlus Google group: https://groups.google.com/d/forum/pcapplusplus-support
  • Ask a question on Stack Overflow: https://stackoverflow.com/questions/tagged/pcapplusplus
  • Send an email to: [email protected]
  • Follow us on X: https://x.com/seladb

If you like this project please Star us on GitHub — it helps! :star: :star:

Please visit the PcapPlusPlus web-site to learn more.

Contributing

We would very much appreciate any contribution to this project. If you're interested in contributing please visit the contribution page in PcapPlusPlus web-site.

License

PcapPlusPlus is released under the Unlicense license.

GitHub Issues· 59 开放

在 GitHub 查看全部
  • #2258

    Dead link in SSLHandshake.h doc comment: blog.squarelemon.com/tls-fingerprinting/

    更新于 2026年9月12日
  • #2248

    Bug: FiveTupleSplitter causes file truncation/corruption on TCP session reuse (PcapSplitter)

    bug更新于 2026年9月2日
  • #2241

    clang-23 with -Werror fails compilation

    bug更新于 2026年8月31日

核心特点

  • •Table Of Contents
  • •Download
  • •GitHub Release Page
  • •Homebrew
  • •Build It Yourself
  • •Verify your packages
  • •Feature Overview
  • •Getting Started
  • •API Documentation
  • •Multi Platform Support

> 标签

C++cppdpdkebpflibpcap

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类数据库
定价开源

> 相关工具

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库