IP_RECVOPTS(2const) IP_RECVOPTS(2const)

IP_RECVOPTS - receive all incoming IP options in control message

Standard C library (libc-lc)

#include <netinet/in.h>  /* Definition of IP* constants */
#include <sys/socket.h>
int setsockopt(int sockfd, IPPROTO_IP, IP_RECVOPTS,
               const int *enable, sizeof(int));

Pass all incoming IP options to the user in a IP_OPTIONS(2const) control message.

The routing header and other options are already filled in for the local host.

Not supported for SOCK_STREAM sockets.

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

Linux 2.2.

IPPROTO_IP(2const), setsockopt(2), ip(7)

2025-11-25 Linux man-pages 6.17