batadv_send_skb_to_orig(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 be NULL β€” 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 errno code on a failure 😭 (something went wrong, it did not slay)
  • -EINPROGRESS if the skb is buffered for later transmit β€” she's not gone yet, she's waiting πŸ•
  • the NET_XMIT status 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:

iykyk 🧚


quick vibe check before you go: recv_if being NULL is only fine when the packet originated from this host. don't be out here passing NULL for 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