skb_put(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… skb_put β€” from the Kernel API Manual, bestie πŸ’–

okay so first thing, this page lives in the Kernel API Manual (yes that's the manual's name, we're being fancy today ✨) and it's about skb_put, which is genuinely one of those tiny functions that eats absolutely nothing and does so much. let's get into it 🫢


🌸 NAME 🌸

skb_put β€” add data to a buffer. that's it. that's the whole vibe check. πŸ’…


✨ SYNOPSIS ✨

void * skb_put (struct sk_buff *skb , unsigned int len );

like, look at her. two args, returns a pointer, no notes. slay. πŸ‘‘


πŸŽ€ ARGUMENTS πŸŽ€

  • skb β€” the buffer you're working with. your canvas. your main character. πŸ¦‹
  • len β€” how much data you're adding. the amount, the quantity, the how much. πŸ“

πŸ’– DESCRIPTION πŸ’–

so here's the tea, bestie: this function extends the used data area of the buffer. it literally grows the "data that actually counts" part of the skb. iconic behavior, no cap. 🌱

⚠️ okay but real talk for a second β€” if this would exceed the total buffer size, the kernel will panic. not like a cute little error return, not like a warning log, a full on panic. the whole thing. πŸ’€ so please, for the love of everything, know your bounds before you call her. πŸ™ˆ

and the glow-up? it returns a pointer to the first byte of the extra data. so you can go ahead and write into that fresh new space. literally handing you the keys. πŸ”₯


🌈 SEE ALSO 🌈

this function lives in the Kernel file ./net/core/skbuff.c, and it's surrounded by so many friends, i'm obsessed. here's the whole group chat, nobody gets left out 🫢:

like, that's a whole ecosystem. iykyk. πŸ’œ


okay that's the page!! quick sign-off from your girl: this one's sourced from ./net/core, dated October 2026, and it's the skb_put(9) page, so if you cite it in your PR description you'll look extremely educated. go forth and don't panic the kernel, bestie πŸ˜­πŸ’–βœ¨

πŸ“¦ where this page comes from