__iptfs_iplen(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ __iptfs_iplen β€” kernel API manual, bestie edition ✨

okay so picture this: you're deep in the kernel, you've got a packet header, and you just need the length. That's it. That's the whole vibe. This function is the friend who reads the number off the envelope so you don't have to open it πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

u32 __iptfs_iplen (u8 *data );

Returns a u32, takes a u8 *, and yes that pointer is doing a lot of heavy lifting. Keep reading, iykyk 🌸


πŸ¦‹ ARGUMENTS πŸ¦‹

  • data β€” pointer to ip (v4/v6) packet header. literally just a pointer to the start of the packet header, that's the whole job 🫢

πŸ’– DESCRIPTION πŸ’–

Grab the IPv4 or IPv6 length value in the start of the inner packet header pointed to by data. Assumes data len is enough for the length field only.

so like β€” it's reaching into the start of the inner packet header that data points at, and pulling out the length value, whether that's v4 or v6 πŸ‘‘

important caveat though, no cap: it assumes the data len is enough for the length field only. Just the length field. Don't come for her expecting more, she's not checking πŸ™ˆ

The version data has been checked to be valid (i.e., either 4 or 6). So the v4/v6 situation is already sorted before you get here β€” you're not the one doing the vibe check, someone already did it for you ⭐


πŸ”₯ RETURN πŸ”₯

the length value. that's it. she ate and left no crumbs πŸ’€


πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./net/xfrm/xfrm_iptfs.c β€” and then the whole friend group, we love a full squad roll call πŸŽ€


okay and before you go β€” this little gem lives in ./net/xfrm, dated October 2026, and it goes by __iptfs_iplen(9) if you need to find her again πŸ’– mwah, go read some packet headers, ily 🧚

πŸ“¦ where this page comes from