# dotpcap/sharppcap

Official repository - Fully managed, cross platform (Windows, Mac, Linux) .NET library for capturing packets

Repository: https://github.com/dotpcap/sharppcap
Canonical: https://ross.abutalabs.com/products/sharppcap
Language: C#
License Family: other
Topics: capture-packets, c-sharp, cross-platform, network-monitoring, network-programming, npcap, linux, windows, macos, sharppcap, packets, analysis, packet, capturing-packets, windivert
Last push: 2026-08-25T12:09:45+00:00

## Health v2 (maintenance only)
Score: 67/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 8, longevity 100
- inputs: {"age_days": 4116, "days_push": 8, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1479, forks 273 (observed 2026-08-28T04:04:50.725060+00:00)

## What it is
SharpPcap is a fully managed, cross-platform .NET library for capturing packets from live network devices and reading/writing pcap capture files. It supports libpcap on Linux/macOS and Npcap/WinDivert on Windows, with BPF filtering and high-performance ReadOnlySpan-based APIs.

## Use cases
- capture packets from a network interface in c#
- read and parse pcap capture files in .net
- build a network traffic monitor in c#
- filter packets with berkeley packet filter expressions
- write captured packets to a pcap file
- list available network devices in .net
- sniff packets cross-platform on windows mac and linux

## When to choose
- you need packet capture in a .NET application across Windows, macOS, and Linux
- you want to read or write pcap/pcap-ng capture files from managed code
- you need BPF-based packet filtering with a high-performance, allocation-conscious API

## When to avoid
- you need packet dissection or protocol construction - use Packet.Net alongside it
- your project is not on .NET or .NET Framework
- you need high-level network analysis features rather than raw capture

## Facets
- artifact type: library
- maturity: active
- function: networking, developer-tools
- domain: networking, security, developer-tools
- platform: cross-platform, windows, dotnet
- tags: packet-capture, libpcap, npcap, windivert, pcap, packet-sniffing, csharp, bpf-filters, linux, macos

## Member repositories
- dotpcap/sharppcap (main) score 67

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:50.725060+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:34:18.956434+00:00, confidence not recorded.
  - readme: https://github.com/dotpcap/sharppcap (fetched 2026-08-28T04:04:50.725060+00:00, sha cc6ad419debe)
- Data as of 2026-08-30T08:39:29.467469+00:00.
