| 
    Zephyr Project API
    3.4.0
    
   A Scalable Open Source RTOS 
   | 
 
SocketCAN library. More...
Data Structures | |
| struct | sockaddr_can | 
| struct | socketcan_frame | 
| CAN frame for Linux SocketCAN compatibility.  More... | |
| struct | socketcan_filter | 
| CAN filter for Linux SocketCAN compatibility.  More... | |
Macros | |
| #define | CAN_RAW 1 | 
| #define | SOL_CAN_BASE 100 | 
| #define | SOL_CAN_RAW (SOL_CAN_BASE + CAN_RAW) | 
| #define | SOCKETCAN_MAX_DLEN 8U | 
| #define | CAN_MTU (sizeof(struct socketcan_frame)) | 
| #define | CANFD_BRS 0x01 /* bit rate switch (second bitrate for payload data) */ | 
| #define | CANFD_ESI 0x02 /* error state indicator of the transmitting node */ | 
| #define | CANFD_FDF 0x04 /* mark CAN FD for dual use of struct canfd_frame */ | 
Enumerations | |
| enum | { CAN_RAW_FILTER = 1 } | 
Functions | |
| static void | socketcan_to_can_frame (const struct socketcan_frame *sframe, struct can_frame *zframe) | 
| Translate a socketcan_frame struct to a can_frame struct.  More... | |
| static void | socketcan_from_can_frame (const struct can_frame *zframe, struct socketcan_frame *sframe) | 
| Translate a can_frame struct to a socketcan_frame struct.  More... | |
| static void | socketcan_to_can_filter (const struct socketcan_filter *sfilter, struct can_filter *zfilter) | 
| Translate a socketcan_filter struct to a can_filter struct.  More... | |
| static void | socketcan_from_can_filter (const struct can_filter *zfilter, struct socketcan_filter *sfilter) | 
| Translate a can_filter struct to a socketcan_filter struct.  More... | |
Linux SocketCAN compatibility | |
The following structures and functions provide compatibility with the CAN frame and CAN filter formats used by Linux SocketCAN.  | |
| typedef uint32_t | socketcan_id_t | 
SocketCAN library.
SocketCAN utilities.
| #define CAN_MTU (sizeof(struct socketcan_frame)) | 
#include <include/zephyr/net/socketcan.h>
| #define CAN_RAW 1 | 
#include <include/zephyr/net/socketcan.h>
| #define CANFD_BRS 0x01 /* bit rate switch (second bitrate for payload data) */ | 
#include <include/zephyr/net/socketcan.h>
| #define CANFD_ESI 0x02 /* error state indicator of the transmitting node */ | 
#include <include/zephyr/net/socketcan.h>
| #define CANFD_FDF 0x04 /* mark CAN FD for dual use of struct canfd_frame */ | 
#include <include/zephyr/net/socketcan.h>
| #define SOCKETCAN_MAX_DLEN 8U | 
#include <include/zephyr/net/socketcan.h>
| #define SOL_CAN_BASE 100 | 
#include <include/zephyr/net/socketcan.h>
| #define SOL_CAN_RAW (SOL_CAN_BASE + CAN_RAW) | 
#include <include/zephyr/net/socketcan.h>
| typedef uint32_t socketcan_id_t | 
#include <include/zephyr/net/socketcan.h>
CAN Identifier structure for Linux SocketCAN compatibility.
The fields in this type are:
| anonymous enum | 
#include <include/zephyr/net/socketcan.h>
| Enumerator | |
|---|---|
| CAN_RAW_FILTER | |
      
  | 
  inlinestatic | 
#include <include/zephyr/net/socketcan_utils.h>
Translate a can_filter struct to a socketcan_filter struct.
| zfilter | Pointer to can_filter struct. | 
| sfilter | Pointer to socketcan_filter struct. | 
      
  | 
  inlinestatic | 
#include <include/zephyr/net/socketcan_utils.h>
Translate a can_frame struct to a socketcan_frame struct.
| zframe | Pointer to can_frame struct. | 
| sframe | Pointer to socketcan_frame struct. | 
      
  | 
  inlinestatic | 
#include <include/zephyr/net/socketcan_utils.h>
Translate a socketcan_filter struct to a can_filter struct.
| sfilter | Pointer to socketcan_filter struct. | 
| zfilter | Pointer to can_filter struct. | 
      
  | 
  inlinestatic | 
#include <include/zephyr/net/socketcan_utils.h>
Translate a socketcan_frame struct to a can_frame struct.
| sframe | Pointer to sockecan_frame struct. | 
| zframe | Pointer to can_frame struct. |