Zephyr API Documentation
2.7.0-rc2
A Scalable Open Source RTOS
|
#include <virtual.h>
Data Fields | |
struct net_if_api | iface_api |
enum virtual_interface_caps(* | get_capabilities )(struct net_if *iface) |
int(* | start )(const struct device *dev) |
int(* | stop )(const struct device *dev) |
int(* | send )(struct net_if *iface, struct net_pkt *pkt) |
enum net_verdict(* | recv )(struct net_if *iface, struct net_pkt *pkt) |
enum net_verdict(* | input )(struct net_if *input_iface, struct net_if *iface, struct net_addr *remote_addr, struct net_pkt *pkt) |
int(* | attach )(struct net_if *virtual_iface, struct net_if *iface) |
int(* | set_config )(struct net_if *iface, enum virtual_interface_config_type type, const struct virtual_interface_config *config) |
int(* | get_config )(struct net_if *iface, enum virtual_interface_config_type type, struct virtual_interface_config *config) |
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::input) (struct net_if *input_iface, struct net_if *iface, struct net_addr *remote_addr, struct net_pkt *pkt) |
Check if this received network packet is for this interface. The callback returns NET_CONTINUE if this interface will accept the packet and pass it upper layers, NET_DROP if the packet is to be dropped and NET_OK to pass it to next interface.
enum net_verdict(* virtual_interface_api::recv) (struct net_if *iface, struct net_pkt *pkt) |
Receive a network packet
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