Hi
I am trying to get the actual payload with delphi but it seems an impossible task.
I do this:
dwDataLength := PacketBuffer[liIndex].m_Length – (SizeOf(pEthHeader) + (pIPHeader.hl_vl and $F)*4 + (pTcpHeader.Offset and $F)*4);
pData := PChar(pEthHeader) + (SizeOf(pEthHeader) + (pIPHeader.hl_vl and $F)*4 + (pTcpHeader.Offset and $F)*4);
This however does not even remotely work as (pTcpHeader.Offset and $F)*4 always returns 0.
When i do this: ((pTcpHeader.Offset-6) and $F)*4 it returns 40 and I can get hold of *some* of the payload. This also is not ideal as the payload is never the correct or complete payload.
Any ideas?