1.. SPDX-License-Identifier: GPL-2.0
2
3struct sk_buff
4==============
5
6:c:type:`sk_buff` is the main networking structure representing
7a packet.
8
9Basic sk_buff geometry
10----------------------
11
12.. kernel-doc:: include/linux/skbuff.h
13   :doc: Basic sk_buff geometry
14
15Shared skbs and skb clones
16--------------------------
17
18:c:member:`sk_buff.users` is a simple refcount allowing multiple entities
19to keep a struct sk_buff alive. skbs with a ``sk_buff.users != 1`` are referred
20to as shared skbs (see skb_shared()).
21
22skb_clone() allows for fast duplication of skbs. None of the data buffers
23get copied, but caller gets a new metadata struct (struct sk_buff).
24&skb_shared_info.refcount indicates the number of skbs pointing at the same
25packet data (i.e. clones).
26
27dataref and headerless skbs
28---------------------------
29
30.. kernel-doc:: include/linux/skbuff.h
31   :doc: dataref and headerless skbs
32
33Checksum information
34--------------------
35
36.. kernel-doc:: include/linux/skbuff.h
37   :doc: skb checksums
38