skb_checksum_complete(9)

Submitted by Jeremy
on July 19, 2007 - 1:23am
.\" Title: skb_checksum_complete .\" Author: .\" Generator: DocBook XSL Stylesheets v1.70.1 .\" Date: July 2007 .\" Manual: Linux Networking .\" Source: Kernel Hackers Manual 2.6.22 .\" .TH "SKB_CHECKSUM_COMPLET" "9" "July 2007" "Kernel Hackers Manual 2.6.22" "Linux Networking" .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .SH "NAME" skb_checksum_complete \- Calculate checksum of an entire packet .SH "SYNOPSIS" .HP 35 .BI "unsigned int skb_checksum_complete(struct\ sk_buff\ *\ " "skb" ");" .SH "ARGUMENTS" .TP 3n \fIskb\fR packet to process .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"