batadv_mcast...hif_get_ipv4(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… batadv_mcast...hif_get_ipv4(9) β€” the Kernel API Manual, bestie edition

okay so real talk, the header on this page is doing that thing where it shortens the name to batadv_mcast...hif_get_ipv4(9) because the full one is a whole mouthful, and the manual it lives in is also literally called batadv_mcast...hif_get_ipv4(9). iconic of the kernel to be like that. anyway, here's what this lil function actually does 🫢


✨ NAME ✨

batadv_mcast_mla_rtr_flags_meshif_get_ipv4 β€” grab the mcast router flags from the node, but for IPv4 specifically πŸ’–

(and yes that's the actual name, the header just couldn't fit it, we've all been there 😭)


🌸 SYNOPSIS 🌸

u8 batadv_mcast_mla_rtr_flags_meshif_get_ipv4 (struct net_device *dev );

it takes a device and hands you back a u8, that's the whole vibe ✨


πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” the interface you're checking, that's it, that's the argument πŸ’…

πŸ¦‹ DESCRIPTION πŸ¦‹

so basically it checks whether there's an IPv4 multicast router hanging out on this node. presence check, lowkey simple, highkey important πŸ”₯

⚠️ real one: the caller needs to hold the rcu read lock. no cap, that's a hard requirement β€” don't come at this function without it 😀

⭐ RETURN ⭐

it's giving two possible answers:

  • BATADV_NO_FLAGS β€” if the router is present πŸ‘‘
  • BATADV_MCAST_WANT_NO_RTR4 β€” otherwise πŸ™ˆ

yes, the "present" answer is the no-flags one. yes, it's a little mind-bending. no, you don't get to question it, that's just how it is πŸ’€


πŸ’œ SEE ALSO πŸ’œ

the whole friend group lives in the kernel file ./net/batman-adv/multicast.c, and honestly the whole squad is linked here so you can go meet them all 🧚

like, the entire mcast extended universe is right there. iykyk 🌈


🌟 ok that's the page, mwah 🌟

this little love letter to IPv4 multicast router detection lives in ./net/batman-adv and the docs are dated October 2026, all stamped with the name batadv_mcast...hif_get_ipv4(9) β€” go forth, hold that rcu read lock, and slay πŸ’…βœ¨πŸ“

πŸ“¦ where this page comes from