__nla_reserve(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… __nla_reserve πŸ’…

okay so bestie, this is the __nla_reserve(9) page from the Kernel API Manual β€” yes, the kernel API manual, section 9, and it’s all about reserving room for an attribute on the skb ✨


🌸 NAME 🌸

__nla_reserve β€” reserve room for attribute on the skb πŸ’–


✨ SYNOPSIS ✨

struct nlattr * __nla_reserve (struct sk_buff *skb , int attrtype , int
       attrlen );

it’s giving β€œkernel function signature realness,” and honestly? iconic 🫢


πŸŽ€ ARGUMENTS πŸŽ€

  • skb β€” the socket buffer to reserve room on, bestie πŸ¦‹
  • attrtype β€” the attribute type πŸ’…
  • attrlen β€” the length of the attribute payload, periodt ✨

πŸ’œ DESCRIPTION πŸ’œ

so the way this works is: it adds a netlink attribute header to a socket buffer and reserves room for the payload β€” but it does not copy the payload. not me expecting a copy, because there is literally no copy happening 😭

⚠️ the caller is responsible for making sure the skb provides enough tailroom for the attribute header and the payload. that’s on you, bestie β€” do the vibe check on your tailroom before you commit πŸ’€

πŸ¦‹ SEE ALSO πŸ¦‹

kernel file ./lib/nlattr.c β€” and the whole friend group is here:


okay bye bestie πŸ’– this page is from ./lib, dated October 2026, and it’s serving __nla_reserve(9) realness πŸŽ€βœ¨

πŸ“¦ where this page comes from