[New-bugs-announce] [issue44077] IP_RECVTOS option is missing from socket module

Georg Sauthoff report at bugs.python.org
Sat May 8 10:57:49 EDT 2021


New submission from Georg Sauthoff <mail at georg.so>:

Currently, the socket module doesn't provide the IP_RECVTOS constant.

This constant is needed for receiving the TOS byte (or the DSCP bits) via ancillary data when calling recvmsg() or recvmsg_into().

That means it would be used in a setsockopt() call like this:

s.setsockopt(socket.IPPROTO_IP, socket.IP_RECVTOS, 1)

This socket option is available on Linux and perhaps other operating systems, as well.

See also https://manpath.be/f33/7/ip#L467

----------
components: Library (Lib)
messages: 393261
nosy: gms
priority: normal
severity: normal
status: open
title: IP_RECVTOS option is missing from socket module
type: enhancement
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44077>
_______________________________________


More information about the New-bugs-announce mailing list