dev_open(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– dev_open(9) β€” like, the "wake up bestie" call for network interfaces πŸ’–

okay so this is dev_open, straight out of the Kernel API Manual β€” section 9, kernel-land, no user-facing shenanigans here. buckle up πŸŽ€


✨ NAME ✨

dev_open β€” prepare an interface for use πŸ¦‹


🌸 SYNOPSIS 🌸

int dev_open (struct net_device *dev , struct netlink_ext_ack *extack );

πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” the device you're opening. the main character, literally πŸ’…
  • extack β€” netlink extended ack. it's the receipts-holder πŸ“¬

πŸ’« DESCRIPTION πŸ’«

okay so picture this: your device is down and you want it up. that's the whole gig, bestie. dev_open takes a device from down state to up state, and it does it in a very specific order β€” no cap:

  1. the device's private open function gets invoked πŸ”₯
  2. then the multicast lists are loaded πŸ“‹
  3. finally the device is moved into the up state

...and then a NETDEV_UP message is sent to the netdev notifier chain. everyone who's anyone gets the memo, periodt πŸ‘‘

here's the chill part: calling this function on an active interface is a nop. it's giving "already slaying, nothing to do" πŸ™ˆ if it fails though, you get a negative errno code back. so like, be aware 😭

⚠️ heads up bestie: failure = negative errno code. not vibes, an actual negative error number. iykyk.

🌈 RETURN 🌈

  • 0 on success πŸŽ‰ slay
  • -errno on failure πŸ’€

πŸ¦‹ SEE ALSO πŸ¦‹

kernel file ./net/core/dev_api.c πŸ‘€ plus the whole friend group:

go read them, they're iconic too πŸ’œ


mwah πŸ’‹ that's the whole page! brought to you by ./net/core, dated October 2026, and yes the manual name for this one is dev_open(9) β€” see you in the next man page, bestie 🫢✨

πŸ“¦ where this page comes from