checksum in raw sockets and pcap
- by hero
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?