batadv_orig_ifinfo_new(9)
β¨ batadv_orig_ifinfo_new(9) β¨
okay so this is a page from the Kernel API Manual (the batadv_orig_ifinfo_new one, bestie, keep up π
) and it's literally just one function doing a vibe check on your orig nodes and then, if the vibe isn't there yet, making the vibe. iconic behavior tbh.
πΈ NAME πΈ
batadv_orig_ifinfo_new β search and possibly create an orig_ifinfo object π¦
like, it goes looking for one, and if it can't find one it just... builds it. main character energy fr.
β¨ SYNOPSIS β¨
struct batadv_orig_ifinfo * batadv_orig_ifinfo_new (struct batadv_orig_node *orig_node , struct batadv_hard_iface *if_outgoing );
π ARGUMENTS π
orig_nodeβ the orig node you wanna query, bestie. that's the one you're asking about πif_outgoingβ the interface you want the ifinfo for. like, which interface is this info even about π§
π RETURN π
So it returns NULL if things go sideways (failure, no cap π) β otherwise you get back the orig_ifinfo object for the if_outgoing interface. And here's the cute part: if that object didn't exist yet, it gets created and added to the list for you. it's giving "i got you" π«Ά
π DESCRIPTION π
The object comes back to you with its refcounter increased by 1. literally one (1) more ref. don't forget to give it back later, iykyk π
β SEE ALSO β
The kernel file this lives in is ./net/batman-adv/originator.c β that's home base π and the whole squad is here:
- the orig-node finding/creating crew:
batadv_orig_hash_find(9),batadv_compare_orig(9),batadv_orig_node_new(9) - the vlan girlies:
batadv_orig_node_vlan_get(9),batadv_vlan_id_valid(9),batadv_orig_node_vlan_new(9),batadv_orig_node_vlan_release(9) - the originator lifecycle:
batadv_originator_init(9),batadv_originator_free(9),batadv_orig_node_free_rcu(9),batadv_orig_node_release(9) - ifinfo + routing:
batadv_orig_ifinfo_get(9),batadv_orig_ifinfo_release(9),batadv_orig_router_get(9),batadv_orig_to_router(9) - neighbor ifinfo things:
batadv_neigh_ifinfo_release(9),batadv_neigh_ifinfo_get(9),batadv_neigh_ifinfo_new(9),batadv_purge_neigh_ifinfo(9) - hardif neighbor things:
batadv_hardif_neigh_release(9),batadv_hardif_neigh_create(9),batadv_hardif_neigh_get_or_create(9),batadv_hardif_neigh_get(9),batadv_hardif_neigh_dump(9) - neighbor nodes:
batadv_neigh_node_release(9),batadv_neigh_node_get(9),batadv_neigh_node_create(9),batadv_neigh_node_get_or_create(9),batadv_find_best_neighbor(9) - the purge patrol π₯:
batadv_purge_orig_ifinfo(9),batadv_purge_orig_neighbors(9),batadv_purge_orig_node(9),batadv_purge_orig_ref(9),batadv_purge_orig(9) - and the dump:
batadv_orig_dump(9)
ngl if you're reading the originator code you should probably read the release/purge ones too β that's where the refcounting lore lives π
okay that's the whole page, love u, go read some kernel code π β it's from ./net/batman-adv, dated October 2026, and the page itself is batadv_orig_ifinfo_new(9). slay, 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