batadv_hardi...le_interface(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 β€” the netdev struct of the interface you're adding to the mesh interface. This is the baby getting adopted into the mesh family πŸ₯Ί
  • mesh_iface β€” the netdev struct 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 πŸ“:

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