Re: Re: _INTERMEDIATE_BUFFER.m_Length Question…

Home Forums Discussions Support Portal _INTERMEDIATE_BUFFER.m_Length Question… Re: Re: _INTERMEDIATE_BUFFER.m_Length Question…




I’ve done further testing on this issue. It seems that the captured packet length reported by INTERMEDIATE_BUFFER.m_Length for some IP packets is incorrect. I’ve proven it by trimming off the unnecessary ending null bytes and resending the packet without it being dropped. If EthHeaderLength + IPDatagramLength < INTERMEDIATE_BUFFER.m_Length, then I can trim off the last difference null bytes and resend the packet safely. When doing all of this, I noticed an interesting behavior for TCP/IP packets. As you know, part of the TCP checksum uses the total TCP datagram length. Well, it seems that the captured packet TCP checksum includes these ending null bytes! If I modify the checksum to match the new shorter TCP datagram length, the resent packet is dropped. How a packet can be sent with a TCP checksum that doesn’t match the TCP datagram length is beyond my understanding. I hope you can help with this. Fragmented packets were not tested. Nor were other packet IP protocol types. I figured I’d keep it simple until you reply with advice. Thanks. ~Cozmik