dev_uc_add(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… dev_uc_add(9) β€” like, the Kernel API Manual page, bestie

okay so we're doing a manpage from the Kernel API Manual today and honestly? it's a little one but it's lowkey iconic. it's giving "small function, big main character energy" ✨


🌸 NAME 🌸

dev_uc_add β€” add a secondary unicast address 🫢


✨ SYNOPSIS ✨

int dev_uc_add (struct net_device *dev , const unsigned char *addr );

so like, it takes two things and gives you back an int. that's the whole vibe check right there πŸ’–


πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” the device. the main character of this whole situation, no cap.
  • addr β€” the address you wanna add. this is the one being handed over. πŸ¦‹

πŸ’œ DESCRIPTION πŸ’œ

okay so here's the tea: dev_uc_add adds a secondary unicast address to the device β€” or, and this is the important part, if that address is already there, it just bumps the reference count instead. so like, if it exists already you don't get a duplicate, you just get a little counter going up. periodt. πŸ‘‘


🌈 SEE ALSO 🌈

and now for the extended universe, because this function has so many friends. it's literally a whole friend group. Kernel file ./net/core/dev_addr_lists.c is where the lore lives, and then we've got:

__hw_addr_sync_dev(9), __hw_addr_ref_sync_dev(9), __hw_addr_ref_unsync_dev(9), __hw_addr_unsync_dev(9), __hw_addr_list_snapshot(9), __hw_addr_list_reconcile(9), dev_addr_flush(9), dev_addr_init(9), dev_addr_add(9), dev_addr_del(9), dev_uc_add_excl(9), dev_uc_del(9), dev_uc_sync(9), dev_uc_sync_multiple(9), dev_uc_unsync(9), dev_uc_flush(9), dev_uc_init(9), dev_mc_add_excl(9), dev_mc_add(9), dev_mc_add_global(9), dev_mc_del(9), dev_mc_del_global(9), dev_mc_sync(9), dev_mc_sync_multiple(9), dev_mc_unsync(9), dev_mc_flush(9), dev_mc_init(9), netif_uc_promisc_update(9), __dev_set_rx_mode(9), netif_rx_mode_sync(9)

like, say less. every single one of them, we listed them all, nobody's getting left out of the group chat πŸ’…


ngl bestie, the _excl ones and the _sync ones are all right there in the list β€” go read them too, iykyk

and that's the page!! πŸŽ€ brought to you by ./net/core, dated October 2026, filed under dev_uc_add(9) β€” mwah, bye bestie, go add some unicast addresses πŸ’–πŸ¦‹βœ¨

πŸ“¦ where this page comes from