register_netdevice(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

register_netdevice β€” register a network device

okay bestie so this is register_netdevice, section 9 of the Kernel API Manual, and it's literally the moment a network device goes from "just a struct someone made" to "the whole kernel can see it." main character energy fr πŸ’…


✨ SYNOPSIS ✨

int register_netdevice (struct net_device *dev );

πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” the device you're registering 🫢 that's it, that's the whole argument.

πŸ’œ DESCRIPTION πŸ’œ

So what this does: you hand it a network device structure that's already been prepared (like, prepped and ready, not raw), and it makes that device externally accessible 🌈 like it goes public.

A NETDEV_REGISTER message gets sent out to the netdev notifier chain β€” everyone subscribed gets the news πŸŽ€.

⚠️ the actual important bit: callers must hold the rtnl lock. no exceptions, no cap. and honestly? you probably want register_netdev instead of this one. like, this is the lowkey "iykyk" version β€” know what you're doing before you reach for it πŸ’€

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./net/core/dev.c β€” and the whole extended friend group:


and that's the whole page bestie, you ate that πŸ’– this masterpiece lives in ./net/core, dated October 2026, and it's filed under register_netdevice(9) β€” slay βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from