mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
gh-91968: Add socket constants SO_USER_COOKIE/SO_RTABLE from BSD (#91967)
Those are somewhat equivalent to Linux' SO_MARK. Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This commit is contained in:
parent
859250cc55
commit
9d85aba9e2
3 changed files with 12 additions and 0 deletions
|
@ -392,6 +392,11 @@ Constants
|
||||||
Added ``TCP_CONNECTION_INFO``. On MacOS this constant can be used in the
|
Added ``TCP_CONNECTION_INFO``. On MacOS this constant can be used in the
|
||||||
same way that ``TCP_INFO`` is used on Linux and BSD.
|
same way that ``TCP_INFO`` is used on Linux and BSD.
|
||||||
|
|
||||||
|
.. versionchanged:: 3.12
|
||||||
|
Added ``SO_RTABLE`` and ``SO_USER_COOKIE``. On OpenBSD
|
||||||
|
and FreeBSD respectively those constants can be used in the same way that
|
||||||
|
``SO_MARK`` is used on Linux.
|
||||||
|
|
||||||
.. data:: AF_CAN
|
.. data:: AF_CAN
|
||||||
PF_CAN
|
PF_CAN
|
||||||
SOL_CAN_*
|
SOL_CAN_*
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Add ``SO_RTABLE`` and ``SO_USER_COOKIE`` constants to :mod:`socket`.
|
|
@ -7595,6 +7595,12 @@ PyInit__socket(void)
|
||||||
#ifdef SO_MARK
|
#ifdef SO_MARK
|
||||||
PyModule_AddIntMacro(m, SO_MARK);
|
PyModule_AddIntMacro(m, SO_MARK);
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef SO_USER_COOKIE
|
||||||
|
PyModule_AddIntMacro(m, SO_USER_COOKIE);
|
||||||
|
#endif
|
||||||
|
#ifdef SO_RTABLE
|
||||||
|
PyModule_AddIntMacro(m, SO_RTABLE);
|
||||||
|
#endif
|
||||||
#ifdef SO_DOMAIN
|
#ifdef SO_DOMAIN
|
||||||
PyModule_AddIntMacro(m, SO_DOMAIN);
|
PyModule_AddIntMacro(m, SO_DOMAIN);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue