---
name: "skb_checksum_trimmed"
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_trimmed"
---

# skb\_checksum\_trimmed(9)

validate checksum of an skb

## NAME

skb\_checksum\_trimmed - validate checksum of an skb

## SYNOPSIS

**struct sk\_buff \* skb\_checksum\_trimmed(struct sk\_buff \*** *skb***, unsigned int** *transport\_len***, \_\_sum16(\****skb\_chkf***) (struct sk\_buff \*skb));**

## ARGUMENTS

*skb*

the skb to check

*transport\_len*

the data length beyond the network header

*skb\_chkf*

checksum function to use

## DESCRIPTION

Applies the given checksum function skb\_chkf to the provided skb. Returns a checked and maybe trimmed skb. Returns NULL on error.

If the skb has data beyond the given transport length, then a trimmed & cloned skb is checked and returned.

Caller needs to set the skb transport header and free any returned skb if it differs from the provided skb.

## COPYRIGHT
