1<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>skb_checksum_trimmed</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Linux Networking and Network Devices APIs"><link rel="up" href="ch01s02.html" title="Socket Buffer Functions"><link rel="prev" href="API-skb-checksum-setup.html" title="skb_checksum_setup"><link rel="next" href="API-skb-try-coalesce.html" title="skb_try_coalesce"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span class="phrase">skb_checksum_trimmed</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-skb-checksum-setup.html">Prev</a> </td><th width="60%" align="center">Socket Buffer Functions</th><td width="20%" align="right"> <a accesskey="n" href="API-skb-try-coalesce.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-skb-checksum-trimmed"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>skb_checksum_trimmed — 
2     validate checksum of an skb
3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef"><a class="link" href="API-struct-sk-buff.html" title="struct sk_buff">struct sk_buff</a> * <b class="fsfunc">skb_checksum_trimmed </b>(</code></td><td><a class="link" href="API-struct-sk-buff.html" title="struct sk_buff">struct sk_buff</a> * <var class="pdparam">skb</var>, </td></tr><tr><td> </td><td>unsigned int <var class="pdparam">transport_len</var>, </td></tr><tr><td> </td><td>__sum16(*<var class="pdparam">skb_chkf</var>)
4     <code>(</code>struct sk_buff *skb<code>)</code><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="id-1.3.3.140.5"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>skb</code></em></span></dt><dd><p>
5     the skb to check
6    </p></dd><dt><span class="term"><em class="parameter"><code>transport_len</code></em></span></dt><dd><p>
7     the data length beyond the network header
8    </p></dd><dt><span class="term"><em class="parameter"><code>skb_chkf</code></em></span></dt><dd><p>
9     checksum function to use
10    </p></dd></dl></div></div><div class="refsect1"><a name="id-1.3.3.140.6"></a><h2>Description</h2><p>
11   Applies the given checksum function skb_chkf to the provided skb.
12   Returns a checked and maybe trimmed skb. Returns NULL on error.
13   </p><p>
14
15   If the skb has data beyond the given transport length, then a
16   trimmed &amp; cloned skb is checked and returned.
17   </p><p>
18
19   Caller needs to set the skb transport header and free any returned skb if it
20   differs from the provided skb.
21</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-skb-checksum-setup.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch01s02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-skb-try-coalesce.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">skb_checksum_setup</span> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> <span class="phrase">skb_try_coalesce</span></td></tr></table></div></body></html>
22