1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>skb_seq_read</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-prepare-seq-read.html" title="skb_prepare_seq_read"><link rel="next" href="API-skb-abort-seq-read.html" title="skb_abort_seq_read"></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_seq_read</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-skb-prepare-seq-read.html">Prev</a>&#160;</td><th width="60%" align="center">Socket Buffer Functions</th><td width="20%" align="right">&#160;<a accesskey="n" href="API-skb-abort-seq-read.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-skb-seq-read"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>skb_seq_read &#8212; 
2     Sequentially read skb data
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">unsigned int <b class="fsfunc">skb_seq_read </b>(</code></td><td>unsigned int <var class="pdparam">consumed</var>, </td></tr><tr><td>&#160;</td><td>const u8 ** <var class="pdparam">data</var>, </td></tr><tr><td>&#160;</td><td>struct skb_seq_state * <var class="pdparam">st</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">&#160;</div></div></div><div class="refsect1"><a name="idp1096323652"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>consumed</code></em></span></dt><dd><p>
4     number of bytes consumed by the caller so far
5    </p></dd><dt><span class="term"><em class="parameter"><code>data</code></em></span></dt><dd><p>
6     destination pointer for data to be returned
7    </p></dd><dt><span class="term"><em class="parameter"><code>st</code></em></span></dt><dd><p>
8     state variable
9    </p></dd></dl></div></div><div class="refsect1"><a name="idp1096327340"></a><h2>Description</h2><p>
10   Reads a block of skb data at <em class="parameter"><code>consumed</code></em> relative to the
11   lower offset specified to <code class="function">skb_prepare_seq_read</code>. Assigns
12   the head of the data block to <em class="parameter"><code>data</code></em> and returns the length
13   of the block or 0 if the end of the skb data or the upper
14   offset has been reached.
15   </p><p>
16
17   The caller is not required to consume all of the data
18   returned, i.e. <em class="parameter"><code>consumed</code></em> is typically set to the number
19   of bytes already consumed and the next call to
20   <code class="function">skb_seq_read</code> will return the remaining part of the block.
21</p></div><div class="refsect1"><a name="idp1096330316"></a><h2>Note 1</h2><p>
22   The size of each block of data returned can be arbitrary,
23   this limitation is the cost for zerocopy sequential
24   reads of potentially non linear data.
25</p></div><div class="refsect1"><a name="idp1096331076"></a><h2>Note 2</h2><p>
26   Fragment lists within fragments are not implemented
27   at the moment, state-&gt;root_skb could be replaced with
28   a stack for this purpose.
29</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-prepare-seq-read.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="ch01s02.html">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="API-skb-abort-seq-read.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">skb_prepare_seq_read</span>&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;<span class="phrase">skb_abort_seq_read</span></td></tr></table></div></body></html>
30