Function etherparse::checksum::u64_16bit_word::ones_complement_with_no_zero
source ยท pub fn ones_complement_with_no_zero(sum: u64) -> u16
Expand description
Converts summed up words from an u64 to an u16 with 0 being replaced by 0xffff (useful for TCP and UDP headers).
This kind of checksum is used in TCP and udp headers.