vti6_tnl_lookup(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 in
  • remote β€” the address of the tunnel exit-point πŸšͺ β€” where the traffic peaces out
  • local β€” 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:


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