ptp_header_u...e_correction(9)
π ptp_header_u...e_correction(9) π
okay bestie so this is a page straight out of the Kernel API Manual and it's about a function with the longest name ever β ptp_header_update_correction. don't let the truncated title scare you, it's lowkey one little function doing one little job and it ate. let's get into it π«Ά
β¨ NAME β¨
ptp_header_update_correction β updates the correction field in a PTP header. that's it, that's the whole vibe π
πΈ SYNOPSIS πΈ
void ptp_header_update_correction (struct sk_buff *skb , unsigned int
type , struct ptp_header *hdr , s64 correction );
like look at her, four args, returns nothing, absolutely no notes π
π ARGUMENTS π
skbβ the packet buffer. the main character of every networking function fr.typeβ what kind of packet this is (go checkptp_classify_raw, she'll tell you).hdrβ the PTP header itself, the thing we're editing β¨correctionβ the shiny new correction value.s64, so it's got range, iykyk.
π¦ DESCRIPTION π¦
so what does this actually do? it updates the correction field of a PTP header, and it also updates the UDP checksum if UDP is used as transport. two for one, no cap π₯
and why does this function even exist? because of hardware. specifically hardware that's capable of one-step P2P but does not already modify the correction field of Pdelay_Req event messages on ingress. so we do it here instead. iconic of us tbh π
heads up bestie: read that carefully β the hardware does not already do it. that's the whole reason this function is here. don't skip that part π
β SEE ALSO β
- Kernel file
./include/linux/ptp_classify.h ptp_classify_raw(9)ptp_parse_header(9)ptp_get_msgtype(9)ptp_check_diff8(9)ptp_msg_is_sync(9)
the whole friend group, all in ./include/linux/ptp_classify.h. go say hi π
and that's the tea, bestie π this page lives in ./include/linux and dates allll the way to October 2026 β so when you're reading it, just know ptp_header_u...e_correction(9) is out here slaying in the Kernel API Manual, correction field updated, checksum handled, periodt π
β¨π§
π¦ 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