Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
virtual_interface_api Struct Reference

#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)
 

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.

◆ input

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.

◆ recv

enum net_verdict(* virtual_interface_api::recv) (struct net_if *iface, struct net_pkt *pkt)

Receive a network packet

◆ 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: