diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst index a081756..3bc89d1 100644 --- a/Doc/library/socket.rst +++ b/Doc/library/socket.rst @@ -313,6 +313,18 @@ Constants .. versionadded:: 3.5 +.. data:: CAN_RAW_JOIN:FILTERS + + Joines the applied CAN filters such that only CAN frames are passed to user + space that matches all given CAN filters. The semantic for the applied + filters is therefore changed from a logical OR to a logical AND. + + This constant is documented in the Linux documentation. + + Availability: Linux >= 4.1. + + .. versionadded:: 3.6 + .. data:: AF_RDS PF_RDS SOL_RDS diff --git a/Misc/ACKS b/Misc/ACKS index b37282e..de9f2c8 100644 --- a/Misc/ACKS +++ b/Misc/ACKS @@ -1422,6 +1422,7 @@ Geoff Talvola Musashi Tamura William Tanksley Christian Tanzer +Stefan Tatschner Steven Taschuk Amy Taylor Julian Taylor diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index bae9634..e0a0a22 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -6625,6 +6625,9 @@ PyInit__socket(void) #ifdef HAVE_LINUX_CAN_RAW_FD_FRAMES PyModule_AddIntMacro(m, CAN_RAW_FD_FRAMES); #endif +#ifdef HAVE_LINUX_CAN_RAW_JOIN_FILTERS + PyModule_AddIntMacro(m, CAN_RAW_JOIN_FILTERS); +#endif #ifdef HAVE_LINUX_CAN_BCM_H PyModule_AddIntMacro(m, CAN_BCM); PyModule_AddIntConstant(m, "CAN_BCM_TX_SETUP", TX_SETUP); diff --git a/configure.ac b/configure.ac index 1f8b9ea..da6c904 100644 --- a/configure.ac +++ b/configure.ac @@ -3060,6 +3060,16 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ /* CAN_RAW_FD_FRAMES available check */ AC_MSG_RESULT(no) ]) +AC_MSG_CHECKING(for CAN_RAW_JOIN_FILTERS) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ /* CAN_RAW_JOIN_FILTERS available check */ +#include ]], +[[int can_raw_join_filters = CAN_RAW_JOIN_FILTERS;]])],[ + AC_DEFINE(HAVE_LINUX_CAN_RAW_JOIN_FILTERS, 1, [Define if compiling using Linux 4.1 or later.]) + AC_MSG_RESULT(yes) +],[ + AC_MSG_RESULT(no) +]) + AC_MSG_CHECKING(for OSX 10.5 SDK or later) AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([[#include ]], [[FSIORefNum fRef = 0]])