'\" t .\" Title: skb_checksum_complete .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: May 2018 .\" Manual: Linux Networking .\" Source: Kernel Hackers Manual 3.16.56 .\" Language: English .\" .TH "SKB_CHECKSUM_COMPLET" "9" "May 2018" "Kernel Hackers Manual 3\&.16\&" "Linux Networking" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" skb_checksum_complete \- Calculate checksum of an entire packet .SH "SYNOPSIS" .HP \w'__sum16\ skb_checksum_complete('u .BI "__sum16 skb_checksum_complete(struct\ sk_buff\ *\ " "skb" ");" .SH "ARGUMENTS" .PP \fIskb\fR .RS 4 packet to process .RE .SH "DESCRIPTION" .PP This function calculates the checksum over the entire packet plus the value of skb\->csum\&. The latter can be used to supply the checksum of a pseudo header as used by TCP/UDP\&. It returns the checksum\&. .PP For protocols that contain complete checksums such as ICMP/TCP/UDP, this function can be used to verify that checksum on received packets\&. In that case the function should return zero if the checksum is correct\&. In particular, this function will return zero if skb\->ip_summed is CHECKSUM_UNNECESSARY which indicates that the hardware has already verified the correctness of the checksum\&. .SH "COPYRIGHT" .br