batadv_choos...xt_candidate(9)
π batadv_choose_next_candidate β Kernel API Manual β¨
okay so bestie, welcome to the Kernel API Manual π this one's a tiny little function page from the batman-adv world, and honestly? she's short but she matters. let's get into it π«Ά
πΈ NAME πΈ
batadv_choose_next_candidate β select the next DHT candidate π that's literally her whole job. no cap.
β¨ SYNOPSIS β¨
void batadv_choose_next_candidate (struct batadv_priv *bat_priv , struct
batadv_dat_candidate *cands , int select , batadv_dat_addr_t ip_key ,
batadv_dat_addr_t *last_max );
she returns void, she takes five args, she's booked and busy π
π¦ ARGUMENTS π¦
bat_privβ the bat priv with all the mesh interface information β¨ like, this is the whole main-character struct holding everything about the mesh interface, iykyk.candsβ candidates array π― the lineup of possible picks, bestie.selectβ number of candidates already present in the array π’ literally just how many are already sitting in there.ip_keyβ key to look up in the DHT π the thing you're searching for in the distributed hash table.last_maxβ pointer where the address of the selected candidate will be saved πΎ it does not return the answer, it writes it here. so like, don't forget to pass it or you get nothing, periodt.
π SEE ALSO π
so there's a whole friend group here, and the page says this all lives in the kernel file ./net/batman-adv/distributed-arp-table.c π β here's literally every single one of her mutuals, no skipping:
enum batadv_bootpop(9)enum batadv_boothtype(9)enum batadv_dhcpoptioncode(9)enum batadv_dhcptype(9)struct batadv_dhcp_packet(9)struct batadv_dhcp_header(9)struct batadv_dhcp_option_header(9)batadv_dat_start_timer(9)batadv_dat_entry_release(9)batadv_dat_entry_put(9)batadv_dat_to_purge(9)__batadv_dat_purge(9)batadv_dat_purge(9)batadv_compare_dat(9)batadv_arp_hw_src(9)batadv_arp_ip_src(9)batadv_arp_hw_dst(9)batadv_arp_ip_dst(9)batadv_hash_dat(9)batadv_dat_entry_hash_find(9)batadv_dat_entry_add(9)batadv_dbg_arp(9)batadv_is_orig_node_eligible(9)batadv_dat_select_candidates(9)batadv_dat_forward_data(9)batadv_dat_tvlv_container_update(9)batadv_dat_status_update(9)batadv_dat_tvlv_ogm_handler_v1(9)batadv_dat_hash_free(9)batadv_dat_init(9)batadv_dat_free(9)batadv_dat_cache_dump_entry(9)batadv_dat_cache_dump_bucket(9)batadv_dat_cache_dump(9)batadv_arp_get_type(9)batadv_dat_get_vid(9)batadv_dat_arp_create_reply(9)batadv_dat_snoop_outgoing_arp_request(9)batadv_dat_snoop_incoming_arp_request(9)batadv_dat_snoop_outgoing_arp_reply(9)batadv_dat_snoop_incoming_arp_reply(9)batadv_dat_check_dhcp_ipudp(9)batadv_dat_check_dhcp(9)batadv_dat_get_dhcp_message_type(9)batadv_dat_dhcp_get_yiaddr(9)batadv_dat_get_dhcp_chaddr(9)batadv_dat_put_dhcp(9)batadv_dat_check_dhcp_ack(9)batadv_dat_snoop_outgoing_dhcp_ack(9)batadv_dat_snoop_incoming_dhcp_ack(9)batadv_dat_drop_broadcast_packet(9)
like, that's the whole group chat π and every single one of them is invited, fr fr π
ngl this page is small but she's giving utility icon energy. if you're poking around the batman-adv distributed ARP table code, you're in the right place π
mwah π this gem lives in ./net/batman-adv, and she's dated October 2026 β so like, mark your calendar bestie, that's the source and the version stamp, and yes I'm mentioning them because they're literally the footer and we don't ghost footers in this house πβ¨ ok bye love u, go select some candidates π¦π
π¦ 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