batadv_backbone_hash_find(9)
π batadv_backbone_hash_find β the Kernel API Manual page, but make it make sense β¨
okay so this is batadv_backbone_hash_find(9) from the Kernel API Manual, and bestie, it's a whole little function that goes digging in a hash table for you. Let's get into it π«Ά
πΈ NAME πΈ
batadv_backbone_hash_find β literally just looks for a backbone gateway in the hash π
No cap, that's the whole job description.
β¨ SYNOPSIS β¨
struct batadv_bla_backbone_gw * batadv_backbone_hash_find (struct
batadv_priv *bat_priv , const u8 *addr , unsigned short vid );
it's giving "give me three things and I'll give you a pointer (maybe)". π
π ARGUMENTS π
bat_privβ the bat priv π this is the one carrying all the mesh interface information, so like, the main character of the struct world.addrβ the address of the originator β¨ yes that address, the one you're hunting for.vidβ the VLAN ID π because nothing in networking is ever complete without a VLAN ID, apparently.
π RETURN π
backbone gateway if found, or NULL otherwise π«
that's it. that's the return value. found = a gateway, not found = NULL, and honestly the NULL case is the vibe check failing π
π₯ SEE ALSO π₯
first up, the source file you should absolutely go read:
- Kernel file
./net/batman-adv/bridge_loop_avoidance.cπ
and then the entire friend group π§ (yes, all of them, don't skip, iykwim):
batadv_choose_claim(9),batadv_choose_backbone_gw(9),batadv_compare_backbone_gw(9),batadv_compare_claim(9)batadv_backbone_gw_release(9),batadv_backbone_gw_put(9),batadv_claim_release(9),batadv_claim_put(9)batadv_claim_hash_find(9)batadv_bla_del_backbone_claims(9),batadv_bla_send_claim(9),batadv_bla_loopdetect_report(9)batadv_bla_get_backbone_gw(9),batadv_bla_update_own_backbone_gw(9)batadv_bla_answer_request(9),batadv_bla_send_request(9),batadv_bla_send_announce(9)batadv_bla_add_claim(9),batadv_bla_claim_get_backbone_gw(9),batadv_bla_del_claim(9)batadv_handle_announce(9),batadv_handle_request(9),batadv_handle_unclaim(9),batadv_handle_claim(9)batadv_check_claim_group(9),batadv_bla_process_claim(9)batadv_bla_purge_backbone_gw(9),batadv_bla_purge_claims(9)batadv_bla_update_orig_address(9),batadv_bla_send_loopdetect(9),batadv_bla_status_update(9)batadv_bla_periodic_work(9),batadv_bla_init(9)batadv_bla_check_duplist(9),batadv_bla_check_ucast_duplist(9),batadv_bla_check_bcast_duplist(9)batadv_bla_is_backbone_gw_orig(9),batadv_bla_is_backbone_gw(9)batadv_bla_free(9),batadv_bla_loopdetect_check(9)batadv_bla_rx(9),batadv_bla_tx(9)batadv_bla_claim_dump_entry(9),batadv_bla_claim_dump_bucket(9),batadv_bla_claim_dump(9)batadv_bla_backbone_dump_entry(9),batadv_bla_backbone_dump_bucket(9),batadv_bla_backbone_dump(9)batadv_bla_check_claim(9)
like, that's the whole bridge_loop_avoidance extended universe and you will be reading it π (affectionate)
ngl, if you came here looking for flags or config options β there are none. this is a plain C function, bestie. options are for man pages of the userland variety π
and that's the page!! shipped from ./net/batman-adv, dated October 2026 β go forth and find those backbone gateways, you absolute icon ππ
π¦ 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