batadv_v_ogm_packet_recv(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– batadv_v_ogm_packet_recv β€” the OGM2 receiving handler, bestie πŸ’–

okay so quick vibe check: you're in the Kernel API Manual (yes, the whole manual, we're fancy now πŸ‘‘) and this page is all about batadv_v_ogm_packet_recv(9), aka the OGM2 receiving handler. it's giving "the person who answers the door when a packet shows up" energy, and honestly? iconic. ✨


🌸 SYNOPSIS 🌸

int batadv_v_ogm_packet_recv (struct sk_buff *skb , struct
       batadv_hard_iface *if_incoming );

that's it. that's the whole function signature. short, sweet, and about to Handle Business πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • skb β€” the received OGM πŸ“ like, the actual packet that just rolled up. this is the main character of the whole operation, ngl.
  • if_incoming β€” the interface where this OGM has been received πŸ¦‹ so we know which door it knocked on. very important for the plot.

⭐ RETURN ⭐

so here's how it goes down at the end:

  • NET_RX_SUCCESS and it consumes the skb on success πŸŽ‰ i.e. the skb gets eaten (respectfully) and everything slays.
  • NET_RX_DROP (and it frees the skb) on failure πŸ’€ so like, the packet didn't make it, but at least it's freed and not just... floating around being a memory leak. we love a clean exit.
lowkey important: both paths deal with the skb β€” one consumes it, one frees it. no skb left behind, periodt 🫢

πŸ”₯ SEE ALSO πŸ”₯

go check out the kernel file ./net/batman-adv/bat_v_ogm.c and all these sibling functions β€” the whole friend group, fr fr:


this page lives in ./net/batman-adv and it's stamped October 2026 🌈 (the version/source vibes, if you were wondering β€” and you were wondering, iykyk). anyway that's the whole page bestie, go read some OGM2 code, you're gonna do amazing, no cap πŸ’œπŸ§šπŸ¦‹

πŸ“¦ where this page comes from