ppp_proto_is_valid(9)
π 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:
- the value is odd
- 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
- 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