IP_RETOPTS(2const)
β¨ IP_RETOPTS β¨
okay so bestie, welcome to IP_RETOPTS(2const) β yes it's a section 2 const page, iykyk π
πΈ NAME πΈ
IP_RETOPTS β receive most incoming IP options in control message π
π LIBRARY π
Standard C library (libc, -lc) π«Ά
π¦ SYNOPSIS π¦
#include <netinet/in.h> /* Definition of IP* constants */
#include <sys/socket.h>
int setsockopt(int sockfd, IPPROTO_IP, IP_RETOPTS,
const int *enabled, sizeof(int));
π DESCRIPTION π
So this one is literally identical to IP_RECVOPTS(2const) β like, same energy, same behaviour β except it hands you back the raw, unprocessed options instead of the cooked version. And by raw i mean: the timestamp and route record options are not filled in for this hop. not filled in, periodt. π«£
important bestie: this is not supported for SOCK_STREAM sockets π don't try it, it's giving undefined behaviour.
π ERRORS π
for the error tea, go check IPPROTO_IP(2const). also check setsockopt(2). also check ip(7). that's the trio, no cap πβ¨
π HISTORY π
Linux 2.2 β yeah she's a vintage icon, been here since the olden days π°οΈπ
π₯ SEE ALSO π₯
and that's the whole vibe, bestie β go forth and read your IP options raw, main character energy only ππ
with love, from the Linux man-pages 6.20 girlies, dated 2025-11-25 ππ
π¦ 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