Available since: Windows Packet Filter 3.4.0
The SendPacketsToMstcpUnsorted function injects a batch of intercepted packets up into the Windows TCP/IP (MSTCP) protocol stack across one or more network adapters in a single system call.
Syntax
BOOL WINAPI SendPacketsToMstcpUnsorted(
_In_ HANDLE hOpen,
_Inout_ PINTERMEDIATE_BUFFER* Packets,
_In_ DWORD dwPacketsNum,
_Out_ PDWORD pdwPacketsSuccess
);
Remarks
Each packet’s associated network interface is identified by m_hAdapter. This function is not supported under WOW64; the native SDK returns FALSE in that case. Use the ordinary per-adapter packet send APIs under WOW64.
Native SDK 3.6.2 output count
Use the output count only when the function returns TRUE. On the IOCTL path, the SDK copies request.packets_num into the output variable before returning, including on FALSE. If the driver has not changed that field, it still contains the requested packet count and is not evidence of successful processing.
The WOW64 precheck returns FALSE before writing the output count and does not set a new last-error value. Initialize your count if needed and check the Boolean before using it. See the pinned read/send implementations.