__iptfs_iphlen(9)
π
__iptfs_iphlen (9) β Kernel API Manual
okay so bestie, welcome to __iptfs_iphlen(9), a tiny little function from the kernel API manual that is genuinely doing the most for such a small name. she's short, she's sweet, she tells you how big an IP header is. icon behavior, honestly.
β¨ NAME β¨
__iptfs_iphlen β returns the v4/v6 header length, and she does it by peeking at packet data. that's it, that's the whole job π
πΈ SYNOPSIS πΈ
u32 __iptfs_iphlen (u8 *data );
π¦ ARGUMENTS π¦
dataβ pointer at the octet that holds the version nibble. like, that specific byte, the one with the version vibe living in its top bits π«Ά
π DESCRIPTION π
so the version in data has already been checked and confirmed valid, meaning it's either 4 or 6. no cap, that validation already happened before you got here β this function is not out here doing vibe checks on untrusted input, she trusts you π
β RETURN β
she gives you back the IP header size, based on the IP version. simple. clean. main character energy π
π SEE ALSO π
the whole friend group, fr fr β the kernel file ./net/xfrm/xfrm_iptfs.c plus:
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_iplen(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)
ngl this page is like three sentences long and i respect that so much. no filler, no yapping, just header length π
and that's the whole thing bestie!! this came out of ./net/xfrm and it's dated October 2026 β stan a tidy little kernel manual page πβ¨π§
π¦ 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