Zephyr API Documentation 4.0.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
canbus_api Struct Reference

CAN L2 network driver API. More...

#include <canbus.h>

Data Fields

struct net_if_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.
 
int(* send )(const struct device *dev, struct net_pkt *pkt)
 Send a CAN packet by socket.
 
void(* close )(const struct device *dev, int filter_id)
 Close the related CAN socket.
 
int(* setsockopt )(const struct device *dev, void *obj, int level, int optname, const void *optval, socklen_t optlen)
 Set socket CAN option.
 
int(* getsockopt )(const struct device *dev, void *obj, int level, int optname, const void *optval, socklen_t *optlen)
 Get socket CAN option.
 

Detailed Description

CAN L2 network driver API.

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: