nla_reserve_64bit(9)
π nla_reserve_64bit β the kernel API manual, bestie edition π
okay so we're doing nla_reserve_64bit(9) today and honestly? she's that girl. this is a page from the Kernel API Manual and it's lowkey iconic, so let's get into it β¨
β¨ NAME β¨
nla_reserve_64bit β reserve room for an attribute on the skb and align it π (yes that's the whole vibe, she reserves room and she aligns, periodt)
πΈ SYNOPSIS πΈ
struct nlattr * nla_reserve_64bit (struct sk_buff *skb , int attrtype ,
int attrlen , int padattr );
like literally just look at her signature, she's serving π«Ά
π¦ ARGUMENTS π¦
skbβ the socket buffer you're reserving room on, that's the canvas bestie π¨attrtypeβ the attribute type, iykykattrlenβ length of the attribute payload, so how much stuff you're putting in therepadattrβ the attribute type used for the padding π
π DESCRIPTION π
okay so what she actually does: she adds a netlink attribute header to a socket buffer and reserves room for the payload β but does not copy it. not her job, not her problem π
. she also makes sure this attribute will have a 64-bit aligned nla_data area, which is the whole point of her existence, no cap β¨
and if the tailroom of the skb is insufficient to store the attribute header and payload? she returns NULL. that's it, that's the whole mood π
fr fr though β check for that NULL, bestie. she's not gonna warn you, she's just gonna hand you nothing and move on π
π₯ SEE ALSO π₯
Kernel file ./lib/nlattr.c β and like, the whole friend group:
__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_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)
she literally runs with the whole squad, we love a connected queen πΈ
aaaand that's the page!! π sign-off time: this one lives in ./lib and it's dated October 2026 β so go forth, reserve your 64-bit aligned room, and slay ππ¦β¨
π¦ 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