dev_change_net_namespace(9)
π dev_change_net_namespace(9)
okay so this is a page from the Kernel API Manual, and it's about dev_change_net_namespace β the little icon that relocates a whole network device into a different nethost namespace. bestie, it's giving "moving out of your group chat into a new one" energy π¦
β¨ NAME β¨
dev_change_net_namespace β move device to different nethost namespace
πΈ SYNOPSIS πΈ
int dev_change_net_namespace (struct net_device *dev , struct net *net ,
const char *pat );
π ARGUMENTS π
devβ the device. the main character we're relocating πnetβ the network namespace. this is where it's moving to, new address new vibe β¨patβ if this is notNULL, it's a name pattern to try when the current device name is already taken in the destination network namespace. like, "oof that handle's taken, let's try this variant" π
π₯ DESCRIPTION π₯
so what it does: this function shuts down a device interface and moves it to a new network namespace. that's the whole plot. on success 0 is returned, and on a failure a negative errno code is returned. no cap π
β οΈ callers must hold the rtnl semaphore. like, this is not optional, the lock is the vibe check and you WILL fail it if you skip it π
β RETURN β
0 on success, -errno on failure. that's it, that's the whole return section π«Ά
π SEE ALSO π
kernel file ./net/core/dev_api.c β and honestly the whole friend group:
dev_change_name(9)dev_set_alias(9)dev_change_flags(9)dev_set_group(9)dev_change_carrier(9)dev_change_tx_queue_len(9)dev_change_proto_down(9)dev_open(9)dev_close(9)dev_disable_lro(9)dev_set_promiscuity(9)dev_set_allmulti(9)dev_set_mac_address(9)netdev_state_change(9)
and that's the page!! π it lives in ./net/core, dated October 2026, and it's signed off as dev_change_net_namespace(9) β go forth and namespace responsibly, bestie ππ
π¦ 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