rtnl_nets_add(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… rtnl_nets_add(9) β€” a Kernel API Manual moment

okay bestie, so this is a page from the Kernel API Manual (section 9, kernel-space vibes only 🧚) and it's all about rtnl_nets_add. Sit down, hydrate, let's go πŸ’–


✨ NAME ✨

rtnl_nets_add β€” add a netns to be locked before ->newlink(). that's the whole assignment, no cap πŸŽ€


🌸 SYNOPSIS 🌸

void rtnl_nets_add (struct rtnl_nets *rtnl_nets , struct net *net );

notice how it returns void? yeah. it does the thing and dips, iconic behavior honestly πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • rtnl_nets β€” the rtnl_nets pointer that got passed to ->get_peer_net. like, that one. 🫢
  • net β€” a netns pointer, and bestie listen: it comes in with an extra refcnt already held. don't touch the refcount, it's handled. 😭

πŸ’€ DESCRIPTION πŸ’€

so the extra refcnt we were just talking about? yeah, it gets released later, over in rtnl_nets_destroy. that's it, that's the function. balanced reference counting, main character energy ⭐πŸ”₯

ngl this is one of those tiny helpers where the whole personality is "I hold a ref so the destroy path doesn't have to panic." respect. πŸ‘‘

🌈 SEE ALSO 🌈


and that's the whole page, bestie β€” no more lore πŸ“

signed, sealed, delivered from ./net/core β€” the Kernel API Manual, dated October 2026, page rtnl_nets_add(9) πŸŽ€βœ¨ bye ily πŸ’œ

πŸ“¦ where this page comes from