Zephyr API Documentation  3.7.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
virtual.h File Reference

Virtual Network Interface. More...

#include <zephyr/kernel.h>
#include <zephyr/types.h>
#include <stdbool.h>
#include <zephyr/sys/atomic.h>
#include <zephyr/net/net_ip.h>
#include <zephyr/net/net_pkt.h>
#include <zephyr/sys/util.h>
#include <zephyr/net/net_if.h>

Go to the source code of this file.

Data Structures

struct  virtual_interface_api
 Virtual L2 API operations. More...
 
struct  virtual_interface_context
 Virtual L2 context that is needed to binding to the real network interface. More...
 

Macros

#define NET_VIRTUAL_INTERFACE_INIT(dev_id, name, init_fn, pm, data, config, prio, api, mtu)
 Create a virtual network interface.
 
#define NET_VIRTUAL_INTERFACE_INIT_INSTANCE(dev_id, name, inst, init_fn, pm, data, config, prio, api, mtu)
 Create a virtual network interface.
 

Enumerations

enum  virtual_interface_caps { VIRTUAL_INTERFACE_IPIP = BIT(1) , VIRTUAL_INTERFACE_VLAN = BIT(2) }
 Virtual interface capabilities. More...
 

Functions

int net_virtual_interface_attach (struct net_if *virtual_iface, struct net_if *iface)
 Attach virtual network interface to the given network interface.
 
struct net_ifnet_virtual_get_iface (struct net_if *iface)
 Return network interface related to this virtual network interface.
 
char * net_virtual_get_name (struct net_if *iface, char *buf, size_t len)
 Return the name of the virtual network interface L2.
 
void net_virtual_set_name (struct net_if *iface, const char *name)
 Set the name of the virtual network interface L2.
 
enum net_l2_flags net_virtual_set_flags (struct net_if *iface, enum net_l2_flags flags)
 Set the L2 flags of the virtual network interface.
 
enum net_verdict net_virtual_input (struct net_if *input_iface, struct net_addr *remote_addr, struct net_pkt *pkt)
 Feed the IP pkt to stack if tunneling is enabled.
 

Detailed Description

Virtual Network Interface.