batadv_algo_select(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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:


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