简体   繁体   中英

C: If source IP header change, TCP header checksum also change

是否有部分/增量方法来获取新的TCP校验和而不重新计算所有内容?

Yes.
Just google "Incremental TCP checksum" and you'll find lots of data.

The basic idea is to add the difference between the old and new IPs to the old checksum.
But the arithmetic should be 1's complement, which complicates things a bit.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM