nla_for_each_nested(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 nla_for_each_nested(9) 🌸

okay bestie, welcome to the Kernel API Manual ✨ this little gem lives in nla_for_each_nested(9) and honestly? it's giving "tiny macro, big responsibilities" πŸ’…


πŸ’– NAME πŸ’–

nla_for_each_nested β€” iterate over nested attributes πŸŽ€

like, literally just loop through the nested attrs, no cap.


✨ SYNOPSIS ✨

nla_for_each_nested (pos , nla , rem );

yes that's the whole thing, she's compact 🫢 (those spaces are exactly how she's written, don't come for her)


πŸ¦‹ ARGUMENTS πŸ¦‹

  • pos β€” the loop counter πŸŒ€ β€” it gets set to the current attribute, so like, that's your "where am I right now" girlie
  • nla β€” the attribute containing the nested attributes 🎁 β€” the momma attribute, iykyk
  • rem β€” initialized to len, holds bytes currently remaining in stream πŸ“ β€” your little remaining-bytes tracker, keep an eye on her

🌈 SEE ALSO 🌈

the whole friend group πŸ’œ β€” plus, heads up, the kernel file lives at ./include/net/netlink.h ⭐


okay that's the whole page, you ate that πŸ“ and before you go β€” this one's from ./include/net 😌 dated October 2026 πŸ’œ so like, future vibes fr fr. bye bestie, go iterate some nested attributes πŸ’…βœ¨

πŸ“¦ where this page comes from