batadv_netli...from_ifindex(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… batadv_netli...from_ifindex(9) β€” kernel API manual, but make it make sense ✨

okay so real talk, bestie: this is a page out of the Kernel API Manual (yes, that kernel manual), and the star of the show is batadv_netlink_get_hardif_from_ifindex. it lives in ./net/batman-adv, the date on it is October 2026, and it's giving "quiet little helper function that everyone depends on" energy. let's get into it 🫢


🌸 NAME 🌸

batadv_netlink_get_hardif_from_ifindex β€” Get hard-iface from ifindex. literally what it says on the tin, no cap.


πŸ¦‹ SYNOPSIS πŸ¦‹

struct batadv_hard_iface * batadv_netlink_get_hardif_from_ifindex
(struct batadv_priv *bat_priv , struct net *net , int ifindex );

that's the whole signature, bestie. three args, one pointer back. iconic.


πŸŽ€ ARGUMENTS πŸŽ€

  • bat_priv β€” the bat priv πŸ¦‡ with all the mesh interface information in it. it's the main character of this whole situation.
  • net β€” the applicable net namespace. which world are we in, yknow?
  • ifindex β€” index of the hard interface. the number that finds your fave.

πŸ”₯ RETURN πŸ”₯

Pointer to the hard interface (with increased refcnt β€” yes, it bumps the refcount, so mind your cleanup, bestie πŸ’€) on success. On error? you get an error pointer. that's it, that's the deal. πŸ™ˆ

ngl the refcnt bump is the part people forget β€” treat that pointer like borrowed merch, you gotta give it back.

⭐ SEE ALSO ⭐

Kernel file ./net/batman-adv/netlink.c enum β€” that's the neighborhood, go say hi πŸ‘‹

and the whole friend group, in order:

like, the whole netlink family reunion 😭 every single one of them, we did not skip a single cousin. periodt.


anyway that's the page!! go forth and resolve those ifindexes responsibly πŸ’– hope this slayed for you. source is ./net/batman-adv, manual dated October 2026, and the page header do be batadv_netli...from_ifindex(9) (yes, truncated, that's just how it ships β€” iykyk πŸ’…). mwah, bye bestie! πŸŒˆπŸ‘‘

πŸ“¦ where this page comes from