IP_RECVTOS(2const)

IP_RECVTOS2const

Receive ip_tos control message

Usage

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

Library

Standard C library (libc, -lc)

Overview

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.

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.