nlmsg_multicast_filtered(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

Okay so bestie, real talk: this is nlmsg_multicast_filtered, straight out of the Kernel API Manual, section 9. It's the netlink multicast girlie who also runs a filter function before the message goes out. Like a group chat where you get to mute certain people before hitting send. Iconic behaviour, honestly.


✨ NAME ✨

nlmsg_multicast_filtered β€” multicast a netlink message with filter function πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

int nlmsg_multicast_filtered (struct sock *sk , struct sk_buff *skb ,
       u32 portid , unsigned int group , gfp_t flags , netlink_filter_fn filter
       , void *filter_data );

That's a whole lot of arguments, I know, but stay with me β€” they're all getting their own little moment below. 🫢


🌸 ARGUMENTS 🌸

  • sk β€” the netlink socket you're spreading messages to. This is the main character socket, no cap.
  • skb β€” the netlink message itself, chilling there as a socket buffer.
  • portid β€” your own netlink portid. Babes, you pass this so the kernel doesn't accidentally send the message back to you. We love a self-awareness moment. πŸ™ˆ
  • group β€” the multicast group id. Basically which group chat this lands in.
  • flags β€” allocation flags. The boring-but-necessary bits.
  • filter β€” the filter function. The bouncer at the door, the vibe check, the "are you actually on the list" energy. πŸ”₯
  • filter_data β€” private data that gets handed to the filter function. Just for filter. Nobody else's business. πŸ’œ

⭐ RETURN ⭐

0 on success πŸŽ‰ β€” and a negative error code if it flops 😭.


πŸ¦‹ SEE ALSO πŸ¦‹

Genuinely obsessed with how long this list is. Grab a snack, bestie β€” the whole family is here. πŸ“

The netlink header & pals

  • Kernel file ./include/net/netlink.h
  • struct nla_policy(9)
  • struct nl_info(9)
  • enum netlink_validation(9)

nlmsg_* girlies (the fact-checkers)

nlmsg_*parse* and validation crew

nla_parse* / nla_validate* squad

bookkeeping & sending

dump & attribute helpers

the nla_put_* putters (yes, all of them πŸ’€)

the nla_get_* getters (even more of them 😭)

nesting, padding & iteration besties


ngl bestie, if you're here just for the multicast part, nlmsg_multicast(9) is the no-filter version. This page is the one that actually does the vibe check. 🧚

That's the whole page, and it lives in <code>./include/net</code>, dated <strong>October 2026</strong>. Go forth and multicast responsibly, my love β€” mwah πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from