Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
canbus_api Struct Reference

#include <socket_can.h>

Data Fields

struct net_if_api iface_api
 
int(* send )(const struct device *dev, struct net_pkt *pkt)
 
void(* close )(const struct device *dev, int filter_id)
 
int(* setsockopt )(const struct device *dev, void *obj, int level, int optname, const void *optval, socklen_t optlen)
 
int(* getsockopt )(const struct device *dev, void *obj, int level, int optname, const void *optval, socklen_t *optlen)
 

Detailed Description

CAN L2 driver API. Used by socket CAN.

Field Documentation

◆ close

void(* canbus_api::close) (const struct device *dev, int filter_id)

Close the related CAN socket

◆ getsockopt

int(* canbus_api::getsockopt) (const struct device *dev, void *obj, int level, int optname, const void *optval, socklen_t *optlen)

Get socket CAN option

◆ iface_api

struct net_if_api canbus_api::iface_api

The net_if_api must be placed in first position in this struct so that we are compatible with network interface API.

◆ send

int(* canbus_api::send) (const struct device *dev, struct net_pkt *pkt)

Send a CAN packet by socket

◆ setsockopt

int(* canbus_api::setsockopt) (const struct device *dev, void *obj, int level, int optname, const void *optval, socklen_t optlen)

Set socket CAN option


The documentation for this struct was generated from the following file: