batadv_iv_ogm_forward(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… batadv_iv_ogm_forward(9) β€” the Kernel API Manual, bestie edition

Okay so this page is from the Kernel API Manual and it's literally all about batadv_iv_ogm_forward, which is living over in ./net/batman-adv/bat_iv_ogm.c. Buckle up πŸŽ€

✨ NAME ✨

batadv_iv_ogm_forward β€” rebroadcast a received OGM πŸ¦‹

🌸 SYNOPSIS 🌸

void batadv_iv_ogm_forward (struct batadv_orig_node *orig_node , const
struct ethhdr *ethhdr , struct batadv_ogm_packet *batadv_ogm_packet ,
bool is_single_hop_neigh , bool is_from_best_next_hop , struct
batadv_hard_iface *if_incoming , struct batadv_hard_iface *if_outgoing
);

It returns void, so like… no return value to obsess over. It just does the thing. πŸ’…

🫢 ARGUMENTS 🫢

  • orig_node β€” the originator that sent the OGM, aka the main character πŸ‘‘
  • ethhdr β€” the ethernet header of the OGM packet
  • batadv_ogm_packet β€” the actual OGM packet that's about to get forwarded
  • is_single_hop_neigh β€” true if the OGM came in via a one-hop neighbour
  • is_from_best_next_hop β€” true if the sender is the currently selected best next hop towards orig_node ⭐
  • if_incoming β€” the interface where the packet was received
  • if_outgoing β€” the interface we should consider for the retransmission

πŸ”₯ DESCRIPTION πŸ”₯

So what does it do? Three things, in order, no cap:

  1. Decrements the TTL
  2. Applies the hop penalty
  3. Queues the OGM for retransmission

And here's the nuance, iykyk: OGMs that don't arrive over the best next hop are only forwarded for link-quality measurement reasons, and they get marked accordingly. Not because we're being nice, it's literally for the measurements πŸ’€

Fr fr, that "only forwarded for link-quality measurement" bit is the whole point β€” don't read into it as normal forwarding behaviour.

🌈 SEE ALSO 🌈

Kernel file ./net/batman-adv/bat_iv_ogm.c, plus the whole extended universe of friends:


And that's the whole page, bestie πŸ§šπŸ’œ Huge shoutout to the source path ./net/batman-adv and the October 2026 date stamp β€” they ate and left no crumbs. Periodt. πŸ“βœ¨

πŸ“¦ where this page comes from