__nla_put_nohdr(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ __nla_put_nohdr β€” the Kernel API Manual glow-up πŸ’…

okay so bestie, welcome to the __nla_put_nohdr(9) page, it's giving "tiny function, huge responsibility" and honestly? iconic.


🌸 NAME 🌸

__nla_put_nohdr β€” adds a netlink attribute, but like… without the header. no cap, that's the whole vibe. πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

void __nla_put_nohdr (struct sk_buff *skb , int attrlen , const void *data );

that's it, that's the signature. short, sweet, and absolutely not gonna hold your hand about tailroom. 😭


πŸ’– ARGUMENTS πŸ’–

  • skb β€” the socket buffer you're adding the attribute to. it's the main character here, everything happens inside it. 🫢
  • attrlen β€” how long the attribute payload is. literally just the length, bestie. πŸ”₯
  • data β€” the head of the attribute payload, aka where your actual bytes start. πŸ’œ

✨ DESCRIPTION ✨

okay so here's the tea: the caller is responsible for making sure the skb has enough tailroom for the attribute payload. that's on you, not the function. no vibes-based checking, no safety net β€” it's giving "trust fall but the floor is memory corruption" πŸ’€

so like… pls pls pls check your tailroom first. the function is not gonna do it for you and it will not be cute. 🌸

πŸ”₯ SEE ALSO πŸ”₯

all the siblings in the kernel file ./lib/nlattr.c, and yes there are a lot of them β€” the whole netlink attribute fam came out to support you:

like an entire friend group in lib/nlattr.c, and you can meet them all. iykyk 🧚


so yeah, that's the page! it's from the ./lib section of the Kernel API Manual, dated October 2026, and the header line everybody knows is __nla_put_nohdr(9). slay, go forth, and please check your tailroom. periodt. πŸ’…πŸ‘‘

πŸ“¦ where this page comes from