Zephyr API Documentation  3.5.0
A Scalable Open Source RTOS
3.5.0
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
socketcan.h File Reference

SocketCAN definitions. More...

#include <zephyr/types.h>
#include <zephyr/net/net_ip.h>
#include <zephyr/net/net_if.h>

Go to the source code of this file.

Data Structures

struct  sockaddr_can
 struct sockaddr_can - The sockaddr structure for CAN sockets More...
 
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 */
 

Typedefs

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
 CAN Identifier structure for Linux SocketCAN compatibility.
 

Enumerations

enum  { CAN_RAW_FILTER = 1 }
 

Detailed Description

SocketCAN definitions.

Definitions for SocketCAN support.