batadv_is_on_batman_iface(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– batadv_is_on_batman_iface(9) β€” Kernel API Manual πŸ’–


✨ NAME ✨

okay so bestie, this is batadv_is_on_batman_iface β€” it literally checks if a device is a batman iface descendant. iconic behavior, no cap.


πŸ’… SYNOPSIS πŸ’…

bool batadv_is_on_batman_iface (const struct net_device *net_dev );

πŸŽ€ ARGUMENTS πŸŽ€

  • net_dev β€” the device to check. that's the one, bestie 🫢

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so picture this: the user creates any virtual device on top of a batman-adv interface. we highkey need to prevent this new interface from being used to create a new mesh network, because that behaviour would lead to a batman-over-batman configuration and we are not doing that πŸ’€

so this function recursively checks all the fathers of the device passed as argument, looking for a batman-adv mesh interface. yes, β€œfathers” is the word here β€” we don't make the rules, we just recursively vibe-check them πŸ’…


🌈 RETURN 🌈

true if the device is descendant of a batman-adv mesh interface (or if it is a batman-adv interface itself), false otherwise. periodt. ✨


πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./net/batman-adv/hard-interface.c β€” and here's the whole function friend group, bestie:


πŸ’Œ cute little sign-off: source/version ./net/batman-adv Β· date October 2026 Β· batadv_is_on_batman_iface(9) β€” byeee bestie, go check those fathers recursively πŸ«ΆπŸ’–

πŸ“¦ where this page comes from