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

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.
 

Detailed Description

Virtual L2 API operations.

Field Documentation

◆ attach

int(* virtual_interface_api::attach) (struct net_if *virtual_iface, struct net_if *iface)

Pass the attachment information to virtual interface.

◆ get_capabilities

enum virtual_interface_caps(* virtual_interface_api::get_capabilities) (struct net_if *iface)

Get the virtual interface capabilities.

◆ get_config

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.

◆ iface_api

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.

◆ recv

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

int(* virtual_interface_api::send) (struct net_if *iface, struct net_pkt *pkt)

Send a network packet.

◆ set_config

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.

◆ start

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

Start the device.

◆ stop

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

Stop the device.


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