batadv_forw_packet_alloc(9)
π batadv_forw_packet_alloc(9) β the kernel API manual, but make it make sense
okay bestie, welcome to the Kernel API Manual entry for batadv_forw_packet_alloc(9) β¨ this is a 9-section manual page and we are reading all of it, no skimming, no cap π«Ά
πΈ NAME πΈ
batadv_forw_packet_alloc β allocate a forwarding packet π
β¨ SYNOPSIS β¨
struct batadv_forw_packet * batadv_forw_packet_alloc (struct
batadv_hard_iface *if_incoming , struct batadv_hard_iface *if_outgoing ,
atomic_t *queue_left , struct batadv_priv *bat_priv , struct sk_buff
*skb );
like, that's the whole signature, it's giving "five arguments and a dream" ππ
π¦ ARGUMENTS π¦
if_incomingβ the (optional)if_incomingthat's gonna get grabbed πif_outgoingβ the (optional)if_outgoingthat's also gonna get grabbedqueue_leftβ the (optional) queue counter that's gonna get decreased, bestiebat_privβ thebat_privfor the mesh that thisforw_packetbelongs to πskbβ the raw packet that this forwarding packet is supposed to contain β
π DESCRIPTION π
So here's the vibe: this thing allocates a forwarding packet, and it tries to get a reference to the (optional) if_incoming, if_outgoing, and queue_left. That's three optionals, she's flexible π
And here's the little detail you do NOT wanna miss: if queue_left is NULL, then bat_priv is optional too. periodt π
π₯ RETURN π₯
- an allocated forwarding packet on success π₯³
NULLotherwise π
π SEE ALSO π
okay this list is LONG and she ate, every single one of these, no skipping π§
Kernel file ./net/batman-adv/send.c plus:
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_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_to_list(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 I said. all of them. iykyk π
ngl bestie, this is kernel code β read the source in ./net/batman-adv/send.c before you go poking at it π
and that's the whole page!! mwah π source path ./net/batman-adv, dated October 2026, brought to you by the batadv_forw_packet_alloc(9) girlies ππ¦π
π¦ 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