Home › Forums › Discussions › General › Packet Length via ip_len failed? › Reply To: Packet Length via ip_len failed?
February 11, 2008 at 8:33 pm
#6543
pIpHeader->ip_len is in network byte order, so it should be:
DWORD dwDataLength = ntohs(pIpHeader->ip_len) - ( pIpHeader->ip_hl*4 + pTcpHeader->th_off*4);