bpo-31203: Expose IP_PKTINFO in the socket module

Co-Authored-By: Florian Hedtstück <fhedtstueck@posteo.de>
This commit is contained in:
Zackery Spytz 2020-05-10 17:04:39 -06:00
parent 2fbc57af85
commit 7da8ab66ee
3 changed files with 7 additions and 0 deletions

View File

@ -371,6 +371,9 @@ Constants
.. versionchanged:: 3.7
``TCP_NOTSENT_LOWAT`` was added.
.. versionchanged:: 3.9
``IP_PKTINFO`` was added.
On Windows, ``TCP_KEEPIDLE``, ``TCP_KEEPINTVL`` appear if run-time Windows
supports.

View File

@ -0,0 +1 @@
Expose :data:`socket.IP_PKTINFO` in the :mod:`socket` module.

View File

@ -8096,6 +8096,9 @@ PyInit__socket(void)
#ifdef IP_TRANSPARENT
PyModule_AddIntMacro(m, IP_TRANSPARENT);
#endif
#ifdef IP_PKTINFO
PyModule_AddIntMacro(m, IP_PKTINFO);
#endif
/* IPv6 [gs]etsockopt options, defined in RFC2553 */
#ifdef IPV6_JOIN_GROUP