]> granicus.if.org Git - python/commitdiff
#26907: add some missing getsockopt constants.
authorR David Murray <rdmurray@bitdance.com>
Wed, 24 Aug 2016 01:12:40 +0000 (21:12 -0400)
committerR David Murray <rdmurray@bitdance.com>
Wed, 24 Aug 2016 01:12:40 +0000 (21:12 -0400)
Patch by Christian Heimes, reviewed by Martin Panter.

Doc/library/socket.rst
Doc/whatsnew/3.6.rst
Modules/socketmodule.c

index d0a3c5edab6a7384185fb7d4ed78611939d511a1..52c8f7f9126d9e26a10182f08b85a16d5680da5f 100644 (file)
@@ -281,6 +281,10 @@ Constants
    in the Unix header files are defined; for a few symbols, default values are
    provided.
 
+   .. versionchanged:: 3.6
+      ``SO_DOMAIN``, ``SO_PROTOCOL``, ``SO_PEERSEC``, ``SO_PASSSEC``
+      were added.
+
 .. data:: AF_CAN
           PF_CAN
           SOL_CAN_*
index 28f9d9f694ea3a95f1283b2b91e6cc62bd90dd5d..8b85b22da3678458354efeb78a910fb93274bedc 100644 (file)
@@ -406,6 +406,10 @@ The :func:`~socket.socket.ioctl` function now supports the :data:`~socket.SIO_LO
 control code.
 (Contributed by Daniel Stokes in :issue:`26536`.)
 
+The :meth:`~socket.socket.getsockopt` constants ``SO_DOMAIN``,
+``SO_PROTOCOL``, ``SO_PEERSEC``, and ``SO_PASSSEC`` are now supported.
+(Contributed by Christian Heimes in :issue:`26907`.)
+
 
 socketserver
 ------------
index d21509e9ebe5e62d758c36fee9f57677e3b9addd..d896cc0240e8d9d32f489a31da5335e163f5a95e 100644 (file)
@@ -6582,6 +6582,12 @@ PyInit__socket(void)
 #ifdef  LOCAL_PEERCRED
     PyModule_AddIntMacro(m, LOCAL_PEERCRED);
 #endif
+#ifdef  SO_PASSSEC
+    PyModule_AddIntMacro(m, SO_PASSSEC);
+#endif
+#ifdef  SO_PEERSEC
+    PyModule_AddIntMacro(m, SO_PEERSEC);
+#endif
 #ifdef  SO_BINDTODEVICE
     PyModule_AddIntMacro(m, SO_BINDTODEVICE);
 #endif
@@ -6591,6 +6597,12 @@ PyInit__socket(void)
 #ifdef  SO_MARK
     PyModule_AddIntMacro(m, SO_MARK);
 #endif
+#ifdef SO_DOMAIN
+    PyModule_AddIntMacro(m, SO_DOMAIN);
+#endif
+#ifdef SO_PROTOCOL
+    PyModule_AddIntMacro(m, SO_PROTOCOL);
+#endif
 
     /* Maximum number of connections for "listen" */
 #ifdef  SOMAXCONN