br_multicast_list_adjacent(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… br_multicast_list_adjacent(9)

okay so you're in the Kernel API Manual, section 9, and today's main character is br_multicast_list_adjacent(9). bestie, this one is gonna make so much sense, i promise 🫢


✨ NAME ✨

br_multicast_list_adjacent β€” literally just returns snooped multicast addresses, no cap πŸ¦‹


🌸 SYNOPSIS 🌸

int br_multicast_list_adjacent (struct net_device *dev , struct
list_head *br_ip_list );

look at that signature. gorgeous. iconic. the way that int is just sitting there ready to hand you a count πŸ’–


πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” the bridge port adjacent to which to retrieve addresses. yes, "adjacent to which", we're being fancy today. it's the port whose neighbours we're snooping around πŸ‘€
  • br_ip_list β€” the list where we stash all the found, snooped multicast IP addresses. it's the lil basket you're handing us 🧺✨

πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the vibe: this function creates a list of IP addresses (as struct br_ip_list) that the multicast snooping feature sensed on all bridge ports of dev's bridge device β€” but with one very important exclusion: it skips the addresses coming from dev itself. like, we're nosy but we're not that nosy πŸ™ˆ

Then it returns the number of items it added to br_ip_list. nice and countable, we love a return value with a job πŸ”₯


πŸ’€ NOTES πŸ’€

okay bestie, listen up, these are the ones that bite if you ignore them:

  • br_ip_list needs to be initialized by the caller β€” that's you, you're the caller, do the init 🫑
  • br_ip_list might contain duplicates in the end, so it needs to be taken care of by the caller. yes, dedupe responsibilty is yours, not ours πŸ’…
  • br_ip_list needs to be freed by the caller. please, please free it. do not leave it hanging 😭
fr fr, all three of those are on you. we just fill the list, we don't babysit it.

🌈 SEE ALSO 🌈

the whole multicast bestie squad, iykyk πŸ‘‘


and that's the page!! sign-off time: this little masterpiece lives in ./net/bridge, dated October 2026, and it's part of the Kernel API Manual β€” stan forever, periodt πŸ’œβ­

πŸ“¦ where this page comes from