IP_RECVTOS(2const)

πŸ“¦
version 6.20 Β· 4 versions
, in arch rolling, nixpkgs unstable

πŸ’– 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:

🌸 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