IP_RECVTOS(2const)
π IP_RECVTOS π
okay bestie, so this is IP_RECVTOS from the <rainbow>2const</rainbow> corner of the Linux man-pages β a tiny little switch that makes your sockets spill the tea about incoming packets' Type of Service field. yes it's niche. yes it's iconic. let's go π
β¨ NAME β¨
IP_RECVTOS β receive IP_TOS control message π
π LIBRARY π
Standard C library (libc, -lc) β the classic, the blueprint, fr fr.
π¦ SYNOPSIS π¦
#include <netinet/in.h> /* Definition of IP* constants */
#include <sys/socket.h>
int setsockopt(int sockfd, IPPROTO_IP, IP_RECVTOS,
const int *enable, sizeof(int));
likeβ¦ copy it exactly, don't get cute with it π
π DESCRIPTION π
So here's the vibe: if you enable this, then the IP_TOS(2const) ancillary message gets passed along with incoming packets. obsessed. That message carries a single byte, and that byte specifies the Type of Service / Precedence field of the packet header. one byte. main character energy. π«
π© heads up bestie: this is not supported for SOCK_STREAM sockets. so don't come for me when it doesn't work there, it literally said so.
π ERRORS π
Not its own little list, nope β it says go read the others:
- See
IPPROTO_IP(2const). - See
setsockopt(2). - See
ip(7).
πΈ HISTORY πΈ
Linux 2.2. ancient. a legend. a pioneer. π«Ά
β SEE ALSO β
and that's the whole page, no notes π this tea was served up by Linux man-pages 6.20, dated 2025-11-25 β thank u for coming to my ted talk, mwah πβ¨π·
π¦ where this page comes from
- arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages 6.20
- π the page's license: Linux-man-pages-copyleft
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms