.. availability:: Linux >= 4.7.
+.. data:: SCM_CREDS2
+ LOCAL_CREDS
+ LOCAL_CREDS_PERSISTENT
+
+ LOCAL_CREDS and LOCAL_CREDS_PERSISTENT can be used
+ with SOCK_DGRAM, SOCK_STREAM sockets, equivalent to
+ Linux/DragonFlyBSD SO_PASSCRED, while LOCAL_CREDS
+ sends the credentials at first read, LOCAL_CREDS_PERSISTENT
+ sends for each read, SCM_CREDS2 must be then used for
+ the latter for the message type.
+
+ .. versionadded:: 3.11
+
+ .. availability:: FreeBSD.
+
Functions
^^^^^^^^^
--- /dev/null
+Add ``LOCAL_CREDS``, ``LOCAL_CREDS_PERSISTENT`` and ``SCM_CREDS2`` FreeBSD constants to the socket module.
#ifdef SO_PROTOCOL
PyModule_AddIntMacro(m, SO_PROTOCOL);
#endif
+#ifdef LOCAL_CREDS
+ PyModule_AddIntMacro(m, LOCAL_CREDS);
+#endif
+#ifdef LOCAL_CREDS_PERSISTENT
+ PyModule_AddIntMacro(m, LOCAL_CREDS_PERSISTENT);
+#endif
/* Maximum number of connections for "listen" */
#ifdef SOMAXCONN
#ifdef SCM_CREDS
PyModule_AddIntMacro(m, SCM_CREDS);
#endif
+#ifdef SCM_CREDS2
+ PyModule_AddIntMacro(m, SCM_CREDS2);
+#endif
/* Flags for send, recv */
#ifdef MSG_OOB