PcapPlusPlus  Next
WinDivertDevice.h File Reference

WinDivert-based device (Windows-only) for capturing and sending packets at the network layer. More...

#include <functional>
#include <tuple>
#include <unordered_map>
#include <atomic>
#include "Device.h"

Go to the source code of this file.

Classes

class  pcpp::internal::IOverlappedWrapper
 Abstract helper that wraps Windows OVERLAPPED I/O used by WinDivert operations. More...
 
struct  pcpp::internal::IOverlappedWrapper::WaitResult
 Result of waiting on an OVERLAPPED I/O operation. More...
 
struct  pcpp::internal::IOverlappedWrapper::OverlappedResult
 Result of completing an OVERLAPPED I/O operation. More...
 
struct  pcpp::internal::WinDivertAddress
 Minimal address/metadata returned by WinDivert for a captured packet. More...
 
class  pcpp::internal::IWinDivertHandle
 An abstract handle for interacting with the WinDivert device. More...
 
class  pcpp::internal::IWinDivertDriver
 Factory and system-query abstraction used by WinDivertDevice. More...
 
struct  pcpp::internal::IWinDivertDriver::NetworkInterface
 Information about a Windows network interface as reported by WinDivert/Windows APIs. More...
 
class  pcpp::WinDivertRawPacket
 A RawPacket specialization used by WinDivertDevice. More...
 
class  pcpp::WinDivertDevice
 A device wrapper around the WinDivert driver for Windows. More...
 
struct  pcpp::WinDivertDevice::ReceiveResult
 Result object returned by receive operations. More...
 
struct  pcpp::WinDivertDevice::SendResult
 Result object returned by send operations. More...
 
struct  pcpp::WinDivertDevice::WinDivertVersion
 The WinDivert runtime version as reported by the driver. More...
 
struct  pcpp::WinDivertDevice::NetworkInterface
 A Windows network interface entry returned by getNetworkInterfaces(). More...
 
struct  pcpp::WinDivertDevice::WinDivertReceiveCallbackContext
 Context object passed to ReceivePacketCallback. More...
 

Namespaces

 pcpp
 The main namespace for the PcapPlusPlus lib.
 

Detailed Description

WinDivert-based device (Windows-only) for capturing and sending packets at the network layer.

This header exposes a device wrapper around the WinDivert driver that lets applications:

  • Open a WinDivert handle with a filter
  • Capture inbound/outbound IPv4/IPv6 packets in batches or via a callback
  • Send batches of raw packets
  • Inspect and configure queue parameters (length, time, size)
  • Query WinDivert runtime version and available network interfaces

For filter syntax and semantics please refer to the WinDivert documentation.