dev_addr_add(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– dev_addr_add(9) πŸ’–

okay so bestie, welcome to the Kernel API Manual β€” this is the dev_addr_add page and honestly it's giving "small function, big responsibilities" ✨


🌸 NAME 🌸

dev_addr_add β€” add a device address πŸŽ€


✨ SYNOPSIS ✨

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

like, that's the whole vibe. she returns an int, she takes three things, she's booked and busy πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • dev β€” the device, bestie. the actual struct net_device we're messing with 🫢
  • addr β€” the address to add. like, the address. the one we're adding. 😭
  • addr_type β€” the address type. it's an unsigned char and it's very much doing its own thing πŸ’œ

🌈 DESCRIPTION 🌈

So here's the tea: dev_addr_add adds a device address to the device or β€” and this is the iconic part β€” increases the reference count if it already exists. so like, no duplicates, no drama, just a lil refcount glow-up when she's already there πŸ‘‘

⚠️ ok but fr fr, the caller must hold the rtnl_mutex. that's not a suggestion, that's a requirement. no cap. hold the lock or don't come to the function πŸ’€

⭐ SEE ALSO ⭐

the full friend group, in order, no one left out 🫢:


πŸŽ€ sign-off πŸŽ€

and that's the page, bestie!! this iconic little number lives in ./net/core, dated October 2026, and yes she's literally named dev_addr_add(9) β€” go forth and add those addresses, but hold that rtnl_mutex first πŸ™ˆπŸ’–

you're gonna slay this kernel work fr fr πŸ§šβ€β™€οΈ

πŸ“¦ where this page comes from