source: trunk/minix/man/man3/oneC_sum.3@ 15

Last change on this file since 15 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 1.0 KB
Line 
1.TH ONEC_SUM 3
2.SH NAME
3oneC_sum \- One's complement internet checksum
4.SH SYNOPSIS
5.ft B
6.nf
7#define _MINIX_SOURCE 1
8#include <stddef.h>
9#include <sys/types.h>
10
11#include <net/gen/oneCsum.h>
12
13u16_t oneC_sum(u16_t \fIprev\fP, void *\fIdata\fP, size_t \fIsize\fP)
14.fi
15.ft R
16.SH DESCRIPTION
17.B OneC_sum
18is used to calculate the one's complement checksum needed for IP network
19packets.
20A good document about the Internet Checksum is RFC-1071 (Computing the
21Internet checksum).
22.PP
23.B OneC_sum
24expects three parameters:
25.TP 10
26.I prev
27The checksum of previous blocks of data that are to be included in the
28checksum.
29The value of prev in first call to oneC_sum should be 0.
30.TP
31.I data
32A pointer to the block of data.
33The data is interpreted as a series of 16 bit numbers in network byte order, but
34an odd number of bytes is also allowed.
35.TP
36.I size
37The size of the data in bytes.
38.SH "SEE ALSO"
39.BR ip (4).
40.br
41.B RFC-1071
42.SH AUTHOR
43Philip Homburg (philip@cs.vu.nl)
44.\"
45.\" $PchId: oneC_sum.3,v 1.3 1996/02/22 21:05:31 philip Exp $
Note: See TracBrowser for help on using the repository browser.