Zephyr API Documentation 4.0.0
A Scalable Open Source RTOS
|
Virtual L2 API operations. More...
#include <virtual.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. | |
enum virtual_interface_caps(* | get_capabilities )(struct net_if *iface) |
Get the virtual interface capabilities. | |
int(* | start )(const struct device *dev) |
Start the device. | |
int(* | stop )(const struct device *dev) |
Stop the device. | |
int(* | send )(struct net_if *iface, struct net_pkt *pkt) |
Send a network packet. | |
enum net_verdict(* | recv )(struct net_if *iface, struct net_pkt *pkt) |
Receive a network packet. | |
int(* | attach )(struct net_if *virtual_iface, struct net_if *iface) |
Pass the attachment information to virtual interface. | |
int(* | set_config )(struct net_if *iface, enum virtual_interface_config_type type, const struct virtual_interface_config *config) |
Set specific L2 configuration. | |
int(* | get_config )(struct net_if *iface, enum virtual_interface_config_type type, struct virtual_interface_config *config) |
Get specific L2 configuration. | |
Virtual L2 API operations.
Pass the attachment information to virtual interface.
enum virtual_interface_caps(* virtual_interface_api::get_capabilities) (struct net_if *iface) |
Get the virtual interface capabilities.
int(* virtual_interface_api::get_config) (struct net_if *iface, enum virtual_interface_config_type type, struct virtual_interface_config *config) |
Get specific L2 configuration.
struct net_if_api virtual_interface_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.
enum net_verdict(* virtual_interface_api::recv) (struct net_if *iface, struct net_pkt *pkt) |
Receive a network packet.
The callback returns NET_OK if this interface will accept the packet and pass it upper layers, NET_DROP if the packet is to be dropped and NET_CONTINUE to pass it to next interface.
Send a network packet.
int(* virtual_interface_api::set_config) (struct net_if *iface, enum virtual_interface_config_type type, const struct virtual_interface_config *config) |
Set specific L2 configuration.
int(* virtual_interface_api::start) (const struct device *dev) |
Start the device.
int(* virtual_interface_api::stop) (const struct device *dev) |
Stop the device.