batadv_mcast_forw_push(9)
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 viabatadv_mcast_forw_expand_head/...β so any pointer into the skb data (e.g. obtained fromskb->dataoreth_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 β
trueon successfalseotherwise
that's it. that's the whole return section. she's not complicated π
π¦ SEE ALSO π¦
the whole friend group π«Ά β go say hi:
- Kernel file
./net/batman-adv/multicast_forw.c 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_packet(9)batadv_mcast_forw_tracker_tvlv_handler(9)batadv_mcast_forw_packet_hdrlen(9)batadv_mcast_forw_expand_head(9)batadv_mcast_forw_mcsend(9)
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
- 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