3 oneC_sum \- One's complement internet checksum
7 #define _MINIX_SOURCE 1
11 #include <net/gen/oneCsum.h>
13 u16_t oneC_sum(u16_t \fIprev\fP, void *\fIdata\fP, size_t \fIsize\fP)
18 is used to calculate the one's complement checksum needed for IP network
20 A good document about the Internet Checksum is RFC-1071 (Computing the
24 expects three parameters:
27 The checksum of previous blocks of data that are to be included in the
29 The value of prev in first call to oneC_sum should be 0.
32 A pointer to the block of data.
33 The data is interpreted as a series of 16 bit numbers in network byte order, but
34 an odd number of bytes is also allowed.
37 The size of the data in bytes.
43 Philip Homburg (philip@cs.vu.nl)
45 .\" $PchId: oneC_sum.3,v 1.3 1996/02/22 21:05:31 philip Exp $