Mal Hacker wrote: > TCP checksums are evaluated by attaching a pseudo > header in the start of the TCP segment which u are > going to be sent. Actually that pseudo header is like > this... > > struct pseudohdr > { > struct in_addr source_address; // 32 bit netid/hostid > struct in_addr dest_address; // 32 bit netid/hostid > unsigned char place_holder; > unsigned char protocol; > unsigned short length; > struct tcphdr tcp; > } phdr; > > > where the protocol is IPPROTO_TCP , place holder is > zero and length is htons(sizeof(struct tcphdr)); length is the length of the header and data, not just the header. -- Glynn Clements <glynn.clements@virgin.net> - : send the line "unsubscribe linux-net" in the body of a message to majordomo@vger.kernel.org