skb_cow(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

okay so welcome to the Kernel API Manual, bestie β€” this is skb_cow(9): copy header of skb when it is required. that's the whole vibe. no cap. πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

int skb_cow (struct sk_buff *skb , unsigned int headroom );

🫢 ARGUMENTS 🫢

  • skb β€” the buffer to cow. yes, that's literally the note. πŸ„
  • headroom β€” the needed headroom. keep that number safe.

🌸 DESCRIPTION 🌸

so here's the tea: if the skb you passed in doesn't have enough headroom, or if its data part is shared, the data gets reallocated. that's the move. ✨

if that reallocation fails, you get an error back, and the original skb is not changed β€” no sneaky edits, no broken vibes. πŸ™ˆ

what you end up with is an skb whose writable area is skb->head...skb->tail, with at least headroom of space at the head. iconique. πŸ‘‘


πŸ¦‹ SEE ALSO πŸ¦‹

bestie, the whole skb cinematic universe is here β€” zero skips, because we do not gatekeep the kernel docs:


source/version check: this page is from ./include/linux, dated October 2026 β€” bye bestie, go make that header writable πŸ’…βœ¨

πŸ“¦ where this page comes from