Zephyr API Documentation 4.5.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
canbus_driver_api Struct Reference

CAN L2 network driver API. More...

#include <zephyr/net/canbus.h>

Data Fields

struct net_if_driver_api iface_api
 The net_if_driver_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, net_socklen_t optlen)
 Set socket CAN option.
int(* getsockopt )(const struct device *dev, void *obj, int level, int optname, const void *optval, net_socklen_t *optlen)
 Get socket CAN option.

Detailed Description

CAN L2 network driver API.

Field Documentation

◆ close

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

Close the related CAN socket.

◆ getsockopt

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

Get socket CAN option.

◆ iface_api

struct net_if_driver_api canbus_driver_api::iface_api

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

◆ send

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

Send a CAN packet by socket.

◆ setsockopt

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

Set socket CAN option.


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