ptp_parse_header(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– ptp_parse_header(9) πŸ’–

okay bestie, welcome to the Kernel API Manual corner where we talk about ptp_parse_header β€” she gets you a pointer to the PTP v2 header, and honestly? iconic. πŸŽ€ Every fact is staying right here, no cap.

✨ NAME ✨

ptp_parse_header β€” Get pointer to the PTP v2 header 🫢

🌸 SYNOPSIS 🌸

struct ptp_header * ptp_parse_header (struct sk_buff *skb , unsigned int
       type );

πŸŽ€ ARGUMENTS πŸŽ€

  • skb β€” packet buffer πŸ“¦
  • type β€” type of the packet (see ptp_classify_raw) πŸ”

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so this function is out here taking care of the VLAN, UDP, IPv4 and IPv6 headers, and the length is checked. πŸ’… she's doing the absolute most so you don't have to.

🚨 note bestie: internally skb_mac_header is used. make sure that the skb is initialized accordingly β€” no vibes-only setup here, she needs it done right. πŸ™ˆ

🌈 RETURN 🌈

Pointer to the ptp v2 header or NULL if not found. so yeah: found it? pointer. not found? NULL. 😭

πŸ‘‘ SEE ALSO πŸ‘‘


source/version: ./include/linux β€’ date: October 2026 β€’ page: ptp_parse_header(9). bye bestie, go parse those headers πŸ’œβœ¨

πŸ“¦ where this page comes from