This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: IP_RECVTOS option is missing from socket module
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.11
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: gms, miss-islington, pablogsal, python-dev
Priority: normal Keywords: patch

Created on 2021-05-08 14:57 by gms, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 25992 merged python-dev, 2021-05-08 15:23
PR 26815 merged miss-islington, 2021-06-20 20:08
Messages (3)
msg393261 - (view) Author: Georg Sauthoff (gms) * Date: 2021-05-08 14:57
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
msg396192 - (view) Author: Pablo Galindo Salgado (pablogsal) * (Python committer) Date: 2021-06-20 20:08
New changeset a317778fd58b1c6b250feffbdb4ecf15e293ef48 by Georg Sauthoff in branch 'main':
bpo-44077: Expose IP_RECVTOS in the socket module (GH-25992)
https://github.com/python/cpython/commit/a317778fd58b1c6b250feffbdb4ecf15e293ef48
msg396198 - (view) Author: miss-islington (miss-islington) Date: 2021-06-20 20:36
New changeset 28fe0159f59a761bf52c1999c8f7cb12d0d12562 by Miss Islington (bot) in branch '3.10':
bpo-44077: Expose IP_RECVTOS in the socket module (GH-25992)
https://github.com/python/cpython/commit/28fe0159f59a761bf52c1999c8f7cb12d0d12562
History
Date User Action Args
2022-04-11 14:59:45adminsetgithub: 88243
2021-12-06 21:41:29andrei.avksetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2021-06-20 20:36:29miss-islingtonsetmessages: + msg396198
2021-06-20 20:08:25miss-islingtonsetnosy: + miss-islington
pull_requests: + pull_request25396
2021-06-20 20:08:14pablogsalsetnosy: + pablogsal
messages: + msg396192
2021-05-08 15:23:49python-devsetkeywords: + patch
nosy: + python-dev

pull_requests: + pull_request24645
stage: patch review
2021-05-08 14:57:49gmscreate