skbuff.rst 995 B

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