__iptfs_iplen(9)
β¨ __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 π
IPTFS_DEFAULT_DROP_TIME_USECS(9)IPTFS_DEFAULT_REORDER_WINDOW(9)IPTFS_DEFAULT_INIT_DELAY_USECS(9)IPTFS_DEFAULT_MAX_QUEUE_SIZE(9)struct xfrm_iptfs_config(9)struct xfrm_iptfs_data(9)iptfs_alloc_skb(9)iptfs_skb_head_to_frag(9)struct iptfs_skb_frag_walk(9)iptfs_skb_prepare_frag_walk(9)iptfs_skb_can_add_frags(9)iptfs_skb_add_frags(9)iptfs_pskb_add_frags(9)iptfs_pskb_extract_seq(9)iptfs_input_save_runt(9)__iptfs_iphlen(9)iptfs_complete_inner_skb(9)iptfs_reassem_abort(9)iptfs_reassem_done(9)iptfs_reassem_cont(9)iptfs_input_ordered(9)iptfs_drop_timer(9)iptfs_input(9)iptfs_enqueue(9)iptfs_copy_create_frag(9)iptfs_copy_create_frags(9)iptfs_first_skb(9)iptfs_encap_add_ipv4(9)iptfs_encap_add_ipv6(9)iptfs_prepare_output(9)__iptfs_get_inner_mtu(9)iptfs_get_inner_mtu(9)iptfs_user_init(9)
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
- 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