dev_set_allmulti(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… dev_set_allmulti(9) β€” Kernel API Manual ✨

okay so bestie, welcome to the group chat. this is dev_set_allmulti, straight out of the Kernel API Manual, and honestly? it's giving "small function, big responsibility" energy. let's get into it πŸŽ€


🌸 NAME 🌸

dev_set_allmulti β€” update the allmulti count on a device. that's it, that's the whole vibe. lowkey iconic that the name just tells you exactly what it does fr fr πŸ’–


✨ SYNOPSIS ✨

int dev_set_allmulti (struct net_device *dev , int inc );

two arguments, one int coming back at you. simple. clean. slay 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • dev β€” the device. the main character of this whole operation πŸ’…
  • inc β€” the modifier. the little number that decides whether we're adding or removing, iykyk 🌸

πŸŽ€ DESCRIPTION πŸŽ€

so what are we actually doing here? we're adding or removing reception of all multicast frames to a device. think of it as telling the interface "bestie, listen to everything multicast-y, not just your usual filtered faves" πŸ‘‘

here's the important bit though, and the way that this counter works is genuinely so satisfying: while the count in the device remains above zero, the interface remains listening to all interfaces. yes, all of them. no cap πŸ”₯

once it hits zero β€” boom β€” the device reverts back to normal filtering operation. zero is the vibe check result that means "we're done here", and the interface goes back to its regular life 🌈

and a negative inc value? that's your move when you're dropping the counter, specifically when you're releasing a resource that needed all multicasts. so if you borrowed the allmulti privilege, you give it back with a negative inc. responsible queen behaviour, honestly πŸ’œ


⭐ RETURN ⭐

  • 0 on success β€” we ate, no crumbs πŸ“
  • -errno on failure β€” it's giving error, and the errno tells you which one 😭

🌟 SEE ALSO 🌟

the kernel file lives at ./net/core/dev_api.c, and here's the whole friend group of related functions β€” all of them in (9), all of them valid, no gatekeeping:

ngl that's a whole friend group and dev_set_promiscuity(9) is definitely the loud one 🧚


reminder bestie: the counter has to stay above zero for the allmulticast listening to stay on, and once it hits zero the device reverts to normal filtering. don't forget to hand back what you borrowed with a negative inc πŸ’–

kisses and bye bye, this page is from ./net/core and it's dated October 2026 β€” noting it here in a cute little sign-off instead of a boring footer, because we're not doing boring around here πŸŽ€βœ¨πŸ’…

πŸ“¦ where this page comes from