batadv_iv_ogm_neigh_cmp(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… batadv_iv_ogm_neigh_cmp β€” the neighbor metrics glow-up comparison

okay so bestie, you've pulled up batadv_iv_ogm_neigh_cmp(9) out of the Kernel API Manual (section 9, kernel API land, we love that for us), and honestly? this one is giving "who wore it better" but for mesh neighbors 🌸 like it literally just looks at two neighbors and tells you whose metric is serving more.

no cap, it's a tiny function, but it's lowkey the vibe-check referee for batman-adv's OGMs. let's get into it 🫢


✨ NAME ✨

batadv_iv_ogm_neigh_cmp β€” compare the metrics of two neighbors πŸ’…

πŸ¦‹ SYNOPSIS πŸ¦‹

int batadv_iv_ogm_neigh_cmp (struct batadv_neigh_node *neigh1 , struct batadv_hard_iface *if_outgoing1 , struct batadv_neigh_node *neigh2 , struct batadv_hard_iface *if_outgoing2 );

πŸŽ€ ARGUMENTS πŸŽ€

okay so the function takes four things, and yes you need all of them, no skipping πŸ‘‘

  • neigh1 β€” the first neighbor object of the comparison. the main character of this matchup πŸ’–
  • if_outgoing1 β€” the outgoing interface for the first neighbor. where neighbor one is headed out πŸ¦‹
  • neigh2 β€” the second neighbor object of the comparison. the challenger, the rival, the other half of the bracket ✨
  • if_outgoing2 β€” the outgoing interface for the second neighbor. neighbor two's exit door πŸšͺ

🌸 RETURN 🌸

it gives you back an int, and the sign is the whole personality:

  • less than 0 β†’ the metric via neigh1 is lower than the metric via neigh2 πŸ’€
  • equal to 0 β†’ the metric via neigh1 is the same as the metric via neigh2 🫢
  • greater than 0 β†’ the metric via neigh1 is higher than the metric via neigh2 πŸ”₯

basically: negative, zero, positive = lower, same, higher. periodt πŸ’…

πŸ‘‘ SEE ALSO πŸ‘‘

the whole friend group, and yes i'm listing every single one because they all ate πŸ“

Kernel file ./net/batman-adv/bat_iv_ogm.c, enum batadv_dup_status(9), batadv_ring_buffer_set(9), batadv_ring_buffer_avg(9), batadv_iv_ogm_orig_get(9), batadv_iv_ogm_neigh_new(9), batadv_iv_ogm_iface_enable(9), batadv_iv_ogm_iface_disable(9), batadv_iv_ogm_iface_update_mac(9), batadv_iv_ogm_primary_iface_set(9), batadv_iv_ogm_emit_send_time(9), batadv_iv_ogm_fwd_send_time(9), batadv_hop_penalty(9), batadv_iv_ogm_aggr_packet(9), batadv_iv_ogm_send_to_if(9), batadv_iv_ogm_emit(9), batadv_iv_ogm_can_aggregate(9), batadv_iv_ogm_aggregate_new(9), batadv_iv_ogm_aggregate(9), batadv_iv_ogm_queue_add(9), batadv_iv_ogm_forward(9), batadv_iv_ogm_slide_own_bcast_window(9), batadv_iv_ogm_schedule_buff(9), batadv_iv_ogm_schedule(9), batadv_iv_ogm_reschedule(9), batadv_iv_orig_ifinfo_sum(9), batadv_iv_ogm_neigh_ifinfo_sum(9), batadv_iv_ogm_orig_update(9), batadv_iv_ogm_calc_tq(9), batadv_iv_ogm_update_seqnos(9), batadv_orig_to_direct_router(9), batadv_iv_ogm_process_per_outif(9), batadv_iv_ogm_process_reply(9), batadv_iv_ogm_process(9), batadv_iv_send_outstanding_bat_ogm_packet(9), batadv_iv_ogm_receive(9), batadv_iv_ogm_neigh_get_tq_avg(9), batadv_iv_ogm_orig_dump_subentry(9), batadv_iv_ogm_orig_dump_entry(9), batadv_iv_ogm_orig_dump_bucket(9), batadv_iv_ogm_orig_dump(9), batadv_iv_ogm_neigh_diff(9), batadv_iv_ogm_neigh_dump_neigh(9), batadv_iv_ogm_neigh_dump_hardif(9), batadv_iv_ogm_neigh_dump(9), batadv_iv_ogm_neigh_is_sob(9), batadv_iv_iface_enabled(9), batadv_iv_init_sel_class(9), batadv_iv_gw_get_best_gw_node(9), batadv_iv_gw_is_eligible(9), batadv_iv_gw_dump_entry(9), batadv_iv_gw_dump(9), batadv_iv_init(9), batadv_iv_deinit(9)


and that's the whole page bestie, you ate that πŸ’œ

shoutout to where this page lives β€” ./net/batman-adv β€” and it's stamped October 2026, so it's basically a time capsule from the future πŸ•°οΈβœ¨ mwah, go compare some neighbors, ily πŸŽ€

πŸ“¦ where this page comes from