nla_memcpy(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… nla_memcpy(9)

okay so this is a page from the Kernel API Manual (the nla_memcpy(9) one, yes bestie, we're in kernel-land today 🐧✨) and it's lowkey one of the chillest functions ever. it just copies a netlink attribute into another memory area. that's it. that's the whole vibe. πŸŽ€


✨ NAME ✨

nla_memcpy β€” Copy a netlink attribute into another memory area

bestie it does exactly what it says on the tin: netlink attribute in, memory area out. no cap. πŸ¦‹


🌸 SYNOPSIS 🌸

int nla_memcpy (void *dest , const struct nlattr *src , int count );

look at her. three args, returns an int, main character energy fr fr. πŸ‘‘


πŸ’– ARGUMENTS πŸ’–

  • dest β€” where to copy to, i.e. the memcpy destination. this is the glow-up location, the place your bytes are moving into. 🏑✨
  • src β€” the netlink attribute to copy from. this is the source of truth, the original, the blueprint. 🧚
  • count β€” size of the destination area. basically "how much room do we have", and you better respect it. πŸ™ˆ

πŸ’€ NOTE πŸ’€

The number of bytes copied is limited by the length of attribute's payload.

read that again bestie β€” you can ask for count bytes, but the attribute's payload length is the ceiling. she will not overflow for you. memcpy says hi. 😭πŸ”₯

Returns the number of bytes copied. so like, always check the return value, it's literally telling you what happened. iykyk. πŸ’…


🌈 SEE ALSO 🌈

Kernel file ./lib/nlattr.c β€” and the whole netlink attr friend group, which is honestly iconic:


and that's the whole page, bestie 🫢 this lil gem lives in ./lib and it's dated October 2026 β€” so like, future vibes only. go copy some attributes, slay, and remember: the payload length is the limit. periodt. πŸ’œβ­πŸ“

πŸ“¦ where this page comes from