batadv_algo_select(9)
π batadv_algo_select(9) β the Kernel API Manual glow-up
okay bestie, so this one lives in the Kernel API Manual under the name batadv_algo_select(9) and honestly? she's a little picky about when you're allowed to call her. let's get into it π
β¨ NAME β¨
batadv_algo_select β literally the function that picks which algorithm your mesh interface is gonna run on π₯
π¦ SYNOPSIS π¦
int batadv_algo_select (struct batadv_priv *bat_priv , const char *name
);
πΈ ARGUMENTS πΈ
bat_privβ the bat priv that's holding all the mesh interface info. she's the main character here πnameβ the name of the algorithm you wanna select. just a string, no cap π
π DESCRIPTION π
so here's the vibe: once the algorithm with the correct name gets found, the algorithm callbacks for the mesh interface get set. that's the slay part. β¨
but the plot twist π β any previously selected algorithm will not be deinitialized, and the newly selected algorithm will also not be initialized. neither. nothing gets torn down, nothing gets set up. it's giving "just vibes, no lifecycle management."
so because of that, it is not allowed to call batadv_algo_select outside the creation function of the mesh interface. fr fr. that's the rule bestie, please don't test it π
π RETURN π
0 on success, or a negative error number if it fails. that's it, that's the whole mood π«Ά
β SEE ALSO β
peep the kernel file ./net/batman-adv/bat_algo.c and also these iconic siblings:
batadv_algo_init(9)batadv_algo_get(9)batadv_algo_register(9)batadv_param_set_ra(9)batadv_algo_dump_entry(9)batadv_algo_dump(9)
and that's the whole page, bestie π this one's from ./net/batman-adv, dated October 2026 β go read the source, ily, bye π§β¨
π¦ 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