IP_RECVTOS(2const) IP_RECVTOS(2const)

IP_RECVTOS - receive IP_TOS 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_RECVTOS,
               const int *enable, sizeof(int));

If enabled, the IP_TOS(2const) ancillary message is passed with incoming packets. It contains a byte which specifies the Type of Service/Precedence field of the packet header.

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