dev_close(9)
π dev_close(9) β Kernel API Manual, bestie edition
Ok so real talk, this one lives in the Kernel API Manual and it's called dev_close(9). It's short, it's sweet, it's giving "one job, does it well." Let's get into it π
β¨ NAME β¨
dev_close β shutdown an interface π
Like, the polite way to put your network device to bed. Nap time, no cap π΄
π¦ SYNOPSIS π¦
void dev_close (struct net_device *dev );
One argument. One function. Zero drama. Slay π
πΈ ARGUMENTS πΈ
devβ the device to shutdown. That's it, that's the whole argument. It's thestruct net_device *you're putting down π
π₯ DESCRIPTION π₯
Okay so here's the whole vibe: this function moves an active device into the down state. Literally taking it from "we're so on" to "we're so off" β¨
The order of operations is important, so pay attention bestie:
- A
NETDEV_GOING_DOWNis sent to the netdev notifier chain β like a little group chat announcement, "hey everyone, it's about to go down" π’ - The device is then deactivated.
- Finally a
NETDEV_DOWNis sent to the notifier chain β "okay it's officially down, periodt" π
That's genuinely the whole thing. Two notifier events sandwiching the deactivation, in that exact order. Iconic behaviour honestly π
π SEE ALSO π
Kernel file ./net/core/dev_api.c β and like, all of these siblings:
dev_change_name(9)dev_set_alias(9)dev_change_flags(9)dev_set_group(9)dev_change_net_namespace(9)dev_change_carrier(9)dev_change_tx_queue_len(9)dev_change_proto_down(9)dev_open(9)dev_disable_lro(9)dev_set_promiscuity(9)dev_set_allmulti(9)dev_set_mac_address(9)netdev_state_change(9)
(If dev_close is the "goodnight", dev_open(9) is the "gm bestie βοΈ" β they're a matched set, iykyk.)
π«Ά And that's the page! This lil gem comes from ./net/core, dated October 2026, and it's dev_close(9) β go forth and shut things down responsibly, mwah πβ¨π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms