Reputation: 3677
I'm having an issue with a socket programming job. I wrote a TCP client that sends commands via sockets/networkstream. I'm using Wireshark to look at the raw data that goes through the wires. Everytime I send a "command" (meaning I Flush() the networkstream), the Wireshark application tells me that the checksum in the TCP Header is incorrect (says "it should be 0x2440, but is 0x0000). I do get an ACK back. I don't understand why at the application layer I would have to care about the TCP header. That can't be right. Would anyone know why I am getting this "error". Is there a setting I'm not aware of? I'm using .NET 2.0 sockets with Tcp. Thank you.
Upvotes: 1
Views: 587
Reputation: 34602
Are you looking at a Wireshark dump from the machine that is sending the data? If so, it may just be that the checksum hasn't been calculated at the point in the stack where Wireshark is seeing it. Many network cards these days have TCP Checksum Offload, where the checksum is done by hardware, and so the checksum field will be zero on the way out (Wireshark gets the packet just before it is sent to the hardware). Since you're getting ACKs, the receiving end is clearly cool with it. Also, if you're talking to localhost, your stack may not be bothering with checksums at all (they aren't strictly necessary for a host talking to itself).
Upvotes: 8