Factory and system-query abstraction used by WinDivertDevice.
More...
#include <WinDivertDevice.h>
|
| struct | NetworkInterface |
| | Information about a Windows network interface as reported by WinDivert/Windows APIs. More...
|
| |
Factory and system-query abstraction used by WinDivertDevice.
The sole responsibilities of this interface are:
- Creating IWinDivertHandle instances (which expose the WinDivert API surface).
- Enumerating relevant Windows network interfaces. Keeping these responsibilities here keeps WinDivertDevice decoupled from concrete system/driver calls and enables unit testing and alternative implementations.
◆ getNetworkInterfaces()
| virtual std::vector<NetworkInterface> pcpp::internal::IWinDivertDriver::getNetworkInterfaces |
( |
| ) |
const |
|
pure virtual |
Enumerate Windows network interfaces relevant to WinDivert.
- Returns
- A vector of NetworkInterface objects with index, name, description and status.
◆ open()
| virtual std::unique_ptr<IWinDivertHandle> pcpp::internal::IWinDivertDriver::open |
( |
const std::string & |
filter, |
|
|
int |
layer, |
|
|
int16_t |
priority, |
|
|
uint64_t |
flags |
|
) |
| |
|
pure virtual |
Open a WinDivert handle with the given filter and settings.
- Parameters
-
| [in] | filter | WinDivert filter string (see WinDivert documentation). |
| [in] | layer | WinDivert layer value (typically WINDIVERT_LAYER_NETWORK). |
| [in] | priority | Injection/capture priority (lower is higher priority). |
| [in] | flags | WinDivert open flags (sniff mode, fragments, etc.). |
- Returns
- A unique_ptr to an IWinDivertHandle on success, or nullptr on failure.