batadv_primary_if_select(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… batadv_primary_if_select(9) β€” the Kernel API Manual glow-up πŸŽ€

okay so bestie, we're in the Kernel API Manual today, and the star of the show is batadv_primary_if_select ✨ (yes the whole page title is literally that, iykyk). she's a lil function with one job and she does it beautifully πŸ’–


🌸 NAME 🌸

batadv_primary_if_select β€” bestie's whole thing is selecting the new primary interface, no cap πŸ‘‘


✨ SYNOPSIS ✨

void batadv_primary_if_select (struct batadv_priv *bat_priv , struct
       batadv_hard_iface *new_hard_iface );

like, look at her signature. void return, two args, iconic behavior πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • bat_priv β€” the bat_priv that's holding all the mesh interface information 🫢 like she's carrying the whole group chat
  • new_hard_iface β€” the new primary interface. and plot twist: she may be NULL πŸ™ˆ (yes really, that's allowed)

πŸ”₯ DESCRIPTION πŸ”₯

so what she does is: she replaces the currently selected primary interface with new_hard_iface. simple. slay. πŸ’–

then β€” not done yet β€” she invokes the algorithm-specific primary_set hook βš™οΈ (whatever algorithm you're running gets its little moment, main character energy tbh).

and finally, she updates the originator MAC address 🌈 so everything stays in sync. three-step routine, ate and left no crumbs πŸ’€βœ¨


πŸ‘‘ SEE ALSO πŸ‘‘

the whole Kernel file is ./net/batman-adv/hard-interface.c and honestly she has SO many friends, here's the full squad πŸŽ€:

like, thirty-something references. she's connected. she's networked. literally πŸ•ΈοΈπŸ’œ


🫢 friendly reminder bestie: new_hard_iface can legit be NULL, that's in the docs, that's not me being messy πŸ’…

and that's the whole page, periodt πŸŽ€πŸ’– she lives in ./net/batman-adv, this doc is from October 2026, and the page is β€” say it with me β€” batadv_primary_if_select(9) βœ¨πŸ‘‘πŸŒΈ bye bestie, go read some more hard-interface.c πŸŒˆπŸ“

πŸ“¦ where this page comes from