batadv_v_neigh_cmp(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– batadv_v_neigh_cmp(9) πŸ’–

okay so this page lives in the Kernel API Manual (yes, that's the manual name, we're fancy now ✨) and it's literally about comparing two B.A.T.M.A.N. V neighbours by throughput. bestie, it's giving "who's the better neighbour" energy and honestly we're obsessed πŸ’…


🌸 NAME 🌸

batadv_v_neigh_cmp β€” compare two B.A.T.M.A.N. V neighbours by throughput πŸ¦‹


✨ SYNOPSIS ✨

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

like, that's the whole signature, no cap 🫢


πŸŽ€ ARGUMENTS πŸŽ€

  • neigh1 β€” the first neighbour we're comparing, main character #1 πŸ‘‘
  • if_outgoing1 β€” the outgoing interface to use for neigh1 (yes, it gets its own interface, slay)
  • neigh2 β€” the second neighbour in the lineup, main character #2 πŸ’œ
  • if_outgoing2 β€” the outgoing interface to use for neigh2, iconic ✨
ngl the interface pairing matters β€” neigh1 goes with if_outgoing1, and neigh2 goes with if_outgoing2. don't mix them up, i'm begging πŸ™ˆ

⭐ RETURN ⭐

so here's the vibe check result:

  • a positive value if neigh1 is better πŸ”₯
  • a negative value if neigh2 is better πŸ’€
  • and 0 if both have equal throughput 🀝 (a tie, we love a peaceful ending)

🌈 SEE ALSO 🌈

the kernel file is ./net/batman-adv/bat_v.c and honestly the whole friend group is here, fr fr:


that's the whole page bestie, go forth and compare neighbours responsibly πŸ’–βœ¨πŸŽ€

source path: ./net/batman-adv Β· dated October 2026 Β· mwah, that's a wrap πŸ«ΆπŸ’…

πŸ“¦ where this page comes from