batadv_gw_get_selected_orig(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ batadv_gw_get_selected_orig(9) ✨

okay so this is a page from the Kernel API Manual bestie, and it's giving "how do I find out which gateway the mesh picked" energy πŸŽ€ lowkey one of the shorter ones, so we're gonna get through it together, no cap.


πŸ’– NAME πŸ’–

batadv_gw_get_selected_orig β€” literally just: get the originator of the currently selected gateway πŸ¦‹

🌸 SYNOPSIS 🌸

struct batadv_orig_node * batadv_gw_get_selected_orig (struct
       batadv_priv *bat_priv );

so you hand it a bat_priv pointer and it hands you back a struct batadv_orig_node *. cute. short. iconic. ✨

🫢 ARGUMENTS 🫢

  • bat_priv β€” the bat priv with all the mesh interface information πŸ’… like, this is the big bag of everything the mesh interface knows about itself, and yeah, it needs it.

πŸ‘‘ RETURN πŸ‘‘

the orig_node of the selected gateway β€” and important detail bestie, it comes back with an increased refcnt (so like, you're holding a reference now, don't just wander off and forget about it πŸ”₯), or NULL on errors 😭

🧚 SEE ALSO 🧚

all the siblings in the family, and yes they're all in the kernel file ./net/batman-adv/gateway_client.c iykyk:


ngl the refcnt thing is the one to remember β€” increased reference means somebody's gotta release it later, that's the whole vibe check πŸ’€

okay that's the page!! mwah πŸ’‹ this came out of ./net/batman-adv, dated October 2026, and honestly? slay. periodt. πŸŒˆβ­πŸ’œ

πŸ“¦ where this page comes from