batadv_mcast_forw_packet(9)
π 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β aboolthat 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_SUCCESSorNET_RX_DROPon 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:
batadv_mcast_forw_skb_push(9),batadv_mcast_forw_push_padding(9),batadv_mcast_forw_push_est_padding(9),batadv_mcast_forw_orig_entry(9),batadv_mcast_forw_push_dest(9),batadv_mcast_forw_push_dests_list(9),batadv_mcast_forw_push_tt(9),batadv_mcast_forw_push_want_all(9),batadv_mcast_forw_push_want_rtr(9),batadv_mcast_forw_scrape(9),batadv_mcast_forw_push_scrape_padding(9),batadv_mcast_forw_push_insert_padding(9),batadv_mcast_forw_push_adjust_padding(9),batadv_mcast_forw_push_dests(9),batadv_mcast_forw_push_tracker(9),batadv_mcast_forw_push_tvlvs(9),batadv_mcast_forw_push_hdr(9),batadv_mcast_forw_scrub_dests(9),batadv_mcast_forw_shrink_fill(9),batadv_mcast_forw_shrink_pack_dests(9),batadv_mcast_forw_shrink_align_offset(9),batadv_mcast_forw_shrink_update_headers(9),batadv_mcast_forw_shrink_move_headers(9),batadv_mcast_forw_shrink_tracker(9),batadv_mcast_forw_tracker_tvlv_handler(9),batadv_mcast_forw_packet_hdrlen(9),batadv_mcast_forw_expand_head(9),batadv_mcast_forw_push(9),batadv_mcast_forw_mcsend(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms