batadv_gw_get_selected_orig(9)
β¨ 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:
batadv_gw_node_release(9)batadv_gw_get_selected_gw_node(9)batadv_gw_select(9)batadv_gw_reselect(9)batadv_gw_check_client_stop(9)batadv_gw_election(9)batadv_gw_check_election(9)batadv_gw_node_add(9)batadv_gw_node_get(9)batadv_gw_node_update(9)batadv_gw_node_delete(9)batadv_gw_node_free(9)batadv_gw_dump(9)batadv_gw_dhcp_recipient_get(9)batadv_gw_out_of_range(9)
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
- 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