netlink_change_ngroups(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

ok so bestie, welcome to the <purple>Kernel API Manual</purple> page for netlink_change_ngroups β€” yes it's a real function, yes it lives in the kernel, and yes we're gonna get into it 🫢


✨ NAME ✨

netlink_change_ngroups β€” change number of multicast groups 🌈


✨ SYNOPSIS ✨

int netlink_change_ngroups (struct sock *sk , unsigned int groups );

✨ ARGUMENTS ✨

  • sk β€” the kernel netlink socket, bestie. the one that came back from netlink_kernel_create. that's your girl πŸ’…
  • groups β€” the new number of groups. like, the count you're switching to ✨

✨ DESCRIPTION ✨

okay so here's the vibe: this one changes the number of multicast groups that are available on a certain netlink family. that's it, that's the whole job 🌸

but ngl there are two things you need to know:

⚠️ you cannot change the number of groups to anything below 32. that's the floor, periodt. πŸ’€
⚠️ also β€” and this is the sneaky one β€” it does not implicitly clear listeners from groups that get removed when you reduce the number of groups. so if you shrink the group count, those listeners are still hanging around. it does not clean up after you. you gotta handle that yourself, fr fr πŸ™ˆ

✨ SEE ALSO ✨

go read those too, iykyk πŸ‘‘


πŸ¦‹ okay that's the page!! this one's from ./net/netlink, dated October 2026, and it's netlink_change_ngroups(9) from the <purple>Kernel API Manual</purple> β€” mwah, slay, go change some groups responsibly πŸ’œπŸŽ€

πŸ“¦ where this page comes from