ptp_classify_raw(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

okay so bestie, welcome to ptp_classify_raw(9) β€” the kernel API manual page that is literally here to classify a PTP packet. that’s the whole main-character job. πŸŽ€βœ¨

✨ SYNOPSIS ✨

unsigned int ptp_classify_raw (const struct sk_buff *skb );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • skb β€” buffer. yes, just the buffer. the packet is in there. no cap. πŸ’…

🌸 DESCRIPTION 🌸

so here’s the tea: it runs a minimal BPF dissector to classify a network packet and determine the PTP class. lowkey iconic. πŸ§šπŸ’–

if the skb does not contain any PTP protocol data, you get PTP_CLASS_NONE back. otherwise you get PTP_CLASS_V1_IPV{4,6}, PTP_CLASS_V2_IPV{4,6}, or PTP_CLASS_V2_{L2,VLAN} β€” depending on the packet content. that’s the classification lineup, periodt. πŸ”₯πŸ‘‘

bestie note: the returned class depends on what’s actually inside the packet, so the answer isn’t one fixed thing for every single skb. πŸ’€βœ¨

πŸ‘‘ SEE ALSO πŸ‘‘

kernel file ./include/linux/ptp_classify.h β€” yes, that file β€” plus these functions, bestie:


mwah πŸ’‹ β€” source/version ./include/linux, date October 2026, page ptp_classify_raw(9). bye bestie, go classify something cute 🫢🌈

πŸ“¦ where this page comes from