ip6_tnl_siocdevprivate(9)
π ip6_tnl_siocdevprivate(9) β the Kernel API Manual page you didn't know you needed π
okay so bestie, welcome to the Kernel API Manual, section 9, and today's main character is ip6_tnl_siocdevprivate β¨ she configures ipv6 tunnels from userspace and she is, honestly, kind of iconic for it π
πΈ NAME πΈ
ip6_tnl_siocdevprivate β configure ipv6 tunnels from userspace π οΈπ
β¨ SYNOPSIS β¨
int ip6_tnl_siocdevprivate (struct net_device *dev , struct ifreq *ifr ,
void __user *data , int cmd );
like, that's the whole signature, no cap π₯
π¦ ARGUMENTS π¦
devβ the virtual device that's associated with the tunnel π she's the one holding the tunnel vibesifrβ unused π literally just sitting there, not contributing, we still love herdataβ the parameters that got passed down from userspace π¦cmdβ the command that's gonna be performed β‘
π DESCRIPTION π
so ip6_tnl_ioctl is the one doing the actual managing of IPv6 tunnels from userspace, periodt π
the possible commands are the following, 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 the fallback device "ip6tnl0" β created during module initialization β can be used for creating other tunnel devices π± she's giving founding mother energy, honestly obsessed π«Ά
π RETURN π
0on success π slay-EFAULTif unable to copy data to or from userspace π the copy failed bestie-EPERMif the current process hasn'tCAP_NET_ADMINset π« no permission, no tunnel-EINVALif the passed tunnel parameters are invalid π-EEXISTif changing a tunnel's parameters would cause a conflict βοΈ-ENODEVif attempting to change or delete a nonexisting device π» she's not there, girl
π SEE ALSO π
go look at the Kernel file ./net/ipv6/ip6_tunnel.c π and then the whole friend group:
ip6_tnl_lookup(9), ip6_tnl_bucket(9), ip6_tnl_link(9), ip6_tnl_unlink(9), ip6_tnl_create(9), ip6_tnl_locate(9), ip6_tnl_dev_uninit(9), ip6_tnl_parse_tlv_enc_lim(9), ip6_tnl_addr_conflict(9), ip6_tnl_xmit(9), ip6_tnl_change(9), ip6_tnl_change_mtu(9), ip6_tnl_dev_setup(9), ip6_tnl_dev_init_gen(9), ip6_tnl_dev_init(9), ip6_fb_tnl_dev_init(9), ip6_tunnel_init(9), ip6_tunnel_cleanup(9)
and that's the page!! π« this one's from ./net/ipv6, dated October 2026, and it's the ip6_tnl_siocdevprivate(9) moment β mwah, go configure some tunnels, ily ππ
π
π¦ 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