__skb_ext_set(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… __skb_ext_set β€” the Kernel API Manual, but make it make sense

okay bestie, so this is a page straight out of the Kernel API Manual, and it's genuinely short and sweet β€” a little three-argument function that glues extension storage onto an skb. Let's get into it πŸŽ€


✨ NAME ✨

__skb_ext_set β€” literally "attach the specified extension storage to this skb" πŸ’– that's the whole job, no cap.


πŸ¦‹ SYNOPSIS πŸ¦‹

void * __skb_ext_set (struct sk_buff *skb , enum skb_ext_id id , struct skb_ext *ext );

look at her, she's serving void * realness β€” she gives you back a pointer, icon behaviour ✨


πŸŽ€ ARGUMENTS πŸŽ€

  • skb β€” the buffer. yeah, that one. the whole reason we're here 🫢
  • id β€” the extension id, aka which slot on the extension shelf you're pointing at πŸ’…
  • ext β€” the extension storage itself, and hear me out: it has to be storage that was previously allocated via __skb_ext_alloc πŸ‘‘ no DIY storage, no vibes-based pointers, okay?

πŸ’œ DESCRIPTION πŸ’œ

so here's the tea β˜• β€” existing extensions, if any, are cleared. like, gone. wiped. don't come crying to me if you had something in there πŸ™ˆ

and then, bestie, she returns the pointer to the extension 🌸 that's it, that's the function, main character energy fr fr.


🌈 SEE ALSO 🌈

kernel file ./net/core/skbuff.c β€” plus a whole friend group of skb function girlies, iykyk ✨


πŸ’€ tiny reminder bestie: that ext argument isn't a free-for-all β€” it's gotta be the storage that came from __skb_ext_alloc. your own random storage will not slay here, it will just break.

🧚 sign-off 🧚

and that's the page!! brought to you from ./net/core, dated October 2026, filed under __skb_ext_set(9) β€” go forth and attach those extensions, bestie, you're gonna do amazing πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from