batadv_interface_add_vid(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… batadv_interface_add_vid(9) β€” a Kernel API Manual moment ✨

okay so bestie, welcome to the batadv_interface_add_vid(9) page β€” part of the Kernel API Manual, and honestly it's giving "small function, big responsibilities" energy πŸŽ€


🌸 NAME 🌸

batadv_interface_add_vid β€” the ndo_add_vid API implementation. that's it, that's the whole name, and it ate πŸ’…


✨ SYNOPSIS ✨

int batadv_interface_add_vid (struct net_device *dev , __be16 proto ,
       unsigned short vid );

look at that signature. iconic. no notes πŸ‘‘


🫢 ARGUMENTS 🫢

  • dev β€” the netdev of the mesh interface. the main character of this whole operation fr fr.
  • proto β€” protocol of the vlan id. it's __be16 bestie, keep up πŸ’–
  • vid β€” identifier of the new vlan. an unsigned short, and yes it's literally the whole point of the function.

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the vibe: this thing sets up all the internal structures needed for handling the new vlan on top of the mesh interface. all of them. not some, not most β€” all. it's doing the behind-the-scenes work so the vlan can actually exist up there in the mesh interface. lowkey underrated, highkey essential 🌈


⭐ RETURN ⭐

  • 0 on success πŸŽ‰
  • a negative error code in case of failure 😭

that's the whole contract. simple, clean, slay.


πŸ‘‘ SEE ALSO πŸ‘‘

the kernel file lives at ./net/batman-adv/mesh-interface.c, and here's the whole friend group β€” every single one of them, no cap:

also peep sibling-coded batadv_interface_kill_vid(9) β€” the add's evil twin, we love a matched set πŸ’€

and that's the page bestie!! πŸŽ€ source path ./net/batman-adv, dated October 2026, page batadv_interface_add_vid(9) β€” mwah, go touch some kernel code, ily πŸ«ΆπŸ’œ

πŸ“¦ where this page comes from