|
PcapPlusPlus
Next
|
An abstract handle for interacting with the WinDivert device. More...
#include <WinDivertDevice.h>
Public Types | |
| enum class | WinDivertParam { QueueLength = 0 , QueueTime = 1 , QueueSize = 2 , VersionMajor = 3 , VersionMinor = 4 } |
| WinDivert runtime parameters that can be queried or configured. More... | |
Public Member Functions | |
| virtual uint32_t | close ()=0 |
| Close the underlying WinDivert handle. More... | |
| virtual uint32_t | recvEx (uint8_t *buffer, uint32_t bufferLen, size_t addressesSize, IOverlappedWrapper *overlapped)=0 |
| Begin or perform an overlapped receive of raw packet data. More... | |
| virtual std::vector< WinDivertAddress > | recvExComplete ()=0 |
| Finalize a previous overlapped receive and fetch per-packet address metadata. More... | |
| virtual uint32_t | sendEx (uint8_t *buffer, uint32_t bufferLen, size_t addressesSize)=0 |
| Send a batch of raw packets. More... | |
| virtual std::unique_ptr< IOverlappedWrapper > | createOverlapped ()=0 |
| Create a new overlapped wrapper bound to this handle. More... | |
| virtual bool | getParam (WinDivertParam param, uint64_t &value)=0 |
| Query a WinDivert runtime/queue parameter. More... | |
| virtual bool | setParam (WinDivertParam param, uint64_t value)=0 |
| Set a WinDivert runtime/queue parameter. More... | |
Static Public Attributes | |
| static constexpr uint32_t | SuccessResult = 0 |
| Generic success code returned by most operations. | |
| static constexpr uint32_t | ErrorIoPending = 997 |
| Windows ERROR_IO_PENDING (997) reported when an async operation is in flight. | |
An abstract handle for interacting with the WinDivert device.
This interface represents an opened WinDivert handle and provides the minimal set of operations used by WinDivertDevice: asynchronous receive, batched send, querying/setting queue parameters and handle closure. Concrete implementations wrap the corresponding WinDivert C APIs and Windows OVERLAPPED I/O.
|
strong |
WinDivert runtime parameters that can be queried or configured.
|
pure virtual |
Close the underlying WinDivert handle.
|
pure virtual |
Create a new overlapped wrapper bound to this handle.
|
pure virtual |
Query a WinDivert runtime/queue parameter.
| [in] | param | The parameter to query. |
| [out] | value | The retrieved value. |
|
pure virtual |
Begin or perform an overlapped receive of raw packet data.
If an overlapped object is provided, the call initiates an asynchronous read and typically returns ErrorIoPending. Completion status and size should be obtained via the provided IOverlappedWrapper.
| [in] | buffer | Destination buffer for packet data. |
| [in] | bufferLen | Size of the destination buffer in bytes. |
| [in] | addressesSize | Number of address entries the implementation may capture for a batch. |
| [in] | overlapped | Wrapper around Windows OVERLAPPED used for async I/O. Must not be null for async. |
|
pure virtual |
Finalize a previous overlapped receive and fetch per-packet address metadata.
|
pure virtual |
Send a batch of raw packets.
| [in] | buffer | Buffer containing one or more consecutive packets. |
| [in] | bufferLen | Total size in bytes of the packets contained in buffer. |
| [in] | addressesSize | Number of address entries accompanying the send batch. |
|
pure virtual |
Set a WinDivert runtime/queue parameter.
| [in] | param | The parameter to set. |
| [in] | value | The value to set. |