nla_put_64bit(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… nla_put_64bit(9) β€” the Kernel API Manual, bestie edition πŸŽ€

Okay so this is nla_put_64bit, from the kernel API manual (yes, that manual β€” the one your kernel-dev mutuals keep quoting). It's a tiny lil function with one job and it does it beautifully. Let's get into it ✨


🌸 NAME 🌸

nla_put_64bit β€” add a netlink attribute to a socket buffer and align it πŸ’«

✨ SYNOPSIS ✨

int nla_put_64bit (struct sk_buff *skb , int attrtype , int attrlen ,
       const void *data , int padattr );

That's the whole signature, no cap. Five args, one int coming back at you 🫢

πŸ¦‹ ARGUMENTS πŸ¦‹

  • skb β€” the socket buffer you're adding the attribute to. It's the canvas, she's the main character πŸ‘‘
  • attrtype β€” the attribute type. iykyk 🌈
  • attrlen β€” length of the attribute payload, fr fr. Measure twice, put once πŸ“
  • data β€” head of the attribute payload. Like, the start of it, literally the head πŸ’œ
  • padattr β€” the attribute type used for the padding. Padding has a type and this is it πŸ’…

πŸ”₯ DESCRIPTION πŸ”₯

So here's the tea: it returns -EMSGSIZE if the tailroom of the skb is insufficient to store the attribute header and payload 😭 That's it. That's the whole documented behaviour. Not enough tailroom? -EMSGSIZE. Vibe check failed, attribute not added πŸ’€

ngl, that -EMSGSIZE is a real one β€” if the tailroom can't hold the attribute header and the payload, that's your error. No silent truncation, no "oops", just -EMSGSIZE. Respect, honestly πŸ™ˆ

🧚 SEE ALSO 🧚

Kernel file ./lib/nlattr.c β€” and the whole netlink attribute friend group, all iconic, all listed:

That's twenty-one whole functions, bestie. Go read them all, I believe in you 🌟


And that's the page πŸŽ€πŸ’– She lives in ./lib, dated October 2026, and this lil reproduction of nla_put_64bit(9) is officially closed out. Periodt 🫢✨

πŸ“¦ where this page comes from