vti6_tnl_lookup(9)
π vti6_tnl_lookup β bestie's guide to the Kernel API Manual β¨
okay so picture this: you're deep in the kernel, you've got a struct net, you've got some IPv6 addresses, and you just need to find the tunnel. that's it. that's the whole vibe. welcome to vti6_tnl_lookup(9), straight out of the Kernel API Manual π
πΈ NAME πΈ
vti6_tnl_lookup β fetch tunnel matching the end-point addresses π¦
like, it goes and gets you the tunnel whose endpoints line up with what you asked for. no cap.
β¨ SYNOPSIS β¨
struct ip6_tnl * vti6_tnl_lookup (struct net *net , const struct
in6_addr *remote , const struct in6_addr *local );
she takes three args and hands you back a struct ip6_tnl *. iconic signature tbh π
π«Ά ARGUMENTS π«Ά
netβ network namespace π β the whole little universe the tunnel lives inremoteβ the address of the tunnel exit-point πͺ β where the traffic peaces outlocalβ the address of the tunnel entry-point π β where it all starts
π₯ RETURN π₯
okay so three possible outcomes, main character energy all around:
- tunnel matching given end-points, if found π β the slay scenario
- else the fallback tunnel, if its device is up π β runner-up but still valid
- else
NULLπ β bestie... nothing. it's giving empty search results
β SEE ALSO β
Kernel file ./net/ipv6/ip6_vti.c π and honestly the whole friend group:
vti6_tnl_bucket(9)vti6_locate(9)vti6_dev_uninit(9)vti6_addr_conflict(9)vti6_xmit(9)vti6_tnl_change(9)vti6_siocdevprivate(9)vti6_dev_setup(9)vti6_dev_init_gen(9)vti6_dev_init(9)vti6_fb_tnl_dev_init(9)vti6_tunnel_init(9)vti6_tunnel_cleanup(9)
ngl the fallback branch is lowkey the sneaky part β it's not just "did we find a match", it also checks that the fallback's device is up before handing it to you. vibe check passed or you get NULL. π
and that's the page, bestie! π brought to you from the source path ./net/ipv6, dated October 2026, filed under vti6_tnl_lookup(9) in the Kernel API Manual β mwah, go read the source, 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