batadv_interface_rx(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… batadv_interface_rx(9)

okay so bestie, buckle up β€” this one's from the Kernel API Manual and it's literally the function that catches ethernet frames coming in on your local batman-adv interface πŸ¦‹


✨ NAME ✨

batadv_interface_rx β€” receive ethernet frame on local batman-adv interface πŸŽ€


✨ SYNOPSIS ✨

void batadv_interface_rx (struct net_device *mesh_iface , struct sk_buff
*skb , int hdr_size , struct batadv_orig_node *orig_node );

🫢 ARGUMENTS 🫢

  • mesh_iface β€” the local interface that's gonna receive the ethernet frame, iykyk πŸ’–
  • skb β€” the ethernet frame destined for mesh_iface πŸ“¦
  • hdr_size β€” the size of the batman-adv header that's already been parsed πŸ‘‘
  • orig_node β€” the originator that sent the batman-adv packet, no cap ⭐

🌸 DESCRIPTION 🌸

So what this does is send an ethernet frame to the receive path of the local mesh_iface β€” that's the whole vibe πŸ’…

Now here's the part you cannot skip: skb->data must still point to the batman-adv header, with the size hdr_size. Not "should" β€” must. And the caller has to have already parsed this header itself, plus made sure that at least hdr_size bytes are still available for pull in skb. Like, that's on you, not on this function πŸ™ˆ

fair warning bestie 😭 β€” the packet can still get dropped. That's just how it is.

It gets dropped when:

  • the encapsulated ethernet frame is invalid, or
  • it contains again a batman-adv packet (inception energy, we don't stan)

Also, unicast packets get dropped directly when they were sent between two isolated clients. no notes, that's the rule πŸ’€


πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./net/batman-adv/mesh-interface.c β€” and the whole friend group:


✨ that's the whole page, bestie ✨ it lives under ./net/batman-adv, dated October 2026, and the manual name up top is batadv_interface_rx(9). go forth and receive those frames πŸ’œπŸ¦‹πŸŽ€

πŸ“¦ where this page comes from