batadv_find_best_neighbor(9)
β¨ batadv_find_best_neighbor β¨
okay so bestie, pull up a chair π this one lives in the Kernel API Manual and it's called batadv_find_best_neighbor β and yes the name lowkey spoils the whole plot: it finds the best neighbor after purging. icon behavior, honestly π
πΈ SYNOPSIS πΈ
struct batadv_neigh_node * batadv_find_best_neighbor (struct batadv_priv
*bat_priv , struct batadv_orig_node *orig_node , struct
batadv_hard_iface *if_outgoing );
she returns a struct batadv_neigh_node *, no cap π¦
π ARGUMENTS π
bat_privβ the bat priv with all the mesh interface information. it's giving "the main character who holds everyone's info" πorig_nodeβ orig node which is to be checked. like, the one we're side-eyeing πif_outgoingβ the interface for which the metric should be compared. this is the vibe check interface, fr fr β¨
β RETURN β
the current best neighbor, with refcount increased. not me reminding you that the refcount goes UP β pls don't leak it, bestie ππ«Ά
π¦ SEE ALSO π¦
Kernel file ./net/batman-adv/originator.c, plus the whole friend group:
batadv_orig_hash_find(9)batadv_compare_orig(9)batadv_orig_node_vlan_get(9)batadv_vlan_id_valid(9)batadv_orig_node_vlan_new(9)batadv_orig_node_vlan_release(9)batadv_originator_init(9)batadv_neigh_ifinfo_release(9)batadv_hardif_neigh_release(9)batadv_neigh_node_release(9)batadv_orig_router_get(9)batadv_orig_to_router(9)batadv_orig_ifinfo_get(9)batadv_orig_ifinfo_new(9)batadv_neigh_ifinfo_get(9)batadv_neigh_ifinfo_new(9)batadv_neigh_node_get(9)batadv_hardif_neigh_create(9)batadv_hardif_neigh_get_or_create(9)batadv_hardif_neigh_get(9)batadv_neigh_node_create(9)batadv_neigh_node_get_or_create(9)batadv_hardif_neigh_dump(9)batadv_orig_ifinfo_release(9)batadv_orig_node_free_rcu(9)batadv_orig_node_release(9)batadv_originator_free(9)batadv_orig_node_new(9)batadv_purge_neigh_ifinfo(9)batadv_purge_orig_ifinfo(9)batadv_purge_orig_neighbors(9)batadv_purge_orig_node(9)batadv_purge_orig_ref(9)batadv_purge_orig(9)batadv_orig_dump(9)
and that's the whole page, bestie π sourced from ./net/batman-adv, dated October 2026, filed under batadv_find_best_neighbor(9) β slay, go read your kernel source now, iykyk ππ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms