batadv_forw_...cket_to_list(9)
πΈ batadv_forw_bcast_packet_to_list (9) β kernel API manual, but make it make sense π
okay bestie, so this whole thing lives in section 9 of the kernel API manual and the page title is literally batadv_forw_...cket_to_list(9) (yes the middle got chopped, it's giving "abbreviated for the algorithm" π). It's a batman-adv function, it queues up broadcast packets, and honestly? it's lowkey iconic. Let's get into it π«Ά
β¨ NAME β¨
batadv_forw_bcast_packet_to_list β queue broadcast packet for transmissions π
π SYNOPSIS π
int batadv_forw_bcast_packet_to_list (struct batadv_priv *bat_priv ,
struct sk_buff *skb , unsigned long delay , bool own_packet , struct
batadv_hard_iface *if_in , struct batadv_hard_iface *if_out );
like, six args, one int out. she's a whole situation and we love her for it π
π¦ ARGUMENTS π¦
bat_privβ the bat priv with all the mesh interface information. it's the main character, she holds everything πskbβ broadcast packet to add. the little guy going into the queue πdelayβ number of jiffies to wait before sending. yes, jiffies, not seconds, don't come for me, that's just how the kernel counts time β³own_packetβtrueif it is a self-generated broadcast packet. like, did we make this or did it come from somewhere else πͺif_inβ the interface where the packet was received on π₯if_outβ the outgoing interface to queue on π€
π DESCRIPTION π
Adds a broadcast packet to the queue and sets up timers. that's the whole gig, no cap β¨
Broadcast packets are sent multiple times to increase probability for being received. like sending the same text four times so they definitely see it π β it's redundancy as a love language.
β οΈ okay listen, this part matters: this call clones the given skb, hence the caller needs to take into account that the data segment of the original skb might not be modifiable anymore. so don't go editing the og skb afterwards expecting it to work, because it's a clone situation and the original's data segment is not guaranteed to be yours to touch anymore. not me warning you twice π
π₯ RETURN π₯
NETDEV_TX_OKon success πNETDEV_TX_BUSYon errors π
that's it. two outcomes. vibe check passed or vibe check failed.
π§ SEE ALSO π§
Kernel file ./net/batman-adv/send.c β go read the source, iykyk π
batadv_send_skb_packet(9)batadv_send_broadcast_skb(9)batadv_send_unicast_skb(9)batadv_send_skb_to_orig(9)batadv_send_skb_push_fill_unicast(9)batadv_send_skb_prepare_unicast(9)batadv_send_skb_prepare_unicast_4addr(9)batadv_send_skb_unicast(9)batadv_send_skb_via_tt_generic(9)batadv_send_skb_via_gw(9)batadv_forw_packet_free(9)batadv_forw_packet_alloc(9)batadv_forw_packet_was_stolen(9)batadv_forw_packet_steal(9)batadv_forw_packet_list_steal(9)batadv_forw_packet_list_free(9)batadv_forw_packet_queue(9)batadv_forw_packet_bcast_queue(9)batadv_forw_packet_ogmv1_queue(9)batadv_forw_bcast_packet_if(9)batadv_send_no_broadcast(9)__batadv_forw_bcast_packet(9)batadv_forw_bcast_packet(9)batadv_send_bcast_packet(9)batadv_forw_packet_bcasts_left(9)batadv_forw_packet_bcasts_dec(9)batadv_forw_packet_is_rebroadcast(9)batadv_send_outstanding_bcast_packet(9)batadv_purge_outstanding_packets(9)
like yes that's a lot of friends but they're all in the group chat, it's fine π«Ά
mwah π that's the page! this cutie came from the kernel file ./net/batman-adv, dated October 2026, and the page itself answers to batadv_forw_...cket_to_list(9) β go forth and queue those broadcasts, bestie πΈβ¨π
π¦ 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