dev_set_allmulti(9)
π 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 β
0on success β we ate, no crumbs π-errnoon 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:
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_close(9)dev_disable_lro(9)dev_set_promiscuity(9)dev_set_mac_address(9)netdev_state_change(9)
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
- 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