batadv_netli...from_ifindex(9)
π
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:
batadv_netlink_multicast_groups(9)batadv_genl_ops_flags(9)batadv_netlink_get_ifindex(9)batadv_netlink_mesh_fill_ap_isolation(9)batadv_netlink_set_mesh_ap_isolation(9)batadv_netlink_mesh_fill(9)batadv_netlink_notify_mesh(9)batadv_netlink_get_mesh(9)batadv_netlink_set_mesh(9)batadv_netlink_tp_meter_put(9)batadv_netlink_tpmeter_notify(9)batadv_netlink_tp_meter_start(9)batadv_netlink_tp_meter_cancel(9)batadv_netlink_hardif_fill(9)batadv_netlink_notify_hardif(9)batadv_netlink_cmd_get_hardif(9)batadv_netlink_set_hardif(9)batadv_netlink_dump_hardif(9)batadv_netlink_vlan_fill(9)batadv_netlink_notify_vlan(9)batadv_netlink_get_vlan(9)batadv_netlink_set_vlan(9)batadv_netlink_get_meshif_from_ifindex(9)batadv_netlink_get_meshif_from_info(9)batadv_netlink_get_meshif(9)batadv_netlink_get_hardif_from_info(9)batadv_netlink_get_hardif(9)batadv_get_vlan_from_info(9)batadv_pre_doit(9)batadv_post_doit(9)batadv_netlink_register(9)batadv_netlink_unregister(9)
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
- 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