Module etherparse::checksum::u64_16bit_word
source · Expand description
Helper functions for calculating a 16 bit checksum using a u64 to sum up all values.
Functions
Add a 2 byte word.
Add a 4 byte word.
Add a 8 byte word.
Add the given slice to the checksum. In case the slice
has a length that is not multiple of 2 the last byte
will be padded with 0.
Converts summed up words from an u64 to an u16 which can be used in a ipv4.
Converts summed up words from an u64 to an u16 with 0 beeing replaced by 0xffff (usefull
for TCP and UDP headers).