Zephyr API Documentation 4.0.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
Virtual LAN definitions and helpers

VLAN definitions and helpers . More...

Macros

#define NET_VLAN_TAG_UNSPEC   0x0fff
 Unspecified VLAN tag value.
 

Functions

static uint16_t net_eth_vlan_get_vid (uint16_t tci)
 Get VLAN identifier from TCI.
 
static uint8_t net_eth_vlan_get_dei (uint16_t tci)
 Get Drop Eligible Indicator from TCI.
 
static uint8_t net_eth_vlan_get_pcp (uint16_t tci)
 Get Priority Code Point from TCI.
 
static uint16_t net_eth_vlan_set_vid (uint16_t tci, uint16_t vid)
 Set VLAN identifier to TCI.
 
static uint16_t net_eth_vlan_set_dei (uint16_t tci, bool dei)
 Set Drop Eligible Indicator to TCI.
 
static uint16_t net_eth_vlan_set_pcp (uint16_t tci, uint8_t pcp)
 Set Priority Code Point to TCI.
 

Detailed Description

VLAN definitions and helpers .

Since
1.12
Version
0.8.0

Macro Definition Documentation

◆ NET_VLAN_TAG_UNSPEC

#define NET_VLAN_TAG_UNSPEC   0x0fff

#include <zephyr/net/ethernet_vlan.h>

Unspecified VLAN tag value.

Function Documentation

◆ net_eth_vlan_get_dei()

static uint8_t net_eth_vlan_get_dei ( uint16_t tci)
inlinestatic

#include <zephyr/net/ethernet_vlan.h>

Get Drop Eligible Indicator from TCI.

Parameters
tciVLAN tag control information.
Returns
Drop eligible indicator.

◆ net_eth_vlan_get_pcp()

static uint8_t net_eth_vlan_get_pcp ( uint16_t tci)
inlinestatic

#include <zephyr/net/ethernet_vlan.h>

Get Priority Code Point from TCI.

Parameters
tciVLAN tag control information.
Returns
Priority code point.

◆ net_eth_vlan_get_vid()

static uint16_t net_eth_vlan_get_vid ( uint16_t tci)
inlinestatic

#include <zephyr/net/ethernet_vlan.h>

Get VLAN identifier from TCI.

Parameters
tciVLAN tag control information.
Returns
VLAN identifier.

◆ net_eth_vlan_set_dei()

static uint16_t net_eth_vlan_set_dei ( uint16_t tci,
bool dei )
inlinestatic

#include <zephyr/net/ethernet_vlan.h>

Set Drop Eligible Indicator to TCI.

Parameters
tciVLAN tag control information.
deiDrop eligible indicator.
Returns
New TCI value.

◆ net_eth_vlan_set_pcp()

static uint16_t net_eth_vlan_set_pcp ( uint16_t tci,
uint8_t pcp )
inlinestatic

#include <zephyr/net/ethernet_vlan.h>

Set Priority Code Point to TCI.

Parameters
tciVLAN tag control information.
pcpPriority code point.
Returns
New TCI value.

◆ net_eth_vlan_set_vid()

static uint16_t net_eth_vlan_set_vid ( uint16_t tci,
uint16_t vid )
inlinestatic

#include <zephyr/net/ethernet_vlan.h>

Set VLAN identifier to TCI.

Parameters
tciVLAN tag control information.
vidVLAN identifier.
Returns
New TCI value.