__nla_put_nohdr(9)
β¨ __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:
__nla_validate(9)nla_policy_len(9)__nla_parse(9)nla_find(9)nla_strscpy(9)nla_strdup(9)nla_memcpy(9)nla_memcmp(9)nla_strcmp(9)__nla_reserve(9)__nla_reserve_64bit(9)__nla_reserve_nohdr(9)nla_reserve(9)nla_reserve_64bit(9)nla_reserve_nohdr(9)__nla_put(9)__nla_put_64bit(9)nla_put(9)nla_put_64bit(9)nla_put_nohdr(9)nla_append(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms