Zephyr API Documentation  3.7.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches

Network Interface Device structure. More...

#include <net_if.h>

Data Fields

const struct devicedev
 The actually device driver instance the net_if is related to.
 
const struct net_l2 *const l2
 Interface's L2 layer.
 
void * l2_data
 Interface's private L2 data pointer.
 
atomic_t flags [ATOMIC_BITMAP_SIZE(NET_IF_NUM_FLAGS)]
 For internal use.
 
struct net_linkaddr link_addr
 The hardware link address.
 
uint16_t mtu
 The hardware MTU.
 
enum net_if_oper_state oper_state
 RFC 2863 operational status.
 

Detailed Description

Network Interface Device structure.

Used to handle a network interface on top of a device driver instance. There can be many net_if_dev instance against the same device.

Such interface is mainly to be used by the link layer, but is also tight to a network context: it then makes the relation with a network context and the network device.

Because of the strong relationship between a device driver and such network interface, each net_if_dev should be instantiated by one of the network device init macros found in net_if.h.

Field Documentation

◆ dev

const struct device* net_if_dev::dev

The actually device driver instance the net_if is related to.

◆ flags

atomic_t net_if_dev::flags[ATOMIC_BITMAP_SIZE( NET_IF_NUM_FLAGS)]

For internal use.

◆ l2

const struct net_l2* const net_if_dev::l2

Interface's L2 layer.

◆ l2_data

void* net_if_dev::l2_data

Interface's private L2 data pointer.

◆ link_addr

struct net_linkaddr net_if_dev::link_addr

The hardware link address.

◆ mtu

uint16_t net_if_dev::mtu

The hardware MTU.

◆ oper_state

enum net_if_oper_state net_if_dev::oper_state

RFC 2863 operational status.


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