batadv_mcast_forw_packet(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– batadv_mcast_forw_packet β€” like, the manual page, bestie πŸ’–

okay so this is a page from the Kernel API Manual (the batadv_mcast_forw_packet(9) one, yes THAT one) and I'm gonna walk you through it like we're on FaceTime at 2am. grab a snack. πŸ“


✨ NAME ✨

batadv_mcast_forw_packet β€” forward a batman-adv multicast packet. that's it. that's the whole job. she's a forwarder. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

int batadv_mcast_forw_packet (struct batadv_priv *bat_priv , struct
sk_buff *skb , bool local_xmit );

look at her. three args, returns an int. no cap, she's compact. ✨


πŸŽ€ ARGUMENTS πŸŽ€

  • bat_priv β€” the bat priv holding ALL the mesh interface information. she's the main character, she knows everything about the mesh. πŸ‘‘
  • skb β€” the received or locally generated batman-adv multicast packet. either way, it's the packet in question. πŸ¦‹
  • local_xmit β€” a bool that says "hey, this packet was locally generated, it wasn't received." so like, did we make this or did it arrive? this flag tells you. 🌸

πŸ’œ DESCRIPTION πŸ’œ

so what does she actually DO? she parses the tracker TVLV of a batman-adv multicast packet and forwards the packet as indicated in that there TVLV. iconic behaviour honestly. πŸ”₯

now listen, caller, because these are on you, not her:

  • you need to set the skb network header to the start of the multicast tracker TVLV β€” and that's excluding the generic TVLV header, don't forget the excluding part bestie 😭
  • you also need to set the skb transport header to the next byte after this multicast tracker TVLV. like, the very next byte. no skipping.
also β€” and I need you to hear me on this β€” the caller needs to free the skb. that's your job. not hers. don't leave her hanging with a leaked skb, that's not the vibe. πŸ’€

🌈 RETURN 🌈

  • NET_RX_SUCCESS or NET_RX_DROP on success, or a negative error code on failure. πŸ™ˆ
  • NET_RX_SUCCESS β€” the received packet is supposed to be decapsulated and forwarded to the own mesh interface. slay, it's coming home. 🫢
  • NET_RX_DROP β€” otherwise. drop it, girl. ⭐

🧚 SEE ALSO 🧚

the kernel file, obviously:

  • Kernel file ./net/batman-adv/multicast_forw.c

and now the extended family β€” she has SO many siblings, it's giving huge family group chat:


that's the whole page bestie, you ate that 🫢 go forth and forward your multicasts responsibly. periodt. πŸ’…

this lil masterpiece lives in ./net/batman-adv, dated October 2026, and it's the batadv_mcast_forw_packet(9) page from the Kernel API Manual β€” mwah, love u, bye πŸ’–βœ¨

πŸ“¦ where this page comes from