netlink_change_ngroups(9)
π netlink_change_ngroups π
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 fromnetlink_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 β¨
- Kernel file
./net/netlink/af_netlink.c __netlink_ns_capable(9)netlink_ns_capable(9)netlink_capable(9)netlink_net_capable(9)netlink_set_err(9)nlmsg_notify(9)
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
- 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