batadv_netlink_get_ifindex(9)
π batadv_netlink_get_ifindex(9) π
okay so real talk, this is a page out of the Kernel API Manual β the batadv_netlink_get_ifindex one, bestie. It lives in the batman-adv netlink corner of the kernel and it's genuinely so useful, iykyk. Let's get into it β¨
πΈ NAME πΈ
batadv_netlink_get_ifindex β literally just: pull an interface index out of a message π
β¨ SYNOPSIS β¨
int batadv_netlink_get_ifindex (const struct nlmsghdr *nlh , int
attrtype );
like, that's the whole signature, no notes π₯
π ARGUMENTS π
nlhβ the message header. the main character of this function fr, this is the message you're digging through π¦attrtypeβ the attribute that's holding the interface index. so like, which slot to look in π
β RETURN β
an interface index, or 0. that's it, that's the whole deal β if there's an index it gives it to you, and if not you get a 0. no cap π
π§ SEE ALSO π§
the kernel file this lives in is ./net/batman-adv/netlink.c, and there's a whole lil squad of related things β honestly an iconic lineup, look at all these besties:
- enum
batadv_netlink_multicast_groups(9) - enum
batadv_genl_ops_flags(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_ifindex(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)
ok that's the whole page, you're officially caught up bestie π
and a lil sign-off for the credits: this one's from ./net/batman-adv, dated October 2026, and the page itself is batadv_netlink_get_ifindex(9). slay, go read the source π«ΆπΈ
π¦ 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