vti6_siocdevprivate(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– vti6_siocdevprivate(9) β€” the kernel API manual, but make it make sense πŸ’–

okay so bestie, welcome to vti6_siocdevprivate(9) from the Kernel API Manual ✨ this is the little function that lets userspace boss around your vti6 tunnels, and honestly? she's giving gatekeeper energy πŸ‘‘


🌸 NAME 🌸

vti6_siocdevprivate β€” configure vti6 tunnels from userspace πŸŽ€

✨ SYNOPSIS ✨

int vti6_siocdevprivate (struct net_device *dev , struct ifreq *ifr ,
void __user *data , int cmd );

🫢 ARGUMENTS 🫢

  • dev β€” the virtual device that's associated with the tunnel πŸ’…
  • ifr β€” literally unused, she's just here for the vibes πŸ™ˆ
  • data β€” the parameters passed in from userspace πŸ“
  • cmd β€” the command you want performed πŸ‘‘

πŸ¦‹ DESCRIPTION πŸ¦‹

so vti6_siocdevprivate is the function you use for managing vti6 tunnels from userspace. no cap, that's her whole job πŸ’œ

the possible commands are these, and yes you need to know all of them:

  • SIOCGETTUNNEL β€” get tunnel parameters for device
  • SIOCADDTUNNEL β€” add tunnel matching given tunnel parameters
  • SIOCCHGTUNNEL β€” change tunnel parameters to those given
  • SIOCDELTUNNEL β€” delete tunnel

and here's a cute detail: the fallback device "ip6_vti0", created during module initialization, can be used for creating other tunnel devices 🌈 iconic behaviour tbh

πŸ”₯ RETURN πŸ”₯

  • 0 on success ✨ we love a clean win
  • -EFAULT if unable to copy data to or from userspace 😭
  • -EPERM if current process hasn't CAP_NET_ADMIN set πŸ’€ (no permission, no tunnel, sorry bestie)
  • -EINVAL if passed tunnel parameters are invalid πŸ™ˆ
  • -EEXIST if changing a tunnel's parameters would cause a conflict 😬
  • -ENODEV if attempting to change or delete a nonexisting device πŸ‘»
fr fr, that -EPERM one will get you if you forgot CAP_NET_ADMIN β€” check it before you start blaming the tunnel πŸ’…

πŸ’€ SEE ALSO πŸ’€

Kernel file ./net/ipv6/ip6_vti.c β€” go read the source, she ate πŸ‘‘


and that's the whole page, bestie 🌟 this one came from ./net/ipv6, dated October 2026, and it lives under the name vti6_siocdevprivate(9) β€” go forth and configure those tunnels, mwah πŸ’‹πŸŽ€

πŸ“¦ where this page comes from