batadv_hardif_get_active(9)
π batadv_hardif_get_active β the kernel API manual page, bestie edition
Okay so this is batadv_hardif_get_active(9) from the Kernel API Manual, and it's lowkey one of the chillest little functions in the whole batman-adv cinematic universe. It's giving "short and sweet", it's giving "one job", and honestly? Iconic. π
β¨ NAME β¨
batadv_hardif_get_active β retrieve an active hard interface for a mesh interface π¦
Like, you hand it a mesh interface and it goes and finds you a hard interface that's actually active. Matchmaker energy fr fr. π
πΈ SYNOPSIS πΈ
struct batadv_hard_iface * batadv_hardif_get_active (struct net_device
*mesh_iface );
Not me writing struct net_device with a little line break in the middle because that's literally how the manual page shows it π keep it exactly like that, no cap.
π ARGUMENTS π
mesh_ifaceβ mesh interface to search π that's it, that's the whole argument list. The mesh interface you're searching through. The main character of the parameter list, honestly.
β RETURN β
It returns the first hard interface in BATADV_IF_ACTIVE state attached to mesh_iface β first one it finds, periodt, no shopping around π
β¦or NULL if none is active. Yeah. If there's nothing active to hand you, you get NULL, and you gotta deal with that. Kind of a vibe check fail but okay π«Ά
Heads up bestie: NULL is a totally real possible return value here, so please check before you go dereferencing. Do not be the person who raw-dogs a pointer. π
π SEE ALSO π
So this function lives in the kernel file ./net/batman-adv/hard-interface.c, and it is surrounded by friends. Look at this squad:
batadv_hardif_release(9)batadv_hardif_get_by_netdev(9)batadv_getlink_net(9)batadv_mutual_parents(9)batadv_is_on_batman_iface(9)batadv_is_valid_iface(9)__batadv_get_real_netdev(9)batadv_get_real_netdev(9)batadv_is_wext_netdev(9)batadv_is_cfg80211_netdev(9)batadv_wifi_flags_evaluate(9)batadv_netdev_get_wifi_flags(9)batadv_hardif_get_wifi_flags(9)batadv_is_wifi_hardif(9)batadv_hardif_no_broadcast(9)batadv_primary_if_update_addr(9)batadv_primary_if_select(9)batadv_hardif_is_iface_up(9)batadv_check_known_mac_addr(9)batadv_hardif_recalc_extra_skbroom(9)batadv_hardif_min_mtu(9)batadv_update_min_mtu(9)batadv_hardif_activate_interface(9)batadv_hardif_deactivate_interface(9)batadv_hardif_enable_interface(9)batadv_hardif_disable_interface(9)batadv_hard_if_event_meshif(9)batadv_wifi_net_device_insert(9)batadv_wifi_net_device_remove(9)batadv_wifi_net_device_update(9)batadv_wifi_net_device_unregister(9)batadv_wifi_net_device_event(9)batadv_hard_if_event(9)batadv_wifi_net_devices_init(9)batadv_wifi_net_devices_deinit(9)
Thirty-five whole references. Thirty-five!! Nobody's doing it like the batman-adv hard-interface crew, I fear. ππ₯
π§ sign-off π§
And that's the page, bestie! π This little gem came to you from the ./net/batman-adv source tree, printed in the Kernel API Manual, dated October 2026 β go forth, find your active hard interface, and slay. πβ¨π¦πΈπ
π¦ 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