Zephyr API Documentation  3.6.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
ethernet_api Struct Reference

Ethernet L2 API operations. More...

#include <ethernet.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(* start )(const struct device *dev)
 Collect optional ethernet specific statistics.
 
int(* stop )(const struct device *dev)
 Stop the device.
 
enum ethernet_hw_caps(* get_capabilities )(const struct device *dev)
 Get the device capabilities.
 
int(* set_config )(const struct device *dev, enum ethernet_config_type type, const struct ethernet_config *config)
 Set specific hardware configuration.
 
int(* get_config )(const struct device *dev, enum ethernet_config_type type, struct ethernet_config *config)
 Get hardware specific configuration.
 
int(* send )(const struct device *dev, struct net_pkt *pkt)
 The IP stack will call this function when a VLAN tag is enabled or disabled.
 

Detailed Description

Ethernet L2 API operations.

Field Documentation

◆ get_capabilities

enum ethernet_hw_caps(* ethernet_api::get_capabilities) (const struct device *dev)

Get the device capabilities.

◆ get_config

int(* ethernet_api::get_config) (const struct device *dev, enum ethernet_config_type type, struct ethernet_config *config)

Get hardware specific configuration.

◆ iface_api

struct net_if_api ethernet_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(* ethernet_api::send) (const struct device *dev, struct net_pkt *pkt)

The IP stack will call this function when a VLAN tag is enabled or disabled.

If enable is set to true, then the VLAN tag was added, if it is false then the tag was removed. The driver can utilize this information if needed. Return ptp_clock device that is tied to this ethernet device Send a network packet

◆ set_config

int(* ethernet_api::set_config) (const struct device *dev, enum ethernet_config_type type, const struct ethernet_config *config)

Set specific hardware configuration.

◆ start

int(* ethernet_api::start) (const struct device *dev)

Collect optional ethernet specific statistics.

This pointer should be set by driver if statistics needs to be collected for that driver. Start the device

◆ stop

int(* ethernet_api::stop) (const struct device *dev)

Stop the device.


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