batadv_send_skb_to_orig(9)
π batadv_send_skb_to_orig β Kernel API Manual, bestie edition β¨
okay so real talk, this is a page from the Kernel API Manual, and it's about one little function in batman-adv that lowkey does the whole "where does this packet even GO" thing. it's giving air-traffic-controller energy π« and honestly? iconic.
πΈ NAME πΈ
batadv_send_skb_to_orig β look up the next hop and transmit the skb. that's it. that's the whole job. she finds the next-hop and yeets the packet on its way π
β¨ SYNOPSIS β¨
int batadv_send_skb_to_orig (struct sk_buff *skb , struct
batadv_orig_node *orig_node , struct batadv_hard_iface *recv_if );
three arguments, one return value, zero drama (mostly). π«Ά
π ARGUMENTS π
skbβ the packet that's getting transmitted, aka the whole point of the operation. this is the main character of the function ngl πorig_nodeβ the final destination of the packet. not "next hop" β the actual final destination. don't get it twisted, bestie πrecv_ifβ the interface that was used when receiving the packet, and yes it can beNULLβ more on that in a sec π
π¦ DESCRIPTION π¦
so what actually happens? she looks up the best next-hop toward the originator you passed in (orig_node, remember her?), and then hands the skb off so the MAC header can get prepared. very "i got you, i'll take it from here" of her honestly πββοΈ
and here's the little caveat that matters: if the packet originated from this host, you can totally pass NULL as recv_if β and in that case no interface alternating is attempted. so like, no shuffling between interfaces, no fancy footwork, we're just going. periodt. β
π₯ RETURN π₯
three possible vibes, pay attention bestie:
- a negative
errnocode on a failure π (something went wrong, it did not slay) -EINPROGRESSif theskbis buffered for later transmit β she's not gone yet, she's waiting π- the
NET_XMITstatus returned by the lower routine, if the packet has been passed down β in which case the lower routine is the one reporting back, not us π
π SEE ALSO π
buckle up, this list is LONG and we're not skipping a single one β the whole squad is here:
- Kernel file
./net/batman-adv/send.c batadv_send_skb_packet(9)batadv_send_broadcast_skb(9)batadv_send_unicast_skb(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_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)
iykyk π§
quick vibe check before you go:recv_ifbeingNULLis only fine when the packet originated from this host. don't be out here passingNULLfor no reason, bestie, that's not the move π
and that's the page!! π sourced from the kernel file tree at ./net/batman-adv, dated October 2026, same batadv_send_skb_to_orig(9) energy as always β catch you in the next manpage, mwah πππ
π¦ 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