ppp_proto_is_valid(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ppp_proto_is_valid(9) β€” like, the whole manual page, bestie

okay so welcome to ppp_proto_is_valid(9), the kernel API manual page that literally just checks if a PPP protocol number is valid ✨ it's a tiny little function but she's doing her job and we respect her for it 🫢


πŸŽ€ NAME πŸŽ€

ppp_proto_is_valid β€” checks if PPP protocol is valid πŸ‘‘

✨ SYNOPSIS ✨

bool ppp_proto_is_valid (u16 proto );

🌸 ARGUMENTS 🌸

  • proto β€” the PPP protocol πŸ’« (that's it, that's the whole argument, she's lowkey simple like that)

πŸ¦‹ DESCRIPTION πŸ¦‹

so the deal is this: this function assumes proto is not compressed πŸ™ˆ like, no compression going on here, that's not her problem, she's not checking for that.

A protocol is valid if the value is odd and the least significant bit of the most significant octet is 0 β€” and yes, that's real, that's literally the rule (see RFC 1661, section 2) πŸ“–βœ¨ iykyk.

so to recap, both conditions, no cap:

  1. the value is odd
  2. the least significant bit of the most significant octet is 0

both? valid. slay πŸ’…

🌈 SEE ALSO 🌈

  • Kernel file ./include/linux/ppp_defs.h β€” go read it, she's iconic
  • ppp_skb_is_compressed_proto(9) β€” the compressed-protocol sibling, main character energy fr fr

ngl, that's genuinely the entire function bestie β€” assumptions matter, so don't come for her when your proto is compressed, she told you upfront 😭

and that's a wrap! πŸŽ€ this little gem lives in ./include/linux, dated October 2026, and it's ppp_proto_is_valid(9) β€” go forth and validate those protocols, bestie, you're gonna ate it πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from