简体   繁体   English

C:如果源IP标头更改,则TCP标头校验和也更改

[英]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. 只是谷歌“增量TCP校验和”,你会发现很多数据。

The basic idea is to add the difference between the old and new IPs to the old checksum. 基本思想是将旧IP和新IP之间的差异添加到旧校验和中。
But the arithmetic should be 1's complement, which complicates things a bit. 但是算术应该是1的补码,这会使事情有些复杂。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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