IP_RETOPTS(2const)

IP_RETOPTS2const

Receive most incoming ip options in control message

Usage

#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));

Library

Standard C library (libc, -lc)

Overview

Identical to IP_RECVOPTS(2const), but returns raw unprocessed options with timestamp and route record options not filled in for this hop.

Not supported for SOCK_STREAM sockets.

Errors

See IPPROTO_IP(2const). See setsockopt(2). See ip(7).

History

Linux 2.2.

From man-pages 6.19-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.