<?xml version="1.0" encoding="ANSI_X3.4-1968" standalone="no"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968" /><title>Socket Buffer Functions</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2" /><link rel="home" href="index.html" title="Linux Networking and Network Devices APIs" /><link rel="up" href="ch01.html" title="Chapter 1. Linux Networking" /><link rel="prev" href="re02.html" title="struct socket" /><link rel="next" href="re03.html" title="struct skb_shared_hwtstamps" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Socket Buffer Functions</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="re02.html">Prev</a> </td><th width="60%" align="center">Chapter 1. Linux Networking</th><td width="20%" align="right"> <a accesskey="n" href="re03.html">Next</a></td></tr></table><hr /></div><div class="sect1" title="Socket Buffer Functions"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="id2670946"></a>Socket Buffer Functions</h2></div></div></div><div class="toc"><dl><dt><span class="refentrytitle"><a href="re03.html"><span>struct skb_shared_hwtstamps</span></a></span><span class="refpurpose"> — hardware time stamps </span></dt><dt><span class="refentrytitle"><a href="re04.html"><span>struct skb_shared_tx</span></a></span><span class="refpurpose"> — instructions for time stamping of outgoing packets </span></dt><dt><span class="refentrytitle"><a href="re05.html"><span>struct sk_buff</span></a></span><span class="refpurpose"> — socket buffer </span></dt><dt><span class="refentrytitle"><a href="re06.html"><span>skb_queue_empty</span></a></span><span class="refpurpose"> — check if a queue is empty </span></dt><dt><span class="refentrytitle"><a href="re07.html"><span>skb_queue_is_last</span></a></span><span class="refpurpose"> — check if skb is the last entry in the queue </span></dt><dt><span class="refentrytitle"><a href="re08.html"><span>skb_queue_is_first</span></a></span><span class="refpurpose"> — check if skb is the first entry in the queue </span></dt><dt><span class="refentrytitle"><a href="re09.html"><span>skb_queue_next</span></a></span><span class="refpurpose"> — return the next packet in the queue </span></dt><dt><span class="refentrytitle"><a href="re10.html"><span>skb_queue_prev</span></a></span><span class="refpurpose"> — return the prev packet in the queue </span></dt><dt><span class="refentrytitle"><a href="re11.html"><span>skb_get</span></a></span><span class="refpurpose"> — reference buffer </span></dt><dt><span class="refentrytitle"><a href="re12.html"><span>skb_cloned</span></a></span><span class="refpurpose"> — is the buffer a clone </span></dt><dt><span class="refentrytitle"><a href="re13.html"><span>skb_header_cloned</span></a></span><span class="refpurpose"> — is the header a clone </span></dt><dt><span class="refentrytitle"><a href="re14.html"><span>skb_header_release</span></a></span><span class="refpurpose"> — release reference to header </span></dt><dt><span class="refentrytitle"><a href="re15.html"><span>skb_shared</span></a></span><span class="refpurpose"> — is the buffer shared </span></dt><dt><span class="refentrytitle"><a href="re16.html"><span>skb_share_check</span></a></span><span class="refpurpose"> — check if buffer is shared and if so clone it </span></dt><dt><span class="refentrytitle"><a href="re17.html"><span>skb_unshare</span></a></span><span class="refpurpose"> — make a copy of a shared buffer </span></dt><dt><span class="refentrytitle"><a href="re18.html"><span>skb_peek</span></a></span><span class="refpurpose"> — </span></dt><dt><span class="refentrytitle"><a href="re19.html"><span>skb_peek_tail</span></a></span><span class="refpurpose"> — </span></dt><dt><span class="refentrytitle"><a href="re20.html"><span>skb_queue_len</span></a></span><span class="refpurpose"> — get queue length </span></dt><dt><span class="refentrytitle"><a href="re21.html"><span>__skb_queue_head_init</span></a></span><span class="refpurpose"> — initialize non-spinlock portions of sk_buff_head </span></dt><dt><span class="refentrytitle"><a href="re22.html"><span>skb_queue_splice</span></a></span><span class="refpurpose"> — join two skb lists, this is designed for stacks </span></dt><dt><span class="refentrytitle"><a href="re23.html"><span>skb_queue_splice_init</span></a></span><span class="refpurpose"> — join two skb lists and reinitialise the emptied list </span></dt><dt><span class="refentrytitle"><a href="re24.html"><span>skb_queue_splice_tail</span></a></span><span class="refpurpose"> — join two skb lists, each list being a queue </span></dt><dt><span class="refentrytitle"><a href="re25.html"><span>skb_queue_splice_tail_init</span></a></span><span class="refpurpose"> — join two skb lists and reinitialise the emptied list </span></dt><dt><span class="refentrytitle"><a href="re26.html"><span>__skb_queue_after</span></a></span><span class="refpurpose"> — queue a buffer at the list head </span></dt><dt><span class="refentrytitle"><a href="re27.html"><span>skb_headroom</span></a></span><span class="refpurpose"> — bytes at buffer head </span></dt><dt><span class="refentrytitle"><a href="re28.html"><span>skb_tailroom</span></a></span><span class="refpurpose"> — bytes at buffer end </span></dt><dt><span class="refentrytitle"><a href="re29.html"><span>skb_reserve</span></a></span><span class="refpurpose"> — adjust headroom </span></dt><dt><span class="refentrytitle"><a href="re30.html"><span>pskb_trim_unique</span></a></span><span class="refpurpose"> — remove end from a paged unique (not cloned) buffer </span></dt><dt><span class="refentrytitle"><a href="re31.html"><span>skb_orphan</span></a></span><span class="refpurpose"> — orphan a buffer </span></dt><dt><span class="refentrytitle"><a href="re32.html"><span>__dev_alloc_skb</span></a></span><span class="refpurpose"> — allocate an skbuff for receiving </span></dt><dt><span class="refentrytitle"><a href="re33.html"><span>netdev_alloc_skb</span></a></span><span class="refpurpose"> — allocate an skbuff for rx on a specific device </span></dt><dt><span class="refentrytitle"><a href="re34.html"><span>netdev_alloc_page</span></a></span><span class="refpurpose"> — allocate a page for ps-rx on a specific device </span></dt><dt><span class="refentrytitle"><a href="re35.html"><span>skb_clone_writable</span></a></span><span class="refpurpose"> — is the header of a clone writable </span></dt><dt><span class="refentrytitle"><a href="re36.html"><span>skb_cow</span></a></span><span class="refpurpose"> — copy header of skb when it is required </span></dt><dt><span class="refentrytitle"><a href="re37.html"><span>skb_cow_head</span></a></span><span class="refpurpose"> — skb_cow but only making the head writable </span></dt><dt><span class="refentrytitle"><a href="re38.html"><span>skb_padto</span></a></span><span class="refpurpose"> — pad an skbuff up to a minimal size </span></dt><dt><span class="refentrytitle"><a href="re39.html"><span>skb_linearize</span></a></span><span class="refpurpose"> — convert paged skb to linear one </span></dt><dt><span class="refentrytitle"><a href="re40.html"><span>skb_linearize_cow</span></a></span><span class="refpurpose"> — make sure skb is linear and writable </span></dt><dt><span class="refentrytitle"><a href="re41.html"><span>skb_postpull_rcsum</span></a></span><span class="refpurpose"> — update checksum for received skb after pull </span></dt><dt><span class="refentrytitle"><a href="re42.html"><span>pskb_trim_rcsum</span></a></span><span class="refpurpose"> — trim received skb and update checksum </span></dt><dt><span class="refentrytitle"><a href="re43.html"><span>skb_get_timestamp</span></a></span><span class="refpurpose"> — get timestamp from a skb </span></dt><dt><span class="refentrytitle"><a href="re44.html"><span>skb_checksum_complete</span></a></span><span class="refpurpose"> — Calculate checksum of an entire packet </span></dt><dt><span class="refentrytitle"><a href="re45.html"><span>struct sock_common</span></a></span><span class="refpurpose"> — minimal network layer representation of sockets </span></dt><dt><span class="refentrytitle"><a href="re46.html"><span>struct sock</span></a></span><span class="refpurpose"> — network layer representation of sockets </span></dt><dt><span class="refentrytitle"><a href="re47.html"><span>sk_filter_release</span></a></span><span class="refpurpose"> — </span></dt><dt><span class="refentrytitle"><a href="re48.html"><span>sk_wmem_alloc_get</span></a></span><span class="refpurpose"> — returns write allocations </span></dt><dt><span class="refentrytitle"><a href="re49.html"><span>sk_rmem_alloc_get</span></a></span><span class="refpurpose"> — returns read allocations </span></dt><dt><span class="refentrytitle"><a href="re50.html"><span>sk_has_allocations</span></a></span><span class="refpurpose"> — check if allocations are outstanding </span></dt><dt><span class="refentrytitle"><a href="re51.html"><span>sk_has_sleeper</span></a></span><span class="refpurpose"> — check if there are any waiting processes </span></dt><dt><span class="refentrytitle"><a href="re52.html"><span>sock_poll_wait</span></a></span><span class="refpurpose"> — place memory barrier behind the poll_wait call. </span></dt><dt><span class="refentrytitle"><a href="re53.html"><span>sk_eat_skb</span></a></span><span class="refpurpose"> — Release a skb if it is no longer needed </span></dt><dt><span class="refentrytitle"><a href="re54.html"><span>sockfd_lookup</span></a></span><span class="refpurpose"> — Go from a file number to its socket slot </span></dt><dt><span class="refentrytitle"><a href="re55.html"><span>sock_release</span></a></span><span class="refpurpose"> — close a socket </span></dt><dt><span class="refentrytitle"><a href="re56.html"><span>sock_register</span></a></span><span class="refpurpose"> — add a socket protocol handler </span></dt><dt><span class="refentrytitle"><a href="re57.html"><span>sock_unregister</span></a></span><span class="refpurpose"> — remove a protocol handler </span></dt><dt><span class="refentrytitle"><a href="re58.html"><span>skb_over_panic</span></a></span><span class="refpurpose"> — private function </span></dt><dt><span class="refentrytitle"><a href="re59.html"><span>skb_under_panic</span></a></span><span class="refpurpose"> — private function </span></dt><dt><span class="refentrytitle"><a href="re60.html"><span>__alloc_skb</span></a></span><span class="refpurpose"> — allocate a network buffer </span></dt><dt><span class="refentrytitle"><a href="re61.html"><span>__netdev_alloc_skb</span></a></span><span class="refpurpose"> — allocate an skbuff for rx on a specific device </span></dt><dt><span class="refentrytitle"><a href="re62.html"><span>dev_alloc_skb</span></a></span><span class="refpurpose"> — allocate an skbuff for receiving </span></dt><dt><span class="refentrytitle"><a href="re63.html"><span>__kfree_skb</span></a></span><span class="refpurpose"> — private function </span></dt><dt><span class="refentrytitle"><a href="re64.html"><span>kfree_skb</span></a></span><span class="refpurpose"> — free an sk_buff </span></dt><dt><span class="refentrytitle"><a href="re65.html"><span>consume_skb</span></a></span><span class="refpurpose"> — free an skbuff </span></dt><dt><span class="refentrytitle"><a href="re66.html"><span>skb_recycle_check</span></a></span><span class="refpurpose"> — check if skb can be reused for receive </span></dt><dt><span class="refentrytitle"><a href="re67.html"><span>skb_morph</span></a></span><span class="refpurpose"> — morph one skb into another </span></dt><dt><span class="refentrytitle"><a href="re68.html"><span>skb_clone</span></a></span><span class="refpurpose"> — duplicate an sk_buff </span></dt><dt><span class="refentrytitle"><a href="re69.html"><span>skb_copy</span></a></span><span class="refpurpose"> — create private copy of an sk_buff </span></dt><dt><span class="refentrytitle"><a href="re70.html"><span>pskb_copy</span></a></span><span class="refpurpose"> — create copy of an sk_buff with private head. </span></dt><dt><span class="refentrytitle"><a href="re71.html"><span>pskb_expand_head</span></a></span><span class="refpurpose"> — reallocate header of <span class="structname">sk_buff</span> </span></dt><dt><span class="refentrytitle"><a href="re72.html"><span>skb_copy_expand</span></a></span><span class="refpurpose"> — copy and expand sk_buff </span></dt><dt><span class="refentrytitle"><a href="re73.html"><span>skb_pad</span></a></span><span class="refpurpose"> — zero pad the tail of an skb </span></dt><dt><span class="refentrytitle"><a href="re74.html"><span>skb_put</span></a></span><span class="refpurpose"> — add data to a buffer </span></dt><dt><span class="refentrytitle"><a href="re75.html"><span>skb_push</span></a></span><span class="refpurpose"> — add data to the start of a buffer </span></dt><dt><span class="refentrytitle"><a href="re76.html"><span>skb_pull</span></a></span><span class="refpurpose"> — remove data from the start of a buffer </span></dt><dt><span class="refentrytitle"><a href="re77.html"><span>skb_trim</span></a></span><span class="refpurpose"> — remove end from a buffer </span></dt><dt><span class="refentrytitle"><a href="re78.html"><span>__pskb_pull_tail</span></a></span><span class="refpurpose"> — advance tail of skb header </span></dt><dt><span class="refentrytitle"><a href="re79.html"><span>skb_store_bits</span></a></span><span class="refpurpose"> — store bits from kernel buffer to skb </span></dt><dt><span class="refentrytitle"><a href="re80.html"><span>skb_dequeue</span></a></span><span class="refpurpose"> — remove from the head of the queue </span></dt><dt><span class="refentrytitle"><a href="re81.html"><span>skb_dequeue_tail</span></a></span><span class="refpurpose"> — remove from the tail of the queue </span></dt><dt><span class="refentrytitle"><a href="re82.html"><span>skb_queue_purge</span></a></span><span class="refpurpose"> — empty a list </span></dt><dt><span class="refentrytitle"><a href="re83.html"><span>skb_queue_head</span></a></span><span class="refpurpose"> — queue a buffer at the list head </span></dt><dt><span class="refentrytitle"><a href="re84.html"><span>skb_queue_tail</span></a></span><span class="refpurpose"> — queue a buffer at the list tail </span></dt><dt><span class="refentrytitle"><a href="re85.html"><span>skb_unlink</span></a></span><span class="refpurpose"> — remove a buffer from a list </span></dt><dt><span class="refentrytitle"><a href="re86.html"><span>skb_append</span></a></span><span class="refpurpose"> — append a buffer </span></dt><dt><span class="refentrytitle"><a href="re87.html"><span>skb_insert</span></a></span><span class="refpurpose"> — insert a buffer </span></dt><dt><span class="refentrytitle"><a href="re88.html"><span>skb_split</span></a></span><span class="refpurpose"> — Split fragmented skb to two parts at length len. </span></dt><dt><span class="refentrytitle"><a href="re89.html"><span>skb_prepare_seq_read</span></a></span><span class="refpurpose"> — Prepare a sequential read of skb data </span></dt><dt><span class="refentrytitle"><a href="re90.html"><span>skb_seq_read</span></a></span><span class="refpurpose"> — Sequentially read skb data </span></dt><dt><span class="refentrytitle"><a href="re91.html"><span>skb_abort_seq_read</span></a></span><span class="refpurpose"> — Abort a sequential read of skb data </span></dt><dt><span class="refentrytitle"><a href="re92.html"><span>skb_find_text</span></a></span><span class="refpurpose"> — Find a text pattern in skb data </span></dt><dt><span class="refentrytitle"><a href="re93.html"><span>skb_append_datato_frags</span></a></span><span class="refpurpose"> — append the user data to a skb </span></dt><dt><span class="refentrytitle"><a href="re94.html"><span>skb_pull_rcsum</span></a></span><span class="refpurpose"> — pull skb and update receive checksum </span></dt><dt><span class="refentrytitle"><a href="re95.html"><span>skb_segment</span></a></span><span class="refpurpose"> — Perform protocol segmentation on skb. </span></dt><dt><span class="refentrytitle"><a href="re96.html"><span>skb_cow_data</span></a></span><span class="refpurpose"> — Check that a socket buffer's data buffers are writable </span></dt><dt><span class="refentrytitle"><a href="re97.html"><span>skb_partial_csum_set</span></a></span><span class="refpurpose"> — set up and verify partial csum values for packet </span></dt><dt><span class="refentrytitle"><a href="re98.html"><span>sk_alloc</span></a></span><span class="refpurpose"> — All socket objects are allocated here </span></dt><dt><span class="refentrytitle"><a href="re99.html"><span>sk_wait_data</span></a></span><span class="refpurpose"> — wait for data to arrive at sk_receive_queue </span></dt><dt><span class="refentrytitle"><a href="re100.html"><span>__sk_mem_schedule</span></a></span><span class="refpurpose"> — increase sk_forward_alloc and memory_allocated </span></dt><dt><span class="refentrytitle"><a href="re101.html"><span>__sk_mem_reclaim</span></a></span><span class="refpurpose"> — reclaim memory_allocated </span></dt><dt><span class="refentrytitle"><a href="re102.html"><span>__skb_recv_datagram</span></a></span><span class="refpurpose"> — Receive a datagram skbuff </span></dt><dt><span class="refentrytitle"><a href="re103.html"><span>skb_kill_datagram</span></a></span><span class="refpurpose"> — Free a datagram skbuff forcibly </span></dt><dt><span class="refentrytitle"><a href="re104.html"><span>skb_copy_datagram_iovec</span></a></span><span class="refpurpose"> — Copy a datagram to an iovec. </span></dt><dt><span class="refentrytitle"><a href="re105.html"><span>skb_copy_datagram_const_iovec</span></a></span><span class="refpurpose"> — Copy a datagram to an iovec. </span></dt><dt><span class="refentrytitle"><a href="re106.html"><span>skb_copy_datagram_from_iovec</span></a></span><span class="refpurpose"> — Copy a datagram from an iovec. </span></dt><dt><span class="refentrytitle"><a href="re107.html"><span>skb_copy_and_csum_datagram_iovec</span></a></span><span class="refpurpose"> — Copy and checkum skb to user iovec. </span></dt><dt><span class="refentrytitle"><a href="re108.html"><span>datagram_poll</span></a></span><span class="refpurpose"> — generic datagram poll </span></dt><dt><span class="refentrytitle"><a href="re109.html"><span>sk_stream_write_space</span></a></span><span class="refpurpose"> — stream socket write_space callback. </span></dt><dt><span class="refentrytitle"><a href="re110.html"><span>sk_stream_wait_connect</span></a></span><span class="refpurpose"> — Wait for a socket to get into the connected state </span></dt><dt><span class="refentrytitle"><a href="re111.html"><span>sk_stream_wait_memory</span></a></span><span class="refpurpose"> — Wait for more memory for a socket </span></dt></dl></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="re02.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch01.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="re03.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span>struct socket</span> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> <span>struct skb_shared_hwtstamps</span></td></tr></table></div></body></html>