__nla_reserve(9)
π __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:
__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_64bit(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)
okay bye bestie π this page is from ./lib, dated October 2026, and itβs serving __nla_reserve(9) realness πβ¨
π¦ 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