__nla_reserve_64bit(9)
β¨ __nla_reserve_64bit(9) β¨
okay so this is a page from the Kernel API Manual, and honestly? it's a little baddie. it does one job and it does it immaculately. let's get into it π
πΈ NAME πΈ
__nla_reserve_64bit β reserve room for an attribute on the skb, and align it. that's it, that's the whole vibe π
π¦ SYNOPSIS π¦
struct nlattr * __nla_reserve_64bit (struct sk_buff *skb , int attrtype
, int attrlen , int padattr );
look at her. four args, no notes. β¨
π ARGUMENTS π
skbβ the socket buffer where we're reserving room, bestie. that's the canvas π¨attrtypeβ the attribute type. it's giving "who am i" energy πattrlenβ the length of the attribute payload, aka how much room the actual content needs πpadattrβ the attribute type used for the padding π
π₯ DESCRIPTION π₯
so what does she do? she adds a netlink attribute header to a socket buffer, and she reserves room for the payload β but she does not copy it. nope! not her job, not her problem π the payload copying is somebody else's main character arc.
she also makes sure this attribute will have a 64-bit aligned nla_data area. alignment slay. not me being obsessed with memory layout π
β οΈ heads up: the caller is responsible for making sure the skb actually provides enough tailroom for the attribute header and the payload. that's on you, babe. she trusts you. don't fumble it π
β SEE ALSO β
go read the whole friend group β they all live in the kernel file ./lib/nlattr.c:
__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_nohdr(9)nla_reserve(9)nla_reserve_64bit(9)nla_reserve_nohdr(9)__nla_put(9)__nla_put_64bit(9)__nla_put_nohdr(9)nla_put(9)nla_put_64bit(9)nla_put_nohdr(9)nla_append(9)
π«Ά and that's the whole page!! she's from the ./lib directory, dated October 2026, and her name is __nla_reserve_64bit(9). periodt. go reserve some room responsibly πβ¨π
π¦ 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