Fully managed, cross platform (Windows, Mac, Linux) .NET library for capturing packets from live and file based devices
The official SharpPcap repository.
Note that packet dissection and creation was split from SharpPcap some years ago into a separate project, Packet.Net. See the Packet.Net page for a full list of supported packet formats.
-
On Linux, support for libpcap
-
On Windows, support for:
- Npcap (formerly WinPcap) extensions, see Npcap API guide
-
Live device lists
-
Statistics
-
Reading packets from Live Devices (actual network devices) and Offline Devices (Capture files)
-
Support for Berkley Packet Filters
-
Dumping packets to Pcap files.
See the Examples folder for a range of examples using SharpPcap
We have support for a number of CI systems for a few reasons:
- Diversity of CI systems in case one of them shuts down
- Examples in case you'd like to customize SharpPcap and make use of one of these CI systems for internal builds. Note that we assume you are following the license for the library.
SharpPcap is released via nuget