nla_append(9)
π nla_append β like, the kernel API manual, but make it make sense
okay so bestie, buckle up π we're diving into nla_append(9) β a little kernel function from <purple>./lib</purple> that does exactly one thing and does it iconically. no notes.
β¨ NAME β¨
nla_append β adds a netlink attribute without a header or padding. literally the whole personality. no header, no padding, just vibes and payload π
π¦ SYNOPSIS π¦
int nla_append (struct sk_buff *skb , int attrlen , const void *data );
three args, one int back. slay. β¨
πΈ ARGUMENTS πΈ
skbβ the socket buffer you're adding the attribute to. this is your canvas, your main character π¨attrlenβ the length of the attribute payload. how many bytes of payload you're bringing to the party πdataβ the head of the attribute payload. the actual content, the moment, the everything π
π§ DESCRIPTION π§
so here's the tea β β nla_append returns -EMSGSIZE if the tailroom of the skb is insufficient to store the attribute payload. that's it. that's the whole description. no cap. if your skb's tailroom can't hold the payload, you get -EMSGSIZE and you simply have to deal π
π₯ SEE ALSO π₯
the whole friend group lives in the Kernel file <purple>./lib/nlattr.c</purple> β go say hi to:
__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_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)
like, the entire extended crew. iykyk ππ
okay so that's the page!! π«Ά this little baddie comes from the source <purple>./lib</purple> and it's dated October 2026 β yes, the future, she's ahead of her time β periodt π
π¦ 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