batadv_mcas...ode_by_count(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… batadv_mcast_forw_mode_by_count(9)

okay so bestie, this is a page out of the Kernel API Manual, and it's all about batadv_mcast_forw_mode_by_count(9) β€” like, the function name is a whole mouthful but we're gonna get through it together 🫢


✨ NAME ✨

batadv_mcast_forw_mode_by_count β€” literally just "get forwarding mode by count" πŸ’« that's the whole vibe, that's the whole job.


πŸŽ€ SYNOPSIS πŸŽ€

enum batadv_forw_mode batadv_mcast_forw_mode_by_count (struct
batadv_priv *bat_priv , struct sk_buff *skb , unsigned short vid , int
is_routable , int count );

she takes five arguments and returns a enum batadv_forw_mode, no cap πŸ”₯


🌸 ARGUMENTS 🌸

  • bat_priv β€” the bat priv, aka the thing holding all your mesh interface information πŸ’– she knows everything, she's the main character of the mesh
  • skb β€” the multicast packet we're checking, the little guy under the microscope πŸ”
  • vid β€” the vlan identifier, yes it's three letters, yes it matters
  • is_routable β€” stores whether the destination is routable 🧭 like, can we actually get there?
  • count β€” the number of originators the multicast packet needs to be sent to 🎯 (the "by count" of it all, iykyk)

πŸ¦‹ DESCRIPTION πŸ¦‹

so for a multicast packet with multiple destination originators, this function checks which mode to use. that's it, that's the plot πŸ“–

and like β€” for real β€” for BATADV_FORW_MCAST it also encapsulates the packet with a complete batman-adv multicast header. she doesn't just pick a mode, she dresses the packet up too βœ¨πŸ‘‘


πŸ’€ RETURN πŸ’€

okay here's the vibe check on what comes back:

  • BATADV_FORW_MCAST β€” if all nodes have multicast packet routing capabilities and an MTU >= 1280 on all hard interfaces (including us 🫡) and the encapsulated multicast packet with all destination addresses would still fit into an 1280 bytes batman-adv multicast packet (excluding the outer ethernet frame) and we could successfully push the full batman-adv multicast packet header. so many conditions bestie, but slay πŸ†
  • BATADV_FORW_UCASTS β€” if the packet cannot be sent in a batman-adv multicast packet and the amount of batman-adv unicast packets needed is smaller or equal to the configured multicast fanout πŸ”’
  • BATADV_FORW_BCAST β€” otherwise πŸ™ˆ the catch-all, the "none of the above", the group chat fallback

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./net/batman-adv/multicast.c β€” and honestly the whole extended family lives there, here's the full guest list πŸŽ‰


and that's the page babes πŸŽ€ this one's from ./net/batman-adv, dated October 2026 β€” signed, sealed, delivered, periodt πŸ’…πŸ’–

πŸ“¦ where this page comes from