]> granicus.if.org Git - python/commit
bpo-37085: Expose SocketCAN bcm_msg_head flags (GH-13646)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 31 Jul 2019 09:10:38 +0000 (02:10 -0700)
committerGitHub <noreply@github.com>
Wed, 31 Jul 2019 09:10:38 +0000 (02:10 -0700)
commitd8b914a30b0849476345a19ce0a0ab1ade171b19
tree56b9fdc45af96d67f50b4001cafca1802233d2d5
parent9b9cac4e5de975fe2417d8231822bc1d2ca2d273
bpo-37085: Expose SocketCAN bcm_msg_head flags (GH-13646)

Expose the CAN_BCM SocketCAN constants used in the bcm_msg_head struct
flags (provided by <linux/can/bcm.h>) under the socket library.

This adds the following constants with a CAN_BCM prefix:

  * SETTIMER
  * STARTTIMER
  * TX_COUNTEVT
  * TX_ANNOUNCE
  * TX_CP_CAN_ID
  * RX_FILTER_ID
  * RX_CHECK_DLC
  * RX_NO_AUTOTIMER
  * RX_ANNOUNCE_RESUME
  * TX_RESET_MULTI_IDX
  * RX_RTR_FRAME
  * CAN_FD_FRAME

The CAN_FD_FRAME flag was introduced in the 4.8 kernel, while the other
ones were present since SocketCAN drivers were mainlined in 2.6.25. As
such, it is probably unnecessary to guard against these constants being
missing.
(cherry picked from commit 31c4fd2a10d90beaa37d630e5f74a471e14e089d)

Co-authored-by: karl ding <karlding@users.noreply.github.com>
Doc/library/socket.rst
Lib/test/test_socket.py
Misc/ACKS
Misc/NEWS.d/next/Library/2019-06-18-16-29-31.bpo-37085.GeYaD6.rst [new file with mode: 0644]
Modules/socketmodule.c