bpo-44077: Expose IP_RECVTOS in the socket module (GH-25992)

Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
This commit is contained in:
Georg Sauthoff 2021-06-20 22:08:07 +02:00 committed by GitHub
parent 7265b277fa
commit a317778fd5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 0 deletions

View File

@ -379,6 +379,9 @@ Constants
On Windows, ``TCP_KEEPIDLE``, ``TCP_KEEPINTVL`` appear if run-time Windows
supports.
.. versionchanged:: 3.10
``IP_RECVTOS`` was added.
.. data:: AF_CAN
PF_CAN
SOL_CAN_*

View File

@ -1219,6 +1219,9 @@ The exception :exc:`socket.timeout` is now an alias of :exc:`TimeoutError`.
Add option to create MPTCP sockets with ``IPPROTO_MPTCP``
(Contributed by Rui Cunha in :issue:`43571`.)
Add ``IP_RECVTOS`` option to receive the type of service (ToS) or DSCP/ECN fields
(Contributed by Georg Sauthoff in :issue:`44077`.)
ssl
---

View File

@ -0,0 +1,3 @@
It's now possible to receive the type of service (ToS), a.k.a. differentiated
services (DS), a.k.a. differenciated services code point (DSCP) and excplicit
congestion notification (ECN) IP header fields with ``socket.IP_RECVTOS``.

View File

@ -8024,6 +8024,9 @@ PyInit__socket(void)
#ifdef IP_RECVRETOPTS
PyModule_AddIntMacro(m, IP_RECVRETOPTS);
#endif
#ifdef IP_RECVTOS
PyModule_AddIntMacro(m, IP_RECVTOS);
#endif
#ifdef IP_RECVDSTADDR
PyModule_AddIntMacro(m, IP_RECVDSTADDR);
#endif