Back to home page

OSCL-LXR

 
 

    


0001 .. SPDX-License-Identifier: GPL-2.0
0002 
0003 struct sk_buff
0004 ==============
0005 
0006 :c:type:`sk_buff` is the main networking structure representing
0007 a packet.
0008 
0009 Basic sk_buff geometry
0010 ----------------------
0011 
0012 .. kernel-doc:: include/linux/skbuff.h
0013    :doc: Basic sk_buff geometry
0014 
0015 Shared skbs and skb clones
0016 --------------------------
0017 
0018 :c:member:`sk_buff.users` is a simple refcount allowing multiple entities
0019 to keep a struct sk_buff alive. skbs with a ``sk_buff.users != 1`` are referred
0020 to as shared skbs (see skb_shared()).
0021 
0022 skb_clone() allows for fast duplication of skbs. None of the data buffers
0023 get copied, but caller gets a new metadata struct (struct sk_buff).
0024 &skb_shared_info.refcount indicates the number of skbs pointing at the same
0025 packet data (i.e. clones).
0026 
0027 dataref and headerless skbs
0028 ---------------------------
0029 
0030 .. kernel-doc:: include/linux/skbuff.h
0031    :doc: dataref and headerless skbs
0032 
0033 Checksum information
0034 --------------------
0035 
0036 .. kernel-doc:: include/linux/skbuff.h
0037    :doc: skb checksums