A fully managed, cross-platform .NET library for capturing network packets from live devices and files.
SharpPcap is a fully managed, cross-platform .NET library for capturing network packets from live interfaces and files. It provides a unified API that abstracts underlying native libraries like libpcap and Npcap, enabling developers to build network monitoring, analysis, and security applications in .NET without platform-specific code.
.NET developers building network tools, security applications, or monitoring solutions that require low-level packet capture across Windows, macOS, and Linux.
Developers choose SharpPcap for its high-performance, cross-platform design, and seamless integration with native packet capture libraries, offering a clean .NET API without sacrificing efficiency or compatibility.
Official repository - Fully managed, cross platform (Windows, Mac, Linux) .NET library for capturing packets
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Provides a unified API across Windows, macOS, and Linux, abstracting platform-specific differences in native packet capture libraries, as highlighted in the README's feature list.
Uses ReadOnlySpan<> to minimize memory allocation and copying, offering up to 30% faster raw capture performance, as noted in the migration guide from 5.x to 6.0.
Automatically resolves and loads libpcap, Npcap, or WinDivert with NativeLibrary support, handling library symlinks smoothly on Linux, per the README's NativeLibrary section.
Supports reading and writing both pcap and pcap-ng formats, compatible with common network analysis tools, as stated in the features list.
Requires separate installation of libpcap, Npcap, or WinDivert on target systems, which can complicate deployment and setup, especially on macOS where certain features like pcap_open may be lacking.
Major version updates like 6.0 introduce significant API breakage, necessitating code migration and potentially disrupting existing projects, as detailed in the migration section of the README.
Focuses solely on packet capture and basic filtering; for dissection and creation, developers must integrate additional libraries like Packet.Net, as mentioned in the README's features.