---
name: "skb_checksum_complete"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/skb_checksum_complete"
---

# skb\_checksum\_complete(9)

Calculate checksum of an entire packet

## NAME

skb\_checksum\_complete - Calculate checksum of an entire packet

## SYNOPSIS

**\_\_sum16 skb\_checksum\_complete(struct sk\_buff \*** *skb***);**

## ARGUMENTS

*skb*

packet to process

## DESCRIPTION

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.

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.

## COPYRIGHT
