oneC_sum - One's complement internet checksum
#define _MINIX_SOURCE 1
u16_t oneC_sum(u16_t prev, void *data, size_t size)
OneC_sum is used to calculate the one's complement checksum needed for IP
network packets. A good document about the Internet Checksum is RFC-1071
(Computing the Internet checksum).
One_Csum expects three parameters:
prev The checksum of previous blocks of data that are to be included
in the checksum. The value of prev in first call to oneC_sum
should be 0.
data A pointer to the block of data. The data is interpreted as a
series of 16 bit numbers in network byte order, but an odd
number of bytes is also allowed.
size The size of the data in bytes.
Philip Homburg (firstname.lastname@example.org)