Closed kayoub5 closed 3 years ago
Basically, you parse the first packet to get the first packet's length, which gives you the offset to the second packet. Then you parse the second packet to get the second packet's length, and so forth.
You can also use WinDivertHelperParsePacket
to automate this process. Specifically, you can iterate over all of the packets in the buffer using the following loop:
while (WinDivertHelperParsePacket(pPacket, packetLen, ..., &pPacket, &packetLen))
{
...
}
I am trying to use the
WinDivertRecvEx
API in batch mode, and it states thatThat sound good, question is how do I tell where does each packet end/start in the pPacket ?