__nla_put_64bit(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– __nla_put_64bit β€” Kernel API Manual energy ✨

okay so bestie, welcome to the group chat where we learn how to shove a netlink attribute into a socket buffer and align it. yes, it's a kernel API manual page, no it's not boring, and yes you're gonna slay this. πŸ’…


✨ NAME ✨

__nla_put_64bit β€” add a netlink attribute to a socket buffer and align it πŸŽ€

(that's the whole vibe. add attribute. align it. done. iconic.)


🌸 SYNOPSIS 🌸

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

look at that signature. gorgeous. returns void, which lowkey means "no take-backs, no error codes, you're on your own" 😭


πŸ¦‹ ARGUMENTS πŸ¦‹

  • skb β€” the socket buffer you're adding the attribute to. this is the main character, the canvas, the whole venue 🫢
  • attrtype β€” the attribute type. literally just, what kind of attribute is this πŸ’«
  • attrlen β€” length of the attribute payload. how many bytes of Actual Content we're rocking ✨
  • data β€” head of the attribute payload. i.e. where the good stuff starts πŸ“
  • padattr β€” attribute type for the padding. yes the padding gets its own type, she has her own identity, respect her πŸ‘‘

πŸ”₯ DESCRIPTION πŸ”₯

so here's the tea: the caller β€” that's you, bestie β€” is responsible for making sure the skb actually has enough tailroom for the attribute header and the payload.

⚠️ read that again. you make sure there's enough tailroom. nobody's checking for you. this function is not your mom, it's not doing a vibe check on your buffer. no cap. πŸ’€

that's it. that's the whole description. short, sweet, and it will absolutely bite you if you skip the tailroom part πŸ™ˆ


🌈 SEE ALSO 🌈

the whole ./lib/nlattr.c friend group, and honestly they're all iconic:

so many functions. so many underscores. the __ prefix is giving "i'm the internal one, use my public sibling if you're normal" 🧚


anyway that's the page!! go forth, check your tailroom, and remember: come from ./lib, stay for the padding ✨

mwah πŸ’– β€” signed, your favorite kernel manual, dated October 2026, shipped from ./lib, and yes the footer still says __nla_put_64bit(9) because branding is forever πŸ‘‘

πŸ“¦ where this page comes from