|
ginnOS
The reference: libc, the libraries and the kernel
|
the Internet checksum (see checksum.h). More...
#include "checksum.h"Functions | |
| uint32_t | checksum_add (uint32_t sum, const void *data, uint32_t length) |
| add bytes to a partial sum. | |
| uint16_t | checksum_finish (uint32_t sum) |
| fold a partial sum and complement it: the checksum to store. | |
| uint16_t | checksum (const void *data, uint32_t length) |
| the checksum of one buffer. | |
the Internet checksum (see checksum.h).
add bytes to a partial sum.
an odd length pads with a zero byte, so only the last piece of a checksum may have an odd length.
fold a partial sum and complement it: the checksum to store.