checksum in raw sockets and pcap

Posted by hero on Server Fault See other posts from Server Fault or by hero
Published on 2010-03-22T06:26:54Z Indexed on 2010/03/22 6:31 UTC
Read the original article Hit count: 526

Filed under:
|
|

i am using pcap library to sniff some packets, change their tcp data , and then inject my packet on the network.
my question is: if i changed in the tcp data, should i recalculate the length field in the tcp header? should i also change the checksum? i read in a page on how to create raw sockets that if you set the tcp_checksum to 0, the kernel will automatically calculate it and fill it, is this true for windows machines also?

© Server Fault or respective owner

Related posts about pcap

Related posts about tcp