batadv_hardi...le_interface(9)
π batadv_hardif_enable_interface(9) β like, the kernel API manual, but make it make sense π
okay bestie, so this whole page lives in the Kernel API Manual (yes, the (9) section, we love a kernel-internals moment π₯), and honestly? It's giving "one little function, one big job". Let's get into it β¨
πΈ NAME πΈ
batadv_hardif_enable_interface β no cap, this thing enslaves an interface to a mesh interface π¦
Like, it takes a normal network interface and ropes it into doing batman-adv mesh work. Slay, honestly. π
β¨ SYNOPSIS β¨
int batadv_hardif_enable_interface (struct net_device *net_dev , struct
net_device *mesh_iface );
So it returns an int, takes two struct net_device * pointers, and yes that spacing is exactly how the manual prints it β we do NOT edit the source material in this house π
π«Ά ARGUMENTS π«Ά
net_devβ thenetdevstruct of the interface you're adding to the mesh interface. This is the baby getting adopted into the mesh family π₯Ίmesh_ifaceβ thenetdevstruct of the mesh interface itself. This is the parent, the main character, the one with the vibe π
π RETURN π
0 on success π β or a negative error number if things go wrong π (classic kernel move: zero means good, negative means go touch grass and read errno).
fr fr, check that return value. 0 = the interface got enslaved, no problem. Anything negative = it didn't, and the number tells you why.
π¦ SEE ALSO π¦
First up, the actual kernel file this lives in:
- Kernel file
./net/batman-adv/hard-interface.c
and then, because batman-adv has, like, a lot of friends π« β every single one of them, bestie, all thirty-five π:
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_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_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)
iykyk β that's the whole hard-interface.c friend group π (yes, batadv_hardif_enable_interface's mirror-image buddy batadv_hardif_disable_interface(9) is in there, obviously, they come as a set π§)
π sign-off π
This lil masterpiece lives under the source path ./net/batman-adv, and it's dated October 2026 β so like, mark your calendars bestie, the mesh is eternal βπ
periodt. 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