Pcap.Net Documentation

repository·master·Indexed 20 days ago

https://github.com/pcapdotnet/pcap.net

A .NET wrapper for WinPcap that enables C# and C++/CLI developers to perform network packet capture, injection, and analysis. It provides access to device management, BPF filtering, and packet storage, while bridging low-level C functions with .NET features like LINQ. Includes a packet interpretation framework supporting protocols such as Ethernet, IPv4, IPv6, TCP, UDP, DNS, and HTTP.

Tokens
303
Snippets
0
Records
3
Agent score
20%

What's inside Pcap.Net

  1. Overview of Pcap.Net

    master
    Pcap.Net is a .NET wrapper for WinPcap implemented using C++/CLI and C#. It provides access to WinPcap's capabilities within the .NET ecosystem and includes a built-in framework for packet interpretation. It is designed for developers needing to capture, send, or analyze network traffic in .NET applications.
  2. WinPcap capabilities in Pcap.Net

    master

    Pcap.Net exposes the following WinPcap features to .NET developers:

    • Device Management: Retrieve a list of Live Devices on the local host.
    • Packet Capture: Read packets from Live Devices (Network Interfaces) or Offline Devices (Pcap files).
    • Statistics: Access capture-wide statistics or per-packet statistics.
    • Sampling & Filtering: Use different sampling methods and apply Berkeley Packet Filters (BPF).
    • Packet Injection: Send packets directly to Live Devices or utilize WinPcap's send queues.
    • Storage: Dump captured packets to Pcap files.
    • Iteration: Use .NET Enumerables and LINQ to process received packets.
  3. Supported packet protocols for interpretation

    master

    Pcap.Net includes a packet interpretation framework that supports the following protocols:

    • Layer 2: Ethernet and VLAN tagging (802.1Q)
    • Layer 3: ARP, IPv4, IPv6, GRE, ICMP, IGMP
    • Layer 4: UDP, TCP
    • Application Layer: DNS, HTTP