__batadv_get_real_netdev(9)
π¦ __batadv_get_real_netdev(9) β a Kernel API Manual moment π
okay so bestie, welcome to the kernel API manual, the vibes edition β¨ this one lives in Kernel API Manual land and it's all about peeking behind the curtain of a netdev struct π
β¨ NAME β¨
__batadv_get_real_netdev β lowkey checks whether the netdev struct you handed it is actually a virtual interface sitting on top of another, more "real" interface π«Ά like is it the main character or just a costume, y'know?
πΈ SYNOPSIS πΈ
struct net_device * __batadv_get_real_netdev (struct net_device *netdev);
π ARGUMENTS π
netdevβ the device you're checking π the one on trial, the one getting the vibe check.
π DESCRIPTION π
okay so heads up, this is the important part: callers must hold the rtnl semaphore. no cap, you literally have to hold it before you call this. π
and also, like... you may want batadv_get_real_netdev instead of this one π this is the underscore-prefixed version, the "you'd better know what you're doing" version. iykyk.
π¦ RETURN π¦
it hands back the 'real' net device, or the original net device β and NULL in case of an error π so yeah, always check your pointers, bestie, periodt.
β SEE ALSO β
Kernel file ./net/batman-adv/hard-interface.c β go read it, it ate π
the whole friend group, in order:
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_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_hardif_get_active(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)
π«Ά reminder bestie: hold that rtnl semaphore. that's not a suggestion, that's a lifestyle. π₯
and that's the whole page, mwah π
okay so source-wise this all comes from ./net/batman-adv, dated October 2026, and the page is literally called __batadv_get_real_netdev(9) β that's the sign-off, go off queen πβ¨
π¦ 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