diff --git a/doc/windivert.html b/doc/windivert.html index 5828015..c3b0f49 100644 --- a/doc/windivert.html +++ b/doc/windivert.html @@ -1093,11 +1093,12 @@ WinDivert handle created with the WINDIVERT_FLAG_DROP set.
 BOOL WinDivertRecvEx(
     __in HANDLE handle,
-    __out PVOID pPacket,
+    __out VOID *pPacket,
     __in UINT packetLen,
-    __in UINT64 flags,
-    __out_opt PWINDIVERT_ADDRESS pAddr,
     __out_opt UINT *recvLen,
+    __in UINT64 flags,
+    __out_opt WINDIVERT_ADDRESS *pAddr,
+    __inout_opt UINT *pAddrLen,
     __inout_opt LPOVERLAPPED lpOverlapped
 );
 
@@ -1108,14 +1109,20 @@ BOOL WinDivertRecvEx( @@ -1131,9 +1138,31 @@ All other codes indicate an error.

Remarks
This function is equivalent to -WinDivertRecv() except that it -supports overlapped I/O via the lpOverlapped parameter. +WinDivertRecv() except:

+ +

+Batched I/O makes it possible to receive multiple packets at once using a +single operation. +This reduces the number of kernel/user-mode context switches, improving +performance. +To use batched I/O, pass an array of more than one +WINDIVERT_ADDRESS to pAddr, set pAddrLen +to be the total length of the pAddr array, and ensure that +pPacket points to a sufficiently large buffer for multiple +packets. +When the operation completes, the value pointed to by pAddrLen +is updated to the total number of address bytes actually received. +For example, if a batch of 5 packets were to be received, then +pAddrLen will be updated to point to the value +(5*sizeof(WINDIVERT_ADDRESS)). +The received packets are packed continuously into the pPacket buffer +without gaps.

5.6 WinDivertSend