3 ms·
The network level is usually pretty solid in that regard with checksumming at wifi/Ethernet protocol level and at tcp, but that's the end of it for most systems
by thfuran 3y ago
The network level is usually pretty solid in that regard with checksumming at wifi/Ethernet protocol level and at tcp, but that's the end of it for most systems.
- immibis 3y agoTCP checksums are very basic. Ethernet has a proper CRC, which at least has certain mathematical guarantees about what it can detect. The TCP checksum fails if the same bit is flipped from 0 to 1 and 1 to 0 in the same bit position modulo 16.
- renonce 3y agomodulo 16 really? I thought it is modulo 2^16-1 (size of multiplicative group of GF(2^16)) which is much bigger than typical packet size
- immibis 2y agoThe TCP checksum is based on the sum of all odd bytes and the sum of all even bytes. Adding a power of 2 to an odd byte and subtracting the same power from another odd byte will cancel out. I'm not sure what guarantees CRC-32 gives you, but they're better than that.