New submission from Georg Sauthoff <m...@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue44077>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to