📄 onec_sum.3
字号:
.TH ONE_CSUM 3.SH NAMEoneC_sum \- One's complement internet checksum.SH SYNOPSIS.ft B.nf#define _MINIX_SOURCE 1#include <stddef.h>#include <sys/types.h>#include <net/gen/oneCsum.h>u16_t oneC_sum(u16_t \fIprev\fP, u16_t *\fIdata\fP, size_t \fIsize\fP).fi.ft R.SH DESCRIPTION.B OneC_sumis used to calculate the one's complement checksum needed for IP networkpackets.A good document about the Internet Checksum is RFC-1071 (Computing theInternet checksum)..PP.B One_Csumexpects three parameters:.TP 10.I prevThe checksum of previous blocks of data that are to be included in thechecksum.The value of prev in first call to oneC_sum should be 0..TP.I dataA pointer to the block of data.The data is interpreted as a series of 16 bit numbers in network byte order, butan odd number of bytes is also allowed..TP.I sizeThe size of the data in bytes..SH "SEE ALSO".BR ip (4)..br.B RFC-1071.SH AUTHORPhilip Homburg (philip@cs.vu.nl)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -