batadv_mcast_forw_push(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay so bestie, welcome to a page straight out of the Kernel API Manual β€” section (9), the kernel API section, where the C functions live πŸ’… β€” and the main character of today's episode is batadv_mcast_forw_push. she's a batman-adv girlie and she's about to wrap your packet up like a little gift 🎁✨


✨ NAME ✨

batadv_mcast_forw_push β€” encapsulate skb in a batman-adv multicast packet

the vibe? you hand her an skb, she hands back a batman-adv multicast packet. that's it. that's the whole job πŸ¦‹


🌸 SYNOPSIS 🌸

bool batadv_mcast_forw_push (struct batadv_priv *bat_priv , struct sk_buff *skb , unsigned short vid , int is_routable , int count );

note the return type, bestie: bool. it's giving "yes or no, no in-between" πŸ’€


πŸŽ€ ARGUMENTS πŸŽ€

  • bat_priv β€” the bat priv, aka the one holding all the mesh interface information. she contains multitudes 🫢
  • skb β€” the multicast packet you want encapsulated and sent. the passenger princess of this whole function ✨
  • vid β€” the vlan identifier. yes, the vlan id. keep up 😌
  • is_routable β€” indicates whether the destination is routable. literally just a yes/no vibe check on routability πŸ”₯
  • count β€” the number of originators the multicast packet needs to be sent to. she needs to know how many friends are coming to the party πŸ‘‘

πŸ’– DESCRIPTION πŸ’–

so what does she actually do? she encapsulates the given multicast packet in a batman-adv multicast packet. iconic behaviour, no notes πŸ’…

a multicast tracker TVLV gets attached accordingly β€” and it carries the destination originator addresses for any node that signaled interest in it, whether that's via the translation table or via the according want-all flags. both paths are covered, she's thorough like that 🌈

⚠️ WARNING, and I mean it bestie ⚠️ this function may reallocate the skb data buffer via batadv_mcast_forw_expand_head/... β€” so any pointer into the skb data (e.g. obtained from skb->data or eth_hdr) that you grabbed before this call must be considered invalid afterwards and has to be reacquired. do not hold onto the old one. it is gone. it is dust. reacquire it or perish 😭

⭐ RETURN ⭐

  • true on success
  • false otherwise

that's it. that's the whole return section. she's not complicated πŸŽ€


πŸ¦‹ SEE ALSO πŸ¦‹

the whole friend group 🫢 β€” go say hi:

like I said. the whole group chat. iykyk πŸ’œ


and that's the page, babe ✨ this little legend came out of ./net/batman-adv and is dated October 2026 β€” so go forth, encapsulate responsibly, reacquire your pointers, and slay πŸ’…πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from